Skip to content

Instantly share code, notes, and snippets.

View pascalandy's full-sized avatar
:octocat:
Rocking the git

Pascal Andy pascalandy

:octocat:
Rocking the git
View GitHub Profile
@pascalandy
pascalandy / style-test.md
Created October 25, 2015 20:18 — forked from ErisDS/style-test.md
A Full and Comprehensive Style Test

Below is just about everything you'll need to style in the theme. Check the source code to see the many embedded elements within paragraphs.


Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6
@pascalandy
pascalandy / install.sh
Created March 3, 2016 00:28 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
# sets the proxy cache path location, max size 2g
proxy_cache_path /data/nginx/cache levels=1:2 keys_zone=STATIC:100m inactive=24h max_size=2g;
# transfers the `Host` header to the backend
proxy_set_header Host $host;
# uses the defined STATIC cache zone
proxy_cache STATIC;
# cache 200 10 minutes, 404 1 minute, others status codes not cached
@pascalandy
pascalandy / submodule - how to
Last active April 8, 2016 14:53 — forked from necolas/gist:2215692
Git submodules
# Workflow from https://github.com/necolas/dotfiles
# Add the new submodule
git submodule add https://github.com/TryGhost/Casper.git
# Initialize the submodule
git submodule init
# Clone the submodule
git submodule update
# Stage the changes
git add Casper
@pascalandy
pascalandy / after-patch.log
Created April 19, 2016 00:50 — forked from rochacon/after-patch.log
Docker issue 5684
ubuntu@ip-10-13-0-67:~$ bash -xe test.sh
+ docker version
Client version: 1.1.1
Client API version: 1.13
Go version (client): go1.2.1
Git commit (client): bd609d2
Server version: 1.1.1
Server API version: 1.13
Go version (server): go1.2.1
Git commit (server): bd609d2
@pascalandy
pascalandy / install-docker-exp.sh
Created July 30, 2016 01:29 — forked from katopz/install-docker-exp.sh
Install Docker on Ubuntu 14.04.4 x64
# Install Docker on Ubuntu 14.04.4 x64
# Ref https://docs.docker.com/engine/installation/linux/ubuntulinux/
# No interactive for now.
export DEBIAN_FRONTEND=noninteractive
# Update your APT package index.
sudo apt-get -y update
# Update package information, ensure that APT works with the https method, and that CA certificates are installed.
sudo apt-get -y install apt-transport-https ca-certificates
# Add the new GPG key.
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
@pascalandy
pascalandy / backup_restore.sh
Created August 22, 2016 15:28 — forked from DTailor/backup_restore.sh
Backup/Restore PostgreSQL Database
# List all databases
sudo -u postgres psql --list
# Create backup file
sudo -u postgres pg_dump [database_name] > dumpl.sql
# Drop the database
sudo -u prostgres dropdb [database_name]
# Create a new database
@pascalandy
pascalandy / sql_backup.sh
Created October 18, 2016 02:25 — forked from niraj-shah/sql_backup.sh
Amazon S3 Backup Script for MySQL Databases
#!/bin/bash
# Shell script to backup MySql database
# CONFIG - Only edit the below lines to setup the script
# ===============================
MyUSER="root" # USERNAME
MyPASS="password" # PASSWORD
MyHOST="localhost" # Hostname
@pascalandy
pascalandy / install-docker.sh
Created October 28, 2016 17:20 — forked from alexellis/install-docker-master.sh
install docker engine for swarm3k on Ubuntu 16.04. 2 options for installing
#!/bin/sh
# option 2: paste this into user-data to automate install via boot script
# NOTE: update --label=owner=YOURNAME below if you want to easily identify yours
# renames the host to have a suffix of alexellisio
export original=$(cat /etc/hostname)
sudo hostname $original-alexellisio
echo $original-alexellisio | sudo tee /etc/hostname
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
@pascalandy
pascalandy / nginx.conf
Created January 6, 2017 22:43 — forked from Yinchie/nginx.conf
nginx.conf (gist colors) = www.itchy.nl.conf - my optimized Nginx configuration for ghost blog
# main server
server {
listen 443 default_server fastopen=256 ssl http2;
listen [::]:443 fastopen=256 ssl http2 ipv6only=on;
charset utf-8;
server_name www.itchy.nl;
include /etc/nginx/includes/tls.conf;
# modify versions being displayed in http header.
more_set_headers "Server: www.itchy.nl";