⌘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 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
{ | |
// Disable telemetry | |
"telemetry.telemetryLevel": "off", | |
// Zen mode | |
"zenMode.fullScreen": false, | |
"zenMode.hideTabs": true, | |
"zenMode.centerLayout": false, | |
// Theming | |
"workbench.iconTheme": "city-lights-icons-vsc", | |
"editor.fontFamily": "Dank Mono", |
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
// Creating Meteor HOCs | |
import { Meteor } from 'meteor/meteor'; | |
import { createContainer } from 'meteor/react-meteor-data'; | |
import React from 'react'; | |
import { compose } from 'recompose'; | |
// Assuming we have a Meteor collection here... | |
import TodosCollection from '../api/TodosCollection'; |
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
import React from 'react'; | |
const MIN_SCALE = 1; | |
const MAX_SCALE = 4; | |
const SETTLE_RANGE = 0.001; | |
const ADDITIONAL_LIMIT = 0.2; | |
const DOUBLE_TAP_THRESHOLD = 300; | |
const ANIMATION_SPEED = 0.04; | |
const RESET_ANIMATION_SPEED = 0.08; | |
const INITIAL_X = 0; |
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
// *** Middleware - custom thunk implementation (slightly diffferent though) - maybe more scalable appraoch | |
export default function createEventBusMiddleware(eventBus) { | |
return ({ dispatch, getState }) => (next) => (action) => { | |
// we could optimize further here and use rest operator to get all arguments and compose the middlewares | |
if (typeof action === 'function') { | |
return action({ dispatch, eventBus, getState }); | |
} | |
return next(action); | |
}; |
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
/** | |
* Super namespace that all our libs and apps will live on. We also extend all | |
* of the native Ember classes as well and exclusely use them that way so we can | |
* alter the behavior in one place without needing to reopen the original class. | |
* | |
* We call the super namespace PS for Pivotshare, call it what you'd like. | |
*/ | |
window.PS = Ember.Namespace.create(); | |
// Create our custom resolver so we can have Ember look up classes on multiple |
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
/** | |
* `Ember.MergedArray` is an array that observes multiple other arrays (called source arrays) for changes and includes | |
* all items from all source arrays in an efficient way. | |
* | |
* Usage: | |
* | |
* ```javascript | |
* var obj = Ember.Object.create({ | |
* people: [ | |
* { |
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
/** | |
* Simple jQuery utility for saving element values in localStorage. | |
* | |
* Usage: | |
* - Add class "store-state" to the element you want to save. | |
* - Add id attribute to the element or specify your own storage key (attribute data-storage-name) | |
* - Add attribute "data-storage-name" to the element if you | |
* want to control under which name the value will be stored | |
* - Add attribute "data-storage-noload" to suppress loading (will be stored though, it is | |
* useful, when HTML-specified value is temporarily more important). |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications
like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html