Skip to content

Instantly share code, notes, and snippets.

View floriancargoet's full-sized avatar

Florian Cargoët floriancargoet

View GitHub Profile
@jed
jed / LICENSE.txt
Created May 10, 2011 16:38 — forked from 140bytes/LICENSE.txt
use cached DOM elements to escape HTML
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@revolunet
revolunet / gist:1104964
Created July 25, 2011 19:30
VLC HTTP stream + intf
REM SERVER (HTTP)
vlc "C:\\Users\\juju\\Desktop\\divx\\aymo_brille.avi" --sout="#duplicate{dst=std{access=http,mux=ts,dst=0.0.0.0:1234}}" --extraintf=http
REM CLIENT
vlc http://SERVERIP:1234 --http-caching=5000
@creationix
creationix / linux-node-joystick.js
Created January 28, 2012 21:49
Basic Linux Joystick support.
var FS = require('fs');
var EventEmitter = require('events').EventEmitter;
// http://www.mjmwired.net/kernel/Documentation/input/joystick-api.txt
function parse(buffer) {
var event = {
time: buffer.readUInt32LE(0),
number: buffer[7],
value: buffer.readInt16LE(4)
}
@jamieowen
jamieowen / youtube.rb
Created March 17, 2012 18:14
Octopress Youtube plugin...
module Jekyll
class Youtube < Liquid::Tag
@width = 640
@height = 390
def initialize(name, id, tokens)
super
@id = id
end
@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)
@valueof
valueof / notabs.js
Created October 13, 2012 18:12
A reporter that discards all warnings about mixed tabs and errors
/**
* notabs.js
*
* A reporter that discards all warnings about mixed tabs and errors.
* This file was based on our default reporter so output is the same.
*
* Usage:
* jshint myfile.js --reporter=notabs.js
*/
@dherman
dherman / range-error-ftw.js
Created November 27, 2012 22:53
fun with JS arrays
var a = [];
a[Math.pow(2, 32) - 2] = "max index"; // highest non-expando indexed property
console.log(a.length === Math.pow(2, 32) - 1); // true
try {
a.push("whoa", "EVEN MOAR WHOA");
} catch (e) {
console.log(e instanceof RangeError); // true
}
@floriancargoet
floriancargoet / trello-grid
Last active March 5, 2017 03:42
Trello Grid
javascript:(function(){$('.list-area').css('max-width','100%');$('.list').css('margin','10px 0 0 10px');var max = Math.max.apply(null,$('.list').map(function(){return $(this).height();}));$('.list').each(function(){$(this).css('margin-bottom', max - $(this).height())});})();
@bobbygrace
bobbygrace / trello-css-guide.md
Last active May 15, 2024 16:01
Trello CSS Guide

Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets


Trello CSS Guide

“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”

You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?

Injecting Terminal Input

Some examples demonstrating how to inject keystrokes into a terminal's input stream.