- Name: vagrant-centos
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
aptitude install ruby1.9.1 rubygems1.9.1 libruby1.9.1 nginx mysql-server libmysql-ruby1.9.1 build-essential ruby1.9.1-dev libopenssl-ruby1.9.1 libssl-dev zlib1g-dev | |
gem install rubygems-update | |
ln /usr/bin/ruby1.9.1 /usr/bin/ruby | |
/var/lib/gems/1.9.1/gems/rubygems-update-1.3.7/bin/update_rubygems | |
gem install rails --pre --no-rdoc --no-ri | |
gem install passenger --no-rdoc --no-ri | |
passenger-install-nginx-module |
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
# Everything you need to do to get started with Rails 2.3.8 | |
# | |
# As of June 14th, 2010 @ 2:30 p.m. MST | |
# | |
# This gist now features instructions to get Rails 3 up and running with: | |
# - Ruby 1.8.7-p174 | |
# - Bundler 0.9.26 | |
# - Cucumber 0.8.0 | |
# - Rspec 1.3.0 + Rspec-Rails 1.3.2 | |
# - RVM |
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
Growl::Notifier.sharedInstance.notify('new_messages', 'title', 'desc', :click_context => 'titel-context') |
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
# based on https://rails.lighthouseapp.com/projects/8994/tickets/4807-error-encodingundefinedconversionerror-xc3-from-ascii-8bit-to-utf-8 | |
# invalid multibyte char (UTF-8), ASCII-8BIT to UTF-8 (Encoding::UndefinedConversionError) | |
diff --git a/activesupport/lib/active_support/buffered_logger.rb b/activesupport/lib/active_support/buffered_logger.rb | |
index 29c3843..5e562ee 100644 | |
--- a/activesupport/lib/active_support/buffered_logger.rb | |
+++ b/activesupport/lib/active_support/buffered_logger.rb | |
@@ -100,7 +100,12 @@ module ActiveSupport | |
def flush | |
@guard.synchronize do | |
unless buffer.empty? |
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
################################################################################## | |
# Deploy | |
# Awesome deploy script stolen from: | |
# http://glu.ttono.us/articles/2008/04/05/really-simple-git-deployment-with-vlad | |
################################################################################## | |
begin | |
require 'rake_remote_task' | |
APP_NAME = "someapp" |
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
set :application, "website" | |
set :scm, :git | |
set :ssh_options, { :forward_agent => true } | |
set :repository, "[email protected]:user/#{application}.git" | |
set :repository_cache, "git-cache" | |
set :deploy_via, :remote_cache | |
role :web, "dev.server.com" | |
role :app, "dev.server.com" | |
role :db, "dev.server.com", :primary => true |
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
var number = "1234567890"; | |
var formatted_number = ""; | |
var number_of_digits = number.length-1; | |
var bracket = false; | |
for(var i=number_of_digits; i>=0; i--) { | |
var digit = number[i]; | |
var position = number_of_digits-i; | |
switch(position) { |
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
<configuration> | |
<property> | |
<name>com.trex.mapreduce.job_root</name> | |
<value>http://localhost:3000</value> | |
</property> | |
<property> | |
<name>com.trex.mapreduce.database_address</name> | |
<value>jdbc:mysql://localhost/trex_production</value> |
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 | |
# Remove Index older than 8 hours | |
find /var/tmp/ -name "j-*" -mmin +500 -exec rm -r {} \; |