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 | |
# For simplicity's sake I dump this file in the project folder and execute | |
# it from the VM straight out of /vagrant -> could run as part of box/basebox buildout. | |
alias apt-get="sudo apt-get" | |
alias mount="sudo mount" | |
alias umount="sudo umount" | |
# Oh. Start by making .vbox_version contain the desired version string. | |
VBOX_VERSION=$(cat /home/vagrant/.vbox_version) |
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 python | |
# Update some incrementing counter to give feedback about progress | |
import time | |
import sys | |
try: | |
for i in range(101): | |
print i, | |
sys.stdout.flush() | |
time.sleep(0.01) |
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 | |
set -e | |
if [ ! -w "$1" ] ; then | |
echo "Usage: $0 [sqlite.db]" | |
exit 1 | |
fi | |
sqlite3 -echo -bail $1 << __EOF | |
BEGIN TRANSACTION; |
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
[color] | |
branch = auto | |
status = auto | |
diff = auto | |
[alias] | |
svn-clone-head = "!f() { git svn clone -`svn log -q --limit 1 $1 | awk '/^r/{print $1}'` $1 $2; }; f" | |
ll = log --branches --oneline --graph --decorate -n10 | |
aa = add --all | |
ca = commit --verbose --all | |
s = status |
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
var Ti = {Platform:{osname:"android"}}; | |
var theme = { | |
fontFamily: { | |
iphone : 'Helvetica Neue', | |
android : 'Droid Sans' }[Ti.Platform.osname] | |
}; | |
document.body.appendChild(document.createTextNode(theme.fontFamily)); |
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
msgid "" | |
msgstr "" | |
"Project-Id-Version: OSSK (Open Source Software in Khmer)\n" | |
"POT-Creation-Date: \n" | |
"PO-Revision-Date: 2006-03-09 10:17+0900\n" | |
"Last-Translator: Chay Sengtha <[email protected]>\n" | |
"Language-Team: OSSK <[email protected]>\n" | |
"MIME-Version: 1.0\n" | |
"Content-Type: text/plain; charset=utf-8\n" | |
"Content-Transfer-Encoding: 8bit\n" |
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
var FooPrototype = { | |
methodA: function methodA() {}, | |
methodB: function methodB() {}, | |
methodC: function methodC() {} | |
}; | |
exports.createFoo = function() { | |
return Object.create(FooPrototype); | |
}; |
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> | |
// Use LiveReload on iOS / Safari Mobile, in case your build tool middleware does not inject a tag already. | |
// Ref: http://feedback.livereload.com/knowledgebase/articles/86232-how-do-i-use-livereload-on-iphone-ipad-android-etc | |
// This variant of the script does away with having to hardcode the hostname (and protocol): | |
$(document).ready(function(){ | |
$.getScript('//'+location.hostname+':35729/livereload.js'); | |
}); | |
</script> | |
<!-- </body> --> |
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 | |
dig +short myip.opendns.com @resolver1.opendns.com |
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 | |
function retry() | |
{ | |
local n=0 | |
local try=$1 | |
local cmd="${@: 2}" | |
[[ $# -le 1 ]] && { | |
echo "Usage $0 <retry_number> <Command>"; } |