Skip to content

Instantly share code, notes, and snippets.

View jherdman's full-sized avatar

James Herdman jherdman

View GitHub Profile
import Ember from 'ember';
export default Ember.Controller.extend({
myCondition: true,
});
/* global Blob */
// put in tests/helpers
import Ember from 'ember';
const {
Test: {
registerAsyncHelper,
},
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle',
cheetos: null
});
// Task function body
let continuePolling = true;
while (continuePolling) {
yield this.get('ajax').raw(url, headers).then(() => {
if (somethingBoring) {
return timeout(pollingInterval);
} else {
continuePolling = false;
}
shared_example 'accessing as an unauthorized user' do |request_proc|
it 'rejects their request' do
instance_exec(&request_proc)
expect(response.status).to eq(401)
end
end
describe 'GET #index' do
include_example 'access as an unauthorized user', -> { get :index }
end
var DumbController = Em.ObjectController.extend({
myArray: []
});
<!DOCTYPE html>
<html>
<head>
<title>Fitness Buddy</title>
<!-- for more details visit: https://github.com/yeoman/grunt-usemin -->
<!-- build:css(.) assets/vendor.min.css -->
<link rel="stylesheet" href="/vendor/bootstrap/dist/css/bootstrap.min.css">
<!-- endbuild -->
var attr = DS.attr,
Profile;
/**
* Representation of the client
*/
Profile = DS.Model.extend({
firstName: attr('string'),
lastName: attr('string'),
ERROR: Could not find a valid gem 'nokogiri' (>= 0), here is why:
Unable to download data from https://rubygems.org - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://s3.amazonaws.com/production.s3.rubygems.org/latest_specs.4.8.gz)
irb(main):030:0> columns.zip(values).each do |col, val|
irb(main):031:1* puts "(#{col}, #{val})"
irb(main):032:1> end
("id", 2)
("program_id", 4)
("version", NULL)
("title", 'Level 2 Intake Questionnaire Part 1')
("description", 'Stage 2 intake questionnaire')
("duplicate_allowed", 0)
("css_path", NULL)