Skip to content

Instantly share code, notes, and snippets.

@nmcc
nmcc / CONSOLAS.md
Last active June 15, 2024 02:25
Install Consolas font on Mac

Download and install the font

  1. Download the Consolas font from http://www.fontpalace.com/font-details/Consolas/
  2. Open Finder and navigate to Downloads directory
  3. Double click the Consolas.ttf file
  4. A dialog box appears displaying the details about the font
  5. Click Install font button

Using Consolas font on IntelliJ IDEA:

  1. Open IDEA Preferences Window (Press Command + ,)
  2. Editor > Colors & Fonts > Font
@nolanlawson
nolanlawson / protips.js
Last active February 4, 2024 18:06
Promise protips - stuff I wish I had known when I started with Promises
// 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!");
@staltz
staltz / introrx.md
Last active July 27, 2024 04:59
The introduction to Reactive Programming you've been missing
@brock
brock / webinar.md
Last active August 29, 2015 14:00
a crazy good webinar on using webstorm. these are notes to accompany the recorded session that will be published the week of Mon, April 28th

WebStorm AngularJS Webinar

AngularJS

  1. Install angular with: terminal: bower install angular
  2. Ctrl-space twice
  3. ng stuff works now
  4. Preferences: Editor: angularjs add whitespace
  5. Debug (there is a shortcut so you can do live edit and it updates in chrome)
  6. You can change your code style for html. Preferences: Code Style: HTML (worth a look through these settings)
  7. Cmd+Alt+L to reformat your code
@remy
remy / pad.js
Created March 16, 2012 14:59
2 digit pad
// 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)
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# 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/