baumi's blog

baumi's personal blog … Linux, OS X, Windows, Random things, …

August, 2016

RegEx für UID Plausibilitätsprüfung (EU VAT # Regex)

Kompakt: /^((AT)?U[0-9]{8}|(BE)?0[0-9]{9}|(BG)?[0-9]{9,10}|(CY)?[0-9]{8}L|(CZ)?[0-9]{8,10}|(DE)?[0-9]{9}|(DK)?[0-9]{8}|(EE)?[0-9]{9}|(EL|GR)?[0-9]{9}|(ES)?[0-9A-Z][0-9]{7}[0-9A-Z]|(FI)?[0-9]{8}|(FR)?[0-9A-Z]{2}[0-9]{9}|(GB)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3})|(HU)?[0-9]{8}|(IE)?[0-9]S[0-9]{5}L|(IT)?[0-9]{11}|(LT)?([0-9]{9}|[0-9]{12})|(LU)?[0-9]{8}|(LV)?[0-9]{11}|(MT)?[0-9]{8}|(NL)?[0-9]{9}B[0-9]{2}|(PL)?[0-9]{10}|(PT)?[0-9]{9}|(RO)?[0-9]{2,10}|(SE)?[0-9]{12}|(SI)?[0-9]{8}|(SK)?[0-9]{10})$/ Lang: ^( (AT)?U[0-9]{8} | # Austria (BE)?0[0-9]{9} | # Belgium (BG)?[0-9]{9,10} | # Bulgaria (CY)?[0-9]{8}L | # Cyprus (CZ)?[0-9]{8,10} | # Czech Republic (DE)?[0-9]{9} | # Germany (DK)?[0-9]{8} | # Denmark (EE)?[0-9]{9} | # Estonia (EL|GR)?[0-9]{9} | # Greece (ES)?[0-9A-Z][0-9]{7}[0-9A-Z] | # Spain (FI)?[0-9]{8} | # Finland (FR)?[0-9A-Z]{2}[0-9]{9} | # France (GB)?([0-9]{9}([0-9]{3})?|[A-Z]{2}[0-9]{3}) | […]

Magento / PayPal IPN: what to do if paypal IPN occasionally isn’t working? – plan B

Occasionally, and with different kinds of webshop technologies it happens once in a while that the PayPal IPN (instant payment notification) doesn’t go through. Internet forums are filled with different reports about this phenomenon, too. – What happens? Basically a customer paid, payment went through, but the webshop doesn’t receive the IPN payment notification from […]

xvkbd (Danke Wolfgang!)

Früher hatte ich dafür ein Widget für KDE, aber für KDE 5 gibts das nicht mehr. Ich wollte per Mausklick einen Text (zB Passwörter) an die aktuelle Mausposition einfügen können. Das geht ganz einfach (nach 1-2 Stunden Suche nach einer Lösung gestern Abend) mit: xvkbd -text ‘Inhalt’ (xvkbd muss natürlich installiert sein) Bei mir schaut […]