const { Model, belongsTo, hasMany } = DS;
import { alias } from '@ember/object/computed';
import RollbackMixin from '../../mixins/rollbackable';
export default Model.extend(RollbackMixin, {
rollabackable: computed(function(){
return {
hasMany: ['items', 'users'],
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
// The global revision clock. Every time state changes, the clock increments. | |
let $REVISION = 0; | |
// The current dependency tracker. Whenever we compute a cache, we create a Set | |
// to track any dependencies that are used while computing. If no cache is | |
// computing, then the tracker is null. | |
let CURRENT_TRACKER = null; | |
// Storage represents a root value in the system - the actual state of our app. | |
class Storage { |
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 { Yieldable } from 'ember-concurrency'; | |
import fetch from 'fetch'; // i.e. ember-fetch. could also use native fetch too. | |
class FetchYieldable extends Yieldable { | |
constructor(url, opts = {}) { | |
super(...arguments); | |
this.url = url; | |
this.opts = opts; | |
} |
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
class FetchTask { | |
@tracked isLoading = true; | |
@tracked result; | |
constructor(url) { | |
this.run(url); | |
} | |
async run(url) { | |
let response = await fetch(url); |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
source <(antibody init) | |
antibody bundle < ~/.config/zsh_plugins | |
# TODO(dcramer): literally doesnt work at all | |
# function update_antibody() { | |
# antibody bundle < ~/.config/zsh_plugins > ~/.config/zsh_plugins.sh | |
# } |
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
# My steps to: | |
# Convert DVD Video to MPEG-4 in MKV without GUI, using only CLI (Command Line Interface) tools. | |
# No need for MeGUI, Avisynth, Handbrake etc.. | |
# ------------------------------------------------------------------------------ | |
# Tools needed: `mediainfo`, `ffmpeg` & `ffprobe`, `x264`, `mkvmerge`, `mplayer` (optional). | |
# Google for them. Use latest versions. Windows tip: avoid Cygwin and get | |
# the official builds, x64, when possible. | |
# Before start use `mediainfo` & `ffprobe` and note down informations about the source material: |
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 '~react-select/dist/react-select.css'; | |
* { | |
padding: 0; | |
margin: 0; | |
box-sizing: border-box; | |
} | |
html { | |
font-size: 13px; |
UPDATE: You don't need shims anymore! We can just use this now, and eventually it'll even be in Ember core.
app.import()
works with node_modules
now! As of Ember 2.15. Previously it only worked with bower_components
and vendor
.
Docs for app.import
are here:
https://ember-cli.com/managing-dependencies#standard-non-amd-asset
NewerOlder