Skip to content

Instantly share code, notes, and snippets.

@freejoe76
freejoe76 / ftp.bash
Last active March 2, 2016 18:22
ftp.bash
#!/bin/bash
# ftp files from one directory to another.
# Assumes credentials are stored in a file in the home directory named .ftppass
# NOTE: FTP IS AN INSECURE PROTOCOL AND SHOULD BE AVOIDED.
SOURCEDIR=''
DIR=''
HOST=''
USER=''
PASS=`cat ~/.ftppass`
FILES='*'
@freejoe76
freejoe76 / iframe_breaker.js
Created October 13, 2014 20:25
iframe_breaker.js
if (top !== self)
{
// We want to track when this happens, which we do with a custom
// ?source=framebuster query added to the URL.
// The challenge is, often there's already a ?source=rss on the URL,
// which means we have to handle that too.
var sourcedomain = 'denverpost.com';
var sourceurl = self.document.location.toString();
var referrer = document.referrer.split('/')[2];
if ( sourceurl.indexOf("www." + sourcedomain) > 0 && referrer.indexOf(sourcedomain) < 0 )
@freejoe76
freejoe76 / __init__.py
Last active July 25, 2016 21:17
FileWrapper
#!/usr/bin/env python
<!-- ################################################################################################ -->
<!-- -->
<!-- THIS FILE IS FAR FROM COMPLETE -- DON'T USE IT WITHOUT FIXING EVERYTHING!! -->
<!-- -->
<!-- Things to fix: -->
<!-- Everything in the meta twitter: tags! -->
<!-- Everything in the Facebook og: meta tags -->
<!-- All the other meta tags! -->
<!-- The Title! -->
<!-- The Omniture tags!
@freejoe76
freejoe76 / parse_csv.py
Created November 25, 2014 16:52
Parse a CSV into another file
#!/usr/bin/env python
import csv
def main():
""" Take a CSV, write it to a file. """
with open('name-of-file.csv', 'rb') as csvfile:
i = 0
content = []
reader = csv.reader(csvfile)
for row in reader:
@freejoe76
freejoe76 / everyword.txt
Last active August 29, 2015 14:14
Every Word
a
aardvark
aardwolf
ab
aba
abaca
abacist
aback
abactinal
abacus
@freejoe76
freejoe76 / hit-and-runs.csv
Last active August 29, 2015 14:15
Hit and runs and vehicular homicides in Denver, 2010-2015 via Denver Police Department
We can't make this file beautiful and searchable because it's too large.
id, category, type, date_reported, address, neighborhood, lat, lon
201593096540100, traffic-accident, traffic-accident-hit-and-run, 2015-02-17 00:15:59, 4800 BLOCK W GILL PL, westwood, 39.7048142, -105.0487949
201592793540100, traffic-accident, traffic-accident-hit-and-run, 2015-02-16 19:44:00, S ONEIDA ST / E TENNESSEE AVE, washington-virginia-vale, 39.698434, -104.9082345
201592662540100, traffic-accident, traffic-accident-hit-and-run, 2015-02-16 18:56:00, 5200 BLOCK N QUEBEC ST, stapleton, 39.7891756, -104.9031733
201592778540100, traffic-accident, traffic-accident-hit-and-run, 2015-02-16 19:28:59, 4060 S TAMARAC DR, hampden-south, 39.6418407, -104.8930407
201592562540100, traffic-accident, traffic-accident-hit-and-run, 2015-02-16 17:03:59, I25 HWYNB / E HAMPDEN AVE, hampden-south, 39.6530788, -104.9182593
201592493540100, traffic-accident, traffic-accident-hit-and-run, 2015-02-16 16:53:00, 3200 BLOCK N PECOS ST, highland, 39.762146, -105.0063315
201592368540100, traffic-accident, traffic-accident-hit-and-
@freejoe76
freejoe76 / frontier online checkin.md
Last active August 29, 2015 14:19
QA'ing Frontier Airlines' check-in process

It took me three tries to check in on Frontier Airlines.

Here's what happened:

  1. First I clicked the "Check In Here" link in my "it's time to check in for your flight" email from Frontier: https://rebooking.flyfrontier.com/LinkTracking?id=727475&url=https://booking.flyfrontier.com/checkin/inline?rl=OTJZVA&ln=MURPHY&utm_campaign=transactional&utm_source=checkin&utm_source=checkin
  2. That took me to a page with an error message on it, "Unable to checkin at this time, please try again later." Seeing as I don't really trust Frontier's site anyway, I disregarded that error message and clicked to Frontier's homepage, then to its My Trip / Check-in tab. I entered my reservation code and name and clicked the "Search" button.
  3. That took me to a full-page ad for a Barclay's / Frontier credit card. I spent a minute scrolling up and down the page for a no-thanks / continue-type link, there were none, just a link to sign up for a credit card I already have (and Frontier knows I already have, it's saved in my Frontier
@freejoe76
freejoe76 / ums_2015.csv
Last active August 29, 2015 14:25
Bands I want to see at UMS 2015
artist day time venue url
Leggy Thursday 8 p.m. Hi-Dive https://leggy.bandcamp.com/
Baby Birds Don't Drink Milk Thursday 10 p.m. Hi-Dive https://soundcloud.com/bbddm
Ambit Thursday 11 p.m. Blue Ice Lounge https://soundcloud.com/greetingsfromambit
Bear Antler Thursday 11 p.m. Illegal Pete's http://www.bearantler.com/
LSD Bags Friday 9 p.m. Irish Rover http://lsdbags.bandcamp.com/
Cop Circles Saturday 10 p.m. Brendan's Pub http://copcircles.bandcamp.com/
Panther Martin Sunday 5 p.m. Irish Rover https://soundcloud.com/panther-martin
Turner Jackson Sunday 10 p.m. Blue Ice Lounge https://soundcloud.com/turnerjacksonmusic
High Five Sunday 11 p.m. Blue Ice Lounge https://soundcloud.com/highfivehiphop
@freejoe76
freejoe76 / by-team.csv
Last active October 13, 2015 17:02
MLB contested plays, 2015
Team Total Challenges Confirmed Stands Overturned
Arizona 36 3 10 23
Atlanta 46 10 13 23
Baltimore 30 9 4 17
Boston 51 18 13 20
Chicago (AL) 41 5 15 21
Chicago (NL) 50 11 11 28
Cincinnati 33 4 9 20
Cleveland 28 3 10 15
Colorado 47 11 12 24