This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c691e1b19a5e46d63eeaa37a455b6e74de9890ee | |
d6b02c6055b6bd4253ced4b0ad91070481032c76 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" | |
} | |
# }}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# link() @ https://gist.github.com/np/3181899#file-link-sh {{{ | |
# Dependencies: | |
# error() @ https://gist.github.com/np/3736727#file-error-sh | |
# Examples: | |
# cd ~/configs | |
# link .zshrc ~/.zshrc | |
# link .vimrc ~/.vimrc | |
link(){ | |
local dst="$1" | |
local ldst="$1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
error(){ | |
echo "$@" >>/dev/stderr | |
exit 1 | |
} | |
GIT_TRASH_FILE=.git/trash.idx | |
remotes=(origin) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
# Current bashisms are: | |
# a=(foo bar baz) | |
# ${foo[@]} | |
# $(bar) | |
# local | |
# (( bar )) | |
# for i; do; ...; done is not a bashism, right? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# vim: ft=sh | |
########################################################################### | |
# Copyright (c) 2011, Nicolas Pouillard | |
# All rights reserved. | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are | |
# met: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Yi.Char.Unicode (greek, symbols, subscripts, superscripts, checkAmbs, disamb) where | |
import Data.List (isPrefixOf) | |
import Control.Applicative | |
greek :: [(String, String)] | |
greek = [(name, unicode) | (_,name,unicode) <- greekData] ++ | |
[ ([leading,shorthand],unicode) | |
| (Just shorthand,_,unicode) <- greekData | |
, leading <- ['\'', 'g'] ] |