Skip to content

Instantly share code, notes, and snippets.

Michael Kaiser-Nyman michaelrkn

Block or report user

Report or block michaelrkn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ember-roadmap-2019.md

This blog post builds off the ideas started by Preston Sego, Dan Gebhardt, and many others.

Moving Past Controllers

It's been really exciting to see Ember turn a new page with its move towards modern JavaScript and slimming of its API surface. Routes rendering a template that is backed by a controller remains the most obviously clunky part of the Ember API. Getting consensus on moving query parameters and having routes load components will give us an API that we don't have to make excuses for (especially in conjunction with Component Templates Co-location).

This might go without saying, but as part of this change, the loading and error substates should render components, rather than templates.

Continuing Through the Hierarchy of Skepticism

View ember-roadmap-2018.md

Address the Hierarchy of Skepticism

Like most Ember developers, I want to see Ember's marketshare and mindshare grow in 2018. At EmberConf 2017, Tom presented the Ember Hierarchy of Skepticism:

  1. Metamorph Tags/ {{bindAttr}} (addressed!)
  2. No Documentation (addressed!)
  3. Custom Object Model
  4. Big File Size
  5. Monolothic
View Forecaster.java
package com.example.michael.forecaster;
import com.squareup.okhttp.Call;
import com.squareup.okhttp.Callback;
import com.squareup.okhttp.OkHttpClient;
import com.squareup.okhttp.Request;
public class Forecaster {
public void fetchForecast(int zip, Callback callback) {
@michaelrkn
michaelrkn / if.rb
Last active Aug 29, 2015
implement if, then, and else as methods
View if.rb
class Object
def _if(object)
object.class != FalseClass && !object.nil?
end
end
class TrueClass
def then
yield
self
View end_of_day_cleanup.sh
killall Terminal Google\ Chrome Sublime\ Text\ 2 Remote\ Desktop\ Message Finder
cd ~
find . ! -name .rubies ! -name .gem ! -name .Trash ! -name Code ! -name Desktop ! -name Documents ! -name Downloads ! -name Library ! -name Movies ! -name Music ! -name Pictures ! -name Public -maxdepth 1 -type d -print | xargs rm -rf
rm -rf ~/Code/* ~/Desktop/* ~/Documents/* ~/Downloads/* ~/Movies/* ~/Pictures/* ~/Public/*
rm ~/*
View config.ru
require "action_controller/railtie"
class TheSimplestRailsApp < Rails::Application
config.secret_token = "ef224177dc6ddcaabffafdbaa50cdb173eb744932073d"
config.eager_load = false
initialize!
routes.draw do
root to: "hello#world"
end
@michaelrkn
michaelrkn / say_smaller.rb
Created Sep 3, 2013
a simple example of recursion
View say_smaller.rb
def say_smaller(word)
if word.length > 0
word + " " + say_smaller(word[0..-2])
else
""
end
end
puts say_smaller("piglet")
View factorial.rb
def factorial(number)
(1..number).inject(&:*) || 1
end
@michaelrkn
michaelrkn / spacing.js
Created Aug 10, 2013
epicodus javascript spacing guide
View spacing.js
// include a space after most keywords (eg var, if, else, for, return)
var foo = "bar";
// include a space around operators
foo === "bar";
foo += "qux";
// put a space after most closing parentheses
// indent within if statements
View js-cheat-sheet.js
// VARIABLES
// assign a variable to something - use the `var` keyword
var myVariable = "i love variables";
// change the value of an existing variable - don't use `var`
myVariable = "i REALLY love variables";
// change the value of a variable in place
myVariable = myVariable + " - don't you?";
You can’t perform that action at this time.