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
[alias] | |
submodule-ignore-on = submodule -q foreach 'git config --file $toplevel/.gitmodules submodule.$name.ignore "all"' | |
submodule-ignore-off = submodule -q foreach 'git config --file $toplevel/.gitmodules --unset submodule.$name.ignore' |
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
#include "objc_id.hpp" | |
int main(int argc, const char * argv[]) | |
{ | |
@autoreleasepool { | |
NSString *s1 = @"hello"; | |
NSString *s2 = [@"hell" stringByAppendingString: @"o"]; | |
if ((objc_id(s1) == objc_id(s2))) { | |
NSLog(@"win"); |
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/python | |
#coding: utf-8 | |
def _test_a(*args, **kvargs): | |
if args: | |
_test_function(*args) | |
else if kvargs: | |
_test_function(**kvargs) |
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 config --global alias.last-commit '!sh -c "git log -1 --pretty=tformat:\"%H\" --author=\"`git config user.name`\" $*"' - | |
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
# Filename : Image2Map.py | |
# Authors : Georg Muntingh and Bjorn Lindeijer | |
# Version : 1.2 | |
# Date : June 16, 2010 | |
# Copyright : Public Domain | |
import os, sys, Image, networkx | |
class TileMap: | |
""" This class represents a map of tiles. |
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 config --global alias.clone-fork '!sh -c "[ $# = 3 ] && git clone $1 $3 && cd $3 && git remote add upstream $2 && git fetch upstream && git checkout -b upstream_master --track upstream/master && git co @{-1} && exit 0 || echo \"usage: git clone-fork <fork-repository> <upstream-repository> <directory>\" >&2 && exit 1 "' - |
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
e() | |
{ | |
echo $1 | grep -E $2 | grep -E '(^M\s|^D\s|^R\s)' | cut -c 3-; | |
} | |
f() | |
{ | |
git st --porcelain | while read line | |
do | |
file=$(e "$line" $1) |
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
require 'colorize' | |
module Text | |
class Table | |
class Cell | |
def initialize(options = {}) #:nodoc: | |
@value = options[:value].to_s | |
@row = options[:row] | |
@align = options[:align ] || :left | |
@colspan = options[:colspan] || 1 |
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
[alias] | |
ci = commit | |
st = status | |
co = checkout | |
lg = !"git lg1" | |
graph = !"git lg" | |
lg1 = !sh -c \"git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' $*\" | |
lg2 = !sh -c \"git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' $*\" | |
lg3 = !sh -c \"git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)' $*\" |
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
import hudson.model.* | |
parameter_name = "DEVELOPER_DIR" | |
allItems = Hudson.instance.items | |
allItems.each { job -> | |
prop = job.getProperty(ParametersDefinitionProperty.class) | |
if(prop != null) { | |
allDefinitions = prop.getParameterDefinitions() | |
filteredDefinitions = allDefinitions.findAll {definition -> definition.name != parameter_name} |
OlderNewer