Skip to content

Instantly share code, notes, and snippets.

View cavebatsofware's full-sized avatar
🧙

Grant DeFayette cavebatsofware

🧙
  • NY
View GitHub Profile
@cavebatsofware
cavebatsofware / IFSQL.sql
Created May 7, 2014 19:18
IFSQL... if only
SELECT
d.order_id AS OrderID,
o.ship_date AS ShipDate,
a.shipping_company AS ShippingCompany,
a.shipping_city AS ShippingCity,
a.shipping_state AS ShippingState,
a.shipping_zip AS ShippingZip,
d.client_reference AS ClientReference,
m.carrier AS Carrier,
IF(ISNULL(bo.bol_id),
@cavebatsofware
cavebatsofware / keeper.rb
Last active August 29, 2015 13:57
Simple house keeping script. Archives old files.
require 'time'
require 'date'
class Keeper
EXPIRE_TIME = 1209600 # 14 days
def initialize(path)
@root = Dir.new(path)
@client_folders = {}