(Several of these git examples have been extracted from the book 'Pragmatic guide to GIT' of Travis Swicegood )
git config --global user.name "Fernando Guillen"
git config --global user.email "fguillen.mail+spam@gmail.com"
cd /develop/myrepo
把以下的東西存成bookmark 然後在填答表格那頁點下去 然後Magic!! | |
javascript:y=document.forms['frm1'].elements;for(var j=1;j<=28;j++){a=y['ans'+j];if(a){var c=a.length;if(c==undefined){a.checked=(a.value=='3')}for(var i=0;i<c;i++){a[i].checked=false;if(a[i].value=='3'){a[i].checked=true}}}} |
#define ApplicationDelegate ((AppDelegate *)[[UIApplication sharedApplication] delegate]) | |
#define UserDefaults [NSUserDefaults standardUserDefaults] | |
#define NotificationCenter [NSNotificationCenter defaultCenter] | |
#define SharedApplication [UIApplication sharedApplication] | |
#define Bundle [NSBundle mainBundle] | |
#define MainScreen [UIScreen mainScreen] | |
#define ShowNetworkActivityIndicator() [UIApplication sharedApplication].networkActivityIndicatorVisible = YES | |
#define HideNetworkActivityIndicator() [UIApplication sharedApplication].networkActivityIndicatorVisible = NO | |
#define NetworkActivityIndicatorVisible(x) [UIApplication sharedApplication].networkActivityIndicatorVisible = x | |
#define NavBar self.navigationController.navigationBar |
# Usage: pr (pull request current branch into develop) | |
# Usage 2: pr stable (pull request current branch into stable) | |
function pr() { | |
base=$1; | |
if [ "$1" == "" ]; then | |
base="develop" | |
fi | |
hub pull-request -b team:"$base" -h team:`git rev-parse --abbrev-ref HEAD`; | |
} |
# A handy j() function, printing some useful info in bash cmdline | |
j() { | |
printf '\n\e[0;35m%(%Y/%m/%d (%a) %H:%M:%S)T\e[0m ' -1 | |
printf '\n\e[0;33m%s@%s\e[0m ' "$USER" "${HOSTNAME/.*/}" | |
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then | |
local GIT_CLEAN= | |
local GIT_REF=$(git rev-parse --abbrev-ref HEAD 2>/dev/null) | |
git diff-index --quiet HEAD && GIT_CLEAN=1 |
#!/bin/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=1.8 |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
pf's note (too old)