First make a fifo
$ export fifopath=$PWD/chat.fifo
$ mkfifo "$fifopath"Then start reading from the fifo and looking for the ^G ding escape code.
First make a fifo
$ export fifopath=$PWD/chat.fifo
$ mkfifo "$fifopath"Then start reading from the fifo and looking for the ^G ding escape code.
| " Find the nearest Makefile and run it | |
| function! MakeUp() | |
| let makefile = findfile("Makefile", ".;") | |
| if makefile != "" | |
| silent exe "NeomakeSh make -C " . fnamemodify(makefile, ':p:h') | |
| endif | |
| endfunction | |
| autocmd BufWritePost *.scss call MakeUp() |
| package main | |
| import "sync" | |
| type ptrId uint | |
| type ptrProxy struct { | |
| sync.Mutex | |
| count uint | |
| lookup map[ptrId]interface{} |
| all: scss | |
| CSS_OUT = ../static/css/screen.css | |
| SCSS_LIBS = ./lib/ | |
| $(CSS_OUT): **.scss $(SCSS_LIBS) | |
| sassc --style nested $(addprefix -I ,$(SCSS_LIBS)) screen.scss $(CSS_OUT) | |
| scss: $(CSS_OUT) |
| package tmp | |
| import "net" | |
| type ServerA struct { | |
| Clients map[string]net.Conn | |
| } | |
| func (srv *ServerA) Accept(conn net.Conn) error { | |
| key := conn.RemoteAddr().String() |
| type Person struct { | |
| Name string | |
| } | |
| func (person Person) Talk(out io.Writer) { | |
| fmt.Fprintf("Hello, I am %s", person.Name) | |
| } |
| #!/usr/bin/bash | |
| # Convert *.gif into *.mp4, skip if already exists. | |
| outdir="." | |
| for path in *.gif; do | |
| out="${outdir}/${path/.gif/}.mp4" | |
| [[ -f "$out" ]] && continue | |
| ffmpeg -f gif -i "${path}" "${out}" | |
| done |
| class Secp256k1 < Formula | |
| desc "Optimized C library for EC operations on curve secp256k1" | |
| homepage "https://github.com/bitcoin/secp256k1" | |
| url "https://github.com/bitcoin/secp256k1.git" | |
| depends_on "autoconf" => :build | |
| depends_on "automake" => :build | |
| depends_on "libtool" => :build | |
| def install |
Notes have been moved here: https://github.com/shazow/learning-opengl
Old versions of the notes that were here are still available as revisions of this gist. Previous revision: https://gist.github.com/shazow/d869952642fe081466fa/70d92e7aac66be8ce9217b06d45fc6441af7b06c
| // This is getting out of hand, probably a bad idea. | |
| func (c *Client) searchBuffer(command string) (message *irc.Message, err error) { | |
| buffer := make(chan *irc.Message, cap(c.buffer)) | |
| Fill: | |
| for { | |
| select { | |
| case message = <-c.buffer: | |
| if message.Command == command { |