Skip to content

Instantly share code, notes, and snippets.

Avatar

Iain K. MacLeod boostventilator

View GitHub Profile
@merlinmann
merlinmann / wisdom.md
Last active Feb 2, 2023
Merlin's Wisdom Project (Draft)
View wisdom.md

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.

@merlinmann
merlinmann / Official Cursor-Resting Area.txt
Last active Feb 12, 2022
Paste this into your Google Doc for a place to store your cursor.
View Official Cursor-Resting Area.txt
⌨️ Official Cursor-Resting Area:
╭―――――――╮
│ >_< │
╰―――――――╯
@halihax
halihax / COMMUNITY.md
Last active Aug 21, 2019
Community guidelines for participating in the Halihax Slack group.
View COMMUNITY.md

COMMUNITY GUIDELINES

#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:

CREATE DISCUSSION

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

@herooutoftime
herooutoftime / README.md
Last active May 13, 2022
MODx (missing) preview of unsaved changes
View README.md

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 Feb 15, 2022
Minimal Facebook Messenger for Fluid
View minimal_fb_messenger.css
/*
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
@pbausch
pbausch / mediumtweets
Last active Aug 29, 2015
Bookmarklet: Search for Medium Article Mentions on Twitter
View mediumtweets
javascript:var h=location.href;if((h.indexOf('medium.com') !== -1) && (h.split('/').length-1 >= 4)){location.href='https://twitter.com/search?q='+encodeURIComponent(h.substr(h.lastIndexOf('/') + 1))}else{alert('Not at a Medium article.');}
@brentsimmons
brentsimmons / gist:5810992
Last active Jan 3, 2021
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;
@stash
stash / press.md
Last active Dec 15, 2015
French Press Method
View press.md

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
View wholikesmitt.html
<html>
<head>
<title>Who Likes Mitt?</title>
<style>
pre#output {
height: 12em;
width: 500px;
overflow: auto;
}
</style>
@robinsloan
robinsloan / langoliers.rb
Last active Jun 5, 2022
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 dev.twitter.com
CONSUMER_KEY = "your_consumer_key"