Skip to content

Instantly share code, notes, and snippets.

View adamesque's full-sized avatar

Adam Luikart adamesque

View GitHub Profile
@adamesque
adamesque / lastmod.bash
Created October 17, 2011 02:01
Bash alias to get the last modified file in a directory
# Naive NOT-FOR-PRODUCTION method. Fails for filenames that contain newlines.
alias lastmod="ls -t | head -n 1"
@adamesque
adamesque / front-end-dev.md
Created January 12, 2012 23:55
Front-End Web Developer

Front-End Web Developer

A little about us

thirteen23 is looking for a front-end web developer to join our boutique software design and development agency. We're a small, tight-knit team of designers and developers who collaborate on each project from start to finish.

Because we're so small, you'll have the freedom to be creative and solve problems your own way. With freedom comes responsibility, though, so it'll be up to you to nail the execution, all the way down to the fit & finish.

A little about you

@adamesque
adamesque / sha1_cache_buster.rb
Created February 10, 2012 01:58
SHA1 cache buster extension for Middleman 2.x
module Middleman::Features
# modeled after built-in CacheBuster extension
# appends truncated SHA1 hashes to the querystring of asset_url'd files.
module Sha1CacheBuster
require 'digest/sha1'
class << self
def registered(app)
app.set :sha1_asset_paths, []
app.send :include, InstanceMethods
@adamesque
adamesque / 2012.txjs.sh
Created March 9, 2012 19:13
Notify folks as soon as the 2012 txjs site is updated.
#!/bin/bash
CHECK=`/usr/bin/curl --write-out %{size_download} --silent --output /dev/null 2012.texasjavascript.com`
cd ~
if [ $CHECK != 123 ] && [ ! -e '.2012.txjs.sent' ]
then
/usr/bin/curl -s -k --user api:key-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \
https://api.mailgun.net/v2/xxxxxxxxxxx.mailgun.org/messages \
-F from=' <txjsbot@xxxxxxxxxxx.mailgun.org>' \
-F to=xx@xxxxxxxxxxx.com\
@adamesque
adamesque / adamluikart.zsh-theme
Created March 12, 2012 19:04
My totally awesome oh-my-zsh theme.
local user_host='%{$fg[green]%}%n@%m%{$reset_color%}'
local current_dir='%{$fg[yellow]%} %~%{$reset_color%}'
local git_branch='$(git_prompt_info)%{$reset_color%}'
PROMPT="
${user_host}${current_dir} ${git_branch}
⑆ "
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}("
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
@adamesque
adamesque / jquery.hoverfilter.js
Created July 6, 2012 20:58
jQuery plugin to filter images without locking the main thread using HTML5 canvas & web workers.
/*!
* Simple jQuery HoverFilter plugin, implemented with Web Workers.
*
* Looks for an img element within the container element you invoke the plugin
* on. Wraps the image in a div and adds a filtered canvas.
*
* Adds mouseout/mouseover handlers to the container, revealing the
* filtered image.
*
* Does nothing if the browser doesn't support Web Workers.
@adamesque
adamesque / linky.sh
Created December 22, 2012 00:18
Replace a symlink with a copy of its target.
#!/usr/bin/env bash
set -e
symlink=$1
main() {
enforce_usage
if [[ -h $symlink ]]; then
remove_and_copy
fi
@adamesque
adamesque / app.js
Created February 12, 2014 04:11 — forked from anonymous/app.js
var Rocknrollcall = window.Rocknrollcall = Ember.Application.create();
/* Order and include as you please. */
require('scripts/controllers/*');
require('scripts/store');
require('scripts/models/*');
require('scripts/routes/*');
require('scripts/views/*');
require('scripts/router');

Keybase proof

I hereby claim:

  • I am adamesque on github.
  • I am adamesque (https://keybase.io/adamesque) on keybase.
  • I have a public key whose fingerprint is 52E8 800A 0C8A 16D4 1B29 EAED 697A D604 CE21 808F

To claim this, I am signing this object:

The Reaction Ruby Exercise

We use this exercise to get a sense of your coding style, your judgement, and your familiarity with Ruby. There's no one right solution, so feel free to tackle the problem however you see fit.

JSON Boolean Merger App

Your task is to build a simple command-line application. This application takes a JSON array of nested objects: