If you installed Node directly using Homebrew, then uninstall it by running:
brew uninstall node
Now, clean up the rest:
// require: $ npm install --save-dev del | |
var gulp = require('gulp'); | |
var elixir = require('laravel-elixir'); | |
var del = require('del'); | |
elixir.extend("remove", function(path) { | |
gulp.task("remove", function() { | |
del(path); | |
}); |
require('font-awesome/css/font-awesome.css'); | |
document.body.innerHTML = '<i class="fa fa-fw fa-question"></i>'; |
CREATE TABLE `paises` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`iso` char(2) DEFAULT NULL, | |
`nombre` varchar(80) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; | |
INSERT INTO `paises` VALUES(1, 'AF', 'Afganistán'); | |
INSERT INTO `paises` VALUES(2, 'AX', 'Islas Gland'); | |
INSERT INTO `paises` VALUES(3, 'AL', 'Albania'); |
<script> | |
var timeoutID; | |
function setup() { | |
this.addEventListener("mousemove", resetTimer, false); | |
this.addEventListener("mousedown", resetTimer, false); | |
this.addEventListener("keypress", resetTimer, false); | |
this.addEventListener("DOMMouseScroll", resetTimer, false); | |
this.addEventListener("mousewheel", resetTimer, false); | |
this.addEventListener("touchmove", resetTimer, false); |
import {Injectable, EventEmitter} from 'angular2/core'; | |
@Injectable() | |
export class EmitterService { | |
private static _emitters: { [ID: string]: EventEmitter<any> } = {}; | |
static get(ID: string): EventEmitter<any> { | |
if (!this._emitters[ID]) | |
this._emitters[ID] = new EventEmitter(); | |
return this._emitters[ID]; |
// Get element offset from top of page | |
function getOffset(el) { | |
el = el.getBoundingClientRect(); | |
return { | |
left: el.left + window.scrollX, | |
top: el.top + window.scrollY | |
}; | |
}; |
// Returns black or white foreground color depending on the background | |
var textColor = function (backgroundColor) { | |
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(backgroundColor); | |
if (!result) { | |
return '#000000';//Happens when not given hex | |
} | |
var shade = (parseInt(result[1], 16) + parseInt(result[2], 16) + parseInt(result[3], 16)) / 3; | |
return shade > 128 ? '#000000' : '#FFFFFF'; | |
} |