-
Simplest intro to git by github and codeschool - Try Git
-
[Intro to github]
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| /* ******************************************************************************************* | |
| * THE UPDATED VERSION IS AVAILABLE AT | |
| * https://github.com/LeCoupa/awesome-cheatsheets | |
| * ******************************************************************************************* */ | |
| // 0. Synopsis. | |
| // http://nodejs.org/api/synopsis.html |
(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.
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft,elem.offsetTop,elem.offsetWidth,elem.offsetHeight,elem.offsetParent
| // Comcast Cable Communications, LLC Proprietary. Copyright 2014. | |
| // Intended use is to display browser notifications for critical and time sensitive events. | |
| var _ComcastAlert = (function(){ | |
| return { | |
| SYS_URL: '/e8f6b078-0f35-11de-85c5-efc5ef23aa1f/aupm/notify.do' | |
| , dragObj: {zIndex: 999999} | |
| , browser: null | |
| , comcastCheck: 1 | |
| , comcastTimer: null | |
| , xmlhttp: null |
First off, props to robmoggach for creating a script that attempts to do the job, however I'm working on a Meteor app that requires Mongo and found that the script wasn't setting everything up to completion. Here's an attempt to catalog all the steps I performed, in the hopes it might save someone a bit of headache someday:
1. Use the WebFaction web dashboard to provision your app directories
- Log in, go to Domains/Websites > Applications, click to add a new application
- Name this one for your Meteor app (for the rest of this doc let's use myapp as your moniker), e.g. myappmeteor
- Change the app category to Custom, type to Custom websockets app (listening on port), check to open a port in the firewall
- Save and note the port number you get (let's say it's 20000, you'll need this later)
- Click to add a second application
- Name this one for the Mong
| #!/bin/bash | |
| INSTALL_DIR=/opt/postman | |
| if [ "$(whoami)" != "root" ] | |
| then | |
| echo "Sorry, you are not root. Use sudo!" | |
| exit 1 | |
| fi |