Skip to content

Instantly share code, notes, and snippets.

@gdurelle
gdurelle / gist:1ce3d706d6d294e81d116bb4c142ae9a
Created October 27, 2022 21:11 — forked from joho/gist:3735740
PostgreSQL 9.2 upgrade steps
Steps to install and run PostgreSQL 9.2 using Homebrew (Mac OS X)
(if you aren't using version 9.1.5, change line 6 with the correct version)
1. launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
2. mv /usr/local/var/postgres /usr/local/var/postgres91
3. brew update
4. brew upgrade postgresql
5. initdb /usr/local/var/postgres -E utf8
6. pg_upgrade -b /usr/local/Cellar/postgresql/9.1.5/bin -B /usr/local/Cellar/postgresql/9.2.0/bin -d /usr/local/var/postgres91 -D /usr/local/var/postgres
7. cp /usr/local/Cellar/postgresql/9.2.0/homebrew.mxcl.postgresql.plist ~/Library/LaunchAgents/

The command line, in short…

wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/

…and the options explained

  • -k : convert links to relative
  • -K : keep an original versions of files without the conversions made by wget
  • -E : rename html files to .html (if they don’t already have an htm(l) extension)
  • -r : recursive… of course we want to make a recursive copy
  • -l 10 : the maximum level of recursion. if you have a really big website you may need to put a higher number, but 10 levels should be enough.
From 5b20e0cbc500431fce7d5d19dc11290155b320f1 Mon Sep 17 00:00:00 2001
From: Gregory Durelle <gdurelle@protonmail.com>
Date: Sun, 24 Jun 2018 01:45:08 +0200
Subject: [PATCH] My submission
XOV: v1
add a gem for testing, add tests, fix typo, add request to return avg/min/max/etc
---
Gemfile | 3 ++-
Gemfile.lock | 5 +++++
@gdurelle
gdurelle / shared_db_connection.rb
Created September 9, 2016 10:01
RSpec + Poltergeist
module ActiveRecord
class Base
mattr_accessor :shared_connection
@shared_connection = nil
def self.connection
@shared_connection || retrieve_connection
end
end
end
http://www.git-attitude.fr/2014/05/04/bien-utiliser-git-merge-et-rebase/
http://www.git-attitude.fr/2013/04/03/configuration-git/
http://mislav.uniqpath.com/2013/02/merge-vs-rebase/
http://mislav.uniqpath.com/2010/07/git-tips/
@gdurelle
gdurelle / keybase.md
Created October 27, 2014 22:11
keybase.md

Keybase proof

I hereby claim:

  • I am gdurelle on github.
  • I am gdurelle (https://keybase.io/gdurelle) on keybase.
  • I have a public key whose fingerprint is FF5C 2ABA C076 9AEF D707 B3A3 24A9 475E C324 1743

To claim this, I am signing this object: