Skip to content

Instantly share code, notes, and snippets.

View cskevint's full-sized avatar

Kevin Trotter cskevint

View GitHub Profile
@juanger
juanger / csv_splitter.rb
Created September 18, 2013 19:00
CSV Splitter
# This script splits a csv file with header into multiple csv files
# Usage: ruby csv_splitter.rb FILENAME [NUM_CHUNKS=10]
# Example: ruby csv_splitter.rb wmeco_export.csv 20
# Change this method to skip malformed lines
def malformed?(line)
false
## This could be:
# line.start_with?(',')
end
@jeanfbrito
jeanfbrito / server.md
Last active September 30, 2018 18:18 — forked from josemarluedke/server.md
Ubuntu with Nginx + Ruby 1.9.3 + PostgreSQL 9.1 + Passenger + Papistrano

Ubuntu with Nginx + Ruby 1.9.3 + PostgreSQL 9.1 + Passenger + Papistrano

Update the system

sudo apt-get update

Install some dependencies

@jeanfbrito
jeanfbrito / gist:3986158
Created October 31, 2012 09:51
Clean Install – Mountain Lion OS X 10.8 DP3
@esilvas
esilvas / mountain-lion-brew-setup.markdown
Created July 30, 2012 00:24 — forked from myobie/mountain-lion-brew-setup.markdown
Fix Homebrew after Mountain Lion Upgrade

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from http://developer.apple.com. You will not be able to submit apps to any stores using this XCode version, so turn away if that is something you might want to do.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.

@bkimble
bkimble / gist:1365005
Last active August 22, 2024 14:21
List local memcached keys using Ruby
#!/usr/bin/env ruby
# List all keys stored in memcache.
# Credit to Graham King at http://www.darkcoding.net/software/memcached-list-all-keys/ for the original article on how to get the data from memcache in the first place.
require 'net/telnet'
headings = %w(id expires bytes cache_key)
rows = []