Skip to content

Instantly share code, notes, and snippets.

View np's full-sized avatar

Nicolas Pouillard np

View GitHub Profile
@np
np / namecoin-update.rb
Last active October 4, 2015 19:28 — forked from comboy/update.rb
update all your namecoin domains
#!/usr/bin/ruby
require 'json'
JSON.load(`namecoind name_list`).each do |domain|
if domain['expires_in'] < 5000
command = "namecoind name_update '#{domain['name']}' '#{domain['value']}'"
puts command
puts `#{command}`
end
end
@np
np / link.sh
Last active October 7, 2015 14:48
link
@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 / 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(){
#!/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
{-
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
@np
np / ensure_link.sh
Last active August 29, 2015 13:57
ensure_link.sh
# notbit GIT version
# Contributor: [email protected]
_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