Skip to content

Instantly share code, notes, and snippets.

{
"ensure_newline_at_eof_on_save": true,
"font_size": 16.0,
"hot_exit": true,
"ignored_packages":
[
"Vintage"
],
"remember_open_files": false,
"rulers":
@bradgignac
bradgignac / building-marconi-browser.md
Last active December 19, 2015 17:29
Building Marconi Browser

Hey Team,

Here's a collection of thoughts I put together on building a SPA with Ember.js.

Why Ember.js

I looked at many frameworks when choosing what one to use with Marconi Browser. Based on my experience on Reach, Backbone (and Spine) were out due to their lack of support for two-way view binding. Knockout was out because it's a partial solution - it only provides a binding solution. There's a handful of others (Knockback, Batman, CanJS), but they seem to have lost momentum over the last year or two. In my eyes, the two big modern webapp frameworks are Ember.js and AngularJS. Here's why I went with Ember:

  • One
  • Two
@bradgignac
bradgignac / router.js
Created August 9, 2013 21:52
Ember Email Client Routes
App.EmailClient.Router.map(function () {
this.resource('mailboxes', '/', function () {
this.resource('messages', '/:mailbox_id', function () {
this.resource('message', '/:message_id');
});
});
});
@bradgignac
bradgignac / server_list.js
Created September 4, 2013 21:02
Knockout List View
ck.servers.list.View.prototype.createTemplate = function () {
return ck.template.servers.listView({...});
};
ck.servers.list.View.prototype.createViewModel = function () {
var servers, entities;
servers = this.getDependency(ck.data.servers.Servers);
checks = this.getDependency(ck.data.monitoring.Checks);

Why Here? Why Now?—About Rackspace Hosting

Rackspace Hosting is the service leader in cloud computing and the founder of OpenStack, the leading open source cloud platform. We deliver enterprise-level managed hosting, cloud hosting and e-mail hosting services to businesses of all types and sizes around the world. We serve over 190,000 customers from data centers around the world, and that number continues to grow. Rackspace integrates the industry's best technologies and practices for each customer's specific needs, delivering it as a service via the company's commitment to Fanatical Support®.

For the over 5,000 current Rackers, however, we are much more than a hosting company. Rackspace offers a vibrant company culture filled with compelling work, a supportive team environment and a lot of fun. We are as Fanatical® about serving our clients and one another as we are about building the future of technology.

We compete in the same space as Amazon, Microsoft and Google because the work that Rackers do

@bradgignac
bradgignac / create-server.rb
Created September 23, 2013 18:53
Testing Server Creation
it 'can create server' do
# Login
visit 'https://ui.preprod.rackspace.com'
fill_in 'Username', 'this is my username'
fill_in 'Password', 'this is my password'
# Go to server create page
click_link 'Servers'
click_link 'Create Server'
@bradgignac
bradgignac / generated-code.html
Last active December 28, 2015 06:19
Polymer Example
<div class="rs-detail-section">
<div class="rs-detail-section-header">
<div class="rs-detail-section-title">{{title}}</div>
<div class="rs-detail-section-summary">{{summary}}</div>
<div class="rs-detail-section-toggle"></div>
</div>
<div class="rs-detail-section-body">
<!-- This is all user-provided code that will appear in the section body. -->
<div class="rs-btn-group">
<button class="rs-btn rs-btn-primary">Add Widget</button>
@bradgignac
bradgignac / canon-shim.css
Created November 18, 2013 18:14
Canon Shim
.rs-body {
position: absolute;
top: 30px;
bottom: 65px;
left: 0;
right: 0;
}
.rs-body > .rs-container,
.rs-body > .rs-container > .rs-main,
@bradgignac
bradgignac / boolean.js
Last active December 29, 2015 09:09
Servo Boolean Observable
goog.provide('servo.boolean');
goog.require('servo.observable');
servo.boolean = function (value, options) {
return servo.observable(value, function (value) {
return typeof value === 'boolean';
}, options);
};
@bradgignac
bradgignac / grid-example.js
Last active January 3, 2016 14:49
Knockout Grid
collection = servo.collection(); // or simply ko.observableArray()
viewModel = ck.grid.observable(collection);
grid = ck.grid(viewModel, {
'foo': ck.grid.column('link', { sort: true }), // Sortable link column.
'bar': ck.grid.column('text', { sort: false }), // Non-sortable text column.
'someComputedColumn': ck.grid.column('text', { sort: function () {...} }) // Sortable text column with custom sort function.
});