Skip to content

Instantly share code, notes, and snippets.

View joachimhs's full-sized avatar

Joachim Haagen Skeie joachimhs

View GitHub Profile
{
"user": {
"id": "dfd07d91-5244-482b-ab0b-1fd9fa92ab30",
"userId": "joachim@haagen.name",
"fullName": "Joachim Haagen Skeie",
"company": "Haagen Software AS",
"phone": "41415805",
"dietaryRequirements": "",
"countryOfResidence": "Norway",
"yearOfBirth": "1981",
Emberfest.ProfileRoute = Ember.Route.extend({
model: function() {
var uuidToken = this.controllerFor('user').readCookie('uuidToken');
console.log('ProfileRoute uuidToken: ' + uuidToken);
return this.store.find('user', uuidToken);
}
});
[mc5@mc5 kvm_imgs]$ sudo qemu-img create -f qcow2 rethinkdb.qcow 20G
[mc5@mc5 kvm_imgs]$ sudo qemu-img info rethinkdb.qcow
image: rethinkdb.qcow
file format: qcow2
virtual size: 20G (21474836480 bytes)
disk size: 136K
cluster_size: 65536
@joachimhs
joachimhs / gist:6416623
Created September 2, 2013 19:44
ED Beta 1 sample
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="author" content="Joachim Haagen Skeie">
<title>Ember Data</title>
@joachimhs
joachimhs / gist:5973284
Created July 11, 2013 07:26
Strange ===
Embriak.BucketLiView = Ember.View.extend({
tagName: 'li',
template: Ember.Handlebars.compile('{{#linkTo keys this}}{{id}}{{/linkTo}}'),
classNameBinding: 'active',
active: function() {
console.log("this.get('content.id') === this.get('controller.controllers.keys.content.id'): '" + this.get('content.id') + "' ::: '" + this.get('controller.controllers.keys.content.id') + "'");
console.log("this.get('content.id') === this.get('controller.controllers.keys.content.id'): " + this.get('content.id') === this.get('controller.controllers.keys.content.id'));
return this.get('content.id') === this.get('controller.controllers.keys.content.id');
Montric.ChartView = Ember.View.extend({
classNames: ['eurekajChart'],
resizeHandler: null,
nvd3Chart: null,
contentObserver: function() {
console.log('ChartView contentObserver!');
var elementId = this.get('elementId');
var series = this.get('chart.series');
console.log('series: ' + series);
auto eth0
iface eth0 inet static
address 192.168.1.202
netmask 255.255.255.0
gateway 192.168.1.1
#auto br0
#iface br0 inet static
# address 192.168.1.202
# netmask 255.255.255.0
contentArrayContains: function(id, type) {
var contains = null;
Ember.get(type, 'collection').forEach(function(item) {
if (item.get('id') === id) {
contains = item;
}
});
return contains;
var alertAdminController;
module("EurekaJ.AdministrationAlertsController", {
setup: function() {
this.server = sinon.fakeServer.create();
Ember.run(function() {
alertAdminController = EurekaJ.__container__.lookup("controller:administrationAlerts");
});
@joachimhs
joachimhs / gist:5280678
Last active December 15, 2015 15:19
Sinon FakeServer test
var alertAdminController;
module("EurekaJ.AdministrationAlertsController", {
setup: function() {
this.server = sinon.fakeServer.create();
Ember.run(function() {
alertAdminController = EurekaJ.__container__.lookup("controller:administrationAlerts");
});