afelicioni
afelicioni
Reputation Top 1%
Alessio Felicioni
http://www.alessiofelicioni.it/
23 Snippets  (31st place)
Published
2 Channels
Created
3 Channels
Following
546 points  (63rd place)
Reputation
Top 5% Publisher
Junior Code Generator
Senior Code Generator
Junior Topic Creator
Junior Popular Coder
Senior Popular Coder
Junior Autobiographer
Senior Autobiographer
Senior Famous Coder
Senior Wise Coder

Recent Snippets See all snippets by afelicioni

public by afelicioni  4656  3  3  1

xpath attribute with regexp (xpath2)

xpath attribute with regexp (xpath2): gistfile1.txt
//a[matches(@href, '^php-\d+')]

;

public by afelicioni  7084  1  3  1

iptables port redirect

iptables port redirect: iptables
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080

;

public by Alessio Felicioni  2599  2  3  0

custom validation email input message

custom validation email input message: meh.js
[].forEach.call( document.querySelectorAll('[type="email"]'), function(emailElement) {
    emailElement.addEventListener('invalid', function() {
        var message = this.value + 'is not a valid email address';
        emailElement.setCustomValidity(message)
    }, false);

    emailElement.addEventListener('input', function() {
        try{emailElement.setCustomValidity('')}catch(e){}
    }, false);
    });

;

public by afelicioni  3733  0  3  0

IIS woff2 mime fix

IIS woff2 mime fix: web.config
<staticContent>
<remove fileExtension=".woff" />
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff" mimeType="application/font-woff" />
<mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
</staticContent>

;

public by Alessio Felicioni  30115  1  3  1

Setup Zmodem rz sz commands on Ubuntu

Setup Zmodem rz sz commands on Ubuntu: meh.sh
apt-get install lrzsz

;