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
package com.foo.bar.utils; | |
import android.os.Handler; | |
import android.os.Looper; | |
import com.squareup.otto.Bus; | |
import com.squareup.otto.ThreadEnforcer; | |
/** |
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
# GIT aliases and syntax highlights | |
alias gs='git status' | |
alias gl='git log' | |
alias gb='git branch' | |
alias gbb='git branch -al' | |
alias gc='git commit -am' | |
alias ga='git add' | |
alias gaa='git add -A' | |
alias gco='git checkout' | |
alias gfa='git fetch --all' |
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
<?php | |
// Where the files will be added from | |
$path = './'; | |
$archiveName = 'test.zip'; | |
$zip = new ZipArchive; | |
$res = $zip->open( $archiveName, ZipArchive::CREATE ); | |
if ( $res !== TRUE ) { |
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 | |
# Very basic open script that either opens a path specified, | |
# or opens your current directory, in Windows Explorer, also | |
# accounting for path translation (via cygpath) | |
# | |
# Usage: | |
# $ open # Opens current directory | |
# $ open /my/unix/path # Opens a given path | |
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 | |
# Note: this only works in 256bit color terminal | |
# http://upload.wikimedia.org/wikipedia/en/1/15/Xterm_256color_chart.svg | |
rs="\e[0m" | |
dc="\e[38;5;227m" | |
cc="\e[38;5;051m" | |
git for-each-ref --sort=-committerdate refs/heads --format="%(committerdate:short) %(refname:short)" | \ |
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 | |
count=10 | |
filter='*.*' | |
if [ ! -z "$1" ]; then | |
if [ "$1" == "--help" ]; then | |
echo "USAGE $0 [count] [filter (e.g. *.java)]" | |
exit 0 | |
fi |
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 Person = function( name ) { | |
this.name = name; | |
}; | |
Person.prototype.hello = function() { | |
console.log( this.name + ' says hello!' ); | |
}; | |
Person.prototype.walk = function( distance ) { |
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 | |
echo | |
show_usage() { | |
cat << EOF | |
Rename a set of branches, effectively DELETING old | |
branches and creating new ones based on the old ones. | |
USAGE |
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 lua | |
print("") | |
local showUsage = function() | |
print([[ | |
Rename a set of branches, effectively DELETING old | |
branches and creating new ones based on the old ones. | |
USAGE |
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
<?php | |
// Config (change these if you want) | |
define( 'DISABLE_TIME_LIMIT', true ); | |
define( 'DISABLE_OUTPUT_BUFFERING', true ); | |
define( 'CUSTOM_ERROR_HANDLING', false ); | |
define( 'DB_HOST', 'localhost' ); | |
define( 'DB_PORT', 3306 ); | |
define( 'DB_USER', 'root' ); | |
define( 'DB_PASS', '' ); |
OlderNewer