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
<?php | |
function isIban($iban, $reformat = true, $countryCode=null, $printErrors=false) { | |
$str = $iban; | |
if(!empty($str)){ | |
if($reformat){ | |
$str = preg_replace('/[\W_]+/', '', strtoupper($str) ); | |
} | |
$errors = array(); | |
if( 4 > strlen($str) || strlen($str) > 34 ){ | |
$errors[] = 'Invalid string length'; |
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
<?php | |
//UTILITY TO CONSOLE LOG DEBUG OUTPUT | |
function console_log($data, $table = 0) { | |
$verb = $table ? 'table' : 'log'; | |
if(is_array($data) || is_object($data)) { | |
echo "<script>console.".$verb."(".json_encode($data).");</script>" ; | |
} else { | |
echo "<script>console.".$verb."(".$data.");</script>" ; | |
} | |
} |
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
sudo /usr/local/mysql/support-files/mysql.server start |
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
/* | |
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js | |
*/ | |
var http = require('http'), | |
fs = require('fs'), | |
util = require('util'); | |
http.createServer(function (req, res) { | |
var path = 'video.mp4'; |
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
<!DOCTYPE html> | |
<html class="no-js"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="css/bootstrap.css"> | |
<link rel="stylesheet" href="css/main.css"> |
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
<?php | |
$mime = array( | |
"323" => "text/h323", | |
"acx" => "application/internet-property-stream", | |
"ai" => "application/postscript", | |
"aif" => "audio/x-aiff", | |
"aifc" => "audio/x-aiff", | |
"aiff" => "audio/x-aiff", | |
"asf" => "video/x-ms-asf", | |
"asr" => "video/x-ms-asf", |
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
DELIMITER $$ | |
CREATE DEFINER=`root`@`localhost` FUNCTION `jaro_winkler_similarity`( | |
in1 varchar(255), | |
in2 varchar(255) | |
) RETURNS float | |
DETERMINISTIC | |
BEGIN | |
#finestra:= search window, curString:= scanning cursor for the original string, curSub:= scanning cursor for the compared string | |
declare finestra, curString, curSub, maxSub, trasposizioni, prefixlen, maxPrefix int; |
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
-- phpMyAdmin SQL Dump | |
-- version 2.6.0-pl3 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generato il: 18 Apr, 2007 at 04:00 PM | |
-- Versione MySQL: 3.23.58 | |
-- Versione PHP: 4.3.11 | |
-- | |
-- Database: `test` |
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
-- phpMyAdmin SQL Dump | |
-- version 2.6.0-pl3 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generato il: 18 Apr, 2007 at 04:00 PM | |
-- Versione MySQL: 3.23.58 | |
-- Versione PHP: 4.3.11 | |
-- | |
-- Database: `test` |
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
-- phpMyAdmin SQL Dump | |
-- version 2.6.0-pl3 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generato il: 18 Apr, 2007 at 04:00 PM | |
-- Versione MySQL: 3.23.58 | |
-- Versione PHP: 4.3.11 | |
-- | |
-- Database: `test` |