Skip to content

Instantly share code, notes, and snippets.

View minac's full-sized avatar

Miguel David minac

View GitHub Profile
@delameko
delameko / upgrade-postgres-9.5-to-9.6.md
Last active August 22, 2023 08:22 — forked from johanndt/upgrade-postgres-9.3-to-9.5.md
Upgrading PostgreSQL from 9.5 to 9.6 on Ubuntu 16.04

TL;DR

Install Postgres 9.6, and then:

sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
@tjbenton
tjbenton / virtualbox-vagrant-nuclear-option.sh
Created April 6, 2016 17:28
Completely uninstall VirtualBox and Vagrant and reinstall through brew
# update brew because `brew update` is broken after updating to El Capitan
cd `brew --prefix`
git fetch origin
git reset --hard origin/master
sudo shutdown -r now # restart the computer
# open terminal and run the following
brew update
brew cleanup
@tristanlins
tristanlins / iconv.docker
Created October 10, 2015 15:41
Docker PHP extension recipes
FROM php:5.6-cli
RUN apt-get update \
&& apt-get install -y \
libfreetype6-dev \
&& rm -rf /var/lib/apt/lists/* \
&& docker-php-ext-install iconv \
&& apt-get remove -y \
libfreetype6-dev \
&& apt-get install -y \
@u0d7i
u0d7i / disable_vim_auto_visual_on_mouse.txt
Last active February 27, 2024 14:08
Disable vim automatic visual mode on mouse select
Disable vim automatic visual mode on mouse select
issue: :set mouse-=a
add to ~/.vimrc: set mouse-=a
my ~/.vimrc for preserving global defaults and only changing one option:
source $VIMRUNTIME/defaults.vim
set mouse-=a
@lovesh
lovesh / admin.py
Last active November 7, 2019 19:37
django-admin register all models
"""
Here models are in different modules and the models.py imports them from different modules like this
from model1 import * # or the name of models you want to import
from model2 import User
or you might write all your models in models.py
"""
@massenz
massenz / repset_mongo.sh
Last active March 1, 2017 12:57
Creates and initializes a MongoDb replica set: allows the user to choose the number of members and the starting port number; this should also work on a remote host, but I have only tested it so far on localhost
#!/bin/bash
#
# Starts up a MongoDB replica set
#
# There is a lot of documentation about replica sets:
#
# http://docs.mongodb.org/manual/reference/replica-configuration/
# http://docs.mongodb.org/manual/administration/replica-sets/
#
# To read data from a SECONDARY, when in the client, use: