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
Project Planning | |
= | |
***SW Due date:** Feb 28, 2010* | |
***Memo Due date:** March 8, 2010* | |
* * * | |
Iteration 1: Feb 1-4 | |
- |
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 'rubygems' | |
require 'benchmark' | |
require 'almodovar' # http://github.com/bebanjo/almodovar | |
auth = Almodovar::DigestAuth.new("Sequence", "api_user", "secret") | |
sequence = Almodovar::Resource("http://sequence.local/api", auth) | |
sequence.work_areas.first.name | |
# "Bebanjo TV" |
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
# In your .bash_profile or .bashrc | |
# show active git branch in prompt | |
git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1) /' | |
} | |
# customize the prompt variable | |
export PS1="\u@\h:\w \$(git_branch)$ " |
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
# Slightly improved version of http://github.com/qoobaa/s3/blob/master/extra/s3_paperclip.rb, with support | |
# for buckets in locations other than standard US. | |
# S3 backend for paperclip plugin. Copy the file to: | |
# +config/initializers/+ directory | |
# | |
# Example configuration for CNAME bucket: | |
# | |
# has_attached_file :image, |
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
namespace :assets do | |
desc "Normalize all Candidate attachments names" | |
task :normalize => :environment do | |
Candidate.find(:all, :conditions => ['candidates.id >= ? AND candidates.avatar_file_name IS NOT ?', ENV['RESUME'] || 1, nil]).each do |candidate| | |
@old_paths = {} | |
@bucket = ENV['BUCKET'] || 'jobandtalent_staging' | |
begin | |
%w{original identity contact profile}.each do |style| | |
@old_paths.merge!({style => candidate.avatar.path(style)}) | |
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
#!/usr/bin/env ruby | |
# jazzfonica.rb for Mac OS X | |
# Scans the visible networks for JAZZTEL_XXXX or WLAN_XXXX and calculates the password | |
# Ported from PHP example at http://kz.ath.cx/wlan/codigo.txt | |
# Download and execute with ruby (e.g. ruby jazzfonica.rb) from a Terminal | |
require 'digest/md5' | |
messages = [] | |
unless !File.exists?('/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport') |
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 ckeditor_textarea(object, field, options = {}) | |
options = options.dup.symbolize_keys | |
var = options.delete(:object) if options.key?(:object) | |
var ||= @template.instance_variable_get("@#{object}") | |
value = var.send(field.to_sym) if var | |
value ||= options.delete(:value) || "" | |
element_id = options.delete(:id) || ckeditor_element_id(object, field, options.delete(:index)) |
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
class NewsEntry < AR::Base | |
has_one :association | |
define_index do | |
index wadus | |
has association.published_at, :as => :published_at | |
end | |
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
class Contents::Post < Contents::Base | |
has_many :content_members, :as => :memberable, :dependent => :destroy | |
has_many :members, :through => :content_members, :class_name => "Contents::Member" | |
belongs_to :kt_blog, :class_name => 'Kontent::KtBlog', :touch => true | |
has_many :blog_categories, :through => :kt_blog, :class_name => "Kontent::KtBlogCategory" | |
validates_presence_of :title | |
validates_presence_of :summary, :unless => Proc.new {|post| post.body.present?} | |
validates_presence_of :kt_blog_id |
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
Estudio 6 | |
~~~~~~~~~ | |
By: Leo Brouwer (1939-) | |
Transcribed from: "Portrait" by Kavi | |
Transcribed and tabbed by: John Kean | |
Standard tuning. | |
6/4 time, changing to 4/4 near the end. | |
Allegro (MM = 138). |