Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View theotherzach's full-sized avatar

Zach Briggs theotherzach

View GitHub Profile

Keybase proof

I hereby claim:

  • I am theotherzach on github.
  • I am briggszj (https://keybase.io/briggszj) on keybase.
  • I have a public key ASDJjfk4gEOrRXiZEuE8JBycz0-WvaEJvkW2WnsmHSquiAo

To claim this, I am signing this object:

Companion tab to this video

Tune guitar to open D tuning. From low (thickest) string to high string: D, A, D, F#, a, d.

(E)
d |--------------------------------|--------------------------------|
a |--------------------------------|--------------------------------|
F#|--------------------------------|--------------------------------|
@theotherzach
theotherzach / frontend_flow.rb
Last active April 24, 2018 19:34
Frontend Flow Control
class FrontendFlow < ActiveRecord
# property_id: Integer
# step: BigDecimal
# name: String
end
from decimal import *
# A dict has a key ane a value. In the following, they key is 'name' and the value is 'Homer'.
homer = {'name':'Homer', 'age':'39'}
# I'm using strings for the values so it looks more like the data you get from your CSV.
milhouse = {'name':'Milhouse', 'age':'10'}
unsorted_list = [homer, {'name': 'Marge', 'age': '37'}, milhouse, {'name':'Bart', 'age':'10'}]
describe("Address", function () {
var app = window.app
var store = window.jQuery.extend({}, app.store)
var Address = Object.assign({}, app.components.Address)
var vm = null
beforeEach(function () {
spyOn(app.services.ordersService, 'get').and
.returnValue(new Promise(function() {}))
a = [{ slug: "foo"}, { slug: "bar" }]
b = a.sort_by { |e| e[:slug] }
a.push({ slug: "baz" })
result_1 = b.find { |e| e[:slug] == "baz" }
# Predict which branch executes
<template id="template-connect">
<div class="connect">
<div class="connect__searchPanel">
<div class="connect__speciesSelect">
<button @click="handleDogs">Dogs</button>
<button @click="handleCats">Cats</button>
</div>
<div class="connect__search">
<input type="text"
export default {
computed: {
isFormValid() {
return this.$validator.valid && this.customerAddress.$dirty
}
canSave() {
return this.isFormValid && this.customerAddress.$notBusy
}
}
}
#app
%vue-size-selector{ sizes: @sizes }
%script#vue-size-selector{ type: "x-template" }
.sizeSelector
.sizeSelector__header
CHOOSE A SIZE: {{ currentSize.dimensions }}
%ul.sizeSelector__grid
%li{ v: { for: "size in sizes" } }
%span{ "@click" => "currentSize = size" }