mirror of
https://github.com/kirsle/kirsle.net
synced 2024-12-22 15:09:29 +00:00
Various tweaks
This commit is contained in:
parent
e76267822d
commit
f17efbe218
|
@ -38,8 +38,8 @@
|
|||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-10 order-12">
|
||||
<div class="k-content-panel">
|
||||
<div class="order-1 order-md-12 col-12 col-md-10">
|
||||
<div class="k-content-panel mb-4">
|
||||
{{ if .SetupNeeded }}
|
||||
<div class="alert alert-success">
|
||||
Your web blog needs to be set up!
|
||||
|
@ -76,7 +76,7 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-2 order-1">
|
||||
<div class="order-12 order-md-1 col-12 col-md-2">
|
||||
<div class="k-navpanel" id="navbar">
|
||||
<div class="k-section">Kirsle</div>
|
||||
<ul>
|
||||
|
|
|
@ -4,24 +4,16 @@
|
|||
<h1>About Me</h1>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-2">
|
||||
<div class="col-2 markdown">
|
||||
<img src="/static/photos/ff7ec4f5.jpg" class="img-responsive portrait" alt="Kirsle"><p>
|
||||
|
||||
<img src="/static/icons/aim.gif" width="16" height="15" alt="AIM">
|
||||
<strong>AIM: </strong>
|
||||
<a href="aim:goim?ScreenName=Kirsle">Kirsle</a><br>
|
||||
|
||||
<img src="/static/icons/xmpp.gif" width="16" height="16" alt="XMPP">
|
||||
<strong>XMPP:</strong>
|
||||
kirsle@kirsle.net<p>
|
||||
|
||||
¤ <a href="/contact">Send me an e-mail</a>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-10">
|
||||
<div class="col-10">
|
||||
<h2>Hello world!</h2>
|
||||
|
||||
My name is <strong>Noah</strong> and this is my website. I am a 29-year-old software
|
||||
My name is <strong>Noah</strong> and this is my website. I am a 30-year-old software
|
||||
engineer who lives in Los Angeles. My areas of expertise are primarily in Perl and
|
||||
Python back-end software development, however I believe I have a knack for the front
|
||||
end as well.<p>
|
||||
|
|
|
@ -3,38 +3,8 @@
|
|||
|
||||
<h1>Contact Me</h1>
|
||||
|
||||
You can use the form below to send me an e-mail. Alternatively you can contact
|
||||
me on an instant messenger
|
||||
(<a href="https://otr.cypherpunks.ca/">Off-the-Record</a> optional):<p>
|
||||
|
||||
<blockquote>
|
||||
<table class="table" style="width: auto" border="0" cellspacing="4" cellpadding="4">
|
||||
<tr>
|
||||
<td>
|
||||
<img src="/static/icons/aim.gif" width="16" height="15" alt="AIM">
|
||||
</td>
|
||||
<td>
|
||||
<strong>AIM:</strong>
|
||||
</td>
|
||||
<td>
|
||||
<a href="aim:goim?ScreenName=Kirsle">Kirsle</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<img src="/static/icons/xmpp.gif" width="16" height="16" alt="XMPP">
|
||||
</td>
|
||||
<td>
|
||||
<strong>XMPP:</strong>
|
||||
</td>
|
||||
<td>
|
||||
noah@kirsle.net
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</blockquote>
|
||||
|
||||
Things that you <strong>SHOULD NOT</strong> use this form for:
|
||||
You can use the form below to send me an e-mail. Things that you
|
||||
<strong>SHOULD NOT</strong> use this form for:
|
||||
|
||||
<ul>
|
||||
<li>Any SEO business solicitations.</li>
|
||||
|
|
|
@ -77,9 +77,6 @@ the <code>audio</code> group.
|
|||
You'll need to do this <em>before</em> starting the VNC server. If you've already
|
||||
started one, shut it down and restart it.
|
||||
|
||||
{{ include_page("comment.partial_index",
|
||||
thread="article-raspberrypi",
|
||||
subject="Raspberry Pi",
|
||||
) | safe }}
|
||||
{{ RenderComments "Raspberry Pi" "raspberrypi" }}
|
||||
|
||||
{{ end }}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
This page contains some of my better 3D renderings. Most of these images were
|
||||
modeled more or less in AutoCAD 2006 and rendered in 3DS Max 8.<p>
|
||||
|
||||
<table border="0" cellspacing="10" cellpadding="0">
|
||||
<table border="0" cellspacing="10" cellpadding="10">
|
||||
<tr>
|
||||
<td align="center" valign="top">
|
||||
<a href="/creativity/rendered/kawar.jpg">
|
||||
|
|
73
www/wiki/Future-Project-Ideas.md
Normal file
73
www/wiki/Future-Project-Ideas.md
Normal file
|
@ -0,0 +1,73 @@
|
|||
# Future Project Ideas
|
||||
|
||||
## Hybrid WebSocket/TCP Socket Library (Go)
|
||||
|
||||
*2017-12-19*
|
||||
|
||||
This would be a Go library for writing custom TCP services, like Go [net](https://golang.org/pkg/net/), but which also transparently handles WebSocket HTTP requests. This way your custom protocol can be used easily by custom clients as well as by WebSocket clients.
|
||||
|
||||
It would only require that your protocol waits for the client to speak first after connecting. This way, if the first line by the client is an HTTP request, the TCP server can parse the rest of the headers and send back an HTTP response, either to upgrade the connection to a WebSocket or to give a static HTML response (like an error page).
|
||||
|
||||
Out-of-box the HTTP support would send *all* WebSocket requests (regardless of URI) to the TCP server and all other HTTP requests to a static error page. Customization options would include replacing the static error page with a custom one, inserting a standard HTTP multiplexer (router) for more custom routes, or requiring the WebSocket request be at a specific URI.
|
||||
|
||||
## Stream Slicer (Go)
|
||||
|
||||
*2017-12-20*
|
||||
|
||||
This would be a Go library that can accept a stream object (for example, a file handle) that implements `io.ReadSeeker` and returns a "slice" of that stream, with a limited range.
|
||||
|
||||
An example use case could be implementing a file archiving algorithm, where the data for an individual file is at a certain offset of the archive and has a certain length. You could get a "slice" of the archive for _just_ that file, and `.Read()` it until EOF, without worrying about the implementation details.
|
||||
|
||||
API example:
|
||||
|
||||
```go
|
||||
// Get a filehandle stream
|
||||
fh, _ := os.Open("/path/to/file.bin")
|
||||
|
||||
// Slice out a part of it from 512 bytes in and
|
||||
// a length of 1024 bytes.
|
||||
slice := streamslice.New(fh, 512, 1024)
|
||||
|
||||
result := make([]byte, 1024)
|
||||
slice.Read(result)
|
||||
```
|
||||
|
||||
Implementation notes:
|
||||
|
||||
```go
|
||||
// The struct + method surface could be like...
|
||||
type StreamSlice struct {
|
||||
source io.ReadSeeker // the larger / original filehandle
|
||||
start int // offset from `source` to be treated as position zero
|
||||
index int // current position in the 'slice' starting from zero
|
||||
stop int // the `start` + the offset to limit the slice
|
||||
|
||||
// StreamSlice also implements io.ReadSeeker
|
||||
Read(p []byte) (n int, err error)
|
||||
Seek(offset int64, whence int) (int64, error)
|
||||
}
|
||||
|
||||
func New(fh io.ReadSeeker, offset int64, length int64) *StreamSlice {
|
||||
return &StreamSlice{
|
||||
source: fh,
|
||||
start: offset,
|
||||
index: 0,
|
||||
stop: offset + length,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *StreamSlice) Read(p []byte) (n int, err error) {
|
||||
// something along the lines of... seek to the current index,
|
||||
// read until we reach `stop` or run out of space in `p`,
|
||||
// whichever comes first. TBD.
|
||||
s.source.Seek(s.offset + s.index, io.SeekStart)
|
||||
// ...
|
||||
return
|
||||
}
|
||||
```
|
||||
|
||||
The struct would keep private references to the original stream, the absolute position of said stream where your slice begins, the _relative_ position of the slice itself, and the length. When calling `Read()`, it would `index++` until it reaches the `stop` and then return EOF.
|
||||
|
||||
When the user calls `Seek(0, io.SeekStart)` to rewind the slice, calling `Read()` would again return bytes starting from the beginning of the slice.
|
||||
|
||||
This could be a fun demonstration of working with Go's type system to create a useful interface for *any* kind of `io.ReadSeeker`, not just file-like objects.
|
|
@ -60,8 +60,8 @@ $ rpmbuild -ba python-rivescript.spec
|
|||
1. Build distributable files: `grunt dist`
|
||||
2. Remove cruft: `rm -rf node_modules`
|
||||
3. Go up a directory to create zip/tar files
|
||||
* zip -r rivescript-js-1.1.2.zip rivescript-js -x '*.git*'
|
||||
* tar -czvf rivescript-js-1.1.2.tar.gz rivescript-js --exclude .git
|
||||
* `zip -r rivescript-js-1.1.2.zip rivescript-js -x '*.git*'`
|
||||
* `tar -czvf rivescript-js-1.1.2.tar.gz rivescript-js --exclude .git`
|
||||
|
||||
See also: [npm developers](https://docs.npmjs.com/misc/developers)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user