Skip to content

Instantly share code, notes, and snippets.

[core]
excludesfile = /Users/matthew/.gitignore_global
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
@charlesmchen
charlesmchen / .bashrc
Created October 14, 2013 15:00
My .bashrc
PATH=~/bin:$PATH
export PATH="/usr/local/bin:$PATH"
alias edit=mate
source ~/bin/git-completion.bash
alias pc='./Utilities/precommit.py'
alias pcw='./Utilities/precommit.py --working'
WeView *weView = [[WeView alloc] init];
[[[[[[weView addSubviewsWithHorizontalLayout:@[
[[DemoFactory createLabel:@"Welcome" fontSize:16.f] setCellVAlign:V_ALIGN_CENTER],
[[DemoFactory createLabel:@"To" fontSize:24.f] setCellVAlign:V_ALIGN_CENTER],
[[DemoFactory createLabel:@"WeView" fontSize:32.f] setCellVAlign:V_ALIGN_CENTER],
]]
setVMargin:10]
setHMargin:20]
setSpacing:5]
setHAlign:H_ALIGN_RIGHT]
WeView *weView = [[WeView alloc] init];
[[[[[[weView addSubviewsWithHorizontalLayout:@[
[DemoFactory createLabel:@"Welcome" fontSize:16.f],
[DemoFactory createLabel:@"To" fontSize:24.f],
[DemoFactory createLabel:@"WeView" fontSize:32.f],
]]
setVMargin:10]
setHMargin:20]
setSpacing:5]
setHAlign:H_ALIGN_RIGHT]
[[[[[demoModel.rootView addSubviewsWithHorizontalLayout:@[
[DemoFactory createLabel:@"Welcome" fontSize:16.f],
[DemoFactory createLabel:@"To" fontSize:24.f],
[DemoFactory createLabel:@"WeView" fontSize:32.f],
]]
setVMargin:10]
setHMargin:20]
setSpacing:5]
setCellPositioning:CELL_POSITIONING_FILL];
WeView *weView = [[WeView alloc] init];
[[[[weView addSubviewsWithHorizontalLayout:@[
[DemoFactory createLabel:@"Welcome" fontSize:16.f],
[DemoFactory createLabel:@"To" fontSize:24.f],
[DemoFactory createLabel:@"WeView" fontSize:32.f],
]]
setVMargin:10]
setHMargin:20]
setSpacing:5];
UIImageView *imageView = [self imageViewWithImageName:@"Images/916px-Greatbasinmap.jpg"];
UIScrollView *scrollView = [[UIScrollView alloc] init];
[scrollView addSubview:imageView];
scrollView.contentSize = imageView.size;
scrollView.bounces = NO;
[[demoModel.rootView addSubviewsWithVerticalLayout:@[
[DemoFactory createLabel:@"Welcome To WeView"
fontSize:16.f],
[[scrollView setStretches]
WeView *container = [[WeView alloc] init];
[[[container addSubviewsWithHorizontalLayout:@[
[label1 setHStretches],
[label2 setHStretches],
label3,]
setMargin:5]
setSpacing:5];
WeView *container = [[WeView alloc] init];
[[[container addSubviewsWithHorizontalLayout:@[
[label1 setHStretchWeight:4.f],
[label2 setHStretchWeight:1.f],
label3,]
setMargin:5]
setSpacing:5];
WeView *container = [[WeView alloc] init];
[[[container addSubviewsWithHorizontalLayout:@[
label1,
[label2 setHStretches],
label3,]
setMargin:5]
setSpacing:5];