Skip to content

Instantly share code, notes, and snippets.

View mono0926's full-sized avatar
🐶
( ´・‿・`)

mono — Masayuki Ono mono0926

🐶
( ´・‿・`)
View GitHub Profile
@mono0926
mono0926 / git_commands.markdown
Last active December 19, 2015 13:49
git commands

show commit rank

git shortlog -ns 

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
@mono0926
mono0926 / mantle.m
Last active December 19, 2015 17:38
mantle snippet
+(NSDictionary *)JSONKeyPathsByPropertyKey {
// マッピングしたいものだけ指定。全て名前が一緒なら空のままでOK。
return @{@"hogeFuga", @"hoge_fuga"};
}
+(NSValueTransformer*)chaptersJSONTransformer {
return [NSValueTransformer mtl_JSONArrayTransformerWithModelClass:UIChapter.class];
}
@mono0926
mono0926 / neue_white.js
Last active December 19, 2015 17:38
http://neue.cc/ を浄化します( ´・‿・`)
javascript:$('body').css('background', 'white');$('*').not('.csharp >span').css('color', 'black');
@mono0926
mono0926 / to_json.m
Last active December 19, 2015 17:39
MantleでobjectをJSON化
MTLJSONAdapter *adapter = [[MTLJSONAdapter alloc] initWithModel:self.book];
NSDictionary*jsonDict = adapter.JSONDictionary;
NSData* jsonData = [NSJSONSerialization dataWithJSONObject:jsonDict options:0 error:nil];
NSString* jsonString = [[NSString alloc] initWithBytes:[jsonData bytes] length:[jsonData length] encoding:NSUTF8StringEncoding];
@mono0926
mono0926 / git.sh
Last active December 20, 2015 14:48
transfer git
git clone --mirror <SOURCE_REPOSITORY_URL>
cd <REPOSITORY>
git push --mirror <DESTINATION_REPOSITORY_URL>
@mono0926
mono0926 / clear_unnecessary_branches.sh
Created August 5, 2013 22:11
clear_unnecessary_branches
git branch -r --merged | grep -o "feature\/.*" | while read BRANCH; do git push origin :${BRANCH}; done; unset BRANCH;
@mono0926
mono0926 / daily_report
Created August 11, 2013 04:33
daily_report
echo "$(PROJECT=$(url=$(git config remote.origin.url) && url=${url#*github.com?} && echo ${url%.git}) && echo "hash | title" && echo "-----|------" && git log --since='12 hours ago' --author=$(git config user.email) --pretty="format:[%h](https://github.com/$PROJECT/commit/%h) | %s" | perl -nle "\$_ =~ s|#(\\d+)|[#\\1](https://github.com/${PROJECT}/pull/\\1)|g; print \$_")" | pbcopy

GitHub Flow

31 Aug 2011

git-flowの問題点 (Issues with git-flow)

私は人々にGitを教えるためにあちこちを飛び回っているが、最近のほぼすべてのクラスやワークショップで git-flow についてどう思うかを尋ねられた。私はいつも、git-flowは素晴らしいと思うと答えている。何百万ものワークフローを持ったシステム(Git)を提供し、ドキュメントもあるし、よくテストされている。フレキシブルなワークフローは、実に容易なやり方で多くの開発者の役に立つ。標準的なものになりつつあり、開発者はプロジェクトや企業の間を移動しつつこの標準的なワークフローに馴染むことができる。

<!-- copy this to YOUR_THEME.tmTheme-->
<dict>
<key>name</key>
<string>diff: deleted</string>
<key>scope</key>
<string>markup.deleted</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#EAE3CA</string>