This file contains hidden or 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
require 'socket' | |
require 'syslog' | |
require 'logger' | |
require 'hoptoad_notifier' | |
# TcpSyslog is used are a dead-simple replacement for | |
# syslog ruby libs. None of them is able to send logs | |
# to a remote server, and even less in TCP. | |
# | |
# Example: |
This file contains hidden or 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 |
This file contains hidden or 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
#!/bin/sh -e | |
# chkconfig: 345 99 1 | |
# description: Tomcat6 service | |
# processname: java | |
# Get LSB functions | |
. /lib/lsb/init-functions | |
export JAVA_HOME=/usr | |
export TOMCAT_USER=solr |
This file contains hidden or 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
require 'growl' | |
require 'open3' | |
ENV["WATCHR"] = "1" | |
$spec_cmd = "env RSPEC_COLOR=true spec --drb --colour --format nested" | |
$cuke_cmd = "cucumber --color --drb --require features/step_definitions --require features/support" | |
$pass = File.join(File.expand_path(File.dirname(__FILE__)), '.watchr_images', 'pass.png') | |
$fail = File.join(File.expand_path(File.dirname(__FILE__)), '.watchr_images', 'fail.png') | |
$pending = File.join(File.expand_path(File.dirname(__FILE__)), '.watchr_images', 'pending.png') |
This file contains hidden or 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
# ======================================================= | |
# Importing and searching RSS with ElasticSearch and Tire | |
# ======================================================= | |
# | |
# This script downloads, parses and indexes Stackoverflow RSS feed with ElasticSearch | |
# via the [Tire](https://github.com/karmi/tire) Rubygem. | |
# | |
# Requirements | |
# ------------ | |
# |
This file contains hidden or 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
rescue_from = {} | |
# Associate status code with an HTTP status code. First argument is the status | |
# code, second argument is a function that accepts the XHR object. For example: | |
# $.rescueFrom 404, (xhr)-> alert("Oh no, page not found!") | |
$.rescueFrom = (status, fn)-> | |
rescue_from[status] = fn | |
# Default handling for unsuccessulf HTTP status code. Finds and calls most | |
# appropriate handler based on the HTTP status code (see `$.rescueFrom`). |
This file contains hidden or 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
@mixin gradient($from, $to) { | |
/* fallback/image non-cover color */ | |
background-color: $from; | |
/* Firefox 3.6+ */ | |
background-image: -moz-linear-gradient($from, $to); | |
/* Safari 4+, Chrome 1+ */ | |
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($from), to($to)); |
This file contains hidden or 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
# using rvm with ruby-1.9.2 | |
# latest version 2.7.8 2011-09-16 | |
brew install libxml2 | |
# installing libxslt from source code | |
wget ftp://xmlsoft.org/libxml2/libxslt-1.1.26.tar.gz | |
tar xvfz libxslt-1.1.26.tar.gz | |
cd libxslt-1.1.26 | |
./configure --prefix=/usr/local/Cellar/libxslt/1.1.26 --with-libxml-prefix=/usr/local/Cellar/libxml2/2.7.8 |
This file contains hidden or 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
## As root | |
# https://rvm.beginrescueend.com/rvm/install/ | |
groupadd rvm | |
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm) | |
# add below to ~/.bash_profile at bottom (for both root and deploy) | |
[[ -s '/usr/local/lib/rvm' ]] && source '/usr/local/lib/rvm' | |
# add below to ~/.gemrc at bottom (for both root and deploy) | |
install: --no-rdoc --no-ri |
This file contains hidden or 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
# Don't forget to run this vagrant command first | |
# vagrant ssh-config >> ~/.ssh/config | |
set :user, 'vagrant' | |
set :run_method, :sudo | |
role :app, '33.33.33.10' | |
ssh_options[:keys] = `vagrant ssh_config | grep IdentityFile`.split.last |
OlderNewer