This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# set the ssl cert for deis | |
deisctl config router set sslKey= sslCert= | |
# redirect all http traffic to https | |
deisctl config router set enforceHTTPS=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VEHICLES | |
-- | |
GET /vehicles - Returns all vehicles | |
Sample Response: | |
{ "data": [ | |
{ | |
"type": "vehicle", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// Code for generating of SAS token for authorization with Service Bus | |
/// | |
/// This handy function can be found on this helpful blog post: | |
/// http://developers.de/blogs/damir_dobric/archive/2013/10/17/how-to-create-shared-access-signature-for-service-bus.aspx | |
/// </summary> | |
/// <param name="resourceUri"></param> | |
/// <param name="keyName"></param> | |
/// <param name="key"></param> | |
/// <returns></returns> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import uuid | |
from azure.storage import BlobService | |
def generate_vhd_footer(size): | |
# Fixed VHD Footer Format Specification | |
# spec: https://technet.microsoft.com/en-us/virtualization/bb676673.aspx#E3B | |
# Field Size (bytes) | |
# Cookie 8 | |
# Features 4 |