Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
never gonna git u up, never gona git u down, never gonna turn around and reset u

Anil Madhavapeddy avsm

💭
never gonna git u up, never gona git u down, never gonna turn around and reset u
View GitHub Profile
@avsm
avsm / source-install-libsodium.sh
Last active Aug 29, 2015
install libsodium from source
View source-install-libsodium.sh
#!/bin/sh -ex
V=0.7.1
curl -OL https://download.libsodium.org/libsodium/releases/libsodium-${V}.tar.gz
tar -zxvf libsodium-${V}.tar.gz
cd libsodium-${V}
./configure
make
sudo make install
@avsm
avsm / setup-iocaml-macos.sh
Last active Aug 29, 2015
OCaml iocaml on MacOS X 10.9 howto
View setup-iocaml-macos.sh
#!/bin/sh
# Various things to get OCaml/IPython working on MacOS X
# get the right version of zmq
brew tap homebrew/versions
brew install zeromq32
brew link zeromq32
# install ipython
pip install ipython
@avsm
avsm / .ocamlinit
Created Mar 30, 2014
default ocamlinit for realworldocaml
View .ocamlinit
#use "topfind";;
#thread;;
#camlp4o;;
#require "core.top";;
#require "core.syntax";;
View install-aacplus.sh
#!/bin/sh -ex
V=2.0.2
curl -OL http://tipok.org.ua/downloads/media/aacplus/libaacplus/libaacplus-${V}.tar.gz
tar -zxvf libaacplus-${V}.tar.gz
cd libaacplus-${V}
sudo apt-get install autotools-dev automake autoconf
./autogen.sh
make
sudo make install
@avsm
avsm / may19th-sched.md
Last active Aug 29, 2015
Scheduling for next week
View may19th-sched.md

Several visitors are arriving at the Computer Lab during the week of 19th May, as well as an OCaml Labs group meeting, so planning the agendas here. Talks are in bold.

Monday 19th May 2014

  • 1700: Andy Ray and Martyn Riley arriving from Edinburgh.
  • 1730: Flying Pig (Rolf, JonC, Andy, Martyn, Anil, ++)
  • midnight: all OCaml 2014 speaking submissions to go in.

Tuesday 20th May 2014

View source-install-nanomsg.sh
#!/bin/sh -ex
V=0.3-beta
curl -OL http://download.nanomsg.org/nanomsg-${V}.tar.gz
tar -zxvf nanomsg-${V}.tar.gz
cd nanomsg-${V}
./configure
make
sudo make install
View solver-error-8771-1.cudf
#internal OPAM solver
preamble:
property: installed-root: bool = [false], reinstall: bool = [false], buildessential: bool = [false], essential: bool = [false], sourceversion: int = [1], sourcenumber: string = [""], source: string = [""], number: string, recommends: vpkgformula = [true!]
package: oasis2opam
version: 43
depends: ocamlfind , oasis-mirage >= 38 | oasis < 52 , oasis-mirage >= 38 | oasis >= 38 , oasis
conflicts: oasis2opam
number: 0.3.4
source: oasis2opam
@avsm
avsm / oclwebsite-postproc.sh
Created Jun 19, 2014
postproc script for ocl website
View oclwebsite-postproc.sh
#!/bin/sh -e
rm -rf pkg
~/src/git/avsm/opam2web/src/_build/opam2web.native --where='tag:org:mirage' --where='tag:org:ocamllabs' --prefix="/projects/ocamllabs/"
cd pkg
rm -f index-*.html
tail -n +2 index.html |sed '$d' > index-b.html
rm -f index.html
# generate subdirs
View gist:09fd0f3944fecd8a8ee3

Building RPMs using OpenSUSE's Open Build Service in n easy steps

  • Get yourself an account on OBS, and create your home project
  • Get the CLI and build tool
$ apt-add-repository "deb http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_14.04/ /"                                             
$ curl http://download.opensuse.org/repositories/openSUSE:/Tools/xUbuntu_14.04/Release.key | sudo apt-key add -                                   
$ apt-get update
$ apt-get install -y osc build                                                                                                                    
@avsm
avsm / test.ml
Created Oct 9, 2014
Example of Lwt thread-local storage values
View test.ml
(* Build with:
ocamlbuild -use-ocamlfind -pkg lwt.unix -tag annot test.native
*)
let id_key = Lwt.new_key ()
let log fmt =
let tid =
match Lwt.get id_key with
| None -> "<unknown>"