Skip to content

Instantly share code, notes, and snippets.


Austin Bales arbales

View GitHub Profile
View Quip

First, I appreciate that the team isn't resting on its laurels and is willing to take risks and do redesigns, please keep going! More iteration!

  1. I prefer the menubar design found in the last version of Quip sheets
  2. The new conversation view is header to read without bubbles
  3. The Share CTA in the conversation view is too bright / distracting
  4. The (x) floating button to hide the conversation view isn't salient enough and the button to restore it is buried in the Application menu.
arbales / gist:8203385
Created Dec 31, 2013
Illustrates downloading a file in MacRuby. — From a question on StackOverflow about the corruption of downloaded files in MacRuby.
View gist:8203385
def download_request(url, filePath:path, progressIndicator:progressBar)
file =, "w+")
Net::HTTP.get_response URI.parse(url) do |response|
if response['Location']!=nil
puts 'Direct to: ' + response['Location']
return download_request(response['Location'], filePath:path, progressIndicator:progressBar)
View react-example.js
render: function(){
var tm = window.ReactTemplates[this.templateName];
if (typeof tm === 'function') {
return tm.apply(this, arguments);
} else {
// however errors work in React
View comment_form.jsx
<form class="commentForm" onSubmit={this.handleSubmit}>
<input type="text" placeholder="Your name" ref="author" />
placeholder="Say something..."
View gist:5660690
# Take a MM:SS.MS formatted string and return an integer of MS
def timestring_to_ms(string)
a=[1, 1000, 60000]*2
string.split(/[:\.]/).map{|time| time.to_i*a.pop}.inject(&:+)
arbales / application.hbs
Created May 9, 2013
Actions specified inside the {{render}} helper appear not to reach their specified controller.
View application.hbs
{{#render "header"}}
<header class="header-main">
* Dropping the debugger here has this.controller properly
set (<Ab.HeaderController:emberXXX>).
* this.view is null, although render.js#L57 correctly finds the object named 'view:header'
* Calling this.controller.toggleMode() from the debugger works as expected.
View gist:4727806

SAN FRANCISCO, Ca. — "Salesforce brings Santa's list to the cloud" (CRM) today announced a joint venture with the Coca Cola Corporation (KO), the owners of Santa's life spirit, called CEO and co-founder Marc Benioff spoke at a press event held in Rejkavik, "We're extremely excited to work with a true leader in building customer relationships – Santa Klaüs and the North Pole Division at Coke."

"DemandForce will change the way Santa runs his workshop," said Sqent Forest, Executive Director of Elf Operations at Coke's North Pole Division. "Until, we've relied on legacy IT systems from as far back at 1800 to manage the world's largest distributed gift registry"

Forest noted that North Pole has thousands of gift service representatives, responsible for opening each letter received by the Coke subsidiary, and said that " will literally change the game in social holiday Santa gift requests… we're ready to be reborn cloud."

View gist:4075217
@import "object/*.png"
@import "actions/*.png"
@include all-object-sprites
@include all-actions-sprites
A mixin to create sprited icons that respond to
:hover, :active, and .active with a different image.
Meant to be paired with icons generated in the images-neue folder.
arbales / gist:3361800
Created Aug 15, 2012
Tag-based Styling
View gist:3361800

At Do, we've been working hard to improve the quality and maintainability of our CSS. Our Rails (3.2.6) backend is up-to-date, well-standardized and fully tested, and we want to bring that to our front-end as well.

One issue we've discussed recently is tag-based styles. One of our developers wrote…

we have avoided tag based rules because of performance, browsers read the rules right to left so if you end the rule with a tag, the browser has to start from a larger set of things before it narrows down the rule.

The reality is that our stylesheets contain quite a number of tag-based rules – and worse than any performance issue we've experienced is the litany of overrides tag-based styles can necessitate down the line.

arbales / mountain-lion-brew-setup.markdown
Created Aug 8, 2012 — forked from myobie/mountain-lion-brew-setup.markdown
Get Mountain Lion and Homebrew to Be Happy
View mountain-lion-brew-setup.markdown

Get Mountain Lion and Homebrew to Be Happy

1) Install XCode 4.4 into /Applications

Get it from the App Store.

2) Install Command Line Tools

In XCode's Preferences > Downloads you can install command line tools.