This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible " be iMproved | |
filetype off " required! | |
set rtp+=~/vimbundle/bundle/vundle/ | |
call vundle#rc() | |
Bundle 'tpope/vim-fugitive' | |
Bundle 'tpope/vim-git' | |
Bundle 'tpope/vim-haml' | |
Bundle 'pangloss/vim-javascript' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update, upgrade and install development tools: | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install build-essential | |
apt-get -y install git-core | |
# Install rbenv | |
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
# Add rbenv to the path: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some brief instructions on how to use Sprocket 2 in Rails to get CoffeeScript | |
powered JS and SASS powered CSS with YUI compression all via the magic of rack. | |
This stuff will be native in Rails 3.1 and the layout of the files on the | |
filesystem will be different but this guide will get you working with it | |
while we wait for all that to finalize. | |
Ignore the number prefixes on each file. This is just to ensure proper order in the Gist. | |
It's based on eric1234 gist https://gist.github.com/911003. ijust made it 3.1 compliant in terms of convention |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adapted because otherwise it will do an update everytime | |
#http://blog.kumina.nl/2010/11/puppet-tipstricks-running-apt-get-update-only-when-needed/ | |
# | |
# Cookbook Name:: apt | |
# Recipe:: default | |
# | |
# Copyright 2008-2009, Opscode, Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ruby_block "Verify running processed" do | |
block do | |
missing_processes = [] | |
[ | |
"jetty", | |
"nginx", | |
"mongodb-#{node[:mongodb][:version]}", | |
"redis-#{node[:redis][:version]}" | |
].each do |process| | |
Chef::Log.debug("Checking process #{process}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def tip(msg); puts; puts msg; puts "-"*100; end | |
# | |
# 30 Ruby 1.9 Tips, Tricks & Features: | |
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/ | |
# | |
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2" | |
tip "Ruby 1.9 supports named captures in regular expressions!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if Chef::Config[:solo] | |
class Chef | |
module Mixin | |
module Language | |
def data_bag(bag) | |
@solo_data_bags = {} if @solo_data_bags.nil? | |
unless @solo_data_bags[bag] | |
@solo_data_bags[bag] = {} | |
Dir.glob(File.join(Chef::Config[:data_bag_path], bag, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'chef' | |
require 'chef/client' | |
require 'chef/run_context' | |
Chef::Config[:solo] = true | |
Chef::Config[:log_level] = :info | |
Chef::Log.level(:info) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# STEP 1: ENSURE COMPLETION AND PROMPT FUNCTION ARE LOADED | |
# ======================================================== | |
# OPTION 1: If on OSX using Homebrew: | |
# | |
# source $(brew --prefix)/etc/bash_completion.d/git-prompt.sh | |
# source $(brew --prefix)/etc/bash_completion.d/git-completion.bash | |
# OPTION 2: If on OSX using built-in Git (also works on ZSH): | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check this out, rvm use rbx | |
ruby_block "rvm use rbx" do | |
block do | |
Chef::Mixin::Command.popen4('bash -l -c "rvm use 1.9.1 && env"') do |p,i,o,e| | |
o.each_line do |line| | |
env_bits = line.split("=") | |
ENV[env_bits[0]] = env_bits[1] | |
end | |
end |
NewerOlder