Skip to content

Instantly share code, notes, and snippets.

View cibernox's full-sized avatar
🏠
Working from home

Miguel Camba cibernox

🏠
Working from home
View GitHub Profile
@cibernox
cibernox / components.file-chooser.js
Created May 22, 2016 19:00 — forked from chrism/components.file-chooser.js
File Chooser Tests Native Events - Ember 2.5.1
import Ember from 'ember';
const { testing } = Ember;
export default Ember.Component.extend({
actions: {
filesChanged(event) {
const files = testing ? event.emberTestingFiles : event.target.files;
if (files.length === 0) {
Ember.Logger.log('you must add a file');
} else if (files.length > 0) {
@cibernox
cibernox / components.file-chooser.js
Created May 22, 2016 17:17 — forked from chrism/components.file-chooser.js
File Chooser Tests - Ember 2.4.5
import Ember from 'ember';
const {
run: {
bind
}
} = Ember;
export default Ember.Component.extend({
label: 'choose a file',
@cibernox
cibernox / monitor.md
Last active May 19, 2016 10:12 — forked from madhurtandon/monitor.md
Monitor rules

INPUT_TYPE=INTEGER, FLOAT, STRING

Payload: No differences here

{
	"title": "Sample",
	"predicate_collections": [{
		"propositions": [{
			"field": "cases.subject",
import Ember from 'ember';
const { computed } = Ember;
export default Ember.Controller.extend({
items: [{
name: 'Foo',
state: {
isActive: true
}
}, {
#!/usr/bin/env ruby
# vim: set syntax=ruby
# Ensures that changes to the Rails schema.rb file may only be committed if a
# migration file is also committed at the same time.
def schema_modified?
%x[ git diff --cached |grep schema.rb ] == ''
end