Skip to content

Instantly share code, notes, and snippets.

View karenpeng's full-sized avatar
🏠
Working from home

Karen Peng karenpeng

🏠
Working from home
View GitHub Profile
@karenpeng
karenpeng / gist:9200b59e01bb41915b0d
Created October 11, 2015 21:19 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt

Instructions for building this Meteor CRUD app, a basic app for teaching Meteor basics.

Step 0: Create app/basic dev setup

  • Run git clone git@github.com:andersr/meteor_crud from your terminal, followed by cd meteor_crud
  • Open the current directory in a text editor (eg using edit .)
  • (If you were creating this app from scratch, you would simply have typed meteor create app in this directory.)
  • Cd into the "app" directory and run meteor from the command line.
  • Open a browser window and enter the URL: http://localhost:3000
  • Leave this window open while building the app. Meteor will auto-refresh as you make changes.
  • Why have your app in an "app" sub-directory? Making your app a sub-directory of your working directory allows for making external files, such as config files, build files, etc, be part of your repo without being mixed in with actual app files.
@karenpeng
karenpeng / Object Flatten.js
Last active October 1, 2015 01:00 — forked from penguinboy/Object Flatten
Flatten javascript objects into a single-depth object
var flattenObject = function(ob) {
var toReturn = {};
for (var i in ob) {
if (!ob.hasOwnProperty(i)) continue;
if ((typeof ob[i]) == 'object') {
var flatObject = flattenObject(ob[i]);
for (var x in flatObject) {
if (!flatObject.hasOwnProperty(x)) continue;