- Install angular with: terminal: bower install angular
- Ctrl-space twice
- ng stuff works now
- Preferences: Editor: angularjs add whitespace
- Debug (there is a shortcut so you can do live edit and it updates in chrome)
- You can change your code style for html. Preferences: Code Style: HTML (worth a look through these settings)
- Cmd+Alt+L to reformat your code
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
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
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
// a bunch of ways to get from 4 => 04 (whilst maintaining 40 => 40). This would be a pad function for times, hours, mins, seconds. | |
var i = 4; | |
// while | |
while((i+'').length<2)i='0'+i | |
// greater than 9 | |
i=(i>9?i:'0'+i) |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
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
// Promise.all is good for executing many promises at once | |
Promise.all([ | |
promise1, | |
promise2 | |
]); | |
// Promise.resolve is good for wrapping synchronous code | |
Promise.resolve().then(function () { | |
if (somethingIsNotRight()) { | |
throw new Error("I will be rejected asynchronously!"); |
- Download the Consolas font from http://www.fontpalace.com/font-details/Consolas/
- Open Finder and navigate to
Downloads
directory - Double click the
Consolas.ttf
file - A dialog box appears displaying the details about the font
- Click
Install font
button
- Open IDEA Preferences Window (Press Command + ,)
- Editor > Colors & Fonts > Font