Skip to content

Instantly share code, notes, and snippets.

View adamesque's full-sized avatar

Adam Luikart adamesque

View GitHub Profile
@adamesque
adamesque / lockfiles-talk-references.md
Last active March 21, 2018 15:52
Lockfiles talk References
@adamesque
adamesque / timeout.test.js
Last active November 8, 2017 17:16
Jest timeout explorations (AKA I don't understand timeouts) (AKA okay I figured it out)
async function wait(ms) {
return new Promise((resolve) => {
window.setTimeout(() => resolve(), ms);
});
}
describe('Jest Timeout test', () => {
beforeEach(() => {
// Calling `jest.setTimeout` simply mutates `jasmine.DEFAULT_TIMEOUT_INTERVAL`
jest.setTimeout(200);
@adamesque
adamesque / application.controller.js
Last active January 26, 2016 22:05
ToggleButton
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
isActive: false,
actions: {
toggle() {
this.toggleProperty('isActive');
}
}
@adamesque
adamesque / component.js
Last active August 31, 2018 14:41
Ember Component Life-cycle Docs Feedback
import Ember from 'ember';
export default Ember.Component.extend({
/**
Overall thoughts: Ember.Component needs a section in the module doc block outlining the order of events (just like the 1.13 blog post).
Individual events can then refer back to that lifecycle chart to avoid the "runs xth during re-renders but only on thursdays" sentences.
The module doc block should also get the section on what triggers a re-render (from the 1.13 blog post).
*/
myProp: null,
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
items: "one two three".w(),
actions: {
handleSelect(item) {
alert(item);
}
}

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:

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:

@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');
@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 / 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.