View superhash.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function set(target, name, value) { | |
const attrConfig = target.constructor?.attributes[name]; | |
if (typeof attrConfig?.init === 'function') { | |
target[name] = attrConfig.init.call(this, value); | |
} | |
if (attrConfig?.defaultValue) { | |
target[name] = attrConfig.defaultValue; | |
} else if (typeof attrConfig?.transform === 'function') { | |
target[name] = attrConfig.transform.call(target, value); | |
} else { |
View machine.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
View machine.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
View machine.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
View app-shell.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function initialize(appInstance) { | |
if (typeof FastBoot === 'undefined') { | |
let originalDidCreateRootView = appInstance.didCreateRootView; | |
appInstance.didCreateRootView = function() { | |
let elements = document.querySelectorAll(appInstance.rootElement + ' #app-shell'); | |
for (let i = 0; i < elements.length; i++) { | |
let element = elements[i]; | |
element.parentNode.removeChild(element); |
View controllers.application\.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Controller from '@ember/controller'; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle'; | |
} |
View globals.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//instance-initializers/globals.js | |
export function initialize(application) { | |
let { environment } = application.resolveRegistration('config:environment'); | |
if (environment !== "production") { | |
/** | |
This basically exposes the application, pretty useful because | |
you can use stuff like this from the console. |
View include-relationships-mixin.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Mixin from '@ember/object/mixin'; | |
import Ember from 'ember'; | |
import { singularize } from 'ember-inflector'; | |
export default Mixin.create({ | |
// ember temporary ids | |
_tempIds: {}, | |
View dynamic-model-initializers-model.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import DS from "ember-data"; | |
import { computed } from "@ember/object"; | |
import { assert } from "@ember/debug"; | |
const { Model } = DS; | |
Model.reopenClass({ | |
/** | |
* The following props are overrided, since per definition | |
* they are sealed props defined in |
View resume.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"basics": { | |
"name": "Alberto Cantú Gómez", | |
"label": "CEO", | |
"picture": "", | |
"email": "betocantu93@gmail.com", | |
"phone": "+52 8125671871", | |
"website": "https://betocantu93.com", | |
"summary": "Software engineer as profession, passionate digital entrepreneur and investor, working everyday building teams and businesses from scratch and pushing them forward.", | |
"location": { |
NewerOlder