Skip to content

Instantly share code, notes, and snippets.

@nicolasramy
nicolasramy / wordpress.local
Created July 30, 2012 12:43
Simple Apache2 Virtual Host for WordPress
<VirtualHost *:80>
ServerAdmin nicolas.ramy@hostname.com
ServerName wordpress.local
# Indexes + Directory Root.
DirectoryIndex index.php index.html
DocumentRoot /var/www/workspace/wordpress/
# BEGIN WordPress
<IfModule mod_rewrite.c>
@nicolasramy
nicolasramy / README.md
Last active October 9, 2021 08:50
Ubuntu 20.04 LTS - Developer Set Up

Ubuntu 20.04 - Developer Set Up

Recommended

Docker Compose

sudo python3 -m pip install --upgrade docker-compose

Better shell history

@nicolasramy
nicolasramy / shell.md
Last active August 10, 2021 15:30
[DRAFT] Useful commands and alias

Shell

Nohup

To run command silently

nohup command-with-options &

Kill

@nicolasramy
nicolasramy / docker-install.md
Last active August 10, 2021 15:15
Simple setup script to install Docker Community Edition on Ubuntu Server 20.04 LTS

Docker installation

Simple setup script to install Docker Community Edition on Ubuntu Server 20.04 LTS

sudo apt update
sudo apt install -y apt-transport-https \
                    ca-certificates \
 curl \
@nicolasramy
nicolasramy / osm.md
Last active August 10, 2021 15:11
Open Street Map installation guide

reference: http://wiki.openstreetmap.org/wiki/Nominatim/Installation

Prerequisites

Ubuntu/Debian

apt-get install build-essential libxml2-dev libgeos-dev libpq-dev libbz2-dev libtool automake libproj-dev
apt-get install libboost-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev
apt-get install gcc proj-bin libgeos-c1 osmosis libgeos++-dev

apt-get install php5 php-pear php5-pgsql php5-json php-db

As Apache still uses the traditional SysV init scripts you can use

sudo update-rc.d -f apache2 remove

to remove the links from /etc/rcX.d or, alternatively use

sudo update-rc.d apache2 disable
@nicolasramy
nicolasramy / MySQL.md
Last active August 10, 2021 15:08
MySQL Tips

Remove

To remove everything related to MySQL, you have to follow this procedure

sudo -i
service mysql stop
killall -KILL mysql mysqld_safe mysqld
apt-get --yes purge mysql-server mysql-client
apt-get --yes autoremove --purge
@nicolasramy
nicolasramy / bad-joke.sh
Last active August 19, 2020 11:55
This is why you should always lock your session -- https://twitter.com/tuxplanet/status/687702022905270272?s=09
#
#
fake-cd() {
echo "bash: cd: $1: No such file or directory"
}
#
#
fake-ls() {
echo "ls: cannot access $1: No such file or directory"
@nicolasramy
nicolasramy / python-cs-01-installation.md
Last active August 20, 2019 07:00
My Python Cheat Sheet :- Installation- Functions- Snippets- Misc- Easter Eggs

#Python Cheat Sheet

Introduction

This is a short list of different packages to install to enhace your production in Python

pip

pip is a tool for installing and managing Python packages

@nicolasramy
nicolasramy / Dockerfile
Last active April 18, 2019 10:20
How to start a Vue.js + webpack dev stack (webpack is no mandatory ;))
FROM node:7.4-alpine
RUN mkdir /app
WORKDIR /app
ADD . /app/
RUN npm install
EXPOSE 8080