I hereby claim:
- I am celadevra on github.
- I am celadevra (https://keybase.io/celadevra) on keybase.
- I have a public key whose fingerprint is 59AF 62A1 DB82 4222 6D6C A071 022E A0C4 F99C 109A
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
;; switch to english input method when switching to normal mode | |
;; and switch back when entering insert/replace modes | |
;; need external script support, currently mac-only | |
(defvar default-im "com.apple.keylayout.Dvorak" "Default ascii-only input method") | |
(defvar prev-im (substring (shell-command-to-string "~/bin/im-select") 0 -1) | |
"IM that I use when starting Emacs and exiting insert mode") | |
(defun im-use-dvorak () | |
"Switch to Dvorak input method on a Mac. im-select is a tool | |
provided at http://git.io/ndA8Mw" |
#!/usr/bin/env ruby | |
everything = "" | |
chars, charcodes = "" | |
File.open("main.md", "r") do |file| | |
while line = file.gets | |
everything << line | |
end | |
chinese_only = everything.gsub(/[\*()%:<>\-\/#\.\+\{\}!\[\]\s\w]+/, '') | |
chinese_array = chinese_only.scan(/./) |
class String | |
def green; "\033[32m#{self}\033[0m" end | |
end | |
elements = ["he", "li", "be", "ne", "na", "mg", \ | |
"al", "si", "cl", "ar", "ca", "sc", "ti",\ | |
"cr", "mn", "fe", "co", "ni", "cu", "zn",\ | |
"ga", "ge", "as", "se", "br", "kr", "rb",\ | |
"sr", "zr", "nb", "mo", "tc", "ru", "rh",\ | |
"pd", "ag", "cd", "in", "sn", "sb", "te",\ |
(defun org-install-series-time-stamp (a b) | |
"For inserting a morning diary using org's template system. | |
At the function call, it calls org-insert-time-stamp to | |
insert a series of active time stamps, one line each. The | |
function is called with 2 parameters: a hour of the | |
work day and the b, in the form of int N and M. | |
i.e. (org-install-series-time-stamp 9 18)" | |
() | |
(cond ((< b a) (org-install-series-time-stamp b a)) |
require 'formula' | |
class Mutt < Formula | |
homepage 'http://www.mutt.org/' | |
url 'ftp://ftp.mutt.org/mutt/devel/mutt-1.5.21.tar.gz' | |
sha1 'a8475f2618ce5d5d33bff85c0affdf21ab1d76b9' | |
option "with-debug", "Build with debug option enabled" | |
option "with-sidebar-patch", "Apply sidebar (folder list) patch" | |
option "with-trash-patch", "Apply trash folder patch" |
diff -uNr mutt-1.5.21.orig/PATCHES mutt-1.5.21/PATCHES | |
--- mutt-1.5.21.orig/PATCHES 2008-03-20 04:07:06.000000000 +0800 | |
+++ mutt-1.5.21/PATCHES 2013-05-28 14:12:57.000000000 +0800 | |
@@ -0,0 +1 @@ | |
+patch-1.5.21.tt.create_rfc2047_params.1 | |
diff -uNr mutt-1.5.21.orig/init.h mutt-1.5.21/init.h | |
--- mutt-1.5.21.orig/init.h 2010-09-15 23:39:31.000000000 +0800 | |
+++ mutt-1.5.21/init.h 2013-05-28 10:50:19.000000000 +0800 | |
@@ -419,6 +419,18 @@ | |
** characters as question marks which can lead to undesired |
/* HTML5 Boilerplate */ | |
article, aside, details, figcaption, figure, footer, header, hgroup, nav, section { display: block; } | |
audio, canvas, video { display: inline-block; *display: inline; *zoom: 1; } | |
audio:not([controls]) { display: none; } | |
[hidden] { display: none; } | |
html { font-size: 100%; -webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; } | |
html, button, input, select, textarea { font-family: sans-serif; color: #222; } | |
body { margin: 0; font-size: 1em; line-height: 1.4; } |
Values are expressions that cannot be further simplified. Thus all values are expressions, but expressions are not always values.
One very powerful feature of functional language is that the contents of a binding cannot be changed. You may shadow a variable but the original variable name in the original environment will always point to the original expression. This is called immutability.
As SML uses pattern-matching to process arguments passed to the function in the form of tuples, it is not necessary to write types for each member of the tuple.
# If you use chnroutes.py generated ip-up to add to route table addresses | |
# that don't route through VPN, you may encounter error saying | |
# "bad address:\n $yourgateway" where $yourgateway is the gate way for | |
# non-VPN addresses. This is because the \n is not accepted by OS X's route | |
# command. Just remove the \n with another sed command: | |
OLDGW=`netstat -nr | grep '^default' | grep -v 'ppp' | sed 's/default *\([0-9\.]*\) .*/\1/' | sed '/^$/d'` |