Skip to content

Instantly share code, notes, and snippets.

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
# 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
// Start app in test mode with mocked services
import startApp from 'azureexplorer/tests/helpers/start-app';
// Replace this with your real tests.
test('it should give us models', function(assert) {
assert.expect(2);
App = startApp(null, assert);
store = App.__container__.lookup('store:main');
Ember.run(function(){
var newAccount = store.createRecord('account', {
name: 'Testaccount',
nodeServices.set('azureStorage', {
createBlobService: function () {
return {
listContainersSegmented: function (shouldBeNull, callback){
assert.ok(shouldBeNull === null, 'expeceted arg shouldBeNull to be null');
assert.ok(callback !== null, 'expeceted arg callback to be non-null');
return callback(null, {
entries: [{
name: 'testcontainer',
properties: {
import Ember from 'ember';
var azureStorage = null;
var fs = null;
// check if running in nw, if not, we're probably running as a test
// in which case this entire service will be mocked
if (window.requireNode) {
azureStorage = window.requireNode('azure-storage');
fs = window.requireNode('fs');
}
export default Ember.Service.extend({
import DS from 'ember-data';
import serializer from '../serializers/azure-storage';
import accountUtils from '../utilities/account';
export default DS.Adapter.extend({
serializer: serializer.create(),
nodeServices: Ember.inject.service(),
find: function (store, type, snapshot) {
var blobService = this.get('azureStorage').createBlobService(store.account_name, store.account_key);
return new Ember.RSVP.Promise(function (resolve, reject) {
blobService.getBlobProperties(snapshot.get('container').name, snapshot.get('name'), function (error, result) {
@sedouard
sedouard / dokku-dockerfile-nodejs
Created January 27, 2015 05:51
An example of using Dockerfile for Nodejs with Dokku on an Ubuntu container
FROM ubuntu:trusty
MAINTAINER Steven Edouard <steven.edouard1@gmail.com>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -y
RUN apt-get -qq update -y
RUN apt-get install -y nodejs npm -y
#install any specific things you need on this ubuntu box
@sedouard
sedouard / sendToEventHub.py
Created November 13, 2014 04:09
Generate SAS Token for eventhub from Python
import urllib
import time
import hmac
import hashlib
import base64
def _sign_string(uri, key, key_name):
'''
100000 = milsecond expiry
'''
@sedouard
sedouard / continuationhandler.js
Created May 23, 2014 20:19
This is an example of continuing oauth authentication with Windows Phone 8.1 (javascript)
app.addEventListener("activated", function (args) {
if (args.detail.kind == activation.ActivationKind.webAuthenticationBrokerContinuation) {
//take oauth response and continue login process
mobileSerivce.login(args.detail.webAuthenticationResult);
}
//Handle normal activiation...(hidden)
}
@sedouard
sedouard / gist:4362b0e809cee4fa4669
Last active August 29, 2015 14:01
Example of oauth AndContinue for Windows Phone 8.1 (javascript)
try{
//Windows 8/8.1
Windows.Security.Authentication.Web.WebAuthenticationBroker
.authenticateAsync(Windows.Security.Authentication.Web.WebAuthenticationOptions.default, startURI, endURI)
.then(function(result){
console.log('handle your provider specific token inside ' + result.responseData);
}, function(error){