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.
| 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 |
| #!/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 |
| type Person struct { | |
| Name string | |
| } | |
| func (person Person) Talk(out io.Writer) { | |
| fmt.Fprintf("Hello, I am %s", person.Name) | |
| } |
| package tmp | |
| import "net" | |
| type ServerA struct { | |
| Clients map[string]net.Conn | |
| } | |
| func (srv *ServerA) Accept(conn net.Conn) error { | |
| key := conn.RemoteAddr().String() |
| 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 main | |
| import "sync" | |
| type ptrId uint | |
| type ptrProxy struct { | |
| sync.Mutex | |
| count uint | |
| lookup map[ptrId]interface{} |
| " 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() |
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.
| package main | |
| import ( | |
| "fmt" | |
| "strings" | |
| ) | |
| // MultiError implements the Error interface, can be checked as nil just like normal errors. | |
| func MultiError() multiError { | |
| var err multiError = nil |
| // The MIT License (MIT) | |
| // Copyright (c) 2016 David Evans @phosphoer | |
| // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| // The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR |