Skip to content

Instantly share code, notes, and snippets.

View avsm's full-sized 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 / gist:166645
Created August 12, 2009 18:03 — forked from jaked/gist:166609
(* defines the Ast.binding for a function of form:
let fun_name ?(opt_arg1) ?(opt_arg2) final_ident = function_body ...
*)
let function_with_label_args _loc ~fun_name ~final_ident ~function_body ~return_type opt_args =
let opt_args = opt_args @ [ <:patt< $lid:final_ident$ >> ] in
<:binding< $lid:fun_name$ =
$List.fold_right (fun b a ->
<:expr<fun $b$ -> $a$ >>
) opt_args <:expr< ( $function_body$ : $return_type$ ) >>
$ >>

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 / opam install
Last active August 29, 2015 14:11 — forked from anonymous/foo
Reproduced failure with debugging for https://github.com/mirage/mirage-skeleton/issues/59
00:00.000 046309 46309 locking /home/avsm/.opam/lock
00:00.000 046309 FILE(config) Read ~/.opam/config in 0.000s
00:00.000 046309 SYSTEM unlocking /home/avsm/.opam/lock (46309)
00:00.000 046309 SYSTEM rm /home/avsm/.opam/lock
00:00.000 046309 STATE LOAD-STATE(switch-lock)
00:00.000 046309 FILE(config) Read ~/.opam/config in 0.000s
00:00.013 046309 STATE Loaded /home/avsm/.opam/state.cache in 0.011s
00:00.013 046309 FILE(aliases) Read ~/.opam/aliases in 0.000s
00:00.018 046309 FILE(repo-config) Read ~/.opam/repo/default/config in 0.000s
00:00.058 046309 FILE(repo-index) Read ~/.opam/repo/package-index in 0.021s
#!/bin/sh
sudo add-apt-repository 'deb http://llvm.org/apt/precise/ llvm-toolchain-precise-3.9 main'
curl -L http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-get update
sudo apt-get -y install llvm-3.9-dev