Skip to content

Instantly share code, notes, and snippets.

@sturadnidge
sturadnidge / tmux-1.8-on-CentOS-6.x.txt
Last active May 10, 2021 18:31
Install tmux 1.8 on CentOS 6.x minimal (64bit)
# download latest libevent2 and tmux sources, and extract them somewhere
# (thx bluejedi for tip on latest tmux URL)
#
# at the time of writing:
# https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
# http://sourceforge.net/projects/tmux/files/latest/download?source=files
#
# install deps
yum install gcc kernel-devel make ncurses-devel
@brendandawes
brendandawes / TwitterButton
Created August 31, 2012 18:02
Electric Imp example for a button to trigger a tweet - needs http://open.sen.se
// Simple button to Twitter
// Button is on pin1 and GND
local channelOutput = [ OutputPort("Ch 1", "string")];
// Event handler for state changes
function swEvent() {
local d = date();
@klange
klange / image-to-ansi.py
Created January 27, 2012 06:29 — forked from MicahElliott/colortrans.py
Convert images to ANSI escape sequences
#! /usr/bin/env python
""" Convert an image (argv[1]) to an ANSI text string (xterm-256color)
Original readme from colortrans.py follows:
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
@khrona
khrona / main.cpp
Created July 28, 2011 22:23
Captures a web-page to a JPEG (or series of JPEGs if the height is too great). Uses Awesomium 1.6.2 (r159+) and C API.
#include <Awesomium/awesomium_capi.h>
#include <string.h>
#include <stdio.h>
#if defined(__WIN32__) || defined(_WIN32)
#include <windows.h>
#elif defined(__APPLE__)
#include <unistd.h>
#endif
// The URL to render
@seanmonstar
seanmonstar / tumblr-backup.py
Created December 7, 2010 06:58
Makes a backup of your tumblr blog.
#!/usr/bin/env python
import os
import sys
import urllib2
from xml.dom import minidom
from datetime import datetime
def url_request(url):
text = None
@nzjrs
nzjrs / gdk-gstappsrc-stream.c
Created December 2, 2010 10:47
GStreamer Streaming AppSrc Example
/* gcc gdk-gstappsrc-stream.c -Wall `pkg-config --cflags --libs gstreamer-app-0.10 gdk-pixbuf-2.0` -o gdkstream */
#include <gst/gst.h>
#include <gst/app/gstappsrc.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <gdk-pixbuf/gdk-pixbuf.h>