Skip to content

Instantly share code, notes, and snippets.

View seebq's full-sized avatar
💭
working on @Greenzie

Charles Brian Quinn seebq

💭
working on @Greenzie
View GitHub Profile
@seebq
seebq / gist:941407
Created April 25, 2011 22:31
uh oh.
$ brew install jpeg cairo librsvg
Formula already installed: /usr/local/Cellar/jpeg/8c
==> Downloading http://downloads.sourceforge.net/project/libpng/libpng12/1.2.44/
######################################################################## 100.0%
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/libpng/
==> make install
==> Caveats
This formula is keg-only, so it is not symlinked into Homebrew's prefix.
Mac OS X already provides this program and installing another version in
parallel can cause all kinds of trouble.
Swarm3::Application.routes.draw do
devise_for :users
resources :swarm_requests do
put 'accept_requester_price_now', :on => :member
resources :bids do
put 'accept', :on => :member
end
<% @body_onload = "initialize();" %>
<script type="text/javascript">
function initialize() {
// default to Atlanta
//custom styling variables
var stylez = [
{
@seebq
seebq / Rails Conf 2011 Proposal.textile
Created February 18, 2011 04:14
A Results Only Work Environment (ROWE) on Rails

Description

Highgroove Studios is a Results Only Work Environment. ROWE is based on the premise that giving employees complete control over their time is the best way to increase productivity in the workplace. We have no set hours (no 9-5), all meetings are optional, and the only thing that matters is Results. We’re also an Agile Ruby on Rails development shop, and we think they go hand in hand.

Abstract

“Results-Only Work Environment is a management strategy where employees are evaluated on performance, not presence. In a ROWE, people focus on results and only results – increasing the organization’s performance while creating the right climate for people to manage all the demands in their lives — including work.” — Go ROWE Official CultureRX Site

ROWE was pioneered at Best Buy and now exists in many companies: Gap, Girl Scouts of America, Syvantis, and more. In a ROWE, people work where they want, when they want, so long as the work gets done. Eureka! It

@seebq
seebq / gist:670985
Created November 10, 2010 15:24 — forked from anonymous/gist:670982
class Widget < ActiveRecord::Base
AMERICAN_COLORS = %w(red white blue)
# /(red|white|blue)/i
validate :must_be_american
def must_be_american
unless AMERICAN_COLORS.include?(self.color.downcase)
errors.add(:color, " has to be american (#{AMERICAN_COLORS.to_sentence}, buddy....")
my code here
# customized ~/.irbrc file
# mate ~/.irbrc
require 'rubygems'
begin
require "ap"
IRB::Irb.class_eval do
def output_value
ap @context.last_value
end
# Slicehost Server running Ubuntu Lucid Lynx 10.
#
apt-get update && apt-get upgrade -y
apt-get install build-essential ruby1.8-dev rails apache2 apache2-prefork-dev libapr1-dev mysql-server git-core sqlite3 libreadline5-dev libmysqlclient15-dev -y
useradd -m -G users -s /bin/bash deploy
passwd deploy # enter a password
# SEO Friendly override of to_param
#
def to_param
"#{id}-#{self.title.downcase.gsub(/[^[:alnum:]]/,'-')}"
end
# Simple way to process incoming emails in ruby
#
# Emails can be pretty complex with their attachments. For example:
#
# email
# alternatives
# text
# HTML
# attachment
#