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 | |
function arrayToSql($array=array(),$pre='',$post='',$xor='&&') | |
{ | |
$end = end(array_keys($array)); | |
$sql = $pre; | |
foreach($array as $k =>$v){ | |
$sql .= "`$k` = '$v' "; | |
if($k != $end){ | |
$sql .= "$xor "; |
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 | |
$max_timeout = 600; | |
$start = time(); | |
register_shutdown_function('shutdown',$start); | |
for(;;) | |
{ | |
$finish = time(); |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrant on AWS | |
# Jason Clark | |
# This sample sets up 1 VM ('delta') with erlang, and apache installed. | |
# Adjustable settings | |
CFG_TZ = "US/Pacific" # timezone, like US/Pacific, US/Eastern, UTC, Europe/Warsaw, etc. |
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 | |
# | |
#This is a pre commit hook for Chicage Boss | |
erl -eval 'erlang:display(erlang:system_info(otp_release)), halt().' -noshell | sed "s/\"*//g" > .preferred_otp_version | |
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/bash | |
DESTINATION_HELP='-p project_destination_path' | |
PROJECT_HELP='-r Resets the Project dir' | |
CWD=$(pwd) | |
function help() | |
{ | |
echo "" | |
echo "Opencart Plugin Installer by Jason Clark <[email protected]>" |
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/bash | |
### get version | |
VER=$(cat src/*.app.src | grep -Po 'appver."[0-9]*\.[0-9]*\.[0-9]"' | grep -Po '[0-9]*\.[0-9]*\.[0-9]') | |
VER_ARRAY=(`echo $VER | tr "." "\n"`) | |
echo "Type of Release: Maj(j), Min(m), Patch(p) (blank skips release tag)" | |
read type | |
if ["$type" == "j"] | |
then |
NewerOlder