Skip to content

Instantly share code, notes, and snippets.

@sobolevn
sobolevn / migrate_postgresql_database.md
Created January 28, 2016 21:30 — forked from olivierlacan/migrate_postgresql_database.md
How to migrate a Homebrew-installed PostgreSQL database to a new major version (9.3 to 9.4) on OS X

This guide assumes that you recently run brew upgrade postgresql and discovered to your dismay that you accidentally bumped from one major version to another: say 9.3.x to 9.4.x. Yes, that is a major version bump in PG land.

First let's check something.

brew info postgresql

The top of what gets printed as a result is the most important:

@sobolevn
sobolevn / keybase.md
Last active March 18, 2016 17:45
keybase.md

Keybase proof

I hereby claim:

  • I am sobolevn on github.
  • I am sobolevn (https://keybase.io/sobolevn) on keybase.
  • I have a public key ASCNRwuPUk6CnbJ0fngAci6JEOXCDJuAzH3qWKrpCl7KKAo

To claim this, I am signing this object:

# -*- coding: utf-8 -*-
from split_settings.tools import optional, include
from components import CONFIG
# To change settings file: runserver --settings=bitcoins.other_settings
if CONFIG['DJANGO_SETTINGS_MODULE'] == 'bitcoins.settings':
testing = bool(CONFIG['_DJANGO_TESTING'])
@sobolevn
sobolevn / medium-django-split-settings.py
Last active April 4, 2017 07:22
medium-django-split-settings.py
"""
This is a django-split-settings main file.
For more information read this:
https://github.com/sobolevn/django-split-settings
Default environment is `developement`.
To change settings file:
`DJANGO_ENV=production python manage.py runserver`
"""
# Documentation: https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md
# http://www.rubydoc.info/github/Homebrew/homebrew/master/Formula
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class GitSecret < Formula
desc ""
homepage ""
url "https://github.com/sobolevn/git-secret/archive/v0.1.0.tar.gz"
version "0.1.0"
sha256 "107c5555c203ad3b1498e2995fa8aa81942840189316d13933fcf0947180d10b"
bottle do
root_url "https://example.com"
prefix "/opt/homebrew"
cellar "/opt/homebrew/Cellar"
revision 4
sha256 "4921af80137af9cc3d38fd17c9120da882448a090b0a8a3a19af3199b415bfca" => :yosemite
sha256 "c71db15326ee9196cd98602e38d0b7fb2b818cdd48eede4ee8eb827d809e09ba" => :mavericks
sha256 "85cc828a96735bdafcf29eb6291ca91bac846579bcef7308536e0c875d6c81d7" => :mountain_lion
end
test do
(testpath/".zshrc").write "source `brew --prefix`/share/antigen.zsh"
system "/bin/zsh", "--login", "-i", "-c", "antigen help"
end
option "with-blk-sha1", "Compile with the block-optimized SHA1 implementation"
option "without-completions", "Disable bash/zsh completions from 'contrib' directory"
option "with-brewed-openssl", "Build with Homebrew OpenSSL instead of the system version"
option "with-brewed-curl", "Use Homebrew's version of cURL library"
option "with-brewed-svn", "Use Homebrew's version of SVN"
option "with-persistent-https", "Build git-remote-persistent-https from 'contrib' directory"
<!DOCTYPE html>
<html lang="en" >
<head>
<title>
Constance | Django site admin</title>
<link rel="stylesheet" type="text/css" href="/static/admin/css/base.css" />
defmodule MediumPhxExample.Web do
def controller do
quote do
use Phoenix.Controller, namespace: MediumPhxExample.Web
import Plug.Conn
# Before 1.3 it was just:
# import MediumPhxExample.Router.Helpers
import MediumPhxExample.Web.Router.Helpers
import MediumPhxExample.Web.Gettext
end