// jQuery
$(document).ready(function() {
// code
})
This file contains hidden or 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
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: `(.*)`/){ |
This file contains hidden or 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
#!/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]; |
This file contains hidden or 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
(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", |
This file contains hidden or 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 | |
$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 ) { |
This file contains hidden or 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
#!/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. | |
# |
This file contains hidden or 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
(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])) |
This file contains hidden or 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 | |
$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 |
This file contains hidden or 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 | |
$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 |
- Install ffmpeg using homebrew:
brew install ffmpeg
- convert the file:
OlderNewer