Skip to content

Instantly share code, notes, and snippets.

View indexzero's full-sized avatar
🗽
✊ Fist in the air in the land of hypocrisy

Charlie Robbins indexzero

🗽
✊ Fist in the air in the land of hypocrisy
View GitHub Profile
@SaneMethod
SaneMethod / jquery-ajax-blob-arraybuffer.js
Last active November 29, 2024 17:59
Ajax transports to allow the sending/receiving of blobs and array buffers via the familiar jquery ajax function.To send, set data to the blob or arraybuffer to be sent, and add 'processData:false' to the ajax options.To receive, specify the 'dataType' as blob or arraybuffer in the ajax options.
(function($){
/**
* Register ajax transports for blob send/recieve and array buffer send/receive via XMLHttpRequest Level 2
* within the comfortable framework of the jquery ajax request, with full support for promises.
*
* Notice the +* in the dataType string? The + indicates we want this transport to be prepended to the list
* of potential transports (so it gets first dibs if the request passes the conditions within to provide the
* ajax transport, preventing the standard transport from hogging the request), and the * indicates that
* potentially any request with any dataType might want to use the transports provided herein.
*
@mikeal
mikeal / gist:6685843
Last active December 23, 2015 19:58
Response to comments by Issac Roth of StrongLoop

This is rather out of date and we've all moved past it. Me and Issac are cool now.

pic

@caged
caged / d3-server.js
Last active October 17, 2023 04:05
Directly render and serve d3 visualizations from a nodejs server.
// Start `node d3-server.js`
// Then visit http://localhost:1337/
//
var d3 = require('d3'),
http = require('http')
http.createServer(function (req, res) {
// Chrome automatically sends a requests for favicons
// Looks like https://code.google.com/p/chromium/issues/detail?id=39402 isn't
// fixed or this is a regression.
@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active June 25, 2025 15:36
5 entertaining things you can find with the GitHub Search API
@isaacs
isaacs / npmswitch-example.log
Last active December 18, 2015 09:39
This is how I change people's packages over to a different username in npm. It requires admin powers, of course, unless you're doing it with your own username.
$ curl http://registry.npmjs.org/-/by-user/testuser
{"testuser":["npm-test-blerg","npm-test-publish"]}
$ curl http://registry.npmjs.org/-/by-user/testuser2
{}
$ npmswitch testuser testuser2
+ npm cache clean npm-test-blerg
+ npm owner add testuser2 npm-test-blerg
npm http GET https://registry.npmjs.org/-/user/org.couchdb.user:testuser2

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@rwaldron
rwaldron / response.md
Last active December 15, 2015 14:28
This is in response to Peter van der Zee's blog post, http://qfox.nl/weblog/282

Peter van der Zee published this post on his personal blog and it was featured in this week's edition of JavaScript Weekly. The following sections each contain a piece of code copied directly from his post, followed by an irrefutable explanation of why it is either wrong or misleading.

EDIT, April 1, 2013: I've removed any harsh language, but the content and corrections remain the same.

These are facts.

Computed properties...

From: Sam Stephenson <[email protected]>
Subject: Re: ruby-build hint
Date: Sun, 10 Feb 2013 12:25:56 -0600
To: Michał Papis <[email protected]>
Hi Michał,
Thanks for the email.
You're right that `[[` is not POSIX sh-compliant. Nor are the following
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active July 31, 2025 21:28
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@jhs
jhs / npm_Dec2012.txt.md
Last active December 10, 2015 11:08
Node.js npm December stats and reflections

Sent this to the [CouchDB users list][email] just now; duplicated here for others to see or comment

Hi, all. Sorry to be distant from the community recently. No excuse.

I thought I might share December stats from one of Apache CouchDB's most well-known deployments and killer apps: the Node.js npm registry.

Facts

  • Zero downtime