Skip to content

Instantly share code, notes, and snippets.

View aortbals's full-sized avatar

Aaron Ortbals aortbals

View GitHub Profile
@aortbals
aortbals / controllers.application.js
Last active August 29, 2015 14:27
Array Computed Properties
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
items: [
{ name: 'Fuu' },
{ name: 'Bar' },
{ name: 'Baz' },
{ name: 'Qix' }
@aortbals
aortbals / cross-fade.js
Created July 21, 2015 21:36
`didAnimateIn` hook for Liquid Fire
import { animate, stop, Promise } from "liquid-fire";
import didAnimateIn from './helpers/did-animate-in';
/**
* Liquid Fire's cross fade animation with the `didAnimateIn` hook added.
*/
export default function crossFade(opts={}) {
stop(this.oldElement);
let promise = Promise.all([
animate(this.oldElement, {opacity: 0}, opts),
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
isAdministrator: false,
notAdministrator: Ember.computed.not('isAdministrator')
});
@aortbals
aortbals / Brocfile.js
Created October 19, 2014 13:49
ember-cll, Bourbon & Bourbon Neat
/* global require, module */
var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var mergeTrees = require('broccoli-merge-trees');
var app = new EmberApp({
trees: {
styles: mergeTrees([
'bower_components/bourbon/dist',
@aortbals
aortbals / example.hbs
Last active August 29, 2015 14:07
Ember Twitter Sharing Button Component
Tweet it!
{{twitter-button data-text=twitterText data-url=twitterUrl}}

Keybase proof

I hereby claim:

  • I am aortbals on github.
  • I am aortbals (https://keybase.io/aortbals) on keybase.
  • I have a public key whose fingerprint is 6DEA C6F4 A4AC 9F4D 8FA0 3BC3 FB6E C0A1 138F 3D6A

To claim this, I am signing this object:

@aortbals
aortbals / _media-queries.styl
Created May 20, 2014 17:19
Media Queries with Stylus
// Media Queries in Stylus
//
// Inspired by Anthony Short's _media-queries.scss to Stylus.
// https://gist.github.com/anthonyshort/2028061
//
// Usage:
//
// @media tablet-portrait-and-below
// margin: 0
// ...
@aortbals
aortbals / email_test.rb
Created March 16, 2014 19:28
Rails 4 Test SMTP Settings for ActionMailer
# Sometimes it's necessary to perform a test of new SMTP settings.
# Should be run from within the rails environment.
# Tested with Rails 4.0.2
ActionMailer::Base.smtp_settings = {
address: ENV['MAILER_ADDRESS'],
domain: ENV['WEB_HOST'],
port: ENV['MAILER_PORT'],
user_name: ENV['MAILER_USER'],
password: ENV['MAILER_PASSWORD'],
@aortbals
aortbals / create_migration_and_open.sh
Last active January 3, 2016 01:59
A bash alias to create a rails migration and open it in your editor
# You should export your editor
# `export EDITOR=vim`
createMigrationAndOpen() {
rails g migration $1
ls db/migrate/* | tail -n1 | xargs $EDITOR
}
alias migration=createMigrationAndOpen
@aortbals
aortbals / jsbin.ember_array_controller_filter.html
Last active December 24, 2015 06:39
This example binds a text input to an Ember ArrayController, filtering the content as you type. http://jsbin.com/UvePomO/4/edit?html,js,output
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="ArrayController Live Filtered Content" />
<meta charset=utf-8 />
<title>ArrayController Live Filtered Content</title>
<script src="http://code.jquery.com/jquery-2.0.2.js"></script>
<script src="http://builds.emberjs.com/handlebars-1.0.0.js"></script>
<script src="http://builds.emberjs.com/release/ember.js"></script>
</head>