Skip to content

Instantly share code, notes, and snippets.

View taotetek's full-sized avatar
💭
Left for Gitlab. Microsoft still contracts with ICE.

taotetek taotetek

💭
Left for Gitlab. Microsoft still contracts with ICE.
View GitHub Profile
type Config struct {
Directories []string
Files []string
}
func NewConfig(path string) (*Config, error) {
c := new(Config)
cFile, err := ioutil.ReadFile(path)
if err != nil {
return nil, err
@taotetek
taotetek / vimrc
Created June 25, 2014 13:45
vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'git://github.com/scrooloose/nerdtree'
Plugin 'git://github.com/Valloric/YouCompleteMe'
@taotetek
taotetek / gopher_example.go
Created June 28, 2014 20:45
gopher_example.go
func TestGopherDirToJSON(t *testing.T) {
gd, err := NewGopherDir("gopher://gopher.quux.org:70")
if err != nil {
t.Fatal(err)
}
jsonBytes, err := gd.ToJSON()
if err != nil {
t.Fatal(err)
}
fmt.Print(string(jsonBytes))
@taotetek
taotetek / vimrc
Created July 11, 2014 17:39
vimrc
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'git://github.com/scrooloose/nerdtree'
Plugin 'git://github.com/Valloric/YouCompleteMe'
@taotetek
taotetek / gist:1040cbd15aed56d88057
Created August 16, 2014 11:37
$status = zmq_setsockopt( $socket, $option, $value )
se ZMQ::LibZMQ3;
use ZMQ::Constants qw/:all/;
my $ctxt = zmq_init;
my $socket = zmq_socket( $ctxt, ZMQ_SUB);
$status = zmq_setsockopt( $socket, ZMQ_SUBSCRIBE, "" )
zmq_connect( $socket, "tcp://127.0.0.1:9999" );
<html>
<head></head>
<body>
<form action="http://localhost:8080/">
<input type="text" name="whatever"></br>
<input type="submit" value="Submit">
</form>
</body>
</html>
24 Aug 10:39:39 - [nodemon] starting `node index.js`
-
/home/bknox/git/revisit.link.hub/node_modules/meatspace-publico/node_modules/level-ttl/node_modules/level-spaces/node_modules/level-updown/level-updown.js:33
if (db.levelup.isOpen())
^
TypeError: Object #<EventEmitter> has no method 'isOpen'
at new LevelUPDOWNIterator (/home/bknox/git/revisit.link.hub/node_modules/meatspace-publico/node_modules/level-ttl/node_modules/level-spaces/node_modules/level-updown/level-updown.js:33:18)
at Object.iteratorFactory [as factory] (/home/bknox/git/revisit.link.hub/node_modules/meatspace-publico/node_modules/level-ttl/node_modules/level-spaces/node_modules/level-updown/level-updown.js:236:20)
at Object.wrappedFactory [as factory] (/home/bknox/git/revisit.link.hub/node_modules/meatspace-publico/node_modules/level-ttl/node_modules/level-spaces/level-spaces.js:124:26)
at LevelUPDOWN._iterator (/home/bknox/git/revisit.link.hub/node_modules/meatspace-publico/node_modules/level-ttl/node_modul

Keybase proof

I hereby claim:

  • I am taotetek on github.
  • I am taotetek (https://keybase.io/taotetek) on keybase.
  • I have a public key whose fingerprint is 5F9E 5FE0 792E 2199 B1B4 7832 12FC D2AF F804 0432

To claim this, I am signing this object:

# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabeled in the BIOS configuration.
# Set swedish keymap
if foo {
return bar
}
return baz