Skip to content

Instantly share code, notes, and snippets.

View kristianfreeman's full-sized avatar
🙃

Kristian Freeman kristianfreeman

🙃
View GitHub Profile
@kristianfreeman
kristianfreeman / dayone-adn.rb
Created August 11, 2012 18:10
Export into my Day One format for App.net posts
require 'json'
require 'date'
json = File.read('appnet.json')
parsed = JSON.parse(json)
f = File.new("dayoneappdotnet.txt", "a")
@kristianfreeman
kristianfreeman / adn.rb
Created August 11, 2012 17:20
App.net backup
# requires "appnet.json" (exported from ADN) in the same folder
require 'json'
require 'date'
json = File.read('appnet.json')
parsed = JSON.parse(json)
f = File.new("appdotnet.txt", "a")
@kristianfreeman
kristianfreeman / applist.md
Created August 8, 2012 20:23
app list for App.net

Safari - Yup. I like Chrome, but I don't like Google. Lesser of two evils here, people.

Dropbox — all my documents are saved right into Dropbox. Nothing else. The retention length is long enough that I've literally never had a problem losing a file.

NValt - all my thoughts go here. Anything of any sort of length. My library card number? Hi NValt. My 10 page essay about Psychology? Hello NValt. All synced through Dropbox.

Transmission - things are acquired here. Don't ask questions.

Hazel - I have some complicated recipes being filtered through Hazel for keeping my Downloads folder relatively clean, as well as meticulously organizing my media collection for access from my Apple TV and other iOS devices.

@kristianfreeman
kristianfreeman / slogger fix
Created August 5, 2012 19:54
Fix for @ttscoff's Slogger and Ruby 1.9
#!/usr/bin/ruby
# Fix for Slogger and Ruby 1.9
#
# require 'ftools'
#
require 'fileutils'
curloc = File.expand_path(File.dirname(__FILE__))
@kristianfreeman
kristianfreeman / atv.md
Created August 1, 2012 03:15
ATV Screensavers

The Apple TV has some nice pictures for screensavers, but there's only about ~20 on average for each screensaver set. Luckily, with a jailbroken Apple TV, we can replace them pretty easily.

The screensaver images are located at /System/Library/PrivateFrameworks/AppleTV.framework/Default[Album]Photos. I like SFTP'ing in with Cyberduck.

There are multiple screensaver sets — if you have a set you like the least (maybe "FlowerPhotos"?), replace those.

The files are in a pretty basic format:

01.jpg
02.jpg
@kristianfreeman
kristianfreeman / gist:3203651
Created July 30, 2012 02:45
CSS for drang
html {
zoom: 1.5;
}
@kristianfreeman
kristianfreeman / ads-knt.sh
Created June 4, 2012 21:04
removing ads on Kindle NT (no touch)
# Disable wifi
rm -rf /Volumes/Kindle/system/.assets
echo "Disable WiFi on your Kindle - it will download new ads if you don't."
echo "If you want a more thorough (permanent) method of removing ads, see Yifan Lu's work."
@kristianfreeman
kristianfreeman / utc-timezone-regex.md
Created April 1, 2012 01:36
regexing a utc timezone code

Trying to regex in ruby using this: /UTC\s.\d{4}/

This picks up both

UTC +0000 UTC -0800

The codebase I'm working with uses: /UTC\s\-?\d{4}/

@kristianfreeman
kristianfreeman / itunes.sql
Created March 12, 2012 06:16 — forked from shanemcd/itunes.sql
itunes music library database
/* create tables to store itunes music library data for quick access
- rkumar 2010 July
*/
drop table tracks;
create table tracks (
album_artist VARCHAR(50),
album_rating_computed INTEGER,
album_rating VARCHAR(50),
album VARCHAR(50),
all_items VARCHAR(50),
@kristianfreeman
kristianfreeman / freeman_smith_hw3a.adb
Created February 25, 2012 00:16
homework assignment #3a CS141
-- Homework 3a: The "Riffle Shuffle"
-- Max Smith and Kristian Freeman
-- TA: Caleb Nelson
with Ada.Integer_Text_IO; use Ada.Integer_Text_IO;
with Ada.Text_IO; use Ada.Text_IO;
PROCEDURE hw3a is
maxDeck : CONSTANT positive := 52; -- Card decks don't get any larger...
SUBTYPE deckRange is positive RANGE 1..maxDeck;