Skip to content

Instantly share code, notes, and snippets.

jasonsnell / gist:5033421
Created Feb 25, 2013
Macworld/IDG Markdown to HTML AppleScript
View gist:5033421
--Macworld Markdown to HTML script
--by Jason Snell <>
--Markdown and SmartyPants by John Gruber <>
--Version 10: Added Euro support and forced Unicode for output file
--Version 11: Output now opens as new document in source window.
--Version 12: Makes sure the output document is set to source language of HTML
--Version 13: Support for [[jump]] tag
--Version 14: Rewrite iLife ‘09 style tags to proper ’09 style.
--Version 15: Support pound symbol
jasonsnell / gist:1b728736c636272bc5da
Last active Aug 29, 2015
Use this in an Automator action set to accept file input from the command line
View gist:1b728736c636272bc5da
for i in "$@" ; do /Users/jsnell/ffmpeg -i "$i" -map 0:0 -acodec pcm_s16le -ac 1 -out_sample_rate 44100 "${i%.*}.wav" ; done
View purpleaqijsnell.js
I've moved this to a proper GitHub project.
Check it out at:
jasonsnell / aq.5m.php
Last active Jul 22, 2021
BitBar plugin for air quality
View aq.5m.php
#!/usr/bin/env php
error_reporting( 0 );
// This version is for SwiftBar.
// <bitbar.title>EPA Air Quality</bitbar.title>
// <bitbar.version>v2.0</bitbar.version>
// <>Jason Snell</>
// <>jasonsnell</>
jasonsnell / airquality.scpt
Created Aug 26, 2020
Air Quality AppleScript
View airquality.scpt
-- PurpleAir station ID
set theStationID to "6732"
tell application "JSON Helper"
set theWeather to (fetch JSON from ("" & theStationID) with cleaning feed)
set theStatsA to (read JSON from (Stats of item 1 of results of theWeather))
set theStatsB to (read JSON from (Stats of item 2 of results of theWeather))
set theLocation to Label of item 1 of results of theWeather
set theLat to (Lat of item 1 of results of theWeather)
set theLon to (Lon of item 1 of results of theWeather)
jasonsnell / aqmono.5m.php
Last active Sep 6, 2020
Monochrome Air Quality BitBar plugin
View aqmono.5m.php
#!/usr/bin/env php
error_reporting( 0 );
// find a PurpleAir sensor ID on the PurpleAir map and put that ID in $show
$show = '6732';
$url = ( '' . $show );
// Get the sensor data via JSON
jasonsnell / epaaq.5m.php
Last active Dec 18, 2020
Air quality from PurpleAir sensor but with EPA adjustments
View epaaq.5m.php
#!/usr/bin/env php
error_reporting( 0 );
// This version requires SwiftBar, rather than BitBar.
// <bitbar.title>EPA Air Quality</bitbar.title>
// <bitbar.version>v2.0</bitbar.version>
// <>Jason Snell</>
// <>jasonsnell</>
View Template Gun.applescript
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
set nameArray to {}
set templateFolder to (alias "Macintosh HD:Users:jsnell:Dropbox:Podcast Templates:")
tell application "Finder" to set theNames to the name of items in folder templateFolder
set mychoice to (choose from list theNames with prompt "Choose your Template" with title "Template Gun" default items "None" OK button name {"Choose"} cancel button name {"Cancel"}) as string