Skip to content

Instantly share code, notes, and snippets.

@Komzpa
Komzpa / upgrade-postgres-9.4-to-9.5-to-9.6-to-10.md
Last active January 15, 2021 18:04 — forked from dideler/upgrade-postgres-9.3-to-9.4.md
Upgrading PostgreSQL from 9.4 to 9.5 to 9.6 to 10 when upgrading Ubuntu 14.10 to 16.04

TL;DR

9.4 -> 9.5:

sudo pg_dropcluster 9.5 main --stop
sudo service postgresql stop
sudo pg_upgradecluster -m upgrade -k 9.4 main
sudo su postgres -c "/usr/lib/postgresql/9.5/bin/vacuumdb --all --analyze-in-stages"
sudo pg_dropcluster 9.4 main
@danharper
danharper / gulpfile.js
Last active April 11, 2024 08:31
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
@borkdude
borkdude / gist:38969e4495f2192b4388
Created February 16, 2015 07:41
Plant based (vegan) whole food low fat recipes
Recipe websites:
http://www.straightupfood.com/
http://www.healthyveganlife.com/
http://www.plantbasedchristian.com/
http://happyherbivore.com/
http://klunkerskitchen.blogspot.nl/
Youtube Channels with recipes:
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@NotSqrt
NotSqrt / settings_test_snippet.py
Last active May 1, 2022 01:34 — forked from nealtodd/settings_test_snippet.py
Another shot at this problem ..
class DisableMigrations(object):
def __contains__(self, item):
return True
def __getitem__(self, item):
return "notmigrations"
MIGRATION_MODULES = DisableMigrations()
@paf31
paf31 / node-haskell.md
Last active May 14, 2024 03:51
Reimplementing a NodeJS Service in Haskell

Introduction

At DICOM Grid, we recently made the decision to use Haskell for some of our newer projects, mostly small, independent web services. This isn't the first time I've had the opportunity to use Haskell at work - I had previously used Haskell to write tools to automate some processes like generation of documentation for TypeScript code - but this is the first time we will be deploying Haskell code into production.

Over the past few months, I have been working on two Haskell services:

  • A reimplementation of an existing socket.io service, previously written for NodeJS using TypeScript.
  • A new service, which would interact with third-party components using standard data formats from the medical industry.

I will write here mostly about the first project, since it is a self-contained project which provides a good example of the power of Haskell. Moreover, the proces

@frenchy64
frenchy64 / schema.md
Created August 11, 2014 06:55
Schema vs core.typed

Schema

I think of Schema as a runtime contracts library (I believe it does coercion and validation, but they seem related to me).

Pros

  • small barrier to entry, thus immediately useful
    • just add a contract/coercion to a function and you're off
  • can manipulate contracts as regular clojure data
  • documentation
@philandstuff
philandstuff / euroclojure2014.org
Last active February 19, 2024 05:12
Euroclojure 2014

EuroClojure 2014, Krakow

Fergal Byrne, Clortex: Machine Intelligence based on Jeff Hawkins’ HTM Theory

  • @fergbyrne
  • HTM = Hierarchical Temporal Memory
  • Slides

big data

  • big data is like teenage sex
    • noone knows how to do it
    • everyone thinks everyone else is doing it
@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
{% if is_paginated %}
{% load i18n %}
<ul class="pagination">
<li{% if not page_obj.has_previous %} class="disabled"{% endif %}><a href="{% if not page_obj.has_previous %}#{% else %}?page={{ page_obj.previous_page_number }}{{ getvars }}{% endif %}">&laquo;</a></li>
{% if show_first %}
<li><a href="?page=1{{ getvars }}">1</a></li>
<li><span>...</span></li>
{% endif %}