Skip to content

Instantly share code, notes, and snippets.

# If you haven't already install ember-cli
npm install ember-cli -g
$>ember new
$>cd
$>npm install && bower install
$>npm install ember-cli-node-webkit --save
$>ember g node-webkit
# Develop your application & tests
...
# Now run your automated tests
Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
Xlib: extension RANDR missing on display :99.0.
Xlib: extension RANDR missing on display :99.0.
InitializeSandbox()** called with multiple threads in process gpu-process
X error received: serial 61, error_code 8 (BadMatch (invalid parameter attributes)**)**, request_code 72, minor_code 0 (X_PutImage)**
1...64
ok 1 - JSHint - adapters # adapters/application.js should pass jshint
ok 2 - JSHint - adapters # adapters/blob.js should pass jshint
ok 3 - JSHint - adapters # adapters/container.js should pass jshint
# set the ssl cert for deis
deisctl config router set sslKey= sslCert=
# redirect all http traffic to https
deisctl config router set enforceHTTPS=true
# Generate the private key
openssl genrsa -des3 -out server.key 1024
Generating RSA private key, 1024 bit long modulus
.........................................................++++++
........++++++
e is 65537 (0x10001)
Enter PEM pass phrase:
Verifying password - Enter PEM pass phrase:
@sedouard
sedouard / spec.json
Created April 28, 2015 23:46
connected car rest api spec
VEHICLES
--
GET /vehicles - Returns all vehicles
Sample Response:
{ "data": [
{
"type": "vehicle",
@sedouard
sedouard / gist:7623912
Created November 24, 2013 06:08
This sample (from the FiddlerCorApi sample) shows how you can create a "Mock" http service for your app. This allows you to "record" traffic between the target process and the web service. Then you can "replay" mode the "Mock" service will respond with the same exact responses the actual service did. The real awesome thing here is that you can t…
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Fiddler;
using System.IO;
using System.Diagnostics;
using Newtonsoft.Json;
using MockHttpServer.Data;
@sedouard
sedouard / chartjs-node.js
Created September 16, 2016 23:22
Trying to use Chart.js sever-side
var Canvas = require('canvas')
, Image = Canvas.Image;
var fs = require('fs');
var jsdom = require("jsdom");
jsdom.defaultDocumentFeatures = {
FetchExternalResources: ["script"],
ProcessExternalResources: true
};
global.Canvas = Canvas;
global.Image = Canvas.Image;
@sedouard
sedouard / chartjs-object
Created September 16, 2016 23:23
ChartJS Object
{ chart:
{ config: { type: 'bar', data: [Object], options: [Object] },
ctx:
CanvasRenderingContext2D {
canvas: HTMLCanvasElement {},
createPattern: [Function],
drawImage: [Function],
lastFontString: 'normal 12px \'Helvetica Neue\', \'Helvetica\', \'Arial\', sans-serif',
lastTextAlignment: 'right',
lastBaseline: 'middle' },
@sedouard
sedouard / chartjs-example.js
Created September 17, 2016 00:53
Chart.js Example
var myChart = new Chart(ctx, {
type: 'bar',
data: {
labels: ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"],
datasets: [{
label: '# of Votes',
data: [12, 19, 3, 5, 2, 3],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
@sedouard
sedouard / canvas-chartjs.js
Created September 17, 2016 00:54
Using Canvas.js in Node.js
// Using the node canvas module
var fs = require('fs');
var jsdom = require("jsdom");
jsdom.defaultDocumentFeatures = {
FetchExternalResources: ["script"],
ProcessExternalResources: true
};
jsdom.env('<html><body><div id="chart-div" style="font-size:12; width:800px; height:800px;"><canvas id="myChart" width="400" height="400" style="width:400px;height:400px"></canvas>></div></body></html>',
['https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.2.2/Chart.js'],
function (err, window) {