Events
On
var object = {};
_.extend(object, Backbone.Events);
var en = function(name){
console.log('hello '+name);
}
#!/bin/bash | |
# Find all boxes which have updates | |
AVAILABLE_UPDATES=`vagrant box outdated --global | grep outdated | tr -d "*'" | cut -d ' ' -f 2` | |
if [ $AVAILABLE_UPDATES ]; then | |
for box in $AVAILABLE_UPDATES ; do | |
echo "Found an update for $box" |
var object = {};
_.extend(object, Backbone.Events);
var en = function(name){
console.log('hello '+name);
}
I place my learning process in this document with 2 motives:
#!/bin/sh | |
# size of swapfile in megabytes | |
swapsize=4000 | |
# does the swap file already exist? | |
grep -q "swapfile" /etc/fstab | |
# if not then create it | |
if [ $? -ne 0 ]; then |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure(2) do |config| | |
# The most common configuration options are documented and commented below. | |
# For a complete reference, please see the online documentation at |
I'm learning rails, again, from scratch. I come from php and node environments.
I'm running a Vagrant machine with Ubuntu 14.04 64bits. In order to have the env ready for installing rails. We need to install some linux libraries.
var sb = require('sb');
sb.connect('company', 'token').then(function(wrapper){
});
"use strict"; | |
//natural numbers. | |
function* naturalNumbers(){ | |
var n = 1; | |
while (true){ | |
yield n++; | |
} | |
} |
//algoritmo de la gente normal que busca películas en internet | |
if (pelicula.release_date>(now.substract("2 months") ) ) { | |
download.from("thepiratebay") | |
} | |
else { | |
if (pelicula.is.in("netflix")) { | |
watch.it.in("netflix") | |
} | |
else { | |
download.from("thepiratebay") |
# Store data in /usr/local/var/mongodb instead of the default /data/db | |
storage: | |
dbPath: "/usr/local/var/mongodb" | |
journal: | |
enabled: false | |
# Append logs to /usr/local/var/log/mongodb/mongo.log | |
systemLog: | |
destination: file |