Skip to content

Instantly share code, notes, and snippets.

View rjschie's full-sized avatar

Ryan Schie rjschie

View GitHub Profile
import Controller from '@ember/controller';
import { action } from '@ember/object';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
@action
runIt(model, e) {
model.name = e.target.value;
//console.log('inputting', model.isDirty);
import Component from '@glimmer/component';
/**
* Open your console when viewing this and
* refresh your page to see the posts
* being console logged.
*/
export default class extends Component {
constructor() {
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
@rjschie
rjschie / controllers.application.js
Last active October 25, 2018 23:20
Route Computed Props
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
});
@rjschie
rjschie / D3-Line.html
Last active April 7, 2016 05:20
D3 Line Chart that scales
<!DOCTYPE html>
<html>
<meta name="description" content="D3 Line chart that scales">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.6/d3.min.js"></script>
<style>
svg {
border: 1px solid red;
}
import Ember from 'ember';
export default Ember.Component.extend({
isVisible: false
});
@rjschie
rjschie / Input Focus Animation.html
Last active September 28, 2015 01:14
Saw this on Bungie's website, and wanted to give it a go using only CSS. http://jsfiddle.net/rjschie/7rL3429z/
<!DOCTYPE html>
<html>
<head>
<title>Input Focus Animation</title>
<style>
html,body {
padding: 0;
margin: 0;
height: 100%;
@rjschie
rjschie / racecar.js
Created September 24, 2015 23:48
Heard a problem set the other day to make a function detecting if a string is a palindrome. Wanted to give it a shot.
'use strict';
function reverseString(input) {
var result = "";
for( var i = (input.length-1); i >= 0; i-- ) {
result = result + input[i];
}
return result;
}
<div ng:controller="PersistentTodosController">
<ul class="todos">
<li ng:repeat="item in todos">
<input type="checkbox" ng:model="item.completed" />
<label
ng:class="{ completed: item.completed }"
ng:click="todos.remove($index)"
>{{ item.title }}</label>