Skip to content

Instantly share code, notes, and snippets.

Robert Jackson rwjblue

Block or report user

Report or block rwjblue

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@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
@rwjblue
rwjblue / rspec-uncommitted.sh
Last active Sep 2, 2019
Run rspec only on uncommited files. No more accidentally pushing a :focus tag to master!
View rspec-uncommitted.sh
rspec `git ls-files --modified --others spec`
View controllers.application.js
import Ember from 'ember';
let RowItem = Ember.Object.extend({
order: 0
});
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
sortDirection: 'asc',
items: Ember.computed(function(){
View components.checkbox-component.js
import Ember from 'ember';
export default Ember.Component.extend({});
@rwjblue
rwjblue / output.txt
Created Mar 2, 2013
Test Ruby's ability to release memory back to system.
View output.txt
Ruby 1.9.3-p392
===========================================================
All memory used before 1st run - 7 MB
Memory consumed by 1st run of eat_up_memory - 445 MB
All memory used before 2nd run - 452 MB
Memory consumed by 2nd run of eat_up_memory - 20 MB
All memory used before 3rd run - 472 MB
Memory consumed by 3rd run of eat_up_memory - 5 MB
Memory used before explicit GC.start - 478 MB
Memory used after explicit GC.start - 284 MB
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super();
this.set('bar', { foo: 'stuff' });
this.set('keys', Object.keys(Ember.get(this, 'bar')));
},
actions: {
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
init() {
this._super();
this.set('bar', { foo: 'stuff' });
},
actions: {
foo() {
View controllers.application.js
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
save: function() {
alert('saving ' + this.get('foo'));
}
}
});
View components.my-component.js
import Ember from 'ember';
export default Ember.Component.extend({
updateCount: 0,
didUpdateAttrs() {
this._super(...arguments)
console.log("didUpdateAttrs", this.updateCount)
debugger
this.updateCount++;
}
You can’t perform that action at this time.