Skip to content

Instantly share code, notes, and snippets.

View macikokoro's full-sized avatar

Joaquin Guardado macikokoro

View GitHub Profile
function oldestLivingParent(people) {
var livingParents = {};
var sortedByAge = [];
var oldestLivingParent = false;
var isDead = function(p) {
return !person.age;
};
var isParent = function(p) {
return !!livingParent[p.name];
};
#goto the node website
#click download
#click the source download
#go to the director you downloaded the source to
tar -xzvf <the node tar.gz you downloaded>
cd <node directory>
./configure --prefix=~/.node
make && make install
#add the following to your .bashrc or .profile
casper.test.begin('check if url is your blog', 1, function suite(test){
casper.start('http://personal-blog-site.herokuapp.com/', function(){
this.echo(this.getHTML('.nav h1'));
});
casper.then(function(){
test.assertTextExists('my blog', 'it is in fact, your blog');
});
casper.run(function(){
casper.test.begin("Testing if node express app", 2, function suite(test) {
casper.start('http://localhost:3000', function() {
test.assertHttpStatus(200);
});
casper.then(function() {
if (this.fetchText('.daysLeft' > 0)) {
this.echo("more than 0 days left");
}
this.echo("Days left: " + this.fetchText('.daysLeft'));
//var reverse = require('../app/reverse');
var pal = require('../app/pal');
var expect = require('chai').expect;
describe('palindrome', function() {
it('it is a palindrome', function() {
expect(pal('racecar')).to.be.true;
});
});
{
"globals": {
"describe" : false,
"it" : false,
"to" : false,
"ok" : false,
"be" : false,
"before" : false,
"beforeEach" : false,
"after" : false,
controllers.controller('MainCtrl', function($scope, $location, Facebook, $rootScope, $http, $location, Upload, Auth, User, Question, Category, Serie, Record, Location, Popup, Process, Card, Question) {
$scope.$on('authLoaded', function() {
$scope.isExpert($scope.main.serieId);
$scope.isMember($scope.main.serieId);
});
$scope.loadAuth = function() {
Auth.load().success(function(data) {
$scope.main.user = data.user;
$scope.$broadcast("authLoaded");

Set up your computer with the following tools:

Latest version of Ruby (for Sass, and other tools) Node.js, PostgreSQL, MongoDB, Redis,

Editors: We use Atom.io or Sublime Text 3 in class, and I'm betting you already do too (unless you rock Vim or Emacs). It has a fully-featured, unlimited time Trial mode.

Optional: if you are coming from an IDE like Visual Studio or Eclipse, you may like WebStorm (trial version) better

Set up your computer with the following tools:

Latest version of Ruby (for Sass, and other tools) Node.js, PostgreSQL, MongoDB, Redis,

Editors: We use Atom.io or Sublime Text 3 in class, and I'm betting you already do too (unless you rock Vim or Emacs). It has a fully-featured, unlimited time Trial mode.

Optional: if you are coming from an IDE like Visual Studio or Eclipse, you may like WebStorm (trial version) better

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software