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
def csv_to_array(file_location) | |
csv = CSV::parse(File.open(file_location, 'r') {|f| f.read }) | |
fields = csv.shift | |
csv.collect { |record| Hash[*(0..(fields.length - 1)).collect {|index| [fields[index],record[index].to_s] }.flatten ] } | |
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/perl | |
($var_name, $process_name) = split(/=/,$ENV{'QUERY_STRING'}); | |
print "HTTP/1.0 200 OK\r\n"; | |
print "Content-type: text/plain\r\n\r\n"; | |
print "OK"; | |
#print $ENV{'QUERY_STRING'}; | |
$process_path = ""; |
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 'spork' | |
Spork.prefork do | |
# Loading more in this block will cause your tests to run faster. However, | |
# if you change any configuration or code from libraries loaded here, you'll | |
# need to restart spork for it take effect. | |
# This file is copied to spec/ when you run 'rails generate rspec:install' | |
ENV["RAILS_ENV"] ||= 'test' | |
require File.expand_path("../../config/environment", __FILE__) |
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
# from your user dir | |
cd | |
# create or update .bash_profile | |
touch .bash_profile | |
# Install RVM: (https://rvm.io/rvm/install/) | |
curl -L get.rvm.io | bash -s stable |
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
# the admin password for all of the IE VMs is “Password1″ without the quotes, it's also used for the password hints | |
1) Install VirtuaBox on your mac | |
http://download.virtualbox.org/virtualbox/4.1.10/VirtualBox-4.1.10-76795-OSX.dmg | |
2) Decide which versions of Internet Explorer you want to download and install – each version of Internet Explorer is contained within a separate virtual machine that runs within VirtualBox. In other words, if you want to run Internet Explorer 7, 8, and 9, you will need to download three separate VM’s, which may take a while so keep that in mind. Select the text below and copy it: | |
# Install ALL versions of Internet Explorer: IE 7, IE 8, and IE 9 (for now this script will also pull down a IE 6 vm with windows xp) |
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
def parse_decimal_from_string(value) | |
value.scan(/[-+]?\d*\.?\d+/).join('') | |
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
# CentOS 6.4 barebones walkthrough guide for a new vps rails server instance | |
# assumes you already have a personal ssh key locally | |
# | |
# script implements the following security approaches: | |
# disables root login | |
# configures ssh setup for deployer user | |
# opens up standard ports | |
# | |
# setup includes: | |
# rvm & ruby-1.9.3-p429 |
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
CREATE USER 'sysadmin'@'localhost' IDENTIFIED BY 'password'; | |
GRANT ALL PRIVILEGES ON `appname_environment`.* TO 'sysadmin'@'localhost'; |
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
source 'https://rubygems.org' | |
gem 'rails', '3.2.1' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
gem 'sqlite3' | |
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
[user] | |
name = yourname | |
email = yourname @ whatever | |
[core] | |
excludesfile = yourhomedir/.gitignore | |
#git config --global core.eol lf | |
#git config --global core.autocrlf input | |
eol = lf | |
autocrlf = input | |
#git rm -rf --cached . |
OlderNewer