Skip to content

Instantly share code, notes, and snippets.

View jalaziz's full-sized avatar

Jameel Al-Aziz jalaziz

View GitHub Profile
@jalaziz
jalaziz / ua.js
Last active March 22, 2018 05:21 — forked from suzuken/ua.js
experimental UDF on Bigquery with https://github.com/woothee/woothee-js.
var root = this;
// embed: dataset, util, browser, mobilephone, crawler, appliance, misc, woothee
// GENERATED from dataset.yaml at Wed Mar 21 22:09:34 PDT 2018 by jalaziz
// Snapshot from package.json
var package_info = {"name":"woothee","version":"1.7.0","description":"User-Agent string parser (js implementation)","main":"./release/woothee","devDependencies":{"mocha":">= 1.7.0","chai":">= 1.3.0","js-yaml":">= 1.0.3","should":"~1.2.2"},"scripts":{"test":"make test"},"repository":{"type":"git","url":"https://github.com/woothee/woothee-js"},"author":"tagomoris","license":"Apache v2"};
var dataset = {};
(function(){
"""
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 / 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.