Skip to content

Instantly share code, notes, and snippets.

Ryan Tablada rtablada

Block or report user

Report or block rtablada

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 components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
add(args) {
return args.reduce((a, b) => a + b, 0);
},
fullName(args, hash) {
return `${hash.first} ${hash.last}`
}
@rtablada
rtablada / .0how-to.md
Last active Apr 27, 2019
Terminal Stuff
View .0how-to.md

How To Install

xcode-select --install

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

brew install wget

https://gist.githubusercontent.com/rtablada/8d720b6eb51c9ab108f2d94e8adab9b3/raw/super-installer.sh
View 1-old-component.hbs
<p>{{value}}</p>
<button {{action "goUp"}}>Click</button>
View 1-before.hbs
{{lookup-component Foo in "foo"}}
{{lookup-component Bar in "baz"}}
{{lookup-component Unused in "tomster"}}
{{lookup-component NavBar in "ui/nav-bar"}}
<Foo />
<Bar />
<NavBar />
@rtablada
rtablada / portfolio.md
Created Jan 9, 2019
A Short Post on doing your best to get a job and being more efficient with finding a jorb!
View portfolio.md

Getting a Job Presence

Each section has a first pass time frame estimate, try to constrain yourself to only focusing for this amount of time before "shipping" and moving on to the next task. These time estimates do not represent a final version of any of these portions of your professional profile, just a first pass. It's important to make a profile and persona then update it and work on it over time. Time you spend with no presence is time that people won't know who they could be hiring!

1. Create or Update your LinkedIn Profile (1-3 Hours)

Make sure that you have a picture of yourself, education, and job history on your LinkedIn profile.

View controllers.application.js
import Ember from 'ember';
import { inject as service } from '@ember/service';
import { computed } from '@ember/object';
export default Ember.Controller.extend({
router: service(),
appName: 'Ember Twiddle',
value: 0,
queryParams: ['value', 'value2'],
View components.my-component.js
import Component from '@ember/component';
import hbs from 'htmlbars-inline-precompile';
let MysteryTour = Component.extend({
layout: hbs`<h2>This is a thing</h2>`
})
export default Component.extend({
layout: hbs`<this.MysteryTour />`,
MysteryTour
View components.my-component.js
import Ember from 'ember';
import { inject as service } from '@ember/service';
export default Ember.Component.extend({
router: service('router'),
queryParams: null,
actions: {
foo() {
this.get('router').transitionTo(this.routeName, {
@rtablada
rtablada / post.md
Last active Nov 2, 2018
Difference between Koa, Express, and Hapi
View post.md

Express and Koa are more 1-1 comparisons and HAPI is slightly different so I’ll explain the diffs for those first.

Express and Koa are both middleware driven server libraries. With middleware you’re defining a set of functions to handle an incoming request and either return a result from that function or make some changes to the incoming request (or outgoing response) and pass on to the next set of middleware (think each middleware function as a colored lens letting light through or a mirror reflecting light back).

The big difference between the two is how they setup middleware, call middleware, and deal with async behavior (and the resulting errors or responses).

Express is based on callbacks so async actions will need to use callbacks as a control flow. While you can use async/await or generators in Express middleware the library itself does not handle this and may exit early or hang (there are some middleware that can be added that add more flexibility for async/await to Express but they aren’t 1st pa

View 0-component.js
import makeStyle from 'ember-something-js-style-thing';
import Component from '@glimmer/component';
export default class MyComponent extends Component {
styles = makeStyle({
title: {
margin: '1rem',
color: (component) => {
return component.isActive ? 'red' : 'black';
}
You can’t perform that action at this time.