Skip to content

Instantly share code, notes, and snippets.

View deepflame's full-sized avatar

Andreas Böhrnsen deepflame

View GitHub Profile
import Ember from 'ember';
import { computed } from '@ember/object';
import { task, timeout } from 'ember-concurrency';
export default Ember.Component.extend({
startValue: 10,
currentValue: null,
init() {
@deepflame
deepflame / components.my-component.js
Last active December 20, 2019 13:45
Ember component: variable set before init?
import Ember from 'ember';
export default Ember.Component.extend({
message: null,
name: Ember.computed('message', {
set(_key, value) {
let message = `${this.get('greeting')} ${value}`;
this.set('message', message);
}
@deepflame
deepflame / controllers.application.js
Last active February 12, 2017 15:42 — forked from samselikoff/mirage.config.js
Mirage dev boilerplate
import Ember from 'ember';
export default Ember.Controller.extend({
});
@deepflame
deepflame / SassMeister-input-HTML.html
Created November 16, 2015 09:52
Generated by SassMeister.com.
<main>Main</main>
@deepflame
deepflame / jsbin.gepuqo.css
Last active August 29, 2015 14:04
EmberJS: example for nesting routes / resources
body {
padding: 15px;
}
@deepflame
deepflame / jsbin.kuhoxu.css
Last active August 29, 2015 14:04
EmberJS: inserting an app template / layout without changing the url
body {
padding-top: 75px;
}
@deepflame
deepflame / .travis.yml
Created March 4, 2014 17:28
test different iOS platforms on Travis
language: objective-c
rvm:
- 1.9.3
env:
matrix:
- TEST_SDK=iphonesimulator5.1 SIMULATOR=ipad
- TEST_SDK=iphonesimulator6.1 SIMULATOR=ipad
- TEST_SDK=iphonesimulator7.0 SIMULATOR=iphone
- TEST_SDK=iphonesimulator7.0 SIMULATOR=ipad
script:
@deepflame
deepflame / .travis.yml
Last active August 29, 2015 13:57
Take screenshots when KIF fails on Travis (and upload them to S3)
language: objective-c
rvm:
- 1.9.3
env:
global:
- KIF_SCREENSHOTS="${TRAVIS_BUILD_DIR}/Screenshots/${TRAVIS_BUILD_NUMBER}"
- secure: N0tEZ7I8Flu1OPxHqG2a4hdZtq/i/X3nz3vbFZWdO9OW9PAm2BXh6Ndqp0W3CyKTnHuLt1l+6RvoaHW9UxHjpSElYcTHB7f62XDV6ldQ6JFk/B2V9z90imKbBN0v1yijjCN2qYSzwV6vAi+QEMyRyGTUKAKanQAng0cUfFsgT00=
matrix:
- TEST_SDK=iphonesimulator5.1 SIMULATOR=ipad
- TEST_SDK=iphonesimulator6.1 SIMULATOR=ipad
@deepflame
deepflame / rowspan_csv.rb
Created July 15, 2013 04:57
This Ruby script fills in the blanks in a csv file which has "rowspan".
require 'csv'
FILE_IN = "in.csv"
FILE_OUT = "out.csv"
CSV.open(FILE_OUT, "wb") do |out|
CSV.foreach(FILE_IN) do |row|
@complete_row ||= row
row.each_with_index {|v,i| @complete_row[i] = v if v }
@deepflame
deepflame / Gemfile
Created December 11, 2012 09:25
Rspec, Capybara, PhantomJs sample config for headless non-Rails-app testing
source :rubygems
gem 'rspec'
gem 'capybara'
gem 'poltergeist' # Capybara driver for PhantomJs
gem 'capybara-screenshot', :require => false # takes screenshots when test fails