Skip to content

Instantly share code, notes, and snippets.

@SamWhited
SamWhited / flac2ogg.sh
Last active October 8, 2015 04:48
Scripts I wrote to manage my music collection
#!/usr/bin/env bash
# Wrap FLAC files in an OGG wrapper (.oga file).
# Deletes the original flac file after verifying that the oga file matches.
# For safety all warnings are treated as errors (and prevent deletion of flac files).
#
# WARNING: Does not prompt before overwriting `.oga' files.
#
# Examples:
#
# $ flac2ogg flacfile.flac
@SamWhited
SamWhited / anteater.scss
Created August 18, 2012 22:04
Scripts and styles for Project Anteater
$page-width: 996px;
$column-width: 425px;
$grid-bottom: 59px;
$header-height: 150px;
$screen-border: 1em;
$background-color: #000;
$text-color: #ddd;
$social-icon-size: 50px;
$header-fonts: "raleway", sans-serif;
$body-fonts: "adobe-garamond-pro", Calluna, Georgia, serif;
(
this[key] = ->
return this.attrs[key]
) for key in this.attrs
@SamWhited
SamWhited / syncMETAR.sh
Created November 17, 2012 18:54
Scripts I wrote to manage weather alerts and data
#!/bin/bash
# Used to sync METAR data for Airports I want updates from.
# All data can be fetched via FTP but that's a waste of bandwidth.
curl --silent "http://weather.noaa.gov/pub/data/observations/metar/stations/{KFTY,KATL}.TXT" -o "/var/www/weather.noaa.gov/pub/data/observations/metar/stations/#1.TXT"
@SamWhited
SamWhited / bep_00XX.rst
Last active December 10, 2015 06:18
A potential BEP candidate for the Bittorrent standards track
BEP: XX
Title: DNS Tracker Lookup with FQDNs
Version: $Revision$
Last-Modified: $Date$
Author: Sam Whited <[email protected]>
Status: Draft
Type: Standards Track
Created: 27-December-2012
Post-History:
@SamWhited
SamWhited / .gitignore
Last active December 10, 2015 14:28
My standard .gitignore file (compilation of files from https://github.com/github/gitignore)
.*
!.gitignore
*~
.*.s[a-w][a-z]
*.un~
Session.vim
.netrwhist
# Emacs
@SamWhited
SamWhited / gitignore.vim
Last active December 11, 2015 23:08
Parse a .gitignore file in vim
" Load a .gitignore file from the current directory
" and parse it for use in Vim
let gitignore = '.gitignore'
if filereadable(gitignore)
let igstring = ''
for oline in readfile(gitignore)
let line = substitute(oline, '\s|\n|\r', '', "g")
if line =~ '^#' | con | endif
if line == '' | con | endif
From 9046e5a23499218f14d84a1d555abda1cf1c1c66 Mon Sep 17 00:00:00 2001
From: Sam Whited <[email protected]>
Date: Fri, 8 Feb 2013 09:33:26 -0500
Subject: [PATCH] Remove deprecated rake/gempackagetask
---
lib/tasks/release.rake | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/tasks/release.rake b/lib/tasks/release.rake
@SamWhited
SamWhited / codescompiling.tex
Last active December 13, 2015 20:48
Code's Compiling, a duple becket contra dance by Sam Whited
\documentclass[a7paper]{contracard}
\begin{document}
\begin{contra}{Code's Compiling}{Sam Whited}{Duple becket}
\move[8]{Neighbor dosido}
\move[8]{Partner see saw}
\move{Shadow swing}
\move[8]{Balance and petronella}
\move[8]{Balance and petronella}
\move[8]{Partner swing}
@SamWhited
SamWhited / gist:5335415
Created April 8, 2013 09:09
Build error in coin3d
Making all in fonts
make[4]: Entering directory `/home/sam/Downloads/coin/src/Coin-3.1.3/src/fonts'
/bin/sh ../../libtool --mode=compile g++ -DHAVE_CONFIG_H -I../../include -I../../include -I../../src -I../../src -D_FORTIFY_SOURCE=2 -D_REENTRANT -DNDEBUG -DCOIN_DEBUG=0 -DCOIN_INTERNAL -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -W -Wall -Wno-unused -Wno-multichar -Woverloaded-virtual -c -o freetype.lo freetype.cpp
g++ -DHAVE_CONFIG_H -I../../include -I../../include -I../../src -I../../src -D_FORTIFY_SOURCE=2 -D_REENTRANT -DNDEBUG -DCOIN_DEBUG=0 -DCOIN_INTERNAL -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -W -Wall -Wno-unused -Wno-multichar -Woverloaded-virtual -c freetype.cpp -fPIC -DPIC -o .libs/freetype.o
In file included from ../../src/base/dict.h:31:0,
from freetype.cpp:142:
/usr/include/c++/4.8.0/cstdlib: In function 'long long int std::abs(long long int)':
/usr/include/c++/4.8.0/cstdlib:174:20: error: de