Skip to content

Instantly share code, notes, and snippets.

View mtvillwock's full-sized avatar

Matthew Villwock mtvillwock

View GitHub Profile
@mtvillwock
mtvillwock / gist:33d23a57f25d68ffde182f7117eb154d
Created August 25, 2019 05:17 — forked from giannisp/gist:ebaca117ac9e44231421f04e7796d5ca
Upgrade PostgreSQL 9.6.5 to 10.0 using Homebrew (macOS)
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work.
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0."
Database files have to be updated before starting the server, here are the steps that had to be followed:
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default
brew unlink postgresql
brew install postgresql@9.6
brew unlink postgresql@9.6
brew link postgresql
@mtvillwock
mtvillwock / hosts
Last active March 13, 2019 23:37 — forked from pamelafox/hosts
etc/hosts for news blocking
### News Aggregators
127.0.0.1 redditate.com
127.0.0.1 news.google.com
127.0.0.1 news.yahoo.com
127.0.0.1 news.ycombinator.com
### News
127.0.0.1 disqus.com # for blocking comments
127.0.0.1 buzzfeed.com
127.0.0.1 lifehacker.com
@mtvillwock
mtvillwock / about.md
Last active February 1, 2018 22:07 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@mtvillwock
mtvillwock / bullshit.js
Created July 26, 2017 19:22 — forked from raydog/bullshit.js
Bullshit as a Service
var E_PREFIX_RATE = 0.25;
// All of our word lists:
var _word_lists = {
verb : [
"implement", "utilize", "integrate", "streamline", "optimize", "evolve", "transform", "embrace",
"enable", "orchestrate", "leverage", "reinvent", "aggregate", "architect", "enhance", "incentivize",
"morph", "empower", "envisioneer", "monetize", "harness", "facilitate", "seize", "disintermediate",
<!DOCTYPE html>
<html>
<head>
<style>
/* How to select a range of children
* (Here, 3rd-7th children, inclusive):
*/
ul li:nth-child(n+3):nth-child(-n+7) {
outline: 1px solid #0f0;
}
@mtvillwock
mtvillwock / Locales.yaml
Created January 20, 2017 00:20 — forked from wojtha/Locales.yaml
config.exceptions_app and ExceptionController
# config/locales/en.yml
en:
exception:
show:
not_found:
title: "Not Found"
description: "The page you were looking for does not exists."
internal_server_error:
title: "Internal Server Error"
@mtvillwock
mtvillwock / Gemfile
Created January 19, 2017 05:46 — forked from iamvery/Gemfile
source "https://rubygems.org"
gem "gnuplot"
gem "highline"
@mtvillwock
mtvillwock / clojure.md
Last active September 5, 2015 10:30 — forked from rakhmad/clojure.md
Setting Up Clojure on OS X

Setting Up Clojure on OS X

I spent a lot of time trying to find a pretty optimal (for me) setup for Clojure… at the same time I was trying to dive in and learn it. This is never optimal; you shouldn't be fighting the environment while trying to learn something.

I feel like I went through a lot of pain searching Google, StackOverflow, blogs, and other sites for random tidbits of information and instructions.

This is a comprehensive "what I learned and what I ended up doing" that will hopefully be of use to others and act as a journal for myself if I ever have to do it again. I want to be very step-by-step and explain what's happening (and why) at each step.

Step 1: Getting Clojure (1.3)

@mtvillwock
mtvillwock / gist:c27f8f8917d698486965
Last active September 3, 2015 03:54 — forked from Mithrandir0x/gist:3639232
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
URL list from Tuesday, Jan. 13 2015 23:57 PM
To copy this list, type [Ctrl] A, then type [Ctrl] C.
oop - How is almost everything in Javascript an object? - Stack Overflow
http://stackoverflow.com/questions/9108925/how-is-almost-everything-in-javascript-an-object
javascript - Everything is an object? - Stack Overflow
http://stackoverflow.com/questions/19165021/everything-is-an-object