Skip to content

Instantly share code, notes, and snippets.

# -*- 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 / 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'
@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 / .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 / 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 / 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 / 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 / Gemfile
Created January 22, 2013 15:32
Bundler < 1.2.0 compatible Gemfile
source :rubygems
ruby "1.9.3" if Gem::Version.new(Bundler::VERSION) > Gem::Version.new('1.2.0')
gem 'sinatra'
@iphoting
iphoting / .powrc
Last active December 12, 2015 09:08
.powrc to be committed.
# detect `$rvm_path`
if [ -z "${rvm_path:-}" ] && [ -x "${HOME:-}/.rvm/bin/rvm" ]
then rvm_path="${HOME:-}/.rvm"
fi
if [ -z "${rvm_path:-}" ] && [ -x "/usr/local/rvm/bin/rvm" ]
then rvm_path="/usr/local/rvm"
fi
# load environment of current project ruby
if
@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()
{