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
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' |
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 | |
sudo /usr/libexec/locate.updatedb |
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
[user] | |
name = name | |
email = name@example.com | |
[alias] | |
st = status | |
ci = commit | |
ls = list | |
co = checkout | |
[color] | |
ui = true |
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
/** change UIBarButtonItem background color */ | |
for (UIView *sv in [self subviews]) { | |
if ([sv respondsToSelector:@selector(setTintColor:)]) { | |
[sv performSelector:@selector(setTintColor:) withObject:[UIColor grayColor]]; | |
} | |
} |
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
javascript:(function(){var%20url,title;if(location.host==="getpocket.com"){title=document.getElementsByTagName('h1')[0].textContent;url=document.getElementsByClassName('original')[0].childNodes[0].href;if(!title||!url)return;}else{title=document.title;url=location.href;}%20window.open('http://b.hatena.ne.jp/add?mode=confirm&is_bm=1&title='+escape(title)+'&url='+escape(url),'_blank','width=520,height=500,resizable=1,scrollbars=1');})() |
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
// vim: set ts=4 sts=4 sw=4 et nosi noai ft=objc : | |
// usage: | |
// $ clang -g -framework Foundation -o test test.m | |
#import <Foundation/Foundation.h> | |
int main(int argc, char *argv[]) | |
{ | |
@autoreleasepool { | |
NSURL *url = [NSURL URLWithString:@"https://user:pass@www.google.com/foo/bar/baz.ext?q=query#hash"]; | |
NSLog(@"%@", url); |
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 | |
# vim set: ts=2 sts=2 sw=2 et : | |
# | |
# install phpunit dependencies as git submodule. | |
# | |
# usage: | |
# clone phpunit and run. | |
# $ git clone git://github.com/sebastianbergmann/phpunit.git && cd phpunit | |
which git > /dev/null 2>&1 |
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
javascript:(function(){var%20embeds,iframes,links,ids,url;function%20getVideoId(nodes)%20{var%20i,j,match,attr,list=[],regex=[/http:\/\/([a-z]+\.)?youtube\.com\/v\/([-\w]+)/,/http:\/\/([a-z]+\.)?youtube\.com\/watch\?v=([-\w]+)/,/http:\/\/youtu\.be\/([-\w]+)/];loop:for(i=0;i<nodes.length;++i){if(nodes[i].src){attr=nodes[i].src;}else%20if(nodes[i].href){attr=nodes[i].href;}else{continue;}%20for(j=0;j<regex.length;++j){match=attr.match(regex[j]);if(match){list.push(match.pop());continue%20loop;}}}%20return%20list;}%20function%20unique(arr)%20{var%20i,uniq=[],d={};for(i=0;i<arr.length;++i){if(d[arr[i]]){continue;}%20uniq.push(arr[i]);d[arr[i]]=1;}%20return%20uniq;}%20embeds=getVideoId(document.getElementsByTagName('embed'));iframes=getVideoId(document.getElementsByTagName('iframe'));links=getVideoId(document.getElementsByTagName('a'));ids=unique(embeds.concat(iframes,links));if(!ids.length)return;url='http://youtube.com/v/'+ids.shift()+'?hd=1&autoplay=1&version=3&playlist='+ids.join(',');window.open(url,'YoutubeE |
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 | |
# vim: set sw=2 ts=2 sts=2 et : | |
# | |
# build script for GHUnitIOS.framework | |
# | |
SRC_DIR=/gh-unit | |
PROJ_DIR=/Project-iOS | |
# check gh-unit directory |
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
cat .gitmodules | awk '{print $3}' | grep '^.\+$' | sed 'N;s/\n/ /' | awk '{print "git submodule add " $2 " " $1}' | sh |
OlderNewer