Skip to content

Instantly share code, notes, and snippets.

View parndt's full-sized avatar

Philip Arndt parndt

View GitHub Profile
FROM ruby:2.3-alpine
RUN apk add --update \
build-base \
git \
libxml2-dev \
libxslt-dev \
tzdata \
rm -rf /var/cache/apk/*; \
gem update --system;
@lengarvey
lengarvey / rc.md
Created January 9, 2015 02:56
RailsCamp 2015 Sydney Announcement - June 12 to 15.

Hi there,

My name is Leonard and I'm one of the organisers for the next Australian RailsCamp which will be held in Sydney. Here are the details:

June 12th-15th which is the 2nd weekend of June.

The camp will be held at Broken Bay Sport and Recreation Camp at the mouth of Hawkesbury River just north of Sydney.

broken bay

@gogogarrett
gogogarrett / after_signup_controller.rb
Created January 6, 2015 02:50
Reform + Wicked Integration
class AfterSignupController < ApplicationController
include Wicked::Wizard
steps :create_organization, :create_event, :create_tiers
def show
case step
when :create_organization
@form = Form::Organization.new(Organization.new)
when :create_event
@form = Form::Event.new(Event.new)
@olivierlacan
olivierlacan / database.rake
Last active June 10, 2021 07:06
Database rake tasks that I use on Code School to ferret out huge tables with millions of rows and see how many indices they have and to see which tables have missing indices on associated tables (foreign keys). The latter was taken from this great post by Tom Ward: https://tomafro.net/2009/09/quickly-list-missing-foreign-key-indexes
namespace :database do
task fat_tables: :environment do
c = ActiveRecord::Base.connection
max_table_name_width = 0
tables = c.tables.sort_by do |t|
max_table_name_width = t.length if t.length > max_table_name_width

List of NZ Beers worth sampling

An incomplete list.

Sessionable

  • Emerson's 1812 (many supermarkets)
  • Emerson's Bookbinder (good “session” ale)
  • Cassel's Best Bitter (from The Brewery)
  • Beer Baroness Lady Danger (from Pomeroy's)
@JuggoPop
JuggoPop / Git branch bash autocomplete *with aliases*
Created April 15, 2014 06:23
Git branch bash autocomplete *with aliases* (add to .bash_profile)
# To Setup:
# 1) Save the .git-completion.bash file found here:
# https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
# 2) Add the following lines to your .bash_profile, be sure to reload (for example: source ~/.bash_profile) for the changes to take effect:
# Git branch bash completion
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
# Add git completion to aliases
@samueljseay
samueljseay / gist:7779276
Last active December 15, 2023 20:22 — forked from jimbojsb/gist:1630790
Color highlight and copy code for presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@elle
elle / Shakshuka
Last active March 30, 2020 19:41
Shakshuka recipes
# Shakshuka by Gilboa:
- Chopped onion
- Chopped red capcisum
- Chopped tomatoes
Fry for a few minutes till soft. Then add:
- Tomato paste in garlic or chilli flavour
- Crushed garlic
- a bit of salt, pepper and sweet paprika
Then add the eggs, with either chopped parsley or chopped coriander.
@bf4
bf4 / ruby_learning.md
Last active July 17, 2021 08:06
Some Ruby Learning Resources
@tommeier
tommeier / Rakefile
Created September 20, 2012 05:25
Rake Timer
require 'rake_timer'