Skip to content

Instantly share code, notes, and snippets.

View andre's full-sized avatar

Andre Lewis andre

View GitHub Profile
# MySQL Statistics by Eric Lindvall <[email protected]>
# MySQLTuner integration by Andre Lewis <@[email protected]>
class MysqlQueryStatistics < Scout::Plugin
ENTRIES = %w(Com_insert Com_select Com_update Com_delete)
OPTIONS=<<-EOS
user:
name: MySQL username
# Quick and dirty applescript to determine batter life under very light load. This script just navigates Safari to a
# page every 10 seconds to simulate web browsing.
#
# You'll need to change the file output path (in the log method) for your machine.
#
# The test:
# * a freshly charged and calibrated battery
# * dim brightness to 50%
# * turn off bluetooth
# * set display to never go to sleep
# Drop this file in config/initializers to run your Rails project on Ruby 1.9.
# This is three separate monkey patches -- see comments in code below for the source of each.
# None of them are original to me, I just put them in one file for easily dropping into my Rails projects.
# Also see original sources for pros and cons of each patch. Most notably, the MySQL patch just assumes
# that everything in your database is stored as UTF-8. This was true for me, and there's a good chance it's
# true for you too, in which case this is a quick, practical solution to get you up and running on Ruby 1.9.
#
# Andre Lewis 1/2010
# encoding: utf-8
#! /usr/bin/env ruby
require "open3" # for reading stderr
# A dirt-simple script to merge a pull request from someone on github.
# Andre Lewis, 2009
#
# Assumptions:
# 1. you're currently working on master
# 2. you've already reviewed the pull request and have decided to include it.