Skip to content

Instantly share code, notes, and snippets.

View jalaziz's full-sized avatar

Jameel Al-Aziz jalaziz

  • Paradigm Connect
  • Los Angeles, CA
  • X @jalaziz
View GitHub Profile
"""
Queries the slowlog database table maintained by Amazon RDS and outputs it in
the normal MySQL slow log text format. Modified version of the script by
memonic (Thanks!) at https://gist.github.com/1481025
Things to change in this script for your own setup:
<root_user> to your mysql root user (e.g. "root")
<root_pass> to your mysql root password (e.g. "hunter2")
<host_domain> to your mysql root password (e.g. "prod-01.w3rfs2.us-east-1.rds.amazonaws.com")
@jalaziz
jalaziz / graphiti.conf
Last active December 14, 2015 19:49
Graphiti Upstart + Unicorn + Nginx
description "Graphiti"
start on runlevel [2345]
stop on runlevel [06]
respawn limit 10 5
chdir /opt/graphiti
kill signal QUIT
exec bundle exec unicorn -c config/unicorn.rb -E production
@jalaziz
jalaziz / nginx.conf
Last active December 14, 2015 12:08
html5bp nginx config for Ubuntu
# Set another default user than root for security reasons
user www-data;
# As a thumb rule: One per CPU. If you are serving a large amount
# of static files, which requires blocking disk reads, you may want
# to increase this from the number of cpu_cores available on your
# system.
#
# The maximum number of connections for Nginx is calculated by:
# max_clients = worker_processes * worker_connections
@jalaziz
jalaziz / riemann-dash.conf
Created March 1, 2013 05:41
Riemann Upstart
description "Riemann Dashboard"
start on runlevel [2345]
stop on runlevel [06]
respawn limit 10 5
setuid riemann
exec riemann-dash
@jalaziz
jalaziz / carbon-cache.conf
Last active December 14, 2015 08:09
Graphite Upstart + uWSGI + Nginx
description "Graphite Carbon Cache Daemon"
start on runlevel [2345]
stop on runlevel [06]
expect daemon
respawn limit 10 5
chdir /opt/graphite
pre-start exec rm -f /opt/graphite/storage/carbon-cache-a.pid
@jalaziz
jalaziz / unicorn.d
Created October 7, 2012 10:19
init.d script for unicorn with RVM
#!/bin/sh
#
# init.d script for single or multiple unicorn installations. Expects at least one .conf
# file in /etc/unicorn
#
# based on git://gist.github.com/504875.git [http://github.com/jaygooby]
# support for RVM on Mac OS X
# Modified by JeremyWei<http://github.com/jeremy>
#
# run the code below, you will get a script named bootup_unicorn in ~/.rvm/bin.
@jalaziz
jalaziz / marathon.upstart
Last active August 29, 2015 13:58
Marathon Upstart
description "marathon"
# Start just after the System-V jobs (rc) to ensure networking and zookeeper
# are started. This is as simple as possible to ensure compatibility with
# Ubuntu, Debian, CentOS, and RHEL distros. See:
# http://upstart.ubuntu.com/cookbook/#standard-idioms
start on stopped rc RUNLEVEL=[2345]
respawn
script
@jalaziz
jalaziz / chronos.upstart
Last active August 29, 2015 13:58
Chronos Upstart
description "chronos"
# Start just after the System-V jobs (rc) to ensure networking and zookeeper
# are started. This is as simple as possible to ensure compatibility with
# Ubuntu, Debian, CentOS, and RHEL distros. See:
# http://upstart.ubuntu.com/cookbook/#standard-idioms
start on stopped rc RUNLEVEL=[2345]
respawn
script

Keybase proof

I hereby claim:

  • I am jalaziz on github.
  • I am jameel (https://keybase.io/jameel) on keybase.
  • I have a public key whose fingerprint is E20B F064 79B1 DCF5 5CC2 3D73 612B BCA5 D882 1231

To claim this, I am signing this object: