Skip to content

Instantly share code, notes, and snippets.

David Deller dmdeller

Block or report user

Report or block dmdeller

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dmdeller
dmdeller / gist:de8c96d7ff99300dcca1df762aec0479
Last active Apr 18, 2016 — forked from joho/gist:3735740
PostgreSQL 9.2 upgrade steps
View gist:de8c96d7ff99300dcca1df762aec0479

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.

View gist:4c71027faf8a0f45db30
for gem in $(gem list | cut -d" " -f1); do gem uninstall -aIx $gem; done
@dmdeller
dmdeller / gulpfile.js
Created Aug 8, 2014
My Gulpfile, based on generator-gulp-webapp, with added Coffee and options.
View gulpfile.js
'use strict';
// generated on 2014-08-08 using generator-gulp-webapp 0.1.0
var gulp = require('gulp');
// load plugins
var $ = require('gulp-load-plugins')();
var mainBowerFiles = require('main-bower-files');
// config
@dmdeller
dmdeller / gist:ad8a1d76bb00e3784820
Last active Aug 29, 2015
Import seeds into Core Data
View gist:ad8a1d76bb00e3784820
#pragma mark - Core Data
- (void)setupCoreData
{
[MagicalRecord setupAutoMigratingCoreDataStack];
if (SearchEngine.MR_countOfEntities == 0)
{
[self importSeeds];
}
View keybase.md

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 / 1_before.m
Last active Aug 29, 2015
Trying to avoid having ugly weakBlah variables all over the place to avoid retain cycles (or at least having to look at them)
View 1_before.m
__weak __typeof__(foo) weakFoo = foo;
foo.block = ^
{
[weakFoo doSomething];
};
@dmdeller
dmdeller / HNCSVParser.h
Created Jul 20, 2013
CHCSVParser with blocks
View HNCSVParser.h
//
// 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 Mar 9, 2013
Justification of colon-style conditionals in PHP (as much as you can justify anything about PHP)
View gist:5126198
Bad:
<html>
<body>
<p>
Hello there,
<?php if (!empty($name)) { ?>
<?php echo $name; ?>
<?php } else { ?>
whoever
View rss.xml
<?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>
View .profile
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
You can’t perform that action at this time.