Skip to content

Instantly share code, notes, and snippets.

@freejoe76
freejoe76 / tweetcheck.sh
Last active September 30, 2015 03:38
Email one or many people when a twitter account hasn't been updated in the last hour.
#!/bin/sh
#
# NOTE: Twitter updated their m.twitter site January 2013, and this script doesn't work anymore.
#
# This script is useful for alerting a team of people when a twitter account
# hasn't been updated in the past hour. There may be other uses as well.
#
# $1 = what account to check
# $2 = what string to look for. To test the script, use 'test'
#
@freejoe76
freejoe76 / django1.4
Created March 23, 2012 17:39
Full tracklist for my yet-to-be-released second album, Backwards-incompatible changes
# Inspired by the release notes for Django 1.4, https://docs.djangoproject.com/en/dev/releases/1.4/
#
# Note: None of these tracks are actually backwards-incompatible with anything.
# They're song names not software, duh.
BACKWARDS-INCOMPATIBLE CHANGES
1. WSGI WSGI WSKE
2. Difficult-to-debug path issues
3. Double imports
4. Same code
@freejoe76
freejoe76 / holiday.class.php
Created May 16, 2012 05:07
Build a list of a particular holiday for its future dates
<?php
class day
{
public $day, $days, $year, $verbose;
function mothers($limit = 101)
{
// Return an array of the future mothers days
// for the next hundred years.
@freejoe76
freejoe76 / searchall.bash
Last active October 25, 2017 21:48
Search all files matching a pattern for a particular string
#!/bin/bash
# For the times when grep -r just doesn't cut it: Search all files matching a pattern for a particular string
# Example command (best when put in a folder that's on your path somewhere):
# searchall.bash -f *.php -s 'hoops'
# What arguments do we pass?
while [ "$1" != "" ]; do
case $1 in
-f | --file ) shift
file=$1
@freejoe76
freejoe76 / gist:4732460
Last active December 12, 2015 06:49
The Newspaper Guild-CWA Web Developer/Webmaster top minimum in all years. Re: https://twitter.com/joemurph/status/299565734814683136
Web Developer/Webmaster top minimum in all years.
The Following weekly scales are based on a 37.5 hour work week except where noted.
News Organization: Eff. Date: Scale: Exp: Notes:
Consumers Union 2010-01-01 $1352.03 4
Consumers Union 2009-01-01 $1312.65 4
Denver Rocky Mountain News 2007-09-30 $1288 5
Consumers Union 2008-01-01 $1271.33 4
San Francisco Chronicle 2010-01-01 $1263.47 6
Denver Rocky Mountain News 2006-10-01 $1247 5
San Francisco Chronicle 2009-01-01 $1237.23 6
@freejoe76
freejoe76 / NYT-salaries.txt
Last active December 12, 2015 06:49
NYT union wages, all classifications, all years.
New York Times top minimum in all years
Re: https://twitter.com/joemurph/status/299566562468315136
$ wget -Osalaries.html --post-data="NewsID=032+New+York+Times&JobsID=000+All+Job+Titles&YearID=0&submit=Submit" http://www.newsguild.org/scales/view4.inc.php
Note: POST strings generated via http://www.newsguild.org/scales/index.php?ID=query4
Date: Scale: Exp: Notes:
Editors 2010-03-31 $1955.54 0.5
Editors 2009-03-31 $1917.2 0.5
Editors 2008-03-31 $1879.61 0.5
@freejoe76
freejoe76 / sxswi-attendance.csv
Last active December 14, 2015 15:09
SXSW Interactive Attendance, 1995-present
Year Registered Attendance Percent Change
http://blogs.denverpost.com/techknowbytes/2013/03/07/sxswi-attendance-over-the-years-1995-2012/8776/ http://blogs.denverpost.com/techknowbytes/2013/03/07/sxswi-attendance-over-the-years-1995-2012/8776/ http://blogs.denverpost.com/techknowbytes/2013/03/07/sxswi-attendance-over-the-years-1995-2012/8776
1995 1010
1996 1356 34
1997 1401 3
1998 1252 -10
1999 2233 78
2000 3755 68
2001 3155 -15
2002 3015 -4
#!/usr/bin/env python
from pymarkov import markov
from random import choice
import doctest
import argparse
class Generate:
""" A song generator. Generate takes input (musician, album) and returns
a version of that musician's songs.
@freejoe76
freejoe76 / __init__.py
Last active August 29, 2015 14:04
Delete The Last Comma
#!/usr/bin/env python
@freejoe76
freejoe76 / FtpWrapper.py
Last active August 29, 2015 14:05
ftpWrapper.py
#!/usr/bin/env python
# FTP files with python.
from ftplib import FTP
import os
from optparse import OptionParser
class FtpWrapper():
""" class ftpWrapper handles FTP operations. Assumes the password is stored
in a file named '.ftppass' in the class directory.
Currently this works best for uploading one or two files. Needs to be