Skip to content

Instantly share code, notes, and snippets.

View featherart's full-sized avatar
🎯
Focusing

Feather featherart

🎯
Focusing
View GitHub Profile
@featherart
featherart / .block
Last active November 10, 2017 02:45
fresh block
license: mit
@featherart
featherart / .block
Last active July 25, 2017 22:19
fresh block
license: mit
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
updateResult() {
$('#result').append(1);
}
}
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
sum(...numbers) {
return numbers
.reject(isBlank)
.reduce((acc, curr) => acc + curr, 0);
}
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@featherart
featherart / controllers.application.js
Created November 30, 2016 20:40
composable helpers
import Ember from 'ember';
import joinWith from '../utils/join-with';
export default Ember.Controller.extend({
firstName: 'Jim',
lastName: 'Bob',
fullName(): joinWith('', 'firstName', 'lastName')
});
@featherart
featherart / index.html
Created August 13, 2014 22:22 — forked from d3noob/.block
<!DOCTYPE html>
<meta charset="utf-8">
<style> /* set the CSS */
body { font: 12px Arial;}
path {
stroke: steelblue;
stroke-width: 2;
fill: none;
@featherart
featherart / gist:7206982
Created October 29, 2013 00:00
Homework for 10/28 WDI
Please write some tests for your first Project. This is backwards from the way it "should" be
-- haha, some Rspec humor for ya!!
Make sure to include at least one Model test and one Controller test. These are tests for
your Ruby code only.
I will randomly call on students in each class to describe the tests they wrote and why, so
please do your homework! :)
Tomorrow we will learn about testing in JavaScript. If you want to do some reading up ahead
@featherart
featherart / gist:7109061
Last active December 26, 2015 06:39
FredMailer or UserMailer
# There are 4 basic steps to implementing your ActionMailer functionality in a Rails app:
# Step 1. Create your ActionMailer object. Remember that it can have any name, but should finish with "Mailer":
rails g mailer UserMailer
class UserMailer < ActionMailer::Base
default from: "fred@fred.com"
def confirm_user(user)
@user = user