This file contains hidden or 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 demo = function (num, callback) { | |
var counter = 0; | |
var checkTasksComplete = function() { | |
counter++; | |
if (counter === num) { | |
callback(); | |
} | |
}; | |
// Closure: create a new function with console.log(string) |
This file contains hidden or 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
<!-- | |
Try to change radio's view | |
Using <input> CSS style 'appearance' | |
But How to display the words in input label? | |
Reference: | |
http://css-tricks.com/almanac/properties/a/appearance/ | |
--> | |
<!doctype html> | |
<html> |
This file contains hidden or 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
# enables color in the terminal bash shell | |
export CLICOLOR=1 | |
# sets up the color scheme for list | |
export LSCOLORS=ExFxCxDxBxegedabagacad | |
# enables color for iTerm | |
export TERM=xterm-color | |
export TERM="xterm-color" |
This file contains hidden or 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#define test_bool(var) _test_bool(var, #var) | |
void _test_bool(bool var, const char * var_name) { | |
printf("%s => %d\n", var_name, var); | |
printf("true ? %s\n", true == var ? "YES" : "NO"); | |
printf("false ? %s\n\n", false == var ? "YES" : "NO"); | |
} |
This file contains hidden or 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 | |
hg_remote=$1 | |
project_path=$2 | |
function usage() { | |
echo " Usage: ./hggit-clone.sh <mercurial repository remote url> <project path>" | |
echo "Example: ./hggit-clone.sh https://bitbucket.org/oojah/mosquitto mosquitto" | |
} | |
# check hg_remote |
This file contains hidden or 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
git config --global color.ui true | |
git config --global core.editor vim | |
git config --global core.quotepath false | |
# git alias | |
git config --global alias.br branch | |
git config --global alias.co checkout | |
git config --global alias.cp cherry-pick | |
git config --global alias.st stash | |
git config --global alias.sub submodule |
This file contains hidden or 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
# http://source.android.com/source/downloading.html | |
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/repo | |
chmod a+x ~/repo | |
sudo mv ~/repo /usr/bin/ |
This file contains hidden or 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
git tag -d <tag_name> | |
git push origin :refs/tags/<tag_name> |
This file contains hidden or 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 byteArrayToString(arr) { | |
var s = ""; | |
arr.forEach(function(i) { | |
s += String.fromCharCode(i); | |
}); | |
return s; | |
} |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<colorTheme id="11666" name="XCode - Dusk - Actual" modified="2012-10-31 16:08:07" author="mechatronic"> | |
<searchResultIndication color="#616161" /> | |
<filteredSearchResultIndication color="#616161" /> | |
<occurrenceIndication color="#616161" /> | |
<writeOccurrenceIndication color="#616161" /> | |
<findScope color="#E0E2E4" /> | |
<deletionIndication color="#E0E2E4" italic="true" /> | |
<sourceHoverBackground color="#000000" /> | |
<singleLineComment color="#41B644" /> |
OlderNewer