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 |
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/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
# -*- 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
<?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
<?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
#!/usr/bin/php -q | |
<?php | |
### This will convert your mysql schema to chicago boss base app, create models, controllers, and views based on the schema | |
### place under the app root ex /appname/mysqlitoboss.php | |
### run from cli ex./mysqlitoboss.php or php -f mysqlitoboss.php | |
/* Define STDIN in case if it is not already defined by PHP for some reason */ |
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 | |
# A simple script to backup an organization's GitHub repositories. | |
GHBU_BACKUP_DIR=${GHBU_BACKUP_DIR-"github-backups"} # where to place the backup files | |
GHBU_ORG=${GHBU_ORG-"<CHANGE-ME>"} # the GitHub organization whose repos will be backed up | |
GHBU_API=${GHBU_API-"https://api.github.com"} # base URI for the GitHub API | |
GHBU_GITHOST=${GHBU_GITHOST-"<CHANGE-ME>.github.com"} # the GitHub hostname (see comments) | |
# I recommend using an API token so it is easily trackable and removable. | |
# Note that you MUST have SSH keys for a user with the access to all repos set up |
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 | |
while sleep 55 | |
do | |
players_list=$(gdbus call --session --dest org.freedesktop.DBus \ | |
--object-path / --method org.freedesktop.DBus.ListNames | \ | |
awk 'BEGIN { RS=","; } /org.mpris.MediaPlayer2./ { gsub(/[\[\]()\x27]/, ""); print $1; }') | |
for player in $players_list | |
do | |
state=$(gdbus call --session \ |
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 -e | |
# -e means exit if any command fails | |
DBHOST=address.to.your.server | |
DBUSER=username | |
DBPASS=password # do this in a more secure fashion | |
DBNAME=DBNAME | |
GITREPO=/where/is/your/repo | |
DUMP=$GITREPO/where/you/store/dumps | |
NEW=$DUMP/schema.sql | |
OLD=$NEW.old |
OlderNewer