Skip to content

Instantly share code, notes, and snippets.

View boostventilator's full-sized avatar

Iain K. MacLeod boostventilator

View GitHub Profile
@pbausch
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('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.');}
@tdreyno
tdreyno / border.html
Created June 1, 2012 04:05
Border Coda Pop
<!doctype html>
<html>
<head>
<link href="stylesheets/border.css" rel="stylesheet">
<script src="javascripts/jquery-1.7.2.js"></script>
<script src="javascripts/ember-0.9.7.1.js"></script>
<script src="javascripts/ember-jui.js"></script>
<script src="javascripts/popkit.js"></script>
<script src="javascripts/border.js"></script>
</head>
@stash
stash / press.md
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
halihax / COMMUNITY.md
Last active August 21, 2019 17:18
Community guidelines for participating in the Halihax Slack group.

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.

@brentsimmons
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
JeffreyWay / gist:1525217
Created December 27, 2011 21:29
Instant Server for Current Directory
alias server='open http://localhost:8000 && python -m SimpleHTTPServer'
@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>
@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

@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
@merlinmann
merlinmann / Official Cursor-Resting Area.txt
Last active May 16, 2024 22:59
Paste this into your Google Doc for a place to store your cursor.
⌨️ Official Cursor-Resting Area:
╭―――――――╮
│ >_< │
╰―――――――╯