Skip to content

Instantly share code, notes, and snippets.

@iphoting
iphoting / 04_newrelic.ini
Created January 20, 2013 15:49
Sample newrelic.ini
; Edit and place this file in your APP directory as `your_app/conf/etc.d/04_newrelic.ini`.
; This file contains the various settings for the New Relic PHP agent. There
; are many options, all of which are described in detail at the following URL:
; https://newrelic.com/docs/php/php-agent-phpini-settings
;
; If you use a full path to the extension you insulate yourself from the
; extension directory changing if you change PHP installations or versions.
; If you do not use an absolute path then the file must be installed in the
@iphoting
iphoting / inputrc
Created November 24, 2012 03:46
My inputrc tweaks.
# Show all tab-completion.
set show-all-if-ambiguous on
# Case-insensitive match when tab-completion matching.
set completion-ignore-case on
# Don't beep on tab-completion.
set bell-style none
# Symlink completion matches have / appended.
@iphoting
iphoting / pin_gen.rb
Created November 18, 2012 09:24
Simple Numeric PIN Generator
#!/usr/bin/env ruby
#
# A simple numerical PIN generator.
# For passphrases, use pwqgen.rb.
#
# Usage:
# gem install docopt
# ./pin_gen.rb --help
#
@iphoting
iphoting / .powconfig
Created November 14, 2012 21:00
My Pow Config
export POW_TIMEOUT=120
export POW_WORKERS=1
export POW_DST_PORT=8300
export POW_RVM_PATH="/usr/local/rvm/scripts/rvm"
@iphoting
iphoting / tumblr_video_downloader.sh
Created October 12, 2012 04:23
Tumblr Video Downloader
#!/usr/bin/env bash
#
# This scripts searches for a video_file link from the a Tumblr
# video premalink page and uses wget to download the video file.
#
# Requirements: curl, 7.21.2 or newer.
#
if [ -z "$1" ];
then
@iphoting
iphoting / simple_http_server.ru
Created July 25, 2012 04:06
Simple HTTP Server for Ruby
#!/usr/bin/env rackup
#\ -E deployment
# Description:
#
# Start a simple static HTTP server for the current directory.
#
# Prerequisites:
#
# gem install 'rack'
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant::Config.run do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "centos64"
@iphoting
iphoting / chef-server.json
Created July 20, 2012 09:08
Chef-Server Bootstrap JSON
{
"chef_server": {
"server_url": "http://chef-server:4000",
"webui_enabled": true,
"init_style": "init"
},
"run_list": [ "recipe[chef-server::rubygems-install]" ]
}
@iphoting
iphoting / apache-gitweb.conf
Created July 13, 2012 03:56
Gitolite v3 gitweb.conf
# gitweb configuration
Alias /gitweb /usr/share/gitweb
RewriteEngine On
RewriteRule ^gitweb$ gitweb/ [R]
<Directory /usr/share/gitweb>
Order allow,deny
Allow from all
Options ExecCgi FollowSymLinks SymLinksIfOwnerMatch
DirectoryIndex gitweb.cgi
@iphoting
iphoting / mysql_rep_delay
Created July 4, 2012 06:47
MySQL Slave Replication Heartbeat Monitor
#!/bin/bash
## Plug-in to Monitor MySQL Slave Replication Delay.
#
#$Author: imran $
#$Date: 2008-09-01 09:29:21 $
#$RCSfile: mysql_rep_delay,v $
#$Revision: 1.1 $
heartbeatdb=${heartbeatdb:-test}
cmd=${cmd:-`which pt-heartbeat`}