Skip to content

Instantly share code, notes, and snippets.

@TaoK
TaoK / jQuery.base64.js
Created January 12, 2012 18:23
jQuery BASE64 functions (yet another)
/**
* jQuery BASE64 functions
*
* <code>
* Encodes the given data with base64.
* String $.base64Encode ( String str )
* <br />
* Decodes a base64 encoded data.
* String $.base64Decode ( String str )
@q0rban
q0rban / varnishreload.sh
Created January 8, 2012 15:38
Varnish Reload VCL Script
#!/bin/bash
# Reload a varnish config
# Author: Kristian Lyngstol
FILE="/etc/varnish/ugc.vcl"
# Hostname and management port
# (defined in /etc/default/varnish or on startup)
HOSTPORT="localhost:6082"
NOW=`date +%s`
@imnuts
imnuts / gps.conf
Created August 6, 2011 05:00
GPS Config File from Darky, edited by bobloblaw1
NTP_SERVER=us.pool.ntp.org
NTP_SERVER=0.us.pool.ntp.org
NTP_SERVER=1.us.pool.ntp.org
NTP_SERVER=2.us.pool.ntp.org
NTP_SERVER=3.us.pool.ntp.org
NTP_SERVER=north-america.pool.ntp.org
NTP_SERVER=0.north-america.pool.ntp.org
NTP_SERVER=1.north-america.pool.ntp.org
NTP_SERVER=2.north-america.pool.ntp.org
NTP_SERVER=3.north-america.pool.ntp.org
@zaius
zaius / background.sh
Created January 16, 2011 23:29
How to redirect a running process output to a file and log out
ctrl-z
bg
touch /tmp/stdout
touch /tmp/stderr
gdb -p $!
# In GDB
p dup2(open("/tmp/stdout", 1), 1)
p dup2(open("/tmp/stderr", 1), 2)