Skip to content

Instantly share code, notes, and snippets.

View max-berman's full-sized avatar

Max Berman max-berman

View GitHub Profile
@jcxplorer
jcxplorer / uuid.js
Created February 12, 2011 16:58
UUID v4 generator in JavaScript (RFC4122 compliant)
function uuid() {
var uuid = "", i, random;
for (i = 0; i < 32; i++) {
random = Math.random() * 16 | 0;
if (i == 8 || i == 12 || i == 16 || i == 20) {
uuid += "-"
}
uuid += (i == 12 ? 4 : (i == 16 ? (random & 3 | 8) : random)).toString(16);
}
@jessefreeman
jessefreeman / layers_to_sprite_sheet.js
Created March 15, 2011 01:15
This is a PS script to make Sprite Sheets out of layers. Modified from http://www.garagegames.com/community/blogs/view/11527
// Put this file in Program Files\Adobe\Photoshop\Presets\Scripts\
// In PhotoShop menu File > Automate > Scripts: layersToSprite.js
// Arrange layers into a sprite sheet.
if (documents.length > 0)
{
// --------------------------
docRef = activeDocument;

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@iznax
iznax / License.txt
Created March 7, 2012 06:54
Mini Frogger
The "WTH" Public License
Copyright (C) 2012 Paul Isaac
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.
#. You can do whatever-the-heck you like with this code.
@crtr0
crtr0 / client.js
Created June 8, 2012 17:02
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});
@elijahmanor
elijahmanor / console.js
Created August 24, 2012 03:27
Custom JSBin Settings
jsbin.settings.editor.theme = "monokai";
jsbin.settings.editor.indentUnit = 4;
jsbin.settings.editor.smartIndent = true;
jsbin.settings.editor.tabSize = 4;
jsbin.settings.editor.indentWithTabs = true;
jsbin.settings.editor.autoClearEmptyLines = true;
jsbin.settings.editor.lineWrapping = true;
jsbin.settings.editor.lineNumbers = true;
jsbin.settings.editor.matchBrackets = true;
@rymawby
rymawby / convert-aac-to-mp3.sh
Created October 19, 2012 15:56
Convert aac to mp3 using ffmpeg
ffmpeg -i <audio.aac> -acodec libmp3lame <audio.mp3>
@pawel-dubiel
pawel-dubiel / gist:4434040
Created January 2, 2013 11:48
impactjs parallax plugin
/* jerev - 10/2012 - parallax.js
Be sure to require plugins.parallax, and place this file in lib/plugins/
Parallax usage
p = new Parallax();
p.add('path/to/image.ext', {distance: 1, y: 0})
p.add('path/to/other/image.ext', {distance: 5, y: 0})
p.move(speed);
@jshaw
jshaw / byobuCommands
Last active July 4, 2024 10:58
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@willurd
willurd / web-servers.md
Last active July 22, 2024 15:25
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000