Skip to content

Instantly share code, notes, and snippets.

View jpfinley's full-sized avatar

John Finley jpfinley

View GitHub Profile
@jpfinley
jpfinley / keybase.md
Created January 23, 2015 20:20
keybase.md

Keybase proof

I hereby claim:

  • I am jpfinley on github.
  • I am heyfinley (https://keybase.io/heyfinley) on keybase.
  • I have a public key whose fingerprint is RETU RN T HIS. PGP. GET_ FING ERPR INT( ); }

To claim this, I am signing this object:

@jpfinley
jpfinley / NewsBlur OMPL API
Created August 11, 2013 03:36
Get from NewsBlur an OPML file of all your feeds via the API.
curl -d "username=XXXXX&password=XXXXX" --cookie-jar cookies.txt -i -X POST https://www.newsblur.com/api/login
curl -b cookies.txt -o NewsBlur_$(date +"%Y-%m-%d").opml https://www.newsblur.com/import/opml_export
@jpfinley
jpfinley / Backup Workflow.md
Last active March 7, 2017 14:20
Some crazy tricks to automate by backup processes. This is the contents of an OS X Automator workflow.

Make sure the external drives are mounted (AppleScript)

try
  do shell script "ls /Volumes/Terrabyte/"
  do shell script "ls /Volumes/TerrabyteTwo/"
on error
  display dialog "External drive not mounted."
  error number -128 #supposedly kills the current Automator workflow
end try
@jpfinley
jpfinley / plus-business-cards.pde
Created December 5, 2011 02:36
Processing code used to make my business cards
import processing.pdf.*;
// Size of each cell in the grid, ratio of window size to video size
// 80 * 8 = 640
// 60 * 8 = 480
int videoScale = 8;
// Number of columns and rows in our system
int cols, rows;
XMLElement xml;
void setup() {
size(200, 200);
String url = YOUR_URL_HERE;
xml = new XMLElement(this, url);
XMLElement[] tracks = xml.getChildren("recenttracks/track");
for (int i = 0; i < tracks.length; i++) {
XMLElement artist = tracks[i].getChild("artist");
@jpfinley
jpfinley / Umbrella.php
Created October 17, 2010 20:10
Enter in your zip code, and it tells you if an umbrella is necessary.
<?php
$reader = new XMLReader();
$reader->open('http://weather.yahooapis.com/forecastrss?p=' . $_REQUEST['Digits']);
while ($reader->read()) {
if($reader->name == "yweather:location"){
$location = $reader->getAttribute("city");
}
if($reader->name == "yweather:condition"){
$condition = $reader->getAttribute("text");
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<script language="javascript" type="text/javascript">
//<![CDATA[
function getCount(){
removeAllAnswers();
<?php foreach ($katies_items as $i=>$item) { ?>
<li<?php echo ($i % 2 == 0) ? " class='special'" : "" ?>>
.. stuff goes here
</li>
<?php } ?>
@jpfinley
jpfinley / FloppyStereo.ahk
Created February 12, 2009 02:41
Keypress detection script for Windows automation program AutoHotKey. Designed to control the Floppy Stereo's WinAmp functions.
; <COMPILER: v1.0.35.10>