Skip to content

Instantly share code, notes, and snippets.

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

mono — Masayuki Ono mono0926

🐶
( ´・‿・`)
View GitHub Profile
typedef NS_ENUM (<#enumeration type#>, <#enumeration name#>) {
<#enumerator1#> = <#value1#>,
};
@mono0926
mono0926 / .gitignore
Last active December 19, 2015 10:39 — forked from adamgit/.gitignore
gitignore for ios_cocoapods
#########################
# .gitignore file for Xcode4 / OS X Source projects
#
# Version 2.0
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
# 2013 updates:
# - fixed the broken "save personal Schemes"
#
# NB: if you are storing "built" products, this WILL NOT WORK,
@mono0926
mono0926 / git_commands.markdown
Last active December 19, 2015 13:49
git commands

show commit rank

git shortlog -ns 
@mono0926
mono0926 / .gitignore
Created July 10, 2013 10:44
gitignore for C#
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
[Oo]bj/
# mstest test results
TestResults
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

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;