Skip to content

Instantly share code, notes, and snippets.

View llazzaro's full-sized avatar
👨‍🚒
Fighting fire with fire 🔥

Leonardo Lazzaro llazzaro

👨‍🚒
Fighting fire with fire 🔥
View GitHub Profile
# This is a step by step tutorial on how to run uwsgi in emperor mode,
# behind nginx on Fedora 20. I'll add to the tutorial as time goes on.
# SeLinux will likely be a pain (even in permissive mode), so please see my comment on how to fix it.
sudo yum upgrade
sudo yum install nano yum-utils gcc uwsgi-plugin-python3 nginx
yum-builddep python3-psycopg2
@llazzaro
llazzaro / 0-openwrt-auto-mount-readme.md
Last active January 9, 2018 09:32 — forked from lanceliao/0-openwrt-auto-mount-readme.md
Auto mount USB storage device by uuid on OpenWrt
  1. Install USB device support;
opkg install kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-storage e2fsprogs fdisk usbutils mount-utils block-mount kmod-fs-ext4 kmod-fs-vfat kmod-nls-utf-8 kmod-nls-cp437 kmod-nls-iso8859-1

reboot
  1. Install blkid, run opkg update && opkg install blkid;
  2. Copy block.sh to directory /lib/functions;
  3. Copy 10-mount and 20-swap to directory /etc/hotplug.d/block;
  4. That's it! run logread -f command then plug in a USB stick to test.
@llazzaro
llazzaro / redis_cheatsheet.bash
Created July 16, 2017 23:31 — forked from Yogendra0Sharma/redis_cheatsheet.bash
Redis Cheatsheet - Basic Commands You Must Know
# Redis Cheatsheet
# All the commands you need to know
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# Strings.
root@OpenWrt:~# cat /etc/config/network
config 'interface' 'loopback'
option 'ifname' 'lo'
option 'proto' 'static'
option 'ipaddr' '127.0.0.1'
option 'netmask' '255.0.0.0'
config 'interface' 'lan'
option 'ifname' 'eth0.1'
option 'type' 'bridge'
@llazzaro
llazzaro / README.md
Created April 3, 2017 04:18 — forked from balupton/README.md
DocPad: Query custom category objects (via parse event)
@llazzaro
llazzaro / about.md
Last active December 4, 2016 01:45 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@llazzaro
llazzaro / install.sh
Last active November 8, 2016 21:17 — forked from jamesdavidson/install.sh
How to install CouchDB 1.2.0 on fresh Ubuntu 12 LTS edition.
#!/bin/bash
# @jsdavo 6th July 2012
# Derived mainly from https://onabai.wordpress.com/2012/05/10/installing-couchdb-1-2-in-ubuntu-12-04/
# @llazzaro 8th Nov 2016: Update to work with ubuntu 16
# For Ubuntu 16
# Get some 300MB of dependencies
sudo apt-get install automake autoconf libtool subversion-tools help2man
sudo apt-get install build-essential erlang libicu-dev
#!/bin/sh
# Settings for a PHP Project
# Using:
# * PHP Lint
# *- PHP CS
# *- PHP Analyzer
# *- EmptyLines Checker
# *- Scrutinizer
# * PHPCPD
@llazzaro
llazzaro / gist:c0232e70ae95786079b11485b9966ea2
Created July 13, 2016 04:00
Assigning VLANs to LXC containers connected to OpenVswitch
#!/bin/bash
### BEGIN INIT INFO
# Provides: Django EC2 server
# Required-Start: networking
# Required-Stop: networking
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: Django server management script
# Description: Django server management script
### END INIT INFO