Skip to content

Instantly share code, notes, and snippets.

View Couto's full-sized avatar
👽
Did you raid area 51?

Luís Couto Couto

👽
Did you raid area 51?
View GitHub Profile
@dscape
dscape / books.txt
Last active August 29, 2015 14:04
Books for the YLD Office
Predictably Irrational: The Hidden Forces that Shape Our Decisions
Quiet: The power of introverts in a world that can't stop talking
Business Adventures
Zero to One
Beyond Budgeting
Winning Decisions: Getting It Right the First Time
Creativity Inc
Good to Great
Surviving & Thriving in a Relationship with an Entrepreneur
First, Break All the Rules

New Javascript Structure

└── app
    └── javascripts
         ├── bower_components
         ├── bundles
         │   └── <bundle-name>
 │ └── tests
// built files are found at /public/__build__/*
// how do I get `webpack` to build to `public/__build__/`
// but have the webpack dev server serve `public/index.html`
// and the bundles from `/__build__/`?
//
// I'm using this to run the server
//
// webpack-dev-server --inline --content-base public/
//
// and this is my config:
@trodrigues
trodrigues / gist:3a575d78e552cec785e6
Created March 11, 2015 16:18
Flux implementations
Fluxxor
Tuxedo
nexus-flux
Marty
Reflux
Fluxy
/**
* FUNCTIONS
**/
/**
* Functions create closures; variables defined
* inside of them are accessible inside the
* function, and to any functions that were
* defined within the same scope.
**/
@cormacrelf
cormacrelf / Spacedust.tmTheme
Created June 12, 2011 04:43
Spacedust TextMate theme - hand-transferred from Xcode
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Spacedust</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
// Original code from http://www.blog.highub.com/mobile-2/a-fix-for-iphone-viewport-scale-bug/
var metas = document.getElementsByTagName('meta');
var i;
if (navigator.userAgent.match(/iPhone/i)) {
for (i=0; i<metas.length; i++) {
if (metas[i].name == "viewport") {
metas[i].content = "width=device-width, minimum-scale=1.0, maximum-scale=1.0";
}
}
@cowboy
cowboy / ctor-proto.js
Created March 2, 2012 17:23
JavaScript: Prototypal Inheritance, Extend
// Also see http://michaux.ca/articles/class-based-inheritance-in-javascript
function extend(Super, Sub) {
// By using a dummy constructor, initialization side-effects are eliminated.
function Dummy() {}
// Set dummy prototype to Super prototype.
Dummy.prototype = Super.prototype;
// Create Sub prototype as a new instance of dummy.
Sub.prototype = new Dummy();
// The .constructor propery is really the Super constructor.
Sub.baseConstructor = Sub.prototype.constructor;
@rwaldron
rwaldron / device.js
Created May 10, 2012 16:21
Fat Arrows and Classes-as-Prototype-sugar make a beautiful future for JavaScript
var stream = require("fake-stream-lib"),
Emitter = require("events").EventEmitter,
util = require("util");
// Today...
function Device( opts ) {
this.value = null;
@grantmichaels
grantmichaels / proxy.js
Created May 13, 2012 17:27 — forked from brandon-lockaby/proxy.js
node.js tcp proxy
var net = require("net");
var Proxy = function() {
};
Proxy.to = function(dst_host, dst_port) {
var proxy = new Proxy();
proxy.dstHost = dst_host;
proxy.dstPort = dst_port;
proxy.mid = [];