Skip to content

Instantly share code, notes, and snippets.

View confuser's full-sized avatar

James Mortemore confuser

  • London
View GitHub Profile
@ojkelly
ojkelly / init.lua
Last active March 30, 2021 04:57
My hammerspoon config
local usbWatcher = nil
-- This is our usbWatcher function
-- lock when yubikey is removed
function usbDeviceCallback(data)
-- this line will let you know the name of each usb device you connect, useful for the string match below
hs.notify.show("USB", "You just connected", data["productName"])
-- Replace "Yubikey" with the name of the usb device you want to use.
if string.match(data["productName"], "Yubikey") then
if (data["eventType"] == "added") then
@serby
serby / commit-style-guide.md
Last active August 29, 2015 14:00
Clock Commit Style Guide

Clock Committing Style Guide

To allow us to automatically create a good quality changelog from our git history we recommend the following formats for commit messages.

The aim is to capture a reference to any ticket, card, or story that this commit contributes towards.

Because we are now using the Pivotal Tracker Webhook on some projects we suggest wrapping your commit message prefix with square brackets []

http://pivotallabs.com/level-up-your-development-workflow-with-github-pivotal-tracker/

@mdp
mdp / README.md
Last active December 14, 2015 14:29

Keep and SSH tunnel up and running on OSX

This is my trick to keep a tunnel running on an OSX host. It's setup so that a network state change will trigger the connection. In practice I've found that it's actually very reliable. Certainly beats starting them by hand.

Notes

  • This uses a 'tunnel' user on your remote host. Because we need to start the tunnel with a passwordless ssh key, it's safer to use a key that just used for this purpose.
  • The remote tunnel user should not have priviledges to login. You only need them to be able to forward ports, shell login is not needed to do this.
@mislav
mislav / pagination.md
Created October 12, 2010 17:20
"Pagination 101" by Faruk Ateş

Pagination 101

Article by Faruk Ateş, [originally on KuraFire.net][original] which is currently down

One of the most commonly overlooked and under-refined elements of a website is its pagination controls. In many cases, these are treated as an afterthought. I rarely come across a website that has decent pagination, and it always makes me wonder why so few manage to get it right. After all, I'd say that pagination is pretty easy to get right. Alas, that doesn't seem the case, so after encouragement from Chris Messina on Flickr I decided to write my Pagination 101, hopefully it'll give you some clues as to what makes good pagination.

Before going into analyzing good and bad pagination, I want to explain just what I consider to be pagination: Pagination is any kind of control system that lets the user browse through pages of search results, archives, or any other kind of continued content. Search results are the o