Skip to content

Instantly share code, notes, and snippets.

View sukima's full-sized avatar

Devin Weaver sukima

View GitHub Profile
@sukima
sukima / disfocus.js
Last active December 21, 2015 19:29 — forked from charyorde/disfocus
function iAmAllDone() {
// Do something herebecause It's All Done!
}
function onContributionWizardAfterAddEntry(entries) {
for(var i = 0; i < entries.length; i++) {
parent.top.$j("#externalVideoID").val(entries[i].entryId);
}
// Trigger an event however the library event model handles event triggering.
@sukima
sukima / .ctags
Last active August 29, 2015 14:13 — forked from kflu/.ctags
--langdef=coffee
--langmap=coffee:.coffee
--regex-coffee=/(^|=[ \t])*class ([A-Za-z_][A-Za-z0-9_]+\.)*([A-Za-z_][A-Za-z0-9_]+)( extends .+)?$/\3/c,class/
--regex-coffee=/^[ \t]*(module\.)?(exports\.)?@?(([A-Za-z][A-Za-z0-9_.]*)+):.*[-=]>.*$/\3/m,method/
--regex-coffee=/^[ \t]*(module\.)?(exports\.)?(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=.*[-=]>.*$/\3/f,function/
--regex-coffee=/^[ \t]*(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=[^->\n]*$/\1/v,variable/
--regex-coffee=/^[ \t]*@(([A-Za-z][A-Za-z0-9_.]*)+)[ \t]*=[^->\n]*$/\1/f,field/
--regex-coffee=/^[ \t]*@(([A-Za-z][A-Za-z0-9_.]*)+):[^->\n]*$/\1/f,static field/
--regex-coffee=/^[ \t]*(([A-Za-z][A-Za-z0-9_.]*)+):[^->\n]*$/\1/f,field/
--regex-coffee=/((constructor|initialize):[ \t]*\()@(([A-Za-z][A-Za-z0-9_.]*)+)([ \t]*=[ \t]*[^,)]+)?/\3/f,field/
#!/bin/bash
## Copyright (C) 2009 Przemyslaw Pawelczyk <[email protected]>
## License: GNU General Public License v2, v3
#
# Lockable script boilerplate
### HEADER ###
LOCKFILE="/var/lock/`basename $0`"
@sukima
sukima / latch.js
Last active September 5, 2016 16:48 — forked from nowelium/latch.js
CountdownLatch
var CountdownLatch = function (limit) {
this.limit = limit;
this.count = 0;
this.waitBlock = function () {};
};
CountdownLatch.prototype.async = function (fn, ctx) {
var _this = this;
fn.call(ctx, function () {
_this.count = _this.count + 1;
if(_this.limit <= _this.count){
@sukima
sukima / test.js
Last active May 9, 2024 23:49 — forked from robneville73/test.js
firstReport: computed.alias('reports.firstObject'),
someOtherThing: computed('reports.[]', function() {
return get(this, 'reports').map(report => doCoolStuff(report));
}),
...
...
...
getReports: task(function*() {
import Ember from 'ember';
export default Ember.Component.extend({
tagName: '',
});
@sukima
sukima / controllers.application.js
Last active November 23, 2017 13:00 — forked from averydev/controllers.application.js
Ember Concurrency Task Model / Nested Routes
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Concurrency Decendants'
});
@sukima
sukima / application.controller.js
Last active January 2, 2018 19:55 — forked from piotrpalek/application.controller.js
inherited computed property
import Ember from 'ember';
import CoreController from '../core/controller';
const { computed } = Ember;
export default CoreController.extend({
queryParams: ['appName', 'foobar'],
appName: 'Ember Twiddle',
foobar: 'baz',
something: computed('{appName,foobar}', {
@sukima
sukima / controllers.application.js
Created April 17, 2018 20:53 — forked from aaronfischer/controllers.application.js
test iterate object and change value
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
thing: {
'first-name': '',
'last-name': '',
'status': '',
},
import Ember from 'ember';
export default Ember.Component.extend({
actions: {
open(){
//do stuff
let image = 'yay image'
this.get('childManager').select(image)
}
}