Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@royriojas
royriojas / index.js
Last active August 29, 2015 14:24
requirebin sketch
var $ = require('jquery');
$(function () {
var React = require('react/addons');
var throttle = require('throttly');
var rand = function rand() {
var min, max,
args = arguments;
//if only one argument is provided we are expecting to have a value between 0 and max
@royriojas
royriojas / index.js
Created July 28, 2015 06:48
requirebin sketch
var data = window.jsonData;
var $ = require('jquery');
var React = require('react/addons');
var throttle = require('throttly');
var rand = function rand() {
var min, max,
args = arguments;
//if only one argument is provided we are expecting to have a value between 0 and max
if ( args.length === 1 ) {
max = args[ 0 ];
@royriojas
royriojas / index.js
Created August 15, 2015 08:18
requirebin sketch
var Tap = require( 'tap.js' );
var $ = require( 'jquery' );
var tap = new Tap( document );
require( 'document-register-element/build/document-register-element.js' );
//var escape = require('escape-html');
var btn = document.querySelector( 'button' );
btn.addEventListener( 'tap', function ( e ) {
console.log( 'tap, tap', e.target );
} )
@royriojas
royriojas / install-package.sh
Created August 18, 2015 22:34
Install package with npm from github using the tarball directly
npm i --save https://github.com/:username/:reponame/tarball/:branchname
# Via http://package.json.nodejitsu.com/
npm i
> chokidar@0.8.1 postinstall /Users/roy/tmp/eslint/node_modules/beefy/node_modules/chokidar
> node setup-deps.js
Executing npm install fsevents@0.1.6 recursive-readdir@0.0.2
npm WARN package.json chokidar@0.8.1 No license field.
../nodefsevents.cc:31:30: error: expected class name
class NodeFSEvents : node::ObjectWrap {
^
@royriojas
royriojas / simple-oop.js
Created September 16, 2012 01:25
OOP in javascript
;(function($) {
'use strict';
var Nexus = function() {};
Object._extend = function(child, parent) {
var base = Nexus.prototype = parent.prototype;
child.prototype = new Nexus();
@royriojas
royriojas / index.js
Created October 16, 2015 01:44
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var $ = require('jquery');
$(function () { $('body').append('<p>Hello world from app here!</p>'); })
@royriojas
royriojas / example.js
Created October 27, 2015 06:11
async/await example
function isValidEmail(email) {
return email.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/);
}
function getUserByEmail(email) {
return new Promise((resolve) => {
setTimeout(() => {
// keep rejections for exceptions only
if (email !== 'roy@someemail.com') {
return resolve(null);
/*
This assumes you have font-awesome properly included in your page to work
*/
.font-ico-props( ) {
font-family:FontAwesome;
font-style: normal;
font-weight: normal;
speak: none;
display: inline-block;

http://krigan.wordpress.com/2010/10/23/el-fin-de-los-derechos-de-autor/

Los 3 derechos clásicos de autor son el de reproducción (copia), el de distribución (de ejemplares tangibles), y el de comunicación pública (que ha acabado convertido en un dar acceso). En un mundo en el que todos pueden copiar legalmente, en el que ya no hay distribución, en el que dar acceso es algo trivial, la concepción tradicional de los derechos de autor ha perdido por completo su sentido. La única opción es sustituirlos por otra cosa, la tecnología ha acabado causando el fin de los actuales derechos de autor.