Skip to content

Instantly share code, notes, and snippets.

View np's full-sized avatar

Nicolas Pouillard np

View GitHub Profile
@np
np / ensure_link.sh
Last active August 29, 2015 13:57
ensure_link.sh
# notbit GIT version
# Contributor: alphazo@gmail.com
_gitname=notbit
pkgname=notbit-git
pkgver=r339.e7bd67e
pkgrel=1
pkgdesc="A minimal Bitmessage client"
arch=('i686' 'x86_64')
depends=('openssl')
@np
np / keybase.md
Created August 27, 2014 19:20
Proving my github identity on keybase.io

Keybase proof

I hereby claim:

  • I am np on github.
  • I am np (https://keybase.io/np) on keybase.
  • I have a public key whose fingerprint is 326B FF50 7855 62A4 AC88 55CF 8826 FA56 57EF 6CA0

To claim this, I am signing this object:

@np
np / gist:2e48ef7d8ce09eabf3fb
Created August 28, 2014 15:19
onename verification
Verifying that +npouillard is my Bitcoin username. You can send me #bitcoin here: https://onename.io/npouillard
@np
np / .emacs
Created May 11, 2015 19:44
.emacs for agda (crypto-agda include dirs)
(setq np-home (concat (getenv "HOME") "/"))
(setq agda-pkg (concat np-home ".agda-pkg/"))
(eval-after-load 'agda2
'(progn
(set-default 'agda2-include-dirs
(list
(concat agda-pkg "github/agda/agda-stdlib/src")
(concat agda-pkg "github/crypto-agda/agda-nplib/lib")
(concat agda-pkg "github/crypto-agda/explore/lib")
(concat agda-pkg "github/crypto-agda/protocols")
Verifying I am +np on my passcard. https://onename.com/np
@np
np / gist:167685
Created August 14, 2009 07:11 — forked from avsm/gist:166441
(* defines the Ast.binding for a function of form:
let fun_name ?(opt_arg1) ?(opt_arg2) final_ident = function_body ...
XXX: figure out the quotation magic for this, if such exists
*)
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
let rec fn _loc = function
|hd::tl -> <:expr< function $hd$ -> $fn _loc tl$ >>
|[] -> <:expr< ( $function_body$ : $return_type$ ) >>
in
@np
np / email-reminder
Created October 1, 2009 19:49
email-reminder
#!/bin/bash -e
perr(){
echo "$@" > /dev/stderr
}
usage(){
perr "Usage: cat <email> | email-reminder <at(1)-arguments>*"
perr "$@"
exit 1
@np
np / gist:202950
Created October 6, 2009 11:59 — forked from kowey/gist:202581
#!/bin/bash
MSGID=$(grep 'Message-Id' | head -n 1 | sed 's/Message-Id: /:/')
hsgtd add "$@" "$MSGID"
#!/bin/sh
# LICENSE: Public Domain
ioreg -w0 -c AppleSmartBattery -r | # Getting the info
tail -n +2 | # Skipping the prelude
sed -e 's/" *=/": /g' | # Record field syntax
sed -e 's/\(": .*\)$/\1,/' | # Add commas
ruby -e 'puts STDIN.read.gsub(/,\s*\}/, "}")' | # Removing last extra comma
sed -e 's/Yes/true/g' | # Yes->true
sed -e 's/No/false/g' | # No->false
sed -e 's/(\(.*,.*\))/[\1]/' | # CellVoltage field