- 3 very ripe bananas
- 2 eggs
- 220gr brown sugar
- 8 tbsp butter
- 250gr flour
- 1 tsp backing powder
- 1 tsp backing soda
- A handful of chopped walnuts
This file contains 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
before 'deploy', 'deploy:good_luck' | |
before 'deploy:migration', 'deploy:good_luck' | |
task :good_luck, roles: :app, except: { no_release: true } do | |
if Time.now.wday == 5 | |
logger.debug('') | |
logger.debug('┓┏┓┏┓┃') | |
logger.debug('┛┗┛┗┛┃\○/') | |
logger.debug('┓┏┓┏┓┃ / Friday') | |
logger.debug('┛┗┛┗┛┃ノ)') |
This file contains 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
irb(main):020:0> require 'benchmark' | |
=> false | |
irb(main):021:0> | |
irb(main):022:0* params = {'platform' => 'ios'} | |
=> {"platform"=>"ios"} | |
irb(main):023:0> | |
irb(main):024:0* Benchmark.bm do |x| | |
irb(main):025:1* x.report { platform = params['platform'].is_a?(Array) ? params['platform'].first : params['platform']; puts platform } | |
irb(main):026:1> x.report { platform = Array === params['platform'] ? params['platform'].first : params['platform']; puts platform } | |
irb(main):027:1> x.report { platform = Array(params['platform']).first; puts platform } |
This file contains 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
# Show active Git branch # | |
git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1) /' | |
} | |
# Example of prompt, full reference -> http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/bash-prompt-escape-sequences.html # | |
export PS1="\u@\h:\w\$(git_branch)$ " |
This file contains 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
#----------------------------------PLEASE NOTE--------------------------------# | |
#This file is the author's own work and represents their interpretation of the# | |
#song. You may only use this file for private study, scholarship, or research.# | |
#-----------------------------------------------------------------------------# | |
Date: Wed, 31 May 1995 08:54 +1200 (NZST) | |
Subject: tab : Aubade - Bartoli | |
Aubade - Bartoli | |
~~~~~~ |
This file contains 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). |
This file contains 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 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 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)) |
NewerOlder