Skip to content

Instantly share code, notes, and snippets.

@Paprikas
Paprikas / notes.md
Created April 13, 2019 07:23 — forked from doejoe13/notes.md
How to run multiple Redis instances on Ubuntu 18.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
@Paprikas
Paprikas / install_phantomJs.sh
Created April 3, 2018 15:59 — forked from ManuelTS/install_phantomJs.sh
This script installs PhantomJS on your Debian/Ubuntu System
#!/usr/bin/env bash
# This script installs PhantomJS on your Debian/Ubuntu System
#
# Taken from https://gist.github.com/julionc/7476620#gistcomment-2030572 and changed the download directory
#
# This script must be run as root:
# sudo sh install_phantomjs.sh
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
@Paprikas
Paprikas / ElasticSearch.sh
Last active April 15, 2016 07:18 — forked from ricardo-rossi/ElasticSearch.sh
Installing ElasticSearch on Ubuntu 14.04 14.10 15.04 15.10 16.04
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh will install Elasticsearch 2.x
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
### ElasticSearch version
@Paprikas
Paprikas / date table.txt
Last active October 24, 2015 18:11 — forked from bryhal/gist:4129042
MYSQL: Generate Calendar Table
DROP TABLE IF EXISTS time_dimension;
CREATE TABLE time_dimension (
id INTEGER PRIMARY KEY, -- year*10000+month*100+day
db_date DATE NOT NULL,
year INTEGER NOT NULL,
month INTEGER NOT NULL, -- 1 to 12
day INTEGER NOT NULL, -- 1 to 31
quarter INTEGER NOT NULL, -- 1 to 4
week INTEGER NOT NULL, -- 1 to 52/53
day_name VARCHAR(9) NOT NULL, -- 'Monday', 'Tuesday'...