This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
names: ["php-search"], | |
author: {name: "Emanuele Biancardi", email: "goffreder@gmail.com"}, | |
license: "MPL,GPL", | |
description: "Searches in the PHP Documentation for the given function", | |
help: "Enter the php function to search for", | |
arguments: [ {role: 'object', nountype: noun_arb_text, label: 'search function'}], | |
icon: "http://static.php.net/www.php.net/favicon.ico", | |
preview: function php_search_preview(pblock,args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
names: ["filestube-search"], | |
author: {name: "Emanuele Biancardi", email: "goffreder@gmail.com"}, | |
license: "MPL,GPL", | |
description: "Searches for files on Filestube", | |
help: "Enter the file to search for", | |
arguments: [ {role: 'object', nountype: noun_arb_text, label: 'search file'}], | |
icon: "http://static.filestube.com/files/images/favicon.ico", | |
preview: function ft_search_preview(pblock,args) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CmdUtils.CreateCommand({ | |
names: ["scaruffi-search"], | |
author: {name: "Emanuele Biancardi", email: "goffreder@gmail.com"}, | |
license: "MPL,GPL", | |
description: "Searches for terms on Scaruffi.com", | |
help: "Enter the term to search for", | |
arguments: [ {role: 'object', nountype: noun_arb_text, label: 'search term'}], | |
preview: function ft_search_preview(pblock,args) { | |
var msg = "Searching for <b>" + args.object.text + "</b> on Scaruffi.com..."; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name TFP Forum Ads Remover | |
// @description Removes ads from TFP Forum | |
// @include http://www.tfpforum.it | |
// ==/UserScript== | |
var ads = document.getElementById('ads'); | |
if(ads) { | |
ads.parentNode.removeChild(ads); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Legenda: | |
RO = Rara Olografica | |
R = Rara | |
NC = Non Comune | |
C = Comune | |
WOTC = Wizards of the Coast edition | |
JP = Giapponese | |
P = Promo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Immutable collections (oggetti immutabili) | |
Si tratta di creare oggetti che non possono essere mutati. Esiste un'implementazione standard (Object.freeze()) ma ha alcuni problemi e non fornisce helpers. Esistono varie librerie. | |
Permettono di fare comodamente undo/redo salvando i vari stati (soprattutto se si sa che alcune parti non cambiano, è semplice mantenere gli stati facendo diff) [https://scott.mn/2014/04/27/why_immutable_collections/] | |
Separazione tra identità e valori (vedere Clojure [https://scott.mn/2014/01/20/reference_types_separate_identities_and_values/]) | |
Molto efficiente unione React + immutable (se opportunamente configurato si possono evitare alcuni re-render dell'applicazione, sapendo che a identità diverse corrispondono valori diversi) [http://swannodette.github.io/2013/12/17/the-future-of-javascript-mvcs/] (vedere benchmarks, Backbone [http://swannodette.github.io/todomvc/architecture-examples/backbone/index.html] vs Om (Clojure) [http://swannodette.github.io/todomvc/labs/architecture-example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rompere tasto back: | |
window.history.pushState(0, window.location.href); | |
window.onpopstate = function() { | |
window.history.pushState(0, window.location.href); | |
}; | |
- versione minificata (61 chars): | |
(onpopstate=Function('history.pushState(0,location.href)'))() | |
# Log stack trace in un punto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$('<div>').addClass('i-average-fund').insertBefore($('.i-progress-bar')); | |
$('<div>').addClass('i-ppl-needed').insertBefore($('.i-progress-bar')); | |
window.avgInterval = setInterval(function() { | |
var balanceTxt = $(".i-balance span span").text(); | |
var curr = balanceTxt[0]; | |
var balance = parseFloat($(".i-balance span span").text().replace(curr, '').replace(/,/g,'')); | |
var people = parseInt($(".i-raised-funders").text().replace(/,/g,'')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"parser": "babel-eslint", | |
"plugins": [ | |
"react", | |
"objects" | |
], | |
"env": { | |
"browser": true, | |
"node": true | |
}, |
OlderNewer