Skip to content

Instantly share code, notes, and snippets.

View hoffm's full-sized avatar
☀️
twib.nyc

Michael Hoffman hoffm

☀️
twib.nyc
View GitHub Profile

Treated as Singular

1
1.0
1.00
```

All fractions of the form `n`/`m` where `n` and `m` are numbers, e.g.
There, now you got it.
@hoffm
hoffm / keeper_bookmarklet.md
Last active October 5, 2016 14:19
MFLB Keeper Bookmarklet
  1. Drag this link to your bookmarks.
  2. Visit your team page.
  3. Click the bookmark.

I've been working mostly on web stuff in Ruby / JS / relational databases over my 5-year career.

What I’m looking for in my next employer is an organization that…

  • is in NYC (requirement)
  • is family-friendly (requirement)
  • makes a product I believe in and/or creates positive social value
  • has tech at its focus
  • has a great eng culture that values quality and learning
  • has an eng team that's a bit bigger than the one I'm on now—say, 15-100 members
@hoffm
hoffm / console_table_example.js
Last active January 10, 2017 16:32
Display a table of all product names and prices from a Food52 shop page
// Display a table of all product names and prices from a Food52 shop page
var names = [],
attributes = [];
_.each($(".product-result"), function(tile){
var prodName = $(tile).children(".product-result-title").first().text(),
prodPrice = $(tile).children(".product-result-desc").first().text().split("\n")[0],
prodImg = $(tile).children("img").first().attr("src");
names.push(prodName);
attributes.push({price: prodPrice, image: prodImg})
class MyClass
def foo_via_method
foo_method
end
def foo_via_constant
FOO_CONSTANT
end
end
class MyOtherClass
NAME = "Michael"
end
class OtherSubClass < MyOtherClass
end
OtherSubClass::NAME
# => "Michael"
class StoryBooleansController < BaseController
def create
update_story(story_boolean => true)
end
def destroy
update_story(story_boolean => false)
end
private
class StarsController < StoryBooleansController
private
def story_boolean
:starred
end
end
class StarsController < StoryBooleansController
STORY_BOOLEAN = :starred
end