Skip to content

Instantly share code, notes, and snippets.

@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 / 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
@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 / 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 / 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

Keybase proof

I hereby claim:

  • I am nicolasramy on github.
  • I am darkelda (https://keybase.io/darkelda) on keybase.
  • I have a public key whose fingerprint is 5C9A 3938 ACF5 D542 952F 20D9 812F 03FE DF16 418C

To claim this, I am signing this object:

@nicolasramy
nicolasramy / deploy.sh
Last active August 29, 2015 14:03
Simple script to deploy static websites + snapshot generation through SSH
#/bin/bash
PROJECT_NAME=my_website
WORKSPACE=/var/www
USERNAME=www-data
PORT=22
DATEMARK=`date +%Y%m%d%H%M%S`
HOSTNAME=www.example.com
@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