Skip to content

Instantly share code, notes, and snippets.

View np's full-sized avatar

Nicolas Pouillard np

View GitHub Profile
@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")
@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 / 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:

# 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 / ensure_link.sh
Last active August 29, 2015 13:57
ensure_link.sh
{-
import Data.Product
module depsession2 (open Data.Product) (let _² = λ A → A × A) (x : Set ²) where
y = _×_
-}
module depsession2 where
open import Type hiding (★)
open import Level.NP
open import Function.NP
#!/bin/bash
# Walk-through (without changing the configuration):
# $ mkdir ~/.agda-pkg
# $ cd ~/.agda-pkg
# $ mkdir github patchtag
# $ darcs get --lazy http://www.cse.chalmers.se/~nad/repos/lib/ stdlib
# $ mkdir github/crypto-agda
# $ cd github/crypto-agda
# $ git clone https://github.com/crypto-agda/agda-nplib
@np
np / asking.sh
Last active December 14, 2015 15:28
A shell function to ask the user to answer a Yes/No question.
# asking() @ https://gist.github.com/np/5107721#file-asking-sh {{{
# Dependencies:
# error() @ https://gist.github.com/np/3736727#file-error-sh
# Options:
# --default=no Makes No being the default (--default=yes is the default)
# --no-slmenu Do no use slmenu even if available
# Examples:
# asking 'Something failed, do you still want to continue?'
# asking --default=yes 'Next step?'
asking(){
@np
np / error.sh
Last active October 10, 2015 19:07
Simple 'error' function in shell
# error() @ https://gist.github.com/np/3736727#file-error-sh {{{
# Takes an exit code and a message, prints the message and then exits
error(){
local code="$1"
shift
echo "error: $@" >>/dev/stderr
exit "$code"
}
# }}}
@np
np / link.sh
Last active October 7, 2015 14:48
link