Skip to content

Instantly share code, notes, and snippets.

@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 / 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 / ledger.sh
Last active March 29, 2019 06:00
Ledger Bash Completion
# Assumption : bash-completion package is installed and enabled
# Try it : just "source ledger"
# Here are three possible ways to install this file
# 1. As ~/.bash_completion file
# 2. As ~/.bash_completion.d/ledger file, with additional file
# ~/.bash_completion which contents ". ~/.bash_completion.d/ledger"
# 3. As /etc/bash_completion.d/ledger
_ledger()
{
@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 / 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`}
@iphoting
iphoting / boxstarter.txt
Last active January 2, 2016 11:19
Boxstarter Script
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
Set-TaskbarSmall
cinst Microsoft-Hyper-V-All -source windowsFeatures
#rem cinst PowerShell
cinst powertab
cinst pscx
cinst teamviewer
#cinst avastfreeantivirus
@iphoting
iphoting / newrelic.yml
Created December 31, 2013 04:47
Cleaned Up Ruby New Relic Agent Configuration File
#
# This file configures the New Relic Agent. New Relic monitors
# Ruby, Java, .NET, PHP, and Python applications with deep visibility and low overhead.
# For more information, visit www.newrelic.com.
#
# Generated June 03, 2013
#
# This configuration file is custom generated for Barsoom
@iphoting
iphoting / global.gems.linux
Last active December 16, 2015 12:08
global.gems for RVM in /usr/local/rvm/gemsets/global.gems
rubygems-bundler
bundler
rake
rvm
heroku
powder
foreman
guard
guard-bundler
@iphoting
iphoting / play
Created March 28, 2013 08:12
play shell script. Put in ~/bin
#!/usr/bin/env bash
export JAVA_HOME="`/usr/libexec/java_home`"
PLAY_HOME="~/Development/Java/play-latest"
exec ${PLAY_HOME}/play $@
@iphoting
iphoting / expenses-by-month.sh
Created February 27, 2013 04:19
Ledger output for Expenses by Month specified.
#!/usr/bin/env bash
if [ "$1" ]; then
MTH="$1"
else
MTH="`date +%b`"
fi
echo "Month: ${MTH}."