This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// includes | |
// | |
#import <SystemConfiguration/SystemConfiguration.h> | |
#import <CoreFoundation/CoreFoundation.h> | |
#import <arpa/inet.h> | |
#import <string> | |
// | |
// desc: convert IPv4 address from binary format to numbers-and-dots notation in a string |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// SuperCollider Examples | |
//boot server | |
s.boot; | |
// SC as system for sound synthesis and sound processing | |
// patching synth moduls by writing synth defs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Build Zsh from sources on Ubuntu. | |
# From http://zsh.sourceforge.net/Arc/git.html and sources INSTALL file. | |
# Some packages may be missing | |
sudo apt-get install -y git-core gcc make autoconf yodl libncursesw5-dev texinfo | |
git clone git://zsh.git.sf.net/gitroot/zsh/zsh | |
cd zsh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"database/sql" | |
"github.com/mattn/go-sqlite3" | |
"log" | |
"os" | |
) | |
func runQuery(db *sql.DB, query string) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Cyberpunk Colour Theme | |
;; | |
;; "and he'd still see the matrix in his sleep, bright lattices of logic | |
;; unfolding across that colorless void..." | |
;; William Gibson, Neuromancer. | |
;; | |
(require 'color-theme) | |
;;;###autoload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Script for assigning the date of a track in a GPX file as track name. | |
# | |
# Usage e.g $ python ChangeGpxTrackName.py source.gpx target.gpx" | |
# | |
# Peter Vasil | |
# Date: 2011-02-05 | |
from optparse import OptionParser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Transparent editing of gpg encrypted files. | |
" By Wouter Hanegraaff <wouter@blub.net> | |
augroup encrypted | |
au! | |
" First make sure nothing is written to ~/.viminfo while editing | |
" an encrypted file. | |
autocmd BufReadPre,FileReadPre *.gpg set viminfo= | |
" We don't want a swap file, as it writes unencrypted data to disk | |
autocmd BufReadPre,FileReadPre *.gpg set noswapfile | |
" Switch to binary mode to read the encrypted file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defhydra ptrv/smartparens (:hint nil) | |
" | |
Sexps (quit with _q_) | |
^Nav^ ^Barf/Slurp^ ^Depth^ | |
^---^------------^----------^-----------------^-----^----------------- | |
_f_: forward _→_: slurp forward _R_: splice | |
_b_: backward _←_: barf forward _r_: raise | |
_u_: backward ↑ _C-<right>_: slurp backward _↑_: raise backward | |
_d_: forward ↓ _C-<left>_: barf backward _↓_: raise forward | |
_p_: backward ↓ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Force-Directed Graph Drawing | |
import Tkinter | |
import random | |
import math | |
# d = [ | |
# [.0, .3, .3, .0], |
NewerOlder