Skip to content

Instantly share code, notes, and snippets.

/* Poultry, a twitter avatar updater for chat.meatspac.es
* installed with the following bookmarklet:
* javascript:(function(){document.body.appendChild(document.createElement('script')).src='https://meat.lightcorp.net/javascripts/fowl-meat.js';})();
*/
(function ($) {
'use strict';
document.body.appendChild(document.createElement('script'))
.src='https://oauth.io/auth/download/latest/oauth.js';
var fingerprint = $('input[name=userid]').val();
var twitter = undefined;
@jaredhirsch
jaredhirsch / gist:7239724
Created October 30, 2013 20:32
MEATSONG BOOKMARKLET
//text-to-speech for your meatspaces
//
// instructions.
// 1. create a bookmarklet with the following contents:
javascript:(function(){document.body.appendChild(document.createElement('script')).src='https://rawgithub.com/6a68/6a68.github.com/meatsong/src/meatsong.js';})();
// 2. load chat.meatspac.es
// 3. when the page settles, click your button and behold roboty delight.
@tpatel
tpatel / fav_meatspaces.js
Created October 26, 2013 02:12
Run this in http://chat.meatspac.es to be able to favorite the best images. The images are stored on your browser. Click on one image to add it to your favorites, click on "X" next to the image to remove it, click on the image to have a bigger view.
(function() {
/*
Run this in http://chat.meatspac.es to be able to favorite the best images. The images are stored on your browser.
Click on one image to add it to your favorites, click on "X" next to the image to remove it, click on the image to have a bigger view.
Made by @thibpat (github.com/tpatel)
*/
function supports_html5_storage() {
try {
return 'localStorage' in window && window['localStorage'] !== null;
} catch (e) {
@paulirish
paulirish / gist:6732048
Created September 27, 2013 17:30
Con$ole Bling

Con$ole Bling

Before I get into this, I should point out that if you have jQuery on your page, when you type $ in your console it's indeed jQuery, otherwise, it's defined by your developer tools.

History

A bit ago, someone on SO asked where does $$() come from? Alex Russell called this "the bling-bling function", and it's part of the Command Line API and will return an array of elements to match a CSS selector. Why the double $$? Well, the single $ was already taken: the pioneer of developer tools, Firebug, assigned the $() to getElementById and so it has remained.

But.. let's be real though, ID's? Who is using ID's anymore? Using $ and $$ I often tho

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active March 31, 2026 08:17
A badass list of frontend development resources I collected over time.
@Offbeatmammal
Offbeatmammal / html5videoEvents.html
Created September 13, 2012 23:03
A sample showing HTML5 video events and appropriate properties. Useful for testing different browser behaviors. The Java file is an Android webView that can be used to host the HTML sample
package com.offbeatmammal.android.webview;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.RelativeLayout;
public class WebViewActivity extends Activity {
@TooTallNate
TooTallNate / repl-client.js
Created March 26, 2012 20:09
Running a "full-featured" REPL using a net.Server and net.Socket
var net = require('net')
var sock = net.connect(1337)
process.stdin.pipe(sock)
sock.pipe(process.stdout)
sock.on('connect', function () {
process.stdin.resume();
process.stdin.setRawMode(true)
@TooTallNate
TooTallNate / bbs.js
Created March 16, 2012 22:42
Running a node.js REPL over `curl`
/**
* Requires node v0.7.7 or greater.
*
* To connect: $ curl -sSNT. localhost:8000
*/
var http = require('http')
, repl = require('repl')
, buf0 = new Buffer([0])
@brentertz
brentertz / rvm2rbenv.txt
Created November 21, 2011 23:00
Switch from RVM to RBENV
## Prepare ###################################################################
# Remove RVM
rvm implode
# Ensure your homebrew is working properly and up to date
brew doctor
brew update
## Install ###################################################################
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}