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
var webpack = require('webpack'); | |
var path = require('path'); | |
module.exports = { | |
devtool: process.env.NODE_ENV !== 'production' ? 'eval' : null, | |
entry: [ | |
'babel-polyfill', | |
'./app/app.jsx' | |
], | |
output: { |
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
- Installare npmo (vedi mail su wyscout.com con istruzioni) | |
- Registro il client: | |
npm login --registry=http://arrested-developer.com:8080 --scope=wyscout | |
utente github (goffreder - GitHub password - goffreder@gmail.com) | |
- Creo pacchetto da pubblicare | |
{ | |
"name": "@wyscout/test-npm", | |
"version": "1.0.1", | |
"description": "A npm test package", |
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 | |
}, |
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
# 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
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
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
// ==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); | |
} |
NewerOlder