Skip to content

Instantly share code, notes, and snippets.

@rtcoms
rtcoms / bashrc.sh
Created April 5, 2012 03:30 — forked from dogmatic69/bashrc.sh
make git prompt more useful
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
RED="\[\033[0;31m\]"
YELLOW="\[\033[0;33m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
WHITE="\[\033[1;37m\]"
LIGHT_GRAY="\[\033[0;37m\]"
COLOR_NONE="\[\e[0m\]"
@rtcoms
rtcoms / database.yml
Created July 10, 2012 16:09 — forked from joselo/database.yml
database.yml config file for postgresql
default: &local_defaults
adapter: postgresql
host: localhost
port: 5432
min_messages: warning
encoding: utf8
username: postgres
password:
template: template0
@rtcoms
rtcoms / ubuntu-lucid-setup-rails.md
Created July 13, 2012 18:14 — forked from lakim/ubuntu-lucid-setup-rails.md
Ubuntu Lucid Setup Guide for Rails

This note will walk you though setting up and securing a Ubuntu 10.04 LTS then deploying a Rails application with mulit-stage deployment.

TODO:

  • Add section for NGINX setup

Server Setup

@rtcoms
rtcoms / new_bashrc.sh
Created August 11, 2012 10:20 — forked from josephwecker/new_bashrc.sh
Replace .bashrc, .bash_profile, .profile, etc. with something much more clean, consistent, and meaningful.
#!/bin/bash
# License: Public Domain.
# Author: Joseph Wecker, 2012
#
# Are you tired of trying to remember what .bashrc does vs .bash_profile vs .profile?
# Are you tired of trying to remember how darwin/mac-osx treat them differently from linux?
# Are you tired of not having your ~/.bash* stuff work the way you expect?
#
# Symlink all of the following to this file:
# * ~/.bashrc
@rtcoms
rtcoms / README.md
Created October 9, 2012 17:38 — forked from agnoster/README.md
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

require 'yaml'
# Simple loading of environment-namespaced config files with local overrides.
#
# LiteConfig(:foobar)
#
# loads and caches the current environment section from:
#
# config/foobar.yml
#
@rtcoms
rtcoms / gist:4358371
Created December 22, 2012 10:31 — forked from pahanix/gist:885671
# config/initializers/clear_logs.rb
# This snippet simply clears your logs when they are too large.
# Large logs mean looooong search in TextMate. You know it :)
# Every time you run rails server or rails console it checks log sizes
# and clears the logs for you if necessary.
if Rails.env.development?
MAX_LOG_SIZE = 2.megabytes
@rtcoms
rtcoms / .bashrc
Created January 15, 2013 09:08 — forked from mcjim/.bashrc
# Quick fork by @mcjim to add stash status and tweak to suit his style.
# http://henrik.nyh.se/2008/12/git-dirty-prompt
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/
# host dir master $ # clean working directory
# host dir master* $ # dirty working directory
# host dir master*^ $ # dirty working directory with stash
# host dir master^ $ # clean working directory with stash
function parse_git_dirty {
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
# install rvm
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
# install ruby 1.9.2 + some global gems
rvm install 1.9.2
rvm use 1.9.2@global
gem install awesome_print map_by_method wirble bundler builder pg cheat
gem install -v2.1.2 builder