Skip to content

Instantly share code, notes, and snippets.

View mixonic's full-sized avatar

Matthew Beale mixonic

View GitHub Profile
@mixonic
mixonic / server.js
Created April 28, 2011 22:49
Node.js + Socket.io + Bash. A collaborative terminal for your browser.
//
// This server will start a bash shell and expose it
// over socket.io to a browser. See ./term.html for the
// client side.
//
// You should probably:
//
// npm install socket.io
// curl -O https://github.com/LearnBoost/Socket.IO/raw/master/socket.io.min.js
//
@mixonic
mixonic / .gitignore
Created May 16, 2011 18:55
Mousy - A shared cursor for webpages using Node.js
node_modules
public/socket.io.min.js
public/jquery.js

See emberjs/ember.js#19868

Download the tgz file below, and change your npm dependency on ember-source (in config/ember-try.js or just in package.json) to 'file:./ember-source-3.28.7-mixonic-explicit-injection-not-deprecated+ae15deb1.tgz'.

Three things for ember source 4.0, BLOCKS EMBER-CLI 4.0

Followup, can be a bit lazy:

@mixonic
mixonic / readme.md
Last active April 21, 2021 23:49
Services for Glimmer.js

Setup

In config/environment.js:

// config/environment.js
'use strict';

/*
 * Mostly this is the stock module config.
@mixonic
mixonic / components.my-component.display-part.js
Created May 16, 2019 16:16
Component with re-usable content components
import Ember from 'ember';
export default Ember.Component.extend({
});
import Ember from 'ember';
export default Ember.Controller.extend({
root: 'aa',
appName: Ember.computed('root', {
get() {
return this.get('root');
},
set(key, value) {
let newValue = value;
@mixonic
mixonic / controllers.application.js
Created May 3, 2019 14:04
Named export, default import
import Ember from 'ember';
import NamedExports from './exporting';
export default Ember.Controller.extend({
appName: NamedExports.appName
});
import Ember from 'ember';
export default Ember.Component.extend({
log: Ember.computed(() => []),
open() {
this.get('log').pushObject('opened!');
},
didInsertElement() {
import Ember from 'ember';
export default Ember.Component.extend({
});