I hereby claim:
- I am paulgroves on github.
- I am paulgroves (https://keybase.io/paulgroves) on keybase.
- I have a public key ASAvOnEovSvNfmtEC0RaW1aIxx_BQ42uabV-xTgkiWDt3wo
To claim this, I am signing this object:
{ | |
"extensions": | |
[ | |
"coffee" | |
] | |
} |
I hereby claim:
To claim this, I am signing this object:
class Clock | |
DEGREES = 360.0 | |
MINUTES = 60.0 | |
HOURS = 12.0 | |
attr_accessor :hour, :minute | |
def initialize(hour:, minute:) | |
validate_inputs!(hour, minute) |
# If we list all the natural numbers below 10 that are multiples of 3 or 5, | |
# we get 3, 5, 6 and 9. The sum of these multiples is 23. | |
# Find the sum of all the multiples of 3 or 5 below 1000. | |
class MulitpleSum | |
attr_reader :target, :dividers | |
def initialize(target:, dividers:[]) | |
@target = target |
module RoleAuthentication | |
extend ActiveSupport::Concern | |
included do | |
append_before_filter :authorize_action | |
end | |
module ClassMethods | |
[:allow, :deny].each do |auth_action| |
{ "Arts" => ["Design", "Fashion & Beauty", "Food", "Literature", "Performing Arts", "Visual Arts"], | |
"Business" => ["Business", "Business News", "Careers", "Investing", "Management & Marketing", "Shopping"], | |
"Comedy" => [], | |
"Education" => ["Education", "Education Technology", "Higher Education", "K-12 (School)", "Language Courses", "Training"], | |
"Games & Hobbies" => ["Automotive", "Aviation", "Hobbies", "Other Games", "Video Games"], | |
"Government & Organisations" => ["Local", "National", "Non-Profit", "Regional"], | |
"Health" => ["Alternative Health", "Fitness & Nutrition", "Self-Help", "Sexuality"], | |
"Kids & Family" => [], | |
"Music" => [], | |
"News & Politics" => [], |
jQuery.fn.justtext = -> | |
$(this).clone().children().remove().end().text() | |
prevent_widows = () -> | |
$("h1,h2,h3,h4,h5,h6").each (i, e) => | |
t = $.trim($(e).justtext()).replace(/\s([^\s]*)$/,'\xa0'+'$1') | |
cache = $(e).children() | |
$(e).text(t).append cache | |
$(e).find('*').each (i, e) => | |
t = $.trim($(e).justtext()).replace(/\s([^\s]*)$/,'\xa0'+'$1') |
$powder_blue: #9ec3de; | |
$turquoise: #00afd8; | |
$cornflower: #0065bd; | |
$royal_blue: #002f57; | |
$dark_purple: #4b306a; | |
$aqua: #72b5cc; | |
$mint: #35c4b5; | |
$seagrass: #007a87; | |
$bluebell: #4c5cc5; | |
$violet: #622567; |
# Zeus webserver version of basic Textpattern mod_rewrite rules | |
map path into SCRATCH:path from %{URL} | |
look for file at %{SCRATCH:path} | |
if exists then goto END | |
look for dir at %{SCRATCH:path} | |
if exists then goto END | |
# Do not apply to admin section i.e /textpattern | |
match URL into $ with ^/textpattern.*$ | |
if matched then goto END | |
match URL into $ with ^/css.php?.*$ |
## about (plain_text) | |
For more features you might like to try ck_fu plugin - http://r38y.github.com/ck_fu/ | |
## config/deploy.rb | |
task :build_info do | |
unix_user = `whoami`.strip | |
run "echo 'Version #{current_revision} deployed by #{unix_user} at #{Time.now}' > #{current_path}/lib/BUILD_INFO" | |
end |