Skip to content

Instantly share code, notes, and snippets.

chrishannah /
Created December 31, 2022 17:23
A bash script that allows you to mass delete blog posts from a Ghost blog via a text file of post ids.
#!/usr/bin/env bash
# Admin API key goes here
KEY="this is your admin api key"
# Split the key into ID and SECRET
IFS=':' read ID SECRET <<<"$KEY"
chrishannah / Blogs.opml
Created January 27, 2021 17:14
Current RSS subscriptions as of 27/01/2021
<?xml version="1.0" encoding="UTF-8"?>
<opml version="2.0">
<outline title="Personal" text="Personal">
<outline text="Blog – Cal Newport" type="rss" htmlUrl="" xmlUrl="" title="Blog – Cal Newport" />
<outline type="rss" title="Matt Gemmell" text="Matt Gemmell" htmlUrl="" xmlUrl=";utm_campaign=311f4cf54b-Writers_Life_Newsletter_0073&amp;utm_medium=email&amp;utm_term=0_3fbd89148b-311f4cf54b-135530901" />
<outline xmlUrl="" htmlUrl="" text="Kyle Seth Gray" title="Kyle Seth Gray" type="rss" />
chrishannah / InsetLabel.swift
Last active March 12, 2022 14:01
A simple subclass of UILabel that allows you to add content insets to pad the content.
import UIKit
class InsetLabel: UILabel {
var contentInsets =
override func drawText(in rect: CGRect) {
let insetRect = UIEdgeInsetsInsetRect(rect, contentInsets)
super.drawText(in: insetRect)
chrishannah / table.swift
Created June 8, 2018 08:43
Example code for the post "Hiding Extra Separators on a UITableView" on
import PlaygroundSupport
import UIKit
class DataSource: NSObject, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 5
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
chrishannah / iOS Icon
Last active February 15, 2022 23:43
A list containing all the icon names and sizes for iOS and watchOS.

iOS 12 Icon Sizes

(Taken from Xcode 10)


iPhone Notification (iOS 7-12) 20pt

  • 2x - 40px
  • 3x - 60px