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
(* 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 |
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 | |
perr(){ | |
echo "$@" > /dev/stderr | |
} | |
usage(){ | |
perr "Usage: cat <email> | email-reminder <at(1)-arguments>*" | |
perr "$@" | |
exit 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
#!/bin/bash | |
MSGID=$(grep 'Message-Id' | head -n 1 | sed 's/Message-Id: /:/') | |
hsgtd add "$@" "$MSGID" |
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/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 |
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/env ruby | |
# LICENSE: Public Domain | |
require 'rubygems' | |
gem 'json' | |
require 'json' | |
puts JSON.pretty_generate(JSON.load(STDIN.read)) |
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 | |
# Copyright (c) 2010, 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: | |
# | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. |
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'] ] |
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
#!/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 | |
set -e | |
error(){ | |
echo "$@" >>/dev/stderr | |
exit 1 | |
} | |
GIT_TRASH_FILE=.git/trash.idx | |
remotes=(origin) |
OlderNewer