Skip to content

Instantly share code, notes, and snippets.

@inecmc
inecmc / vue-history-prerender-nginx.md
Created March 2, 2018 06:54
Nginx config for Vue.js history mode + Prerender.io
# Force to use https
server {
    listen 80;
    listen [::]:80;
    server_name example.com;
    return 301 https://$server_name$request_uri;
}

# Default server configuration
@inecmc
inecmc / notes.md
Created August 4, 2017 08:06
How to run multiple Redis instances on Ubuntu 16.04

Create the directory for the new instance

$ sudo install -o redis -g redis -d /var/lib/redis2

Create a new configuration file

$ sudo cp -p /etc/redis/redis.conf /etc/redis/redis2.conf
@inecmc
inecmc / notes.md
Last active August 18, 2020 09:19
Compile mosquitto-auth-plug on Ubuntu 16.04
sudo add-apt-repository ppa:mosquitto-dev/mosquitto-ppa
sudo apt-get update
sudo apt-get install mosquitto         # Install the latest version

sudo apt-get install build-essential libc-ares-dev libc-ares2 libcurl4-openssl-dev libmysqlclient-dev
curl -O http://mosquitto.org/files/source/mosquitto-1.4.11.tar.gz
tar zxf mosquitto-1.4.11.tar.gz
cd mosquito-1.4.11
nano config.mk # Edit: disable SRV
@inecmc
inecmc / notes.md
Created April 28, 2017 03:21
Get different size of user picture in Facebook and Google

Facebook

https://graph.facebook.com/<VERSION>/me?fields=picture.width(<WIDTH>).height(<HEIGHT>)

Google

// Remove or specify the value the sz parameter 
https://.../photo.jpg?sz=50
@inecmc
inecmc / vhost.md
Created March 27, 2017 12:24
Nginx config : remove hashbang in vue.js
 server {
   listen 80;
   listen [::]:80;

   root /path/to/your/project/dist;

   index index.html;

 server_name example.com;