Skip to content

Instantly share code, notes, and snippets.

@dmdeller
dmdeller / mailrules.json
Last active December 8, 2023 03:53
Fastmail rules to filter useless delivery emails
[
{
"markFlagged": false,
"fileIn": "Deliveries",
"combinator": "any",
"snoozeUntil": null,
"discard": false,
"created": "2023-07-25T14:15:44Z",
"previousFileInName": null,
"name": "Useless delivery notifications",
@dmdeller
dmdeller / 1. Hosts File help page.markdown
Created November 18, 2011 19:38
DuckDuckGo Hosts File information

Hosts File

NOTE: This feature is currently in beta. The server IP below will change when the beta ends.

As discussed [here][1], Safari doesn’t allow you to customize the search engines available from the search bar.

However, there is a simple hack you can do. DuckDuckGo operates a server that can respond to Safari’s search requests directed at Yahoo, Google, or Bing, and send those to DuckDuckGo instead. To use it, you can either use an app to make the change, or edit your hosts file directly.

Method 1: Mac app

@dmdeller
dmdeller / keybase.md
Last active September 19, 2017 23:40

Keybase proof

I hereby claim:

  • I am dmdeller on github.
  • I am dmdeller (https://keybase.io/dmdeller) on keybase.
  • I have a public key whose fingerprint is 1872 D86F D9E4 2038 48FA DB43 4DF5 4ADF A8BD 32F9

To claim this, I am signing this object:

@dmdeller
dmdeller / gist:de8c96d7ff99300dcca1df762aec0479
Last active April 18, 2016 16:11 — forked from joho/gist:3735740
PostgreSQL 9.2 upgrade steps

Steps to upgrade a database from PostgreSQL 9.4 to PostgreSQL 9.5 using Homebrew (Mac OS X)

Notes:

  • I don't use launchd to run Postgres.
  • I don't have Homebrew installed in /usr/local, so I'm using commands that should work regardless of where it is installed.

This assumes you have already upgraded to 9.5 and got the fatal error trying to use your 9.4 database.

We need to have both 9.4 and 9.5 installed, so reinstall the old version.

@dmdeller
dmdeller / HNCSVParser.h
Created July 20, 2013 20:25
CHCSVParser with blocks
//
// HNCSVParser.h
// HNCSVParser
//
// Created by David on 7/20/13.
// Copyright (c) 2013 David Deller. MIT Licensed.
//
#import <CHCSVParser/CHCSVParser.h>
@dmdeller
dmdeller / gist:5126198
Created March 9, 2013 23:09
Justification of colon-style conditionals in PHP (as much as you can justify anything about PHP)
Bad:
<html>
<body>
<p>
Hello there,
<?php if (!empty($name)) { ?>
<?php echo $name; ?>
<?php } else { ?>
whoever
@dmdeller
dmdeller / rss.xml
Last active December 14, 2015 10:39
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title>Steven Frank's Posts</title>
<description>Hello, I'm Steven, co-founder of Panic and technology enthusiast.</description>
<link>http://stevenf.com/posts</link>
<item>
<title>Thoughts on the Microsoft Surface Pro</title>
<link>http://stevenf.com/posts/surface-pro</link>
export PATH=$HOME/Applications/homebrew/sbin:$HOME/Applications/homebrew/bin:$PATH
export PATH=$(brew --prefix ruby)/bin:$PATH
export PATH=$(brew --prefix)/share/npm/bin:$PATH
#!/usr/bin/env ruby
require 'net/http'
require 'digest/sha2'
require 'fileutils'
require 'date'
show = ARGV[0]
case show