Skip to content

Instantly share code, notes, and snippets.

@Clark-G
Clark-G / gist:22254390fc2f0f0d8c49904fe0f2fbeb
Created September 3, 2019 05:17
libxmlsec1 dependencies
export PATH="/usr/local/opt/gettext/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/gettext/lib"
export CPPFLAGS="-I/usr/local/opt/gettext/include"
export LDFLAGS="-L/usr/local/opt/libffi/lib"
export PATH="/usr/local/opt/openssl/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
export LDFLAGS="-L/usr/local/opt/readline/lib"
export CPPFLAGS="-I/usr/local/opt/readline/include"
export PATH="/usr/local/opt/sqlite/bin:$PATH"
@Clark-G
Clark-G / upgrade-postgres-9.5-to-11.md
Last active September 8, 2023 03:26 — forked from delameko/upgrade-postgres-9.5-to-9.6.md
Upgrading PostgreSQL from 9.5 to 11 on Ubuntu 16.04

TL;DR

Install Postgres 11, and then:

sudo pg_dropcluster 11 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
@Clark-G
Clark-G / .zshrc
Created February 18, 2019 07:11
zsh configuration file
export TERM="xterm-256color"
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/clark/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
@Clark-G
Clark-G / django_oauth_middleware.py
Created November 8, 2018 01:53
Django oauth middleware
# coding:utf-8
import time
import urllib
from importlib import import_module
from django.conf import settings
from django.utils.deprecation import MiddlewareMixin
from django.shortcuts import HttpResponseRedirect
from django.utils.cache import patch_vary_headers
from django.utils.http import cookie_date
from django.contrib.sessions.backends.base import UpdateError