Skip to content

Instantly share code, notes, and snippets.

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
// AtScript
import {Component} from 'angular';
import {Server} from './server';
@Component({selector: 'foo'})
export class MyComponent {
constructor(server:Server) {
this.server = server;
}
}
http://www.html5rocks.com/en/tutorials/es7/observe/
http://ng-learn.org/2014/03/AngularJS-2-Status-Preview/
http://eisenbergeffect.bluespire.com/all-about-angular-2-0/
http://www.w3.org/wiki/WebComponents/
https://docs.google.com/document/d/11YUzC-1d0V1-Q3V0fQ7KSit97HnZoKVygDxpWzEYW0U/edit
https://speakerdeck.com/rauschma/ecmascript-6-whats-next-for-javascript-august-2014
http://pascalprecht.github.io/2014/10/25/integrating-web-components-with-angularjs/
https://docs.google.com/document/d/1kpuR512G1b0D8egl9245OHaG0cFh0ST0ekhD_g8sxtI/edit#heading=h.xgjl2srtytjt
https://docs.google.com/presentation/d/1Gv-dvU-yy6WY7SiNJ9QRo9XayPS6N2jtgWezdRpoI04/present?slide=id.g108668b30_040
http://code.tutsplus.com/tutorials/using-polymer-to-create-web-components--cms-20475
From the chat:
Vijay Velagapudi 12:16 PM
no problem
To list all available commands enter "/?".
John Elliott 12:23 PM
https://dl.dropboxusercontent.com/u/23241016/startup%20engineering%20public/Lecture-all.pdf - Lecture Notes in one file on Dropbox
Nghia Hoang 12:23 PM

Put a closure on it

Sometimes you'll have objects that manage state along with event handling. This happens frequently in MVC apps. Let's start with a messy example:

var Launcher = function(rocket) {
  this.rocket = rocket
}

Launcher.prototype.isReady = function() {

@learningjs
learningjs / AndroidManifest.xml
Last active January 4, 2016 15:39
activity Java files for the Jabberwocky and Roundball activities. AndroidManifest.xml and activity_jabberwocky.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="app.to.webpage.webpagetoapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET"/>
@learningjs
learningjs / mickey.pde
Created January 6, 2014 21:08
Original Image - “Originality depends only on the character of the drawing and the vision peculiar to each artist.” – Georges Seurat
// Draws a Mickey
void setup() {
// Sets sketch size
size(600, 600);
// Translates origin point (now "0, 0" are placed at "width / 2, height / 2" and not at upper left corner anymore)
translate(width / 2, height / 2);
// Sets background color
background(200);
// Disables all smoothing
@learningjs
learningjs / gist:8287828
Created January 6, 2014 19:01
coursesites.com - genart_processing - Constellations Sketch Preface “Constellations have always been troublesome things to name. If you give one of them a fanciful name, it will always refuse to live up to it; it will always persist in not resembling the thing it has been named for. Ultimately, to satisfy the public, the fanciful name has to be …
// Gemini
// http://stardate.org/nightsky/constellations/gemini
void setup() {
// Sets sketch size
size(400, 400);
// Translates origin point (now "0, 0" are placed at "width / 5, height / 5" and not at upper left corner anymore)
translate(width / 5, height / 5);
// Sets background color
background(0);
@learningjs
learningjs / test.js
Created December 29, 2013 21:05
Code used to retrieve an user's watched repositories on Github. Always returns 30 results.
fetchJSONFile("https://api.github.com/users/" + userName + "/subscriptions", function(data){
...
}
function fetchJSONFile(path, callback) {
var httpRequest = new XMLHttpRequest();
httpRequest.onreadystatechange = function() {
if (httpRequest.readyState === 4) {
if (httpRequest.status === 200) {
var data = JSON.parse(httpRequest.responseText);
@learningjs
learningjs / index.js
Created December 17, 2013 13:44 — forked from auser/index.js
var Pusher = require('pusher'),
os = require('os'),
express = require('express'),
app = express(),
ch = 'stats';
var pusher = new Pusher({
appId: process.env.PUSHER_APP_ID,
key: process.env.PUSHER_KEY,
secret: process.env.PUSHER_SECRET