Skip to content

Instantly share code, notes, and snippets.

View jbueza's full-sized avatar

Jaime Bueza jbueza

View GitHub Profile
var account = require("../test/fixtures/secret.json");
var Client = require("../lib/Client");
var client = new Client(account);
var person = client.define("People", {
PartitionKey: "dcb83fa0-15c4-463f-99b7-2ce365878b20",
RowKey: "58f92ada-2aa9-48f8-9429-4580e0f91b81",
FirstName: "Jaime",
LastName: "Bueza",
λ php_heroku: heroku create hello-php-jbueza
Creating hello-php-jbueza... done, stack is cedar
http://hello-php-jbueza.herokuapp.com/ | git@heroku.com:hello-php-jbueza.git
λ php_heroku: git init
Initialized empty Git repository in /private/tmp/php_heroku/.git/
λ php_heroku: git remote add heroku git@heroku.com:hello-php-jbueza.git
λ php_heroku: echo "<?php phpinfo(); ?>" >> index.php
λ php_heroku: git add . && git commit -m "PHP Time." .
[master (root-commit) 663c056] PHP Time.
1 files changed, 1 insertions(+), 0 deletions(-)
test:
@./node_modules/.bin/mocha \
test/unit \
--compilers coffee:coffee-script \
--reporter min
.PHONY: test
alias ll='ls -al'
alias search=grep
alias ..='cd ..'
alias ...='cd ../..'
alias rm='rm -i'
alias df='df -h'
alias glo='git log --oneline --decorate'
alias gst='git status'
(someCondition) ? (function() {
//then do this!
})() : (function() {
//else do that!
})();
describe("Registration", function() {
describe("register(params, callback)", function() {
it("should return false if not passing a params object", function() {
expect(registrationController.register()).toBeFalsy();
});
it("should return false if a callback is not specified", function() {
expect(registrationController.register({})).toBeFalsy();
});
it("should invoke the callback", function() {
var spy = sinon.spy();
// app.js
app
.map(".login-component", [ { controller: "abc.User.LoginController" ])
.map(".registration-component", [{controller: "abc.User.RegistrationController"}])
.start()
seclorum 1 hour ago | link
I'm 42 and have managed to survive 25 years professionally in the computer world, primarily as a software developer.
There is one, hard, fast rule for survival as a developer, and it has worked very well for me for years. I will share it with you:
Follow the platform. Programming is all about the hardware.
How does it work? Its simple - programming on Windows for x86? Get yourself a Mac and learn to hack on it in your spare time (by the way: no television or other sedentary 'entertainment' activities - entertain yourself by learning new things). Already a Mac code - get an iPhone, or learn Android. An iOS developer already? Android master already? Alright then, time to get a Beagleboard and do some Linux hacking. Already hacked on Linux? Get into CUDA. CUDA genius already - okay, how about some of that Cloud tech ..
There is no safety in platform mastery, because those platforms are like slippery barrels, spinning around and around, slowly sinking into redundancy. If you are empl
@jbueza
jbueza / LoginController.js
Created January 3, 2012 07:39
Cleaner way of writing Mojo Controllers
mojo.define("resaas.controller.LoginController", function() {
var $ = jQuery;
var LoginController = {
events: [], methods: {}
};
return LoginController;
});
describe("Adding a user to a particular application - Service Spec", function () {
var service = services['addUserToApplication'];
it("should have a name", function () {
expect(service.name).toEqual("addUserToApplication");
});
it("should have a url", function () {
expect(service.uri).toEqual("/Application/AddUser");
});
it("should be a POST", function () {
expect(service.options.method).toEqual("post");