Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
Slow and Steady

Kori Roys koriroys

🐢
Slow and Steady
View GitHub Profile
@koriroys
koriroys / class_methods.rb
Created Apr 13, 2020
Why does this happen?
View class_methods.rb
class Thing
class << self
def public_method
private_method
end
private
def private_method
"hello"
end
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View components.get-ten.js
import Ember from 'ember';
import Location from '../models/location';
import Grid from '../models/grid';
const { Component, get, set, computed, isEqual, isPresent } = Ember
export default Component.extend({
lastTapped: null,
init() {
View components.my-child.js
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super(...arguments);
}
});
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@koriroys
koriroys / controllers.application.js
Last active Jan 19, 2017
Checkbox: <input> vs {{input}}
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
isChecked: true,
isCheckedTwo: true,
isCheckedThree: true,
appName: 'Ember Twiddle',
actions: {
foo() {},
fooTwo() {
View gist:74a6b9eb117ed7dbe2af
#original attribution https://gist.github.com/alexspeller/6251054 & https://gist.github.com/stevekane/6356006
App.ClickElsewhereMixin = Ember.Mixin.create
#use this method hook to define your desired behavior
onClickElsewhere: Ember.K
#bound version of our instance method
clickHandler: Em.computed ->
Em.run.bind @, 'onClickElsewhere'
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@koriroys
koriroys / application.controller.js
Last active Oct 14, 2015
modified twice in the single render
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
@koriroys
koriroys / instructions.sh
Last active Sep 14, 2015
Pandoc 1.15 on Heroku Cedar 14. regular lines are console commands. // lines are comments, just read those :)
View instructions.sh
// create a digital ocean ubuntu 14.04 droplet (matches heroku ubuntu version)
// pick the 2GB (or more) RAM option or cabal update will fail
// ssh into it:
ssh root@<ip_address>
// enter root password
// prompted to change password, follow instructions
// update
apt-get update