Skip to content

Instantly share code, notes, and snippets.

View boostventilator's full-sized avatar

Iain K. MacLeod boostventilator

View GitHub Profile
pbausch / mediumtweets
Last active August 29, 2015 14:00
Bookmarklet: Search for Medium Article Mentions on Twitter
javascript:var h=location.href;if((h.indexOf('') !== -1) && (h.split('/').length-1 >= 4)){location.href=''+encodeURIComponent(h.substr(h.lastIndexOf('/') + 1))}else{alert('Not at a Medium article.');}
tdreyno / border.html
Created June 1, 2012 04:05
Border Coda Pop
<!doctype html>
<link href="stylesheets/border.css" rel="stylesheet">
<script src="javascripts/jquery-1.7.2.js"></script>
<script src="javascripts/ember-"></script>
<script src="javascripts/ember-jui.js"></script>
<script src="javascripts/popkit.js"></script>
<script src="javascripts/border.js"></script>
stash /
Last active December 15, 2015 20:40
French Press Method

French Press Coffee

  • grind super coarse
  • add just enough boiling water to cover grounds. Steep for 30s.
  • fill press to top. Stir to get a good vortex, which will pull the grounds down into a "cone" on the bottom.
  • Leave for ~5mins
  • skim floating grounds off the top with a spoon
  • press
halihax /
Last active August 21, 2019 17:18
Community guidelines for participating in the Halihax Slack group.


#Halihax is a place to collaborate, ask questions, discuss new products, find work, get feedback and keep up on local events.

We’ve developed a loose set of guidelines to help you navigate the community:


We encourage members to create meaningful and respectful discussion around their experiences and projects/products.

ttscoff / brettquix.txt
Created May 23, 2012 02:32
Brett's Quix File
@Brett's searches
@Brett's custom searches
go Open first result (DuckDuckGo)
b Bang search (DuckDuckGo)
grep Greplin
ss Current site (DuckDuckGo)
bt (DuckDuckGo)
gh Search GitHub (everything)
hints Search Mac OS X Hints
mu Search MacUpdate (Software)
gruber / gist:1063605
Created July 4, 2011 16:48
Simple Inbox Archiving Script for Apple Mail
-- See article here:
-- The following should be one long line:
set _description to "All unflagged, read messages in each IMAP account
inbox will be moved to the “Archive” mailbox corresponding to that
account. This action is not undoable."
tell application "Mail"
display alert "Archive read messages from IMAP inboxes?" buttons ¬
{"Cancel", "Archive"} cancel button 1 message _description
brentsimmons / gist:5810992
Last active January 3, 2021 02:22
Detect a tap on a URL inside a UITextView. Note: the rs_links method isn't included -- you'll need something that takes text and returns an array of detected links. This gist just demonstrates walking through the UITextView characters.
@implementation UITextView (RSExtras)
static BOOL stringCharacterIsAllowedAsPartOfLink(NSString *s) {
/*[s length] is assumed to be 0 or 1. s may be nil.
Totally not a strict check.*/
if (s == nil || [s length] < 1)
return NO;
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
kentbrew / wholikesmitt.html
Created November 11, 2012 02:00
Who Likes Mitt?
<title>Who Likes Mitt?</title>
pre#output {
height: 12em;
width: 500px;
overflow: auto;
herooutoftime /
Last active May 13, 2022 15:55
MODx (missing) preview of unsaved changes

Idea & Concept

MODx Revolution lacks a preview of unsaved changes. For editors this is a rather important feature to check if their changes are correctly displayed and it's easy to do. No need to unpublish, save and view the resource. Just click 'Preview' and a MODx Window will show you all the changes.

The way it works is pretty easy: When clicking the 'Preview' button and OnBeforeDocFormSave is triggered all current (saved) data will be stored in a cache file, the resource will be saved with the new data. If OnWebPageComplete is fired, the saved data will be replaced with the previously cached data.

So for a short period the actual preview will be live!