Skip to content

Instantly share code, notes, and snippets.

View 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 Aug 11, 2013
Get from NewsBlur an OPML file of all your feeds via the API.
View NewsBlur OMPL 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 Mar 7, 2017
Some crazy tricks to automate by backup processes. This is the contents of an OS X Automator workflow.
View Backup Workflow.md

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 Dec 5, 2011
Processing code used to make my business cards
View plus-business-cards.pde
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;
View recent_tracks.pde
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 Oct 17, 2010
Enter in your zip code, and it tells you if an umbrella is necessary.
View Umbrella.php
<?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");
View finley is the man.html
<!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();
View gist:276301
<?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 Feb 12, 2009
Keypress detection script for Windows automation program AutoHotKey. Designed to control the Floppy Stereo's WinAmp functions.
View FloppyStereo.ahk
; <COMPILER: v1.0.35.10>