TL;DR
Create a backup:
pg_dumpall > mybackup.sql
Perform the upgrade:
sudo pg_dropcluster 9.4 main --stop
#!/boot/bzImage | |
# Linux kernel userspace initialization code, translated to bash | |
# (Minus floppy disk handling, because seriously, it's 2017.) | |
# Not 100% accurate, but gives you a good idea of how kernel init works | |
# GPLv2, Copyright 2017 Hector Martin <[email protected]> | |
# Based on Linux 4.10-rc2. | |
# Note: pretend chroot is a builtin and affects the current process | |
# Note: kernel actually uses major/minor device numbers instead of device name |
From f5908efac9f55216d5aabdee72687b2b47f1c89c Mon Sep 17 00:00:00 2001 | |
From: Chang Liu <[email protected]> | |
Date: Mon, 13 Apr 2015 09:36:31 +0000 | |
Subject: [PATCH] Add support for linux-musl in build system. Fix glibc | |
assumptions in code. | |
--- | |
autoconf/config.sub | 7 +++++-- | |
lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp | 2 +- | |
lib/Support/DynamicLibrary.cpp | 4 ++-- |
TL;DR
Create a backup:
pg_dumpall > mybackup.sql
Perform the upgrade:
sudo pg_dropcluster 9.4 main --stop
# Hack to change the Rails cookie serializer from Marshal to JSON and therefore allow the session | |
# to be shared between different languages but also avoid that someone knowing the | |
# cookie secret key could execute arbitrary code on the server by unmarshalling | |
# modified Ruby code added to the session/permanent cookie. | |
# | |
# Note that all users will beed to login again since both the remember me cookie and the session cookies | |
# won't be valid. Note also that the remember me cookie is tested multiple times per request even when it fails. | |
# for performance reasons you might want to delete it if these extra cycles are too costly for you. | |
# | |
# Rails 4 (not tested on Rails 3). |
# Lifted from this blog article & modified heavily: | |
# http://blog.nicolai86.eu/posts/2011-11-03/deploying-hubot-with-capistrano | |
set :application, "hubot" | |
set :repository, "repository" | |
set :scm, :git | |
set :ssh_options, { :forward_agent => true } | |
set :branch, "master" |
// Linear Congruential Generator | |
// Variant of a Lehman Generator | |
var lcg = (function() { | |
// Set to values from http://en.wikipedia.org/wiki/Numerical_Recipes | |
// m is basically chosen to be large (as it is the max period) | |
// and for its relationships to a and c | |
var m = 4294967296, | |
// a - 1 should be divisible by m's prime factors | |
a = 1664525, | |
// c and m should be co-prime |
#!/usr/bin/env ruby | |
require 'logger' | |
# rotatelogs required... | |
# http://httpd.apache.org/docs/2.2/programs/rotatelogs.html | |
logger = Logger.new("|rotatelogs ./foo.log.%Y-%m-%d-%H 3600", 0, 0) | |
10.times do | |
logger.error "testing..." |
#!/bin/sh | |
# | |
# Example usage: | |
# ./macroview.sh -IThirdPartyHeadersToInclude file.m | |
clang -E -nostdinc -nobuiltininc "$@" 2>/dev/null | indent -bl -nce -nei |
# [Notification Center](http://osxdaily.com/2012/08/06/disable-notification-center-remove-menu-bar-icon-os-x/) | |
## Disable | |
launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist | |
killall NotificationCenter # optional? | |
## Enable | |
launchctl load -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist | |
# Spotlight |
VERSION="1.4.2" | |
BUILD="slack1" | |
set -e -x | |
cd "$(mktemp -d)" | |
trap "rm -rf \"$PWD\"" EXIT INT QUIT TERM | |
curl -O "https://storage.googleapis.com/golang/go$VERSION.linux-amd64.tar.gz" | |
tar xf "go$VERSION.linux-amd64.tar.gz" |