Skip to content

Instantly share code, notes, and snippets.

View cjwinchester's full-sized avatar
💭
🤌

Cody Winchester cjwinchester

💭
🤌
View GitHub Profile
@cjwinchester
cjwinchester / index.html
Last active August 24, 2016 03:07
experimenting with svg path animation
<html>
<style>
@-moz-keyframes draw {
50% {
stroke-dashoffset: 0;
}
}
@-webkit-keyframes draw {
50% {
@cjwinchester
cjwinchester / .make-dat-gif.bat
Created July 1, 2016 05:57
m4v -> cut -> pngs -> gif
ffmpeg -i input.m4v -ss 00:50:57 -t 00:00:14 cut.mp4
ffmpeg -i cut.mp4 -r 10 output%05d.png
convert tagd*.png -loop 0 -dither none -deconstruct -layers optimize -matte -depth 8 -background none -quantize transparent output.gif
@cjwinchester
cjwinchester / lol.py
Created May 5, 2016 23:20
hey buddy i got something for you here [fishes around in pocket]
import turtle
t = turtle.Pen()
t.left(180)
t.up()
t.forward(60)
t.down()
t.right(90)
t.forward(60)
t.left(90)
@cjwinchester
cjwinchester / jokes.json
Created May 3, 2016 02:01
Command-Line Kid Jokes As A Service
[
{
"joke": "orange",
"punchline": "Orange you glad I'm telling you all these knock-knock jokes?",
"knockknock": true
},
{
"joke": "boo",
"punchline": "Don't cry about it. It's just a joke.",
"knockknock": true
@cjwinchester
cjwinchester / salammbo.txt
Last active March 29, 2016 03:44
Salammbô, by Gustave Flaubert
SALAMMBO
By Gustave Flaubert
(http://www.gutenberg.org/files/1290/1290-h/1290-h.htm)
CHAPTER I: THE FEAST
It was at Megara, a suburb of Carthage, in the gardens of Hamilcar. The soldiers whom he had commanded in Sicily were having a great feast to celebrate the anniversary of the battle of Eryx, and as the master was away, and they were numerous, they ate and drank with perfect freedom.
@cjwinchester
cjwinchester / city-getter.sh
Last active March 16, 2016 23:13
How common is your city name? Use Census data to find out.
city=$1
if [[ -n "$city" ]]; then
echo "$city"
wget -q -O states.txt -nc http://www2.census.gov/geo/docs/reference/state.txt
echo "Fetched state file"
wget -q -O places.txt -nc http://www2.census.gov/geo/docs/reference/codes/files/national_places.txt
echo "Fetched national places file"
csvjoin -e "iso-8859-1" -d "|" -c 2,1 places.txt states.txt | csvcut -c 8,9,10,7,4,3 | csvsort -c 6 | csvformat -D "|" > places_with_state_names.txt
echo "Merged place file with states"
@cjwinchester
cjwinchester / gist-curler.sh
Created March 9, 2016 19:18
Read a local markdown file and post as a new gist.
# like ok say you have a local file called `test.md` and your access token saved as an environmental variable ($GITHUB_TOKEN)
file_contents=$(cat test.md); curl -u cjwinchester:$GITHUB_TOKEN -X POST -d '{ "files": { "test.md": { "content": "'"$(echo $file_contents)"'" } }, "description": "testing the gist endpoint here don't mind me", "public": true }' https://api.github.com/gists
@cjwinchester
cjwinchester / 2016-02-05_austin_lobbyists.json
Last active February 5, 2016 07:50
Get a pipe-delimited text file + non-bananas json of Austin lobbyists.
[{"client": {"city": "AUSTIN", "name": "ST. DAVID'S FOUNDATION", "zip": "78704", "state": "TEXAS", "biz": "NON-PROFIT", "address": "811 BARTON SPRINGS RD, STE 600"}, "lobbyist": {"city": "AUSTIN", "fname": "MICHAEL", "zip": "78701", "lname": "WHELLAN", "state": "TEXAS", "full_name": "MICHAEL WHELLAN", "address": "401 CONGRESS AVENUE, SUITE 2200"}}, {"client": {"city": "AUSTIN", "name": "TX RR620 APARTMENTS, LTD", "zip": "78705", "state": "TEXAS", "biz": "APARTMENT DEVELOPMENT", "address": "1101 S. CAP OF TEXAS HWY, STE F2100"}, "lobbyist": {"city": "AUSTIN", "fname": "JERRY", "zip": "78701", "lname": "HARRIS", "state": "TEXAS", "full_name": "JERRY HARRIS", "address": "111 CONGRESS AVENUE, SUITE 1400"}}, {"client": {"city": "AUSTIN", "name": "SCENIC AUSTIN", "zip": "78762", "state": "TEXAS", "biz": "ENVIRONMENTAL ADVOCACY", "address": "PO BOX 6456"}, "lobbyist": {"city": "AUSTIN", "fname": "KELAN", "zip": "78703", "lname": "ROBINSON", "state": "TEXAS", "full_name": "KELAN ROBINSON", "address": "1717 WEST 6TH S
@cjwinchester
cjwinchester / 2016-01-06-output.json
Last active January 6, 2016 23:06
A Python script to scrape basic data on childcare providers in Omaha.
[{"owner": "24/2 CHILD CARE CENTER INC", "phone": "402-614-0277", "name": "24/2 CHILD CARE CENTER INC", "address": "8025 MAPLE ST Omaha, NE 68134"}, {"owner": "OMAHA CHILD CARE CENTER LLC", "phone": "402-933-4404", "name": "A TO Z LEARNING ACADEMY owned by OMAHA CHILD CARE CENTER LLC", "address": "6901 NORTH 102nd CIR Omaha, NE 68122"}, {"owner": "TJ WOLF LLC", "phone": "402-496-1020", "name": "ABC CHILDCARE", "address": "15650 W MAPLE RD Omaha, NE 68116"}, {"owner": "THE PETRY GROUP INC", "phone": "402-496-1020", "name": "ABC CHILDCARE", "address": "15650 W MAPLE RD Omaha, NE 68116"}, {"owner": "KELLY PETRY", "phone": "402-496-1020", "name": "ABC CHILDCARE", "address": "15650 W MAPLE RD OMAHA, NE 68116"}, {"owner": "ABC DAYCARE LLC", "phone": "402-496-1020", "name": "ABC DAYCARE LLC", "address": "15650 W MAPLE RD Omaha, NE 68116"}, {"owner": "ACADEMIC ADVENTURES, INC", "phone": "402-884-0888", "name": "ACADEMIC ADVENTURES, INC", "address": "16909 BLONDO ST Omaha, NE 68116"}, {"owner": "TINA THAMM", "phone":
@cjwinchester
cjwinchester / image-tweeter.py
Last active November 30, 2015 22:21
Pythonically tweet an image (fetched from a URL) with your text.
from twitter import *
import requests
"Reference: https://pypi.python.org/pypi/twitter"
t = Twitter(auth=OAuth(
token,
token_secret,
consumer_key,
consumer_secret