Skip to content

Instantly share code, notes, and snippets.

@vreon
vreon / .Xresources
Created February 27, 2011 03:26
molokai color theme for xterm
! Molokai theme
*xterm*background: #101010
*xterm*foreground: #d0d0d0
*xterm*cursorColor: #d0d0d0
*xterm*color0: #101010
*xterm*color1: #960050
*xterm*color2: #66aa11
*xterm*color3: #c47f2c
*xterm*color4: #30309b
*xterm*color5: #7e40a5
@dtrce
dtrce / mp3.js
Created September 8, 2011 18:39
streaming mp3 using nodejs
var http = require('http'),
fileSystem = require('fs'),
path = require('path')
util = require('util');
http.createServer(function(request, response) {
var filePath = 'path_to_file.mp3';
var stat = fileSystem.statSync(filePath);
response.writeHead(200, {

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@andreyvit
andreyvit / tmux.md
Created June 13, 2012 03:41
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@radiosilence
radiosilence / gist:3946121
Created October 24, 2012 13:43
Outputs some files that WMs can import and colourify everything with.
import sys
import colorsys
from colorz import colorz
WALLPAPER = '/home/james/.wallpaper'
COLORS = '/home/james/.colors'
XRESOURCES = '/home/james/.Xresources'
cols = ''
xres = """
@joemiller
joemiller / netpps.sh
Last active January 12, 2024 15:39
shell: quick linux scripts for showing network bandwidth or packets-per-second
#!/bin/bash
if [ -z "$1" ]; then
echo
echo usage: $0 network-interface
echo
echo e.g. $0 eth0
echo
echo shows packets-per-second
@krrishd
krrishd / backtogeocities.js
Last active April 19, 2016 19:43
Bootstrap To Geocities
/*
Tired of the same old bootstrapped site?
Miss the trendy, hip Geocities look?
This bookmarklet will fix that in a click!
Derived from Bootstrap Geocities theme at http://code.divshot.com/geo-bootstrap/
Simply add new bookmark, edit url, and add bottom code in place of url. Whenevver you miss Geocities, click it.
*/
@lavoiesl
lavoiesl / bs3-stacked-tabs.less
Created September 18, 2013 15:21
Add tabs-left, tabs-right and tabs-below in bootstrap 3 Credit: http://stackoverflow.com/questions/18432577/stacked-tabs-in-bootstrap-3
// http://stackoverflow.com/questions/18432577/stacked-tabs-in-bootstrap-3
.tabs-below, .tabs-right, .tabs-left {
.nav-tabs {
border-bottom: 0;
}
}
.tab-content > .tab-pane,
.pill-content > .pill-pane {
display: none;
@Anachron
Anachron / gist:7004957
Last active December 25, 2015 16:19
Read & use npm proxy for http requests Removed linefeeds for stdout to be able to check for 'null' proxy settings.
var request = require('request');
var chp = require('child_process');
// read the npm proxy settings
chp.exec('npm config get proxy', function(error, stdout, stderr){
var options = {
// repare our target url
'uri': 'http://mimosa-data.herokuapp.com/modules'
};
// stdout consists of linefeeds
@dbashford
dbashford / bower.json
Last active December 26, 2015 17:49
mimosa-bower mimosa-config mainOverride example. The first file is the pertinent bower.json, the second is the mimosa-config bower snippet. The first comment at the bottom explains the config in detail.
{
"name": "Durandal Mimosa Skeleton",
"version": "2.0.0",
"dependencies": {
"jquery":"1.9.1",
"requirejs":"2.1.8",
"requirejs-text":"2.0.3",
"knockout.js":"2.3.0",
"bootstrap":"2.3.2",
"font-awesome":"3.2.1",