Skip to content

Instantly share code, notes, and snippets.

View wjlafrance's full-sized avatar
🐶
Wondering if Github is becoming a social network.

William LaFrance wjlafrance

🐶
Wondering if Github is becoming a social network.
View GitHub Profile
#define pathInDocumentDirectory(fileName) [[NSSearchPathForDirectoriesInDomain(NSDocumentDirectory, NSUserDomainMask, YES) lastObject] stringByAppendingPathComponent:fileName]
//
// DocJohnsonSoundboardModel.m
// DocJohnsonSoundboard
//
// Created by William LaFrance on 4/6/11.
// Copyright 2011 William LaFrance. All rights reserved.
//
#import "DocJohnsonSoundboardModel.h"
Apr 20 03:35:28 cisjava ConsoleMessage: Starting Mac OS X Server services
Apr 20 03:55:09 cisjava ConsoleMessage: Starting Mac OS X Server services
Apr 20 03:59:39 cisjava ConsoleMessage: Starting Mac OS X Server services
Apr 20 04:03:45 cisjava ConsoleMessage: Starting Mac OS X Server services
Apr 20 04:57:38 cisjava ConsoleMessage: Starting Mac OS X Server services
Apr 20 05:36:29 cisjava ConsoleMessage: Starting Mac OS X Server services
Apr 20 06:08:58 cisjava ConsoleMessage: Starting Mac OS X Server services
Apr 20 06:49:00 cisjava ConsoleMessage: Starting Mac OS X Server services
Apr 20 06:51:13 cisjava ConsoleMessage: Starting Mac OS X Server services
Apr 20 06:53:49 cisjava ConsoleMessage: Starting Mac OS X Server services
#! /usr/bin/ruby
#
# tokenls
# william lafrance
#
# i got tired of forgetting to do my todos
# you can list off a bunch of files to check
#
# to test for custom tokens:
# tokenls --tokens=these,are,a,list,of,tokens file1 file2 file3
@wjlafrance
wjlafrance / accounting.rb
Created June 23, 2011 19:31
Script to calculate taxes for biweekly paychecks
#! /usr/bin/ruby
BUSINESS_TAX_SOCIAL_SECURITY = 0.062
EMPLOYEE_TAX_SOCIAL_SECURITY = 0.042
BUSINESS_TAX_MEDICARE = 0.0145
EMPLOYEE_TAX_MEDICARE = 0.0145
EMPLOYEE_TAX_INCOME_STATE = 0.05
[17:44:05] [william@enterprise ~/Documents/Git/GitHub/javaop2]$ jruby --ng -S rake test
rake aborted!
cannot link Java class com.javaop.BNetLogin.versioning.CheckRevision, probable missing dependency: com/javaop/exceptions/LoginException
Tasks: TOP => test
(See full trace by running task with --trace)
[17:44:43] [william@enterprise ~/Documents/Git/GitHub/javaop2]$ jruby --ng -S rake test
Loaded suite /Users/william/bin/jruby-1.6.3/bin/rake
Started
.....
@wjlafrance
wjlafrance / gist:1166198
Created August 23, 2011 19:18
Rakefile additions
task :test do
system("autotest > log/test.log 2>&1 &")
end
task :deploy do
system("touch tmp/restart.txt")
system("rsync -r --delete * server:path")
end
task :tail_log do
@wjlafrance
wjlafrance / gist:1220858
Created September 16, 2011 00:11
Wells Fargo Form Letter Fail
Dear William Lafrance:
Thank you for contacting Wells Fargo. My name is K******, and I am happy to assist you.
I received your email instructing us to cancel your Online Banking service through Quicken. I am sorry that the service does not meet your needs at this time.
As you requested, I canceled the service. Because we value your banking relationship, I also reimbursed your account in the amount of $9.95, corresponding to the fee that was recently charged to your account for this service. This reimbursement will post to your account within 2 business days.
If the fee and the credit are initiated within the same statement cycle, these items will offset each other. The fee will no longer show up online or on your monthly statement.
@wjlafrance
wjlafrance / gist:1291394
Created October 16, 2011 20:38
Downcase all files in current directory
for f in *; do mv $f `echo $f | ruby -e 'puts gets.downcase'`; done
# Crawl WoW forums thread for all characters who posted, and their realms
# Doesn't uniquify characters
require 'rubygems'
require 'nokogiri'
require 'open-uri'
require 'json'
thread_url = "http://us.battle.net/wow/en/forum/topic/3657428962"