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
function levenshtein(s1, s2) { | |
// http://kevin.vanzonneveld.net | |
// + original by: Carlos R. L. Rodrigues (http://www.jsfromhell.com) | |
// + bugfixed by: Onno Marsman | |
// + revised by: Andrea Giammarchi (http://webreflection.blogspot.com) | |
// + reimplemented by: Brett Zamir (http://brett-zamir.me) | |
// + reimplemented by: Alexander M Beedie | |
// * example 1: levenshtein('Kevin van Zonneveld', 'Kevin van Sommeveld'); | |
// * returns 1: 3 |
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
# ip number | |
regexp=\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3} | |
colours=bold yellow | |
====== | |
# list header | |
regexp=(PORT|STATE|SERVICE|REASON|VERSION) | |
colours=bold white | |
====== | |
# open | |
regexp=open |
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
{ "localhost:3000/index.jade": 4963044 } |
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
Show hidden characters
{ | |
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"] | |
} |
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
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> |
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 | |
# How to Merge Folders on a Mac | |
# (copied from http://the.taoofmac.com/space/HOWTO/Merge%20Folders) | |
# The standard UNIX way | |
cp -R -v source/. destination | |
# The geeky UNIX way (restartable) | |
rsync -vaEW source/ destination | |
# The OSX "easy" way |
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
# zimbra should be administered using the zimbra user account | |
sudo su - zimbra | |
#re-run zimbra setup | |
/opt/zimbra/libexec/zmsetup.pl | |
# service status | |
zmcontrol status | |
# start services |
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
<SCRIPT LANGUAGE="JavaScript"> | |
<!-- | |
// F. Permadi 2005. | |
// (C) F. Permadi | |
// Print DOM tree | |
//////////////////////////////////////////// | |
// This function traverses the DOM tree of an element and prints the tree. | |
// This function called recursively until the DOM tree is fully traversed. | |
// | |
// Parameters: |
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
.highlight .hll { background-color: #ffffcc } | |
.highlight { background: #f8f8f8; } | |
.highlight .c { color: #008800; font-style: italic } /* Comment */ | |
.highlight .err { border: 1px solid #FF0000 } /* Error */ | |
.highlight .k { color: #AA22FF; font-weight: bold } /* Keyword */ | |
.highlight .o { color: #666666 } /* Operator */ | |
.highlight .cm { color: #008800; font-style: italic } /* Comment.Multiline */ | |
.highlight .cp { color: #008800 } /* Comment.Preproc */ | |
.highlight .c1 { color: #008800; font-style: italic } /* Comment.Single */ | |
.highlight .cs { color: #008800; font-weight: bold } /* Comment.Special */ |
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
# virtualenv | |
VIRTUAL_ENV_DISABLE_PROMPT="true" | |
function virtualenv_info { | |
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' | |
} | |
function vcprompt_info { | |
vcprompt --format-git "on ± %{$fg[magenta]%}%b%{$reset_color%}%{$fg[green]%}%u%m%a%{$reset_color%}" \ | |
--format-hg "on ☿ %{$fg[magenta]%}%b%{$reset_color%}%{$fg[green]%}%u%m%{$reset_color%}" \ | |
--format "on %s %{$fg[magenta]%}%b%{$reset_color%}%{$fg[green]%}%u%m%{$reset_color%}" |