Skip to content

Instantly share code, notes, and snippets.

@staltz
staltz / main.js
Created March 4, 2016 21:22
Cycle.js demo with MIDI and Web Audio
import {Observable, Disposable} from 'rx';
import {run} from '@cycle/core'
const jsondiffpatch = require('jsondiffpatch').create({
objectHash: function(obj) {
return obj.name;
}
});
function generateCurve(steps){
var curve = new Float32Array(steps)
@anvaka
anvaka / 00.Intro.md
Last active June 25, 2024 17:06
npm rank

npm rank

This gist is updated daily via cron job and lists stats for npm packages:

  1. Top 1,000 most depended-upon packages
  2. Top 1,000 packages with largest number of dependencies
  3. Top 1,000 packages with highest PageRank score
@lygaret
lygaret / index.js
Last active January 18, 2023 17:26
ES6 Quasi-Literal for JSX
define(function(require) {
var React = require('react');
var paramRegex = /__(\d)+/;
var parser = new DOMParser();
var errorDoc = parser.parseFromString('INVALID', 'text/xml');
var errorNs = errorDoc.getElementsByTagName("parsererror")[0].namespaceURI;
// turns the array of string parts into a DOM
// throws if the result is an invalid XML document.
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@jjulian
jjulian / gist:2520936
Created April 28, 2012 18:08
Advice on moving to Baltimore

Derek Sivers wrote an interesting post (http://sivers.org/la) as advice for folks moving to LA. Here's my thoughts on the same topic, but about Baltimore, MD.

I moved into South Baltimore in 1996 and I've lived in this neighborhood ever since. Here are a few of my thoughts (please fork and edit):

  • Baltimore is made up of many different neighborhoods. Getting to know the character of each of the them will enhance your experience. Visiting the baseball stadium and going to dinner in the Inner Harbor does not make for a satisfying Baltimore-experience. You have to get it into the neighborhoods to find the truly great food, the fun bars, and genuine people.

  • "The Wire" is real, but you probably won't see it. Unless you're visiting your cousin who lives on West Lanvalle, you probably won't see much that resembles a Barksdale corner. And don't ask for a "Wire Tour" - that's not what we're about.

  • People are friendly, especially the older folks. If you have a chance, take a pause to listen to their story, o

@vinbarnes
vinbarnes / baltimore_hipster_guide.mdown
Created May 15, 2011 19:09 — forked from pjb3/baltimore_hipster_guide.mdown
Hipster's Guide to Baltimore by @bmuller

Food

  • Little Italy has a number of great places (I think Amicci's has the best happy hour) and is accessible by the circulator's Orange Line.
  • Best pizza/risotto is Joe Squared on North Ave (purple line accessible).
  • Best Mexican is La Guadalupana on 500 South Wolfe Street (Orange/Green route will get you there). You will need to know some basic Spanish to order there, but the food is amazing.
  • Best odd assortment of random food is Lexington Market, the longest running market in the world(according to Wikipedia). It's accessible by heading north on the light rail and then walking West and would be good for lunch one day.
  • Best fancy food is Woodberry Kitchen, which is light rail accessible.
  • Best late night food is Never on Sunday on N Charles across the street from Helmand, which is open until 3:30am.
  • Best sushi is an easy pick - Kiku (1017 Light Street). It's a literal Mom and Pop operation with an amazing chirashi.