This file contains hidden or 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 convertHMS(value) { | |
const sec = parseInt(value, 10); // convert value to number if it's string | |
let hours = Math.floor(sec / 3600); // get hours | |
let minutes = Math.floor((sec - (hours * 3600)) / 60); // get minutes | |
let seconds = sec - (hours * 3600) - (minutes * 60); // get seconds | |
let a = []; | |
if (hours) { | |
a.push(`${hours} h`) |
This file contains hidden or 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
POSTGRES_USER=postgres | |
POSTGRES_PASSWORD=ThereNeedsToBeOne | |
POSTGRES_DB=my_project_development |
This file contains hidden or 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'; | |
} |
This file contains hidden or 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'; | |
import { action } from "@ember/object"; | |
import { tracked } from '@glimmer/tracking'; | |
import move from 'ember-animated/motions/move'; | |
import { inject as service } from "@ember/service"; | |
import drag from '../motions/drag'; | |
export default class ApplicationController extends Controller { | |
@service("-ea-motion") motion; | |
@tracked animators = 'click button above'; |
This file contains hidden or 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'; | |
export default DS.JSONAPIAdapter.extend({ | |
urlForQueryRecord(query) { | |
if (query.type === "next") { | |
const id = query.id; | |
delete query.type; | |
delete query.id; | |
This file contains hidden or 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 default function() { | |
window.server = this; | |
this.get('users/:id'); | |
}; |
This file contains hidden or 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'; | |
export default DS.JSONAPIAdapter.extend({ | |
namespace: 'api/v1' | |
}); |
This file contains hidden or 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 Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
This file contains hidden or 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 Ember from 'ember'; | |
export default Ember.Component.extend({ | |
slow: Ember.inject.service(), | |
async init() { | |
this._super(...arguments); | |
const waitPromise = await this.get('slow.assetsPromise'); | |
This file contains hidden or 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 Ember from 'ember'; | |
import move from 'ember-animated/motions/move'; | |
import opacity from 'ember-animated/motions/opacity'; | |
import { easeOut, easeIn } from 'ember-animated/easings/cosine'; | |
import Promise from 'rsvp'; | |
export default Ember.Component.extend({ | |
myProperty: false, | |
transition: function* ({ insertedSprites, keptSprites, removedSprites, duration }) { |
NewerOlder