Skip to content

Instantly share code, notes, and snippets.

@meirish
meirish / components.container\.js
Last active October 24, 2020 16:20 — forked from lifeart/components.mega-input\.js
Ember DDEU (Data Down Events Up)
import Component from '@glimmer/component';
import { tracked } from '@glimmer/tracking';
import { action } from '@ember/object';
export default class extends Component {
@tracked children = [];
@action
registerChild({detail}) {
this.children = [...this.children, detail[0]];
@meirish
meirish / components.test-select.js
Created November 21, 2019 22:22 — forked from kkincade/cloudSettings
Selected Option
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super(...arguments);
this.set('items',
Ember.A([
{ name: 'Option 1', value: '1', isSelected: false },
import Ember from 'ember';
export default Ember.Component.extend({
options: null,
feed: null
});
@meirish
meirish / router.js
Last active July 28, 2017 15:55 — forked from amk221/router.js
New Twiddle
import Ember from 'ember';
import config from './config/environment';
const Router = Ember.Router.extend({
location: 'none',
rootURL: config.rootURL
});
Router.map(function() {
this.route('foo', { path: '/foo/:topId' }, function() {
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle'
});
<div class="pure-g">
<div class="pure-u-20-24 padding-r-s-mobile">
<h2 class="h3 margin-none">
{{course.title}}
</h2>
<p class="light margin-none small">
{{#t}}Next Due {{date course.next_section_due "full"}}{{/t}}
<span class="pink">({{date course.next_section_due "fromNow"}})</span>
&nbsp;/&nbsp;
;(function (){
var HomeUI = {
imageLoadCounter:1,
delayTimer:null,
animationTimer:null,
timerCounter:0,
currentAnimation:null,
animating:false,
popUpTimer:null,
NUM_IMAGES_TO_LOAD:4,
<!DOCTYPE html>
<html>
<head>
<title>Checkbox</title>
<style>
input[type=checkbox] {
display:none;
}
@meirish
meirish / index.html
Created June 17, 2012 18:56 — forked from tkadlec/mqListener.html
machMedia Listener Test
<html>
<head>
<title>MatchMedia Listener Test</title>
<meta name="viewport" content="width=device-width" />
<style type="text/css">
body{
font-family: Helvetica, sans-serif;
}
#colorMe{
padding: 1.5em 1em;
@meirish
meirish / license_generator.vim
Created April 3, 2012 19:30 — forked from chuckha/license_generator.vim
License Generator for SBO projects
function! LicenseGenerator()
let date = strftime("%c")
if &ft == "javascript"
return "/*jslint bitwise: true, browser: true, eqeqeq: true, immed: true, newcap: true, regexp: true, nomen: false, onevar: false, undef: true, plusplus: false, white: true, indent: 2 */\n/*global confirm define interpolate gettext console */\n\n// Created by Matthew Irish (mirish@safaribooksonline.com) on " . date . "\n/*! Copyright (c) 2012 Safari Books Online, LLC. All rights reserved.*/\n\n"
endif
if &ft == "python"
return "# encoding: utf-8\n\n# Created by Matthew Irish (mirish@safaribooksonline.com) on " . date . "\n# Copyright (c) 2012 Safari Books Online, LLC. All rights reserved.\n\n"
endif
endfun