Leonardo Dutra LeoDutra

View mcx-inject.js
1 2 3 4 5 6 7 8 9 10
// ==UserScript==
// @include https://mcxnow.com/*
// ==/UserScript==
// reminders:
// http://www.texelate.co.uk/blog/jquery-whats-the-difference-between-height-innerheight-and-outerheight/
// https://developer.mozilla.org/en-US/docs/Web/API/Element.scrollHeight (scrollHeight includes only padding)
// optimizations:
// http://jsperf.com/array-constructor-vs-literal-modalities/6
// http://jsperf.com/number-vs-parseint-vs-plus/23
// append once elements is better cause of browser redraw
View start or kill programs script.bat
1 2 3 4 5 6 7 8 9
@ECHO OFF
 
:: start.bat -----------------------------
 
C:\mining\Win64_all_Improved\Win64_all_Improved\minerd -a quark --url stratum+tcp://mine1.coinmine.pl:6010 -u User.Worker -p Workerpassword
 
:: kill.bat ------------------------------
 
taskkill /F /IM "Minerd.exe"
View Liberal Regex Pattern for All URLs
1 2 3 4 5 6 7 8 9
The regex patterns in this gist are intended to match any URLs,
including "mailto:foo@example.com", "x-whatever://foo", etc. For a
pattern that attempts only to match web URLs (http, https), see:
https://gist.github.com/gruber/8891611
 
 
# Single-line version of pattern:
 
(?i)\b((?:[a-z][\w-]+:(?:/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))
View Liberal Regex Pattern for Web URLs
1 2 3 4 5 6 7 8
The regex patterns in this gist are intended only to match web URLs -- http,
https, and naked domains like "example.com". For a pattern that attempts to
match all URLs, regardless of protocol, see: https://gist.github.com/gruber/249502
 
 
# Single-line version:
 
(?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|s
View fixDepthChartUpdate.js
1 2 3 4 5 6 7 8 9 10
function updateOrderBook(data) {
exchange_data = data;
 
$("#numusers").text($(data).find("users").text() + " people online");
 
var n = 0;
$(data).find("tabprice").find("p").each(function () {
var t = $(this).text();
if (tabprices[n] != t) {
if (tabprices[n].length > 0) {
View pocket.js
1 2 3 4 5 6 7 8 9 10
pocket = (function() {
 
return {
view: {
extractLinks: function() {
var res = [];
 
$('.item').each(function() {
var $this = $(this);
res.push({title: $this.find('.title').text(), url: unescape($this.find('.original_url').attr('href')) });
View jquery-togglers.js
1 2 3 4 5 6 7 8 9 10
(function liveTogglers() {
 
var STATE_CLASS = 'clicked';
 
function fire(targets, fn) {
if (targets) {
$.each(targets.split(/\s*[,;|]\s*/), function(i, target) { // iterates on each target
fn.call($('#' +target));
});
}
View removeDiacritics.js
1 2 3 4 5 6 7 8 9 10
// SOURCE: http://stackoverflow.com/a/5912746/1260526
 
removeDiacritics = (function(window) {
 
var defaultDiacriticsRemovalMap = [
{'base':'A', 'letters':/[\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/g},
{'base':'AA','letters':/[\uA732]/g},
{'base':'AE','letters':/[\u00C6\u01FC\u01E2]/g},
{'base':'AO','letters':/[\uA734]/g},
{'base':'AU','letters':/[\uA736]/g},
View iframe-transparent.html
1
<iframe seamless="seamless" frameborder="0" border="0" allowtransparency="true" src=""></iframe>
View overflow-fix.css
1 2 3 4 5 6 7 8 9 10
/* http://css-tricks.com/the-css-overflow-property/ */
 
.scroll-x {
overflow-x: auto;
-ms-overflow-x: auto;
}
.scroll-y {
overflow-y: auto;
-ms-overflow-y: auto;
}
Something went wrong with that request. Please try again.