Skip to content

Instantly share code, notes, and snippets.

C:\cygwin64\home\Mateusz\.opam\system\bin>set PATH=%PATH%;c:\cygwin64\home\Mateusz\.opam\system\lib\stublibs
C:\cygwin64\home\Mateusz\.opam\system\bin>utop
────────────────────────────┬──────────────────────────────────────────────────────────────┬────────────────────────────
│ Welcome to utop version 1.19.3 (using OCaml version 4.02.3)! │
└──────────────────────────────────────────────────────────────┘
Type #utop_help for help about using utop.
@akavel
akavel / bootstrap.sh
Last active June 8, 2016 00:05 — forked from anonymous/gist:23d6abf21bc8f8aa6e6fcb1703348fbc
Bootstrap declarative home dir in Nix
nix-env -i -f https://github.com/akavel/multigit/archive/3.6.1-nix.tar.gz
@akavel
akavel / usage.txt
Created May 2, 2016 13:14
vendo --help
$ vendo --help
Usage:
vendo [command]
Available Commands:
check [TODO][NIY] for use as a git pre-commit hook
recreate clone third-party packages from GOPATH to _vendor/ subdirectory
update update a third-party repo in _vendor/ from the Internet (like `go get -u`)
help Help about any command
@akavel
akavel / luvit-bootstrap.bat
Created February 25, 2016 20:27
luvit bootstrap/build script
@echo off
:: This file (bootstrap.bat) is a helper for building "luvit.exe" and "lit.exe"
:: with pre-built "luvi.exe".
:: We require luvi.exe.
:: TODO: find out a way to auto-download it on "bare" Windows?
if not exist luvi.exe (
echo error: luvi.exe missing!
echo Please download luvi-*.exe from https://github.com/luvit/luvi/releases, then copy it here and rename to "luvi.exe".
@akavel
akavel / gist:4acd7e163774f337b84a
Last active November 27, 2015 14:23
rsrc WIP
C:\prog\gopath\src\github.com\akavel\rsrc\tmp-amd64>go version
go version go1.5.1 windows/amd64
C:\prog\gopath\src\github.com\akavel\rsrc\tmp-amd64>gcc --version
gcc.exe (GCC) 4.7.0 20111220 (experimental)
Copyright (C) 2011 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
C:\prog\gopath\src\github.com\akavel\rsrc\tmp-amd64>git clone https://github.com/jhowardmsft/sql1.5.1
@akavel
akavel / gist:ae3eae104d050208c01e
Created February 12, 2015 01:27
AkavelListGoImports.vim
function! SystemFirstLine(cmd)
" Drop CR from CR-LF sequences on Windows OS
return split(system(a:cmd), "\n")[0]
endfunction
function! AkavelListGoImports()
" Note: http://stackoverflow.com/a/6146663/98528
" and :help feature-list
if has('win32') || has('win64') || has('win16') || has('win32unix')
let pathsep = ';'
@akavel
akavel / build
Created May 21, 2014 18:26 — forked from elimisteve/build
#!/bin/bash
# This is a simple build script and will be executed on your CI system if
# available. Otherwise it will execute while your application is stopped
# before the deploy step. This script gets executed directly, so it
# could be python, php, ruby, etc.
tarball="https://go.googlecode.com/files/go1.0.3.linux-amd64.tar.gz"
# Set GOROOT since we don't use GOROOT_FINAL
mkdir -p $OPENSHIFT_HOMEDIR/app-root/data/go
@akavel
akavel / ast2xml.py
Created May 16, 2014 18:30
Python AST to XML (Python recipe). Converts Python ASTs to XML files for reading in other languages. http://code.activestate.com/recipes/578625-python-ast-to-xml/ Created by Ryan Gonzalez on Wed, 7 Aug 2013 (MIT) meta:license=mit
import ast, re, sys
from xml.dom import minidom
try:
from xml.etree import cElementTree as etree
except:
try:
from lxml import etree
except:
from xml.etree import ElementTree as etree
@akavel
akavel / piper.go
Created May 7, 2014 11:12
piping experiment for Go, by egon
// https://groups.google.com/d/msg/golang-nuts/LqDtKSpo5YY/bd5Z5xbNIVgJ
// by egon
package main
import (
"fmt"
"reflect"
)
--[[ This script automatically saves the global environment periodically
and restores it when this script is run. Recommended usage is with
the standalone Lua interpreter like this:
lua -i autosave.lua
It was coded for and tested with Eris (https://github.com/fnuecke/eris).