Skip to content

Instantly share code, notes, and snippets.

@bryanveloso
bryanveloso / pip.conf
Created March 10, 2010 21:15 — forked from jezdez/pip.conf
Sample pip configuration file.
[global]
default-timeout = 60
respect-virtualenv = true
download-cache = /tmp
log-file = /tmp/pip-log.txt
[install]
find-links =
http://pypi.pinaxproject.com
http://pypi2.pinaxproject.com
@elpuri
elpuri / Button.qml
Created December 28, 2010 19:36
A button component in QML
import Qt 4.7
BorderImage {
id: buttonbase
signal clicked
property int hitboxExtension : 20
property alias text : label.text
property bool pressed: hitbox.pressed && hitbox.containsMouse
@copyninja
copyninja / daemon.c
Created June 19, 2011 07:24
A sample Daemon program in C
#include <stdio.h>
#include <fcntl.h>
#include <signal.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#define RUNNING_DIR "/tmp"
#define LOCK_FILE "daemond.lock"
#define LOG_FILE "daemond.log"
@davidboy
davidboy / app_indicator.c
Created June 24, 2011 17:18
Awsum C niceness!
#include <gtk/gtk.h>
#include <libappindicator/app-indicator.h>
int main (int argc, char **argv) {
gtk_init(&argc, &argv);
GtkWidget *menu;
GtkWidget *menu_item;
AppIndicator *indicator;
@fogus
fogus / 0 - UNIX Fifth Edition
Created July 20, 2011 00:15
UNIX V5, OpenBSD, Plan 9, FreeBSD, and GNU coreutils implementations of echo.c
main(argc, argv)
int argc;
char *argv[];
{
int i;
argc--;
for(i=1; i<=argc; i++)
printf("%s%c", argv[i], i==argc? '\n': ' ');
}
@m039
m039 / get_sound.sh
Created July 24, 2011 20:14
Get an audio file from the Google Translate.
#!/bin/sh
# Author: m039 <flam44 (at) gmail (dot) com>
wget --user-agent --referer='http://translate.google.com' "http://translate.google.com/translate_tts?ie=UTF-8&tl=ja&q=$1" -O ~/.anki/decks/MNN\ I.media/${1}.mp3
@jfromaniello
jfromaniello / continous-qunit.ps1
Created August 4, 2011 14:22
The powershell continuously watch for file changes in a directory, then it executes PhantomJs with the Run-Qunit.js attached to your htm qunit test harness.
# watch a file changes in the current directory,
# execute all tests when a file is changed or renamed
$watcher = New-Object System.IO.FileSystemWatcher
$watcher.Path = get-location
$watcher.IncludeSubdirectories = $true
$watcher.EnableRaisingEvents = $false
$watcher.NotifyFilter = [System.IO.NotifyFilters]::LastWrite -bor [System.IO.NotifyFilters]::FileName
while($TRUE){
@spicycode
spicycode / tmux.conf
Created September 20, 2011 16:43
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@jaseemabid
jaseemabid / git tutorials.md
Last active March 24, 2024 00:07 — forked from netroy/git tutorials.md
Awesome git tutorials I am finding here and there
@naaman
naaman / delete-heroku-apps.sh
Last active March 5, 2021 20:57
[WARNING THIS WILL HARD DELETE YOUR APPS. YOU COULD LOSE DATA. MAKE SURE YOU KNOW WHAT YOURE DOING!!!!!!!!!!] Delete all heroku apps from bash terminal -- no script file required
for app in $(heroku apps); do heroku apps:destroy --app $app --confirm $app; done