Skip to content

Instantly share code, notes, and snippets.

@pyrat
pyrat / Cocoapods Environment.md
Created October 4, 2016 17:39 — forked from andrewroycarter/Cocoapods Environment.md
Directions on installing chruby, ruby, ruby-build, and bundler.

Setting up a good cocoapods environment

Before you start

Make sure that you have the latest version of Xcode installed from the Mac App Store, and that you have the command line tools installed. To install the command line tools, open Xcode, click Xcode->Preferences->Downloads->Command Line Tools

Install brew if needed.

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"

@pyrat
pyrat / gist:3927980
Created October 21, 2012 18:25
Everything you can override in a refinerycms project with refinerycms-blog
When starting a project that includes refinerycms-blog:
$ rake refinery:override view=refinery/pages/*
$ rake refinery:override view=layouts/*
$ rake refinery:override view=refinery/blog/shared/*
$ rake refinery:override view=refinery/blog/posts/*
$ rake refinery:override view=refinery/*
$ rake refinery:override controller=refinery/blog/*
$ rake refinery:override controller=refinery/*
@pyrat
pyrat / capistrano_protect.rb
Created September 27, 2011 18:06 — forked from pierot/capistrano_protect.rb
Capistrano snippet to secure deployment environment
set :stages, %w(testing staging production)
set :default_stage, "testing"
require 'capistrano/ext/multistage'
task :protect do
# http://www.htaccesstools.com/htaccess-authentication/
run "echo 'username:$apr1$gT8Ap...$3f8RadFS7xottW8AYVX5b0' >> #{File.join(current_path, '.htpasswd')}"
run "echo 'AuthType Basic' >> #{File.join(current_path, '.htaccess')}"
@pyrat
pyrat / about.md
Created August 30, 2011 09:02 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@pyrat
pyrat / Questions
Created August 9, 2011 14:22
Frozen Rails Give-away
Day job:
Rails Programmer, Trondheim, Norway (in need of a conference, last one was RailsConf Europe 2007!)
Your Rails contributions (if any):
Contribution to image_submit_tag - http://contributors.rubyonrails.org/contributors/alastair-brunton/commits
What's your Ruby/Rail experience?:
# Methods added to this helper will be available to all templates in the application.
module ApplicationHelper
def sheet(*args, &block)
code = <<-EOF
<table border="0" cellspacing="0" cellpadding="0" width="#{args[0]}">
<tr>
<td height="11" width="6"><img src="/images/shadow_tl.png" width="6" height="11" border="0" /></td>
<td rowspan="2" style="background-color: #fff; padding: 2px;">
namespace :synchronize do
desc "Synchronizing EFP and Edflats databases"
task(:synchronize => :environment) do
props = Property.find(:all)
@bookings = Array.new
if props.length > 0
props.each do |prop|
enquiries = Enquiry.find(:all, :conditions=>["property_id=? AND status='BOOKING_CONFIRMED' AND ISNULL(synced_at)", prop.id])
enquiries.each do |enq|
@bookings.push(enq.booking)