Skip to content

Instantly share code, notes, and snippets.

View boostventilator's full-sized avatar

Iain K. MacLeod boostventilator

View GitHub Profile
@merlinmann
merlinmann / wisdom.md
Last active April 17, 2024 21:52
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.

@robinsloan
robinsloan / langoliers.rb
Last active April 7, 2024 13:22
The Langoliers, a tweet deletion script
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 dev.twitter.com
CONSUMER_KEY = "your_consumer_key"
@gruber
gruber / gist:647224
Created October 26, 2010 16:26 — forked from dpk/gist:646570
Slight tweaks to dpkendal's script. Gives the BBEdit document a name (rather than "untitled <integer>", and skips the \n to \r stuff, which I don't think is necessary in recent versions of BBEdit.
tell application "Safari"
set _source to do JavaScript "window.document.documentElement.outerHTML" in document 1
set _name to name of document 1
end tell
tell application "BBEdit"
make new text window with properties ¬
{contents:_source, source language:"HTML", name:"Generated source: " & _name}
select insertion point before character 1 of text window 1
/*
* Bookmarklet for viewing source in iPad Safari
*/
javascript:(function(){
var w = window.open('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>');
s.close();
@merlinmann
merlinmann / Official Cursor-Resting Area.txt
Last active October 8, 2023 20:57
Paste this into your Google Doc for a place to store your cursor.
⌨️ Official Cursor-Resting Area:
╭―――――――╮
│ >_< │
╰―――――――╯
@Kilian
Kilian / annoying.js
Created January 6, 2011 15:04
How to be an asshole
/**
* Annoying.js - How to be an asshole to your users
*
* DO NOT EVER, EVER USE THIS.
*
* Copyright (c) 2011 Kilian Valkhof (kilianvalkhof.com)
* Visit https://gist.github.com/767982 for more information and changelogs.
* Visit http://kilianvalkhof.com/2011/javascript/annoying-js-how-to-be-an-asshole/ for the introduction and weblog
* Check out https://gist.github.com/942745 if you want to annoy developer instead of visitors
*
@herooutoftime
herooutoftime / README.md
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!

Installation

@cmod
cmod / minimal_fb_messenger.css
Last active February 15, 2022 19:11
Minimal Facebook Messenger for Fluid
/*
Minimal Facebook Messenger
==========================
1. Make a Fluid (http://fluidapp.com/) instance of https://facebook.com/messages/
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
@kentbrew
kentbrew / wholikesmitt.html
Created November 11, 2012 02:00
Who Likes Mitt?
<html>
<head>
<title>Who Likes Mitt?</title>
<style>
pre#output {
height: 12em;
width: 500px;
overflow: auto;
}
</style>
@JeffreyWay
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'