View nodejs-config-ubuntu-14.04.sh
1 2 3 4 5 6 7 8 9 10
# INSTALL PACKAGES FOR NODEJS I LIKE
 
sudo -i
 
echo "Installing NodeJS Packages!"
 
npm config set loglevel=http
 
npm config set proxy=http://10.2.97.200:8080
npm config set https-proxy=http://10.2.97.200:8080
View leo's-ubuntu-14.04-fist-run.sh
1 2 3 4 5 6 7 8 9
# RUN "SUDO SU" FIRST
sudo -i
 
# SET CHROME KEY + REPOS
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
 
# SET NODEJS REPO + DEPS
apt-get install -y curl
curl -sL https://deb.nodesource.com/setup | bash -
View data-fill-till-bottom.js
1 2 3 4 5 6 7 8
// RECOMENDAVEL UTILIZAR $().ready JA EXISTENTE
 
$(document).ready(function() {
 
var $filler = $('[data-fill-till-bottom]');
$filler.height($(window).height() - $filler.offset().top);
 
});
View utils.logging to log4j level map.txt
1 2 3 4 5 6
FINEST -> TRACE
FINER -> DEBUG
FINE -> DEBUG
INFO -> INFO
WARNING -> WARN
SEVERE -> ERROR
View delete-stuff.bat
1 2 3 4 5 6 7 8 9
@echo off
 
set foldername=%1
 
:: Remove files before removing their folders. It's faster
DEL /F /Q /S %foldername%\*
 
:: "RD" is much more fast than "RMDIR"
for /D %%i in ("%foldername%\*") do RD /S /Q "%%i"
View supports-post-object.js
1 2 3 4 5 6 7 8 9 10
var supportsPostObject = false;
 
(function(win){
 
if (window.postMessage) {
var oldIE = false;
var callback = function(e) {
supportsPostObject = typeof(e.data) !== 'string';
View extends.js
1 2 3 4 5 6 7 8 9 10
function EXTENDS(super_, extension) {
var obj = function() {};
var proto = obj.prototype = new super_();
proto.super = function() {
super_.apply(this, arguments);
};
for (var prop in extension) {
View clean-was.bat
1 2 3 4 5 6 7 8 9 10
@echo off
call :deleta "C:\WebsphereProfiles\temp"
call :deleta "C:\WebsphereProfiles\wstemp"
call :deleta "C:\IBM\SDP\runtimes\base_v7\profiles\AppSrv02\config\temp"
call :deleta "C:\IBM\SDP\runtimes\base_v7\profiles\AppSrv02\temp"
call :deleta "C:\IBM\SDP\runtimes\base_v7\profiles\AppSrv02\wstemp"
 
call "C:\IBM\SDP\eclipse.exe" -product com.ibm.rational.rad.product.v75.ide -clean
 
goto :eof
View css-selector-perf.js
1 2 3 4 5 6 7 8 9 10
function selectorPerf(a, b, times, bypassJQuery) {
 
var i, t, k = times || 10000, res;
var $ = (!bypassJQuery) && window.jQuery || function(selector) { return document.querySelectorAll(selector); };
 
i = k
t = Date.now();
while(i--) res = $(a);
t = Date.now() - t;
View bitwise-hacks.js
1 2 3 4 5 6 7 8 9 10
// http://michalbe.blogspot.com.br/2013/03/javascript-less-known-parts-bitwise.html
// http://jsperf.com/bitwise-vs-math-object
// http://united-coders.com/christian-harms/results-for-game-for-forfeits-and-the-winner-is/
// https://mudcu.be/journal/2011/11/bitwise-gems-and-other-optimizations/
// https://dreaminginjavascript.wordpress.com/2009/02/09/bitwise-byte-foolish/
// http://jsperf.com/math-min-max-vs-ternary-vs-if/24
 
"use strict";
 
var PI = Math.PI;
Something went wrong with that request. Please try again.