| ⌘T | go to file |
| ⌘⌃P | go to project |
| ⌘R | go to methods |
| ⌃G | go to line |
| ⌘KB | toggle side bar |
| ⌘⇧P | command prompt |
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
| $ git config --global core.excludesfile ~/.gitignore | |
| $ echo .DS_Store >> ~/.gitignore |
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
| body { | |
| background-image: url('{img-url}'); | |
| background-repeat: no-repeat; | |
| -webkit-background-size: cover; | |
| -moz-background-size: cover; | |
| -o-background-size: cover; | |
| background-size: cover; | |
| background-attachment: fixed; | |
| } |
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
| <snippet> | |
| <content><![CDATA[ | |
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>Title</title> | |
| </head> |
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
| <snippet> | |
| <content><![CDATA[ | |
| it("${1:expects}", function() { | |
| expect(${2:test}).to.equal(${3:result}); | |
| }); | |
| ]]></content> | |
| <description>tdd</description> | |
| <tabTrigger>expect</tabTrigger> | |
| <scope>source.js</scope> | |
| </snippet> |
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
| <snippet> | |
| <content><![CDATA[ | |
| describe("${1:describe}", function() { | |
| ${2:it} | |
| }); | |
| ]]></content> | |
| <description>tdd</description> | |
| <tabTrigger>describe</tabTrigger> | |
| <scope>source.js</scope> | |
| </snippet> |
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
| rsync -r --exclude='.git*' sourceDir/ targetDir/ |
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
| function getRandomInt (min, max) { | |
| return Math.floor(Math.random() * (max - min + 1)) + min; | |
| } |
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
| var getTimeDiff = function(date) { | |
| //input: js date object | |
| //output: returns how long ago the input date occured in a user friendly format | |
| var now = new Date().getTime(); | |
| var ms = (now - date.getTime()); | |
| var days = Math.round(ms / 86400000); // days | |
| var hrs = Math.round((ms % 86400000) / 3600000); // hours | |
| var mins = Math.round(((ms % 86400000) % 3600000) / 60000); // minutes | |
| if (days > 0) { |
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
| var formatLongDate = function(date) { | |
| //input: js date object | |
| //output: user friendly long date string, eg: Monday, Oct 26, 2015, 3:11 PM | |
| var options = { | |
| weekday: "long", | |
| year: "numeric", | |
| month: "short", | |
| day: "numeric", | |
| hour: "2-digit", | |
| minute: "2-digit" |
NewerOlder