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] | |
lol = log --graph --decorate --pretty=oneline --abbrev-commit | |
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
[color] | |
branch = auto | |
diff = auto | |
interactive = auto | |
status = auto |
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
-- Assuming we have a list of items in the model (type alias Model = { items : List Item } | |
-- where Item is a record like { id : Int, name : String } | |
-- this goes in the view and generates an html dropdown | |
select | |
[ onSelect ValueSelectedMsg ] | |
(List.map (\item -> option [ value (toString item.id) ] [ text item.name ]) model.items) | |
targetSelectedIndex : Json.Decoder Int |
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
// Writing JS for everything is great and all, but I don't want to see JS | |
// inline in my Jade templates. Thankfully, there are ways of abstrating it | |
// into mixins! | |
// Want some Rails-like helpers? | |
mixin link_to(name, href) | |
- href = href || "#" | |
a(href="#{href}")= name | |
// How about a single editing point for a class 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
#!/bin/bash | |
# Takes one parameter: a remote git repository URL. | |
# | |
# This is the stuff this script does: | |
# | |
# 1. Clones the repository | |
# 2. Fetches all remote branches | |
# 3. Compresses the folder | |
# 4. Deletes the cloned folder. |
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
o.......Open files, directories and bookmarks....................|NERDTree-o| | |
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go| | |
t.......Open selected node/bookmark in a new tab.................|NERDTree-t| | |
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T| | |
i.......Open selected file in a split window.....................|NERDTree-i| | |
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi| | |
s.......Open selected file in a new vsplit.......................|NERDTree-s| | |
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs| | |
O.......Recursively open the selected directory..................|NERDTree-O| | |
x.......Close the current nodes parent...........................|NERDTree-x| |