Skip to content

Instantly share code, notes, and snippets.

Hungry for biscuits.

Brandon Mathis imathis

Hungry for biscuits.
View GitHub Profile

Keybase proof

I hereby claim:

  • I am imathis on github.
  • I am imathis ( on keybase.
  • I have a public key ASDv6UKdWP1IsKjvk0pJega3CqiUZw9fA6nGz22Vgh9ORAo

To claim this, I am signing this object:

imathis / set-game.js
Created Apr 8, 2016
Some simple javascript to power a game of Set.
View set-game.js
var Deck = {
reset: function() {
this.size = 0 = []
while(this.size < 81) {
this.size += 1
imathis / clone.rb
Created Aug 17, 2015
Clone all repositories under a user or organization
View clone.rb
require 'open-uri'
require 'json'
user = 'imathis'
repos = open("{user}/repos") { |f|
View Gemfile
source ''
gem 'jekyll'
group :jekyll_plugins do
gem 'octopress-littlefoot'
gem 'octopress-solarized'
gem 'octopress-codefence'
gem 'octopress-feeds'
gem 'octopress-multilingual'
View generator.rb
# Pretty much pseduo code
# Let's just assume you're in a loop where you are generating each post
new_data = {
'title' => 'Some new title for this generated post post'
site.posts <<, site.source, index, post, new_data)
imathis / Readme
Last active Aug 29, 2015
Workflow vs. Curl
View Readme
Workflow concept:
1. Copy url from an instagram post, in this case "".
2. Run a workflow which starts with a url from the clipboard and saves a photo to my camera library.
Workflow url:
I believe the problem is that when converting rich text to HTML, the parser removes stuff.
When I stop before the parser and send the webarchive to myself, the source has quite a bit more content than the rich text source.
imathis / Readme.markdown
Last active Aug 29, 2015
Full with image in a max width content column
View Readme.markdown

Allow any element to expand beyond the width of its parent container to fill the width of the browser window using vw and calc(). This is especially useful with images. Check out the Codepen demo.

This code is licensed under the MIT License.

View gist:9964117
### Keybase proof
I hereby claim:
* I am imathis on github.
* I am imathis ( on keybase.
* I have a public key whose fingerprint is 86CA 84D1 66C9 FB97 44F8 2C6C 661F 438D 54B2 EA61
To claim this, I am signing this object:
imathis / Guardfile
Last active Dec 19, 2015
Guard-Jekyll-Plus is a fancy Guard script for managing "smart" Jekyll builds. Changes in the source directory to non-template files will trigger a simple filesystem copy (or delete) to the destination directory. Changes to template files (configured by file extension) will trigger a Jekyll build.
View Guardfile
require 'guards/guard-jekyll-plus.rb'
# Sample guard
guard :jekyll do
watch /^source/
watch '_config.yml'
imathis / gist:5887081
Last active Dec 19, 2015
More readable coffeescript conditionals
View gist:5887081
# This is part of a simple javascript router I'm writing.
# When a link is clicked, the router checks to see if the url should trigger a route callback
# Here I demonstrate a way to improve long conditional statements with coffeescript and underscore.js
# Before: Concise but hard to read, hard to comment and hard to modify.
routeUrl: (url)->
return false if url is window.location.pathname || url.match /^http|^#/ || url.match /\.(png|gif|je?pg|pdf)$/i