Skip to content

Instantly share code, notes, and snippets.


Iain K. MacLeod boostventilator

View GitHub Profile
merlinmann /
Last active March 14, 2023 13:48
Merlin's Wisdom Project (Draft)

Merlin's Wisdom Project

Or: “Everybody likes being given a glass of water.”

By Merlin Mann.

It's only advice for you because it had to be advice for me.

View ipad-view-source-bookmarklet
* Bookmarklet for viewing source in iPad Safari
var w ='about:blank'),
s = w.document;
s.write('<!DOCTYPE html><html><head><title>Source of ' + location.href + '</title><meta name="viewport" content="width=device-width" /></head><body></body></html>');
robinsloan / langoliers.rb
Last active June 5, 2022 21:32
The Langoliers, a tweet deletion script
View langoliers.rb
require "rubygems"
require "twitter"
require "json"
# things you must configure
TWITTER_USER = "your_username"
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted
# get these from
CONSUMER_KEY = "your_consumer_key"
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!


cmod / minimal_fb_messenger.css
Last active February 15, 2022 19:11
Minimal Facebook Messenger for Fluid
View minimal_fb_messenger.css
Minimal Facebook Messenger
1. Make a Fluid ( instance of
1. a. (You need to buy the paid version of Fluid to modify UserStyles)
2. Apply the below CSS as a Userstyles stylesheet
3. Like magic, you can now message without all the cruft of Full Facebook
merlinmann / Official Cursor-Resting Area.txt
Last active February 12, 2022 23:00
Paste this into your Google Doc for a place to store your cursor.
View Official Cursor-Resting Area.txt
⌨️ Official Cursor-Resting Area:
│ >_< │
Kilian / annoying.js
Created January 6, 2011 15:04
How to be an asshole
View annoying.js
* Annoying.js - How to be an asshole to your users
* Copyright (c) 2011 Kilian Valkhof (
* Visit for more information and changelogs.
* Visit for the introduction and weblog
* Check out if you want to annoy developer instead of visitors
kentbrew / wholikesmitt.html
Created November 11, 2012 02:00
Who Likes Mitt?
View wholikesmitt.html
<title>Who Likes Mitt?</title>
pre#output {
height: 12em;
width: 500px;
overflow: auto;
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
View gist:1525217
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
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.
View gist:5810992
@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;