Skip to content

Instantly share code, notes, and snippets.

View components.one-way-input.js
import Ember from 'ember';
export default Ember.Component.extend({
tagName: 'input',
attributeBindings: [ 'type', 'value', 'placeholder', 'data-stripe', 'name' ],
type: 'text',
_sanitizedValue: undefined,
input() { this._handleChangeEvent(); },
change() { this._handleChangeEvent(); },
View helpers.guid-for\.js
import { helper } from '@ember/component/helper';
export default helper(function guidFor(params/*, hash*/) {
return Ember.guidFor(params[0]);
});
@rwjblue
rwjblue / list.sh
Created Sep 26, 2012
List account and distribution list details in Zimbra
View list.sh
sudo su - zimbra
# list all accounts and print out account name and aliases
for i in `zmprov -l gaa` ; do zmprov ga $i zimbraMailAlias ; done
# list all distribution lists and any members and/or aliases
for i in `zmprov gadl` ; do zmprov gdl $i zimbraMailAlias zimbraMailForwardingAddress ; done
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
View controllers.application.js
import Controller from '@ember/controller';
import { computed } from '@ember/object';
const values = [
0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100
];
export default Controller.extend({
sliderIndex: 1,
View components.my-component\.js
import Component from '@glimmer/component';
export default class extends Component {
constructor() {
super();
this.classNames = [];
}
}
@rwjblue
rwjblue / steps.md
Last active Apr 12, 2020
Remote Pairing (through SSH tunnel) Setup
View steps.md

Start with a machine that is directly accessible to both parties via SSH (linode, EC2, prgmr.com, etc), and that you can add users to. DO NOT USE root!!!!

Usage

##From the hosts local machine:

ssh -R1337:localhost:22 host@<shared server's ip address/hostname>
@rwjblue
rwjblue / application.controller.js
Created Dec 14, 2015 — forked from barneycarroll/application.controller.js
Can't access object values by dynamic key in Handlebars
View application.controller.js
import Ember from 'ember';
export default Ember.Controller.extend({
numbers:['1','2','3','4'],
letters:['a','b','c','d']
});
View controllers.application.js
import Ember from 'ember';
const { Controller, inject } = Ember;
export default Controller.extend({
display: inject.service(),
actions: {
toggle() {
this.get('display').toggleVisibility();
}
You can’t perform that action at this time.