Skip to content

Instantly share code, notes, and snippets.

View zackexplosion's full-sized avatar
🏠
Working from home

Zack zackexplosion

🏠
Working from home
View GitHub Profile
@zackexplosion
zackexplosion / model.rb
Last active October 14, 2015 02:19 — forked from minjindang/請問要怎麼實作Model?
Ruby on Rails
# Try to create a "Person" model,that we can use the "children" method below.
tom = Person.create(name: "Tom")
may = Person.create(name: "May", parent: tom)
syd = Person.create(name: "Syd", parent: tom)
tom.children.map(&:name)
# => ["Syd", "May"]
# Furthermore,can you design "grandchildren" method that we can use it like this?
wen = Person.create(name: "Wen", parent: syd)
jon = Person.create(name: "Jon", parent: may)
tom.grandchildren.map(&:name)
@zackexplosion
zackexplosion / Setting up Google Cloud Storage with CORS for Web Fonts.md
Last active September 16, 2015 02:44 — forked from mhulse/Setting up Google Cloud Storage with CORS for Web Fonts.md
Setting up CORS on Google Cloud Storage: An unofficial quick start guide to serving web fonts from Google's cloud. (I'm sure a lot of this info could be improved... Please leave comments if you have tips/improvements.)

Login:

Google Cloud Storage

You'll want to login using an official Google account (i.e. if this is for your company, use the comapany Gmail account vs. a personal one.)

When logging in, you might be prompted to verify the account; if so, enter your cell number to get a verification e-mail or phone call.

Once verified, you'll have to agree to the terms of service; do that, and click continue.

@zackexplosion
zackexplosion / 0_reuse_code.js
Last active August 29, 2015 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

An ongoing project to catalogue all of these sneaky, hidden, bleeding edge selectors as I prepare my JSConf EU 2012 talk.

Everything is broken up by tag, but within each the selectors aren't particularly ordered.

I have not tested/verified all of these. Have I missed some or got it wrong? Let me know. - A

A friendly reminder that you may need to set this property on your target/selected element to get the styling results you want:

-webkit-appearance:none;

  1. Choose: Tools > New Plugin

  2. Paste in the contents of "timestamp.py" below

  3. Save as timestamp.py in ~/Library/Application Support/Sublime Text 2/Packages/User/ (should be the default directory that pops up when you save)

  4. Choose: Sublime Text 2 > Preferences > Key Bindings - User

  5. Add:

    { "keys": ["super+ctrl+t"], "command": "timestamp" }

To make command+ctrl+t perform the insertion.
Make sure to add a comma after the previous keymap entry, if present.