- Install ffmpeg using homebrew:
brew install ffmpeg
- convert the file:
brew install ffmpeg
<?php | |
$a = '+94715753168'; | |
$b = '0715753168'; | |
$c = '715753168'; | |
$d = '0094715753168'; | |
$e = '094-71-5-753-168'; | |
is_lk_mobile($a); //true | |
is_lk_mobile($b); //true | |
is_lk_mobile($c); //true |
<?php | |
$valid = '64-8681'; // BAC-1488 | |
$invalid = '00-8681'; // A1C-3422 | |
$re = '/^([a-zA-Z]{1,3}|((?!0*-)[0-9]{1,3}))-[0-9]{4}(?<!0{4})/m'; | |
echo preg_match($re, $valid); //true |
(ns fileupload.core | |
(:use [net.cgrand.enlive-html | |
:only [deftemplate defsnippet content clone-for | |
nth-of-type first-child do-> set-attr sniptest at emit*]] | |
[compojure.core] | |
[ring.adapter.jetty]) | |
(:require (compojure [route :as route]) | |
(ring.util [response :as response]) | |
(ring.middleware [multipart-params :as mp]) | |
(clojure.contrib [duck-streams :as ds])) |
#!/bin/sh | |
# | |
# chmodr.sh | |
# | |
# author: Francis Byrne | |
# date: 2011/02/12 | |
# | |
# Generic Script for recursively setting permissions for directories and files | |
# to defined or default permissions using chmod. | |
# |
<?php | |
$api_token = 'slack-api-token'; | |
if ( file_exists( 'users.json' ) ) { | |
$api_users = file_get_contents( 'users.json' ); | |
} else { | |
$api_users = file_get_contents( 'https://slack.com/api/users.list?token=' . $api_token ); | |
if ( false === $api_users ) { |
(ns webstore.simplecart_parser | |
(:require [clojure.string :as string])) | |
;; see github.com/sventech/simplecart-js for tax calculation improvement fork | |
(def input-params | |
{"item_quantity_1" "1", | |
"itemCount" "2", | |
"item_price_1" "9.99", | |
"store_name" "Online Store", | |
"item_name_1" "Awesome Product - MP3", |
#!/usr/bin/perl | |
#run as a super user | |
if (!@ARGV){ | |
print 'usage example: #vhosts testing.localsitename.com /var/www/html/site_folder_name username' ."\n"; | |
exit(0); | |
} | |
$url = $ARGV[0]; |
use Tie::File; | |
use IO::Handle; | |
tie @SQL_FILE, 'Tie::File' , "localhost.sql" or die $!; | |
mkdir('output'); | |
STDOUT->printflush("Processing"); | |
for $lineNum (1 .. $#SQL_FILE){ | |
if($SQL_FILE[$lineNum] =~ /\-\- Database: `(.*)`/){ |