Like autotune for your objects.
class Autochain
attr_reader :subject
def initialize(subject)
@subject = subject
end
class JSPTagParser < Parslet::Parser | |
rule(:java) { (str('%>').absent? >> any).repeat.as(:java) } | |
rule(:jsp) { java.as(:code) } | |
rule(:jsp_with_tags) { str('<%') >> jsp >> str('%>') } | |
rule(:text) { (str('<%').absent? >> any).repeat(1) } | |
rule(:text_with_java) { (text.as(:text) | jsp_with_tags).repeat.as(:text) } | |
root(:text_with_java) | |
end |
Like autotune for your objects.
class Autochain
attr_reader :subject
def initialize(subject)
@subject = subject
end
var Candidacy = function(applicant) { | |
this.applicant = applicant; | |
}; | |
Candidacy.SCORE_DIMENSIONS = [ | |
'creativity', | |
'socialMediaEngagement', | |
'freshGraduate', | |
'passionate', | |
'workEthic' |
<link rel="import" href="../google-map/google-map.html"> | |
<link rel="import" href="../speech-mic/speech-mic.html"> | |
<link rel="import" href="../core-icons/core-icons.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { |
activate :asset_host | |
# Will generate asset1.example.org...asset4.example.org deterministically | |
set :asset_host do |asset| | |
"//asset%d.example.org" % (asset.hash % 4 + 1) | |
end |
require 'time' | |
june_first = DateTime.new(2014, 6, 1) | |
june_second = DateTime.new(2014, 6, 2) | |
june_first > june_second # => false | |
(june_first..june_second).max == june_second # => true | |
(june_first..june_second).min == june_first # => true | |
# Range#max and #min return nil if the first value in range is larger than the last value. |
require 'redis' | |
require 'benchmark' | |
hash = {} | |
array = nil | |
redis = Redis.new | |
n_values = 720 | |
redis.del redis.keys("demo:*") | |
Ideas:
vendor/assets
from Sprockets environmentGoal:
what I'd like to do: use a combination of bower, npm, or
vendor/assets
for front-end deps, use browserify for JS compilation, use sprockets for CSS and asset hashes