I hereby claim:
- I am jacklynrose on github.
- I am jacklynrose (https://keybase.io/jacklynrose) on keybase.
- I have a public key ASAGELIJ_qqqVpzqBdWg5tf1du-j18KPnIc-DXiKOkOzYAo
To claim this, I am signing this object:
# Other zushy stuff | |
sluggify() { | |
# 1. Convert upper to lower | |
# 2. Remove all non-alphanumeric chars or non-space char | |
# 3. Convert spaces to dashes | |
# 4. Convert multiple dashes to single dash | |
echo $1 | tr '[:upper:]' '[:lower:]' | tr -dc '[:alnum:] ' | tr '[:space:]' '-' | sed -E 's/-+/-/g' | |
} |
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
class OpenStruct < BasicObject | |
def initialize(hash) | |
@struct = ::Struct.new(*hash.keys.map { |k| k.to_sym }) | |
@struct = @struct.new(*hash.values) | |
end | |
def ==(other) | |
to_h == other.to_h | |
end |
// Set on window | |
this.foobar = "V1" | |
//=> (result) "V1" | |
console.log(this.foobar) | |
//=> (output) V1 | |
//=> (result) undefined | |
// Uses window | |
(() => { | |
console.log(this.foobar); |
This assumes you're using bubble-wrap
osx-plist
in your Gemfilebootstrap.rb
gist into your AppDelegate's application:didFinishLaunchingWithOptions:
methodrake
bootstrap.rb
features/step_definitions/location_services_steps.rb
location_services_steps.rb
in this gist$.getJSON("https://api.github.com/repos/rails/rails/stats/commit_activity", function(data) { | |
var week_count = 1; | |
var commits_by_week = data.map(function(week) { | |
var total = 0; | |
$.each(week['days'], function(k, v) { total += v }); | |
return total; | |
}); | |
$.each(commits_by_week, function (k, v) { | |
console.log("Week " + week_count + ": " + v + " commits"); | |
week_count++; |
# This one! | |
def viewNamed(view_name, ofClass: class_reference) | |
var_name = view_name[0].downcase + view_name[1, view_name.length - 1].gsub(/\s/, '') | |
instance_variable_get("@#{var_name}") or instance_variable_set("@#{var_name}", class_reference.new).tap do |view| | |
view.accessibilityLabel = view_name | |
yield view if block_given? | |
end | |
end |
totalCombinedViewHeight = 100 | |
Motion::Layout.new do |layout| | |
layout.view view | |
layout.subviews "state" => @state, "action" => @action | |
layout.metrics "margin" => 20, "height" => 40, "halfHeight" => ((view.bounds.size.height - totalCombinedViewHeight) / 2), "halfWidth" => ((view.bounds.size.width - 100) / 2) | |
layout.vertical "|-(<=halfHeight)-[state]-margin-[action]-(>=halfWidth)-|" | |
layout.horizontal "|-margin-[state]-margin-|" | |
layout.horizontal "|-margin-[action]-margin-|" | |
end |
require 'Subdomain' | |
CMS::Application.routes.draw do | |
namespace "admin" do |admin| | |
resources :pages # Admin::PagesController Routes | |
end | |
constraints(Subdomain) do | |
match '/' => "pages#root" # Route for Root URL for Subdomains |