Skip to content

Instantly share code, notes, and snippets.

@sweikenb
sweikenb / iban_check.php
Created April 8, 2014 06:26
iban validator function
<?php
$iban = "DE89 3704 0044 0532 0130 00";
function getValidIban($iban)
{
// normalize
$iban = str_replace(array(' ', '-', '.', ','), '', strtoupper($iban));
// define the pattern
@sweikenb
sweikenb / install_ramcache.sh
Last active December 22, 2015 22:19
Speedup your symfony2 vagrant box by mounting the app/cache folder into the ram of the vm (run this script as root!)
#!/bin/sh
# create mount point
if [ ! -d /ram ]
then
mkdir /ram
fi
# create ramfs
mount -t ramfs -o size=512M ramfs /ram/