Skip to content

Instantly share code, notes, and snippets.

View MichaelHackett's full-sized avatar

Michael Hackett MichaelHackett

  • Halifax, NS, Canada
View GitHub Profile
@vincetreur
vincetreur / ListPaddingDecoration.java
Created December 30, 2015 12:13
A RecyclerView.ItemDecoration that adds 8 dp padding to the top of the first and bottom of the last item in a list (or RecyclerView in this case).
import android.content.Context;
import android.graphics.Rect;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.util.DisplayMetrics;
import android.util.TypedValue;
import android.view.View;
/**
* Adds 8dp padding to the top of the first and the bottom of the last item in the list,
@rmondello
rmondello / gist:b933231b1fcc83a7db0b
Last active April 5, 2024 07:10
Exporting (iCloud) Keychain and Safari credentials to a CSV file

Exporting (iCloud) Keychain and Safari credentials to a CSV file

Update (October 2021)

Exporting password + one-time code data from iCloud Keychain is now officially supported in macOS Monterey and Safari 15 (for Monterey, Big Sur, and Catalina). You can access it in the Password Manager’s “gear” icon (System Preferences > Passwords on Monterey, and Safari > Passwords everywhere else), or via the File > Export > Passwords... menu item). You shouldn't need to hack up your own exporter anymore.

Original, Obsolete Content (2014)

After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.

@tony4d
tony4d / p4merge4git.md
Created August 24, 2012 19:00
Setup p4merge as a visual diff and merge tool for git
This was nice and fast... but it takes up WAY TOO MUCH space. And it's annoying to write.
(I like the way I can just step into the function that calls the delegate for debugging)
What's a better way to not make me call respondsToSelector in the middle of my code? Some proxy?
struct {
unsigned int delegateWillDisplayDocument:1;
unsigned int delegateDidDisplayDocument:1;
unsigned int delegateDidShowPageView:1;
unsigned int delegateDidRenderPageView:1;
@halpo
halpo / knitr.mk
Created November 29, 2011 18:55
knitr makefile
################################################################################
# Copyright 2011
# Andrew Redd
# 11/23/2011
#
# Description of File:
# Makefile for knitr compiling
#
################################################################################
all:pdf # default rule DO NOT EDIT
@spartanroc
spartanroc / BibTeXKeyOnly.js
Created May 5, 2011 06:17
New Features and Improvements on Zotero's Support of BibTeX Export
{
"translatorID": "12345",
"label": "BibTeX CiteKey-only Exporter",
"creator": "Simon Kornblith and Richard Karnesky with tweaks by Tan",
"target": "bib",
"minVersion": "2.1.9",
"maxVersion": "",
"priority": 200,
"inRepository": false,
"translatorType": 3,
@jon
jon / BPUUID.h
Created February 3, 2010 21:09
An Objective-C wrapper for CFUUID
//
// BPUUID.h
// Skates
//
// Created by Jon Olson on 2/3/10.
// Copyright 2010 Ballistic Pigeon, LLC. All rights reserved.
//
#import <Foundation/Foundation.h>
//
// NSObject+BlockObservation.h
// Version 1.0
//
// Andy Matuschak
// andy@andymatuschak.org
// Public domain because I love you. Let me know how you use it.
//
#import <Cocoa/Cocoa.h>