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
--- | |
- hosts: servers | |
user: root | |
tasks: | |
- name: create repository for packages | |
copy: src=files/mongodb.repo dest=/etc/yum.repos.d/mongodb.repo | |
- name: install mongodb pacakges | |
yum: name=mongo-10gen state=latest | |
yum: name=mongo-10gen-server state=latest | |
- name: config mongodb |
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
--- | |
- hosts: servers | |
user: root | |
tasks: | |
- name: install the latest git | |
command: rpm --import http://apt.sw.be/RPM-GPG-KEY.dag.txt | |
command: rpm -i http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.3-1.el6.rf.x86_64.rpm | |
- name: install git with yum | |
yum: name=git enablerepo=rpmforge-extras state=latest |
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
--- | |
- hosts: servers | |
user: root | |
tasks: | |
- name: add user | |
user: name=kamesho | |
- authorized_key: user=kamesho key="{{ lookup('file', '/Users/kamesho/.ssh/id_rsa.pub') }}" |
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
.factory('myOrder', function () { | |
var order = {}; | |
return { | |
init: function () { | |
order = {}; | |
}, | |
setStock: function(stock){ | |
order.stock = stock; | |
}, | |
getStock: function(){ |
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
'use strict'; | |
describe('Testing Services', function () { | |
// Required setup for AngualarJS | |
beforeEach(module('frontieApp')); | |
var myOrder; | |
beforeEach(inject(function(_myOrder_){ | |
myOrder = _myOrder_; | |
})); |
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
#!/usr/bin/env perl | |
use Statistics::R; | |
my $R = Statistics::R->new(); | |
$R->set('x', 5); | |
$R->run(q`y <- x^2`); | |
my $output_value = $R->get('y'); | |
print "y = $output_value\n"; | |
$R->stop(); |
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
sub startup { | |
my $self = shift; | |
$self->types->type(json => 'application/json; charset=utf-8'); |
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
app.models.Employee = Backbone.Model.extend({ | |
initialize:function () { | |
this.reports = new app.models.ReportsCollection(); | |
this.reports.parent = this; | |
}, | |
sync: function(method, model, options) { | |
if (method === "read") { | |
app.adapters.employee.findById(parseInt(this.id)).done(function (data) { |
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
app.views.HomeView = Backbone.View.extend({ | |
initialize: function () { | |
this.searchResults = new app.models.EmployeeCollection(); | |
this.searchresultsView = new app.views.EmployeeListView({model: this.searchResults}); | |
}, | |
render: function () { | |
this.$el.html(this.template()); | |
$('.scroller', this.el).append(this.searchresultsView.render().el); |
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
app.routers.AppRouter = Backbone.Router.extend({ | |
routes: { | |
"": "home", | |
"employees/:id": "employeeDetails", | |
"employees/:id/reports": "reports", | |
"employees/:id/map": "map" | |
}, | |
initialize: function () { |