Skip to content

Instantly share code, notes, and snippets.

View rtablada's full-sized avatar

Ryan Tablada rtablada

View GitHub Profile
@rtablada
rtablada / memory.md
Last active November 28, 2023 19:21
var x = 5;
const name = 'Homer';

let homer = {
  first: name,
  last: 'Simpson'
};
import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
}
@rtablada
rtablada / components.index\.js
Created May 20, 2021 16:34
My Component Test
import Component from '@glimmer/component';
export default class extends Component {
}
  • Create new directory named 03-position-layout
  • Initialize Git using git init
  • Create new repo using hub create
  • Open project in your editor
  • Create Boilerplate contents of index.html
    • html tag
    • head tag
    • title tag
    • body tag
  • Create Boilerplate of style.css

Middleware vs Plugs

Lately I've been experimenting with Elixir and Phoenix and have started to ask myself "what's the difference between Phoenix's Plugs vs middleware in other server-side paradigms"

To start I'm going to talk about Phoenix's Plugs vs synchronous middleware (like what's found in Laravel). For the most part, this will also apply to asyc middleware, but there are a few caveats that I'll cover.

As a comparison, we will have a hypothetical system with a few operations to respond to HTTP requests:

  • Authorize via JWT or some token auth
import TextField from '@ember/component/text-field';
import { computed } from '@ember/object'
export default TextField.extend({
guitar: computed('value', {
get() {
return this.value + ' hello world'
},
set(value) {
console.log(this.people)

Senator Alexander,

This morning you made a statement on voting against witnesses to which I have sent a separate letter, however in that official statement you made some worrying remarks about the validity of the Impeachment Articles of which you have been asked to judge.

On Article 2 you stated: “There is no need to consider further the frivolous second article of impeachment that would remove the president for asserting his constitutional prerogative to protect confidential conversations with his close advisers”. This is what you are being asked to judge Senator, it is not frivolous that the administration is withholding pertinent information in an unprecedented denial of oversight. I fear for the country and the Constitution of what this would allow for in the future. The Constitution and historic precedent does allow for security in information and for some autonomy of the Executive, but the Administration has blatantly abused this privilege to the point of declaring blanket privilege to withhold doc

As we go in to the impeachment of Donald Trump, we need to vote against the rules as put forward by Mitch McConnell last night. For the good of the country, the constitution, and the state of Tennessee, we need to take this impeachment seriously and fairly.

The current rules put forward have the trial going on until as late as 1AM or later, this is unfair and unhealthy for the managers, defense, senators, and the American people. A more moderate time table to allow for a sensible time for arguments and questioning needs to be taken so we are not rushing the parties involved or risking the sleep of the nation.

In a case as important as this we need to hear from witnesses or at the least, we need to hear deposition materials. Every impeachment in the senate has had witnesses or deposition and this trial should be no different. We need first hand accounts and answers to know the truth. The second article is “obstruction of congress” because of the efforts to deny witnesses and evidence, if you vote to not hear

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}`
}