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
#!/usr/bin/bash | |
if [ -z $1 ]; then | |
echo "Container name is empty" | |
exit -1 | |
fi | |
if [ -z "$2" ]; then | |
echo "Message is empty" | |
exit -1 |
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
'use strict'; | |
/** | |
* @param {string} behavior | |
*/ | |
Behavior = Class.extend({ | |
init: function (behavior) { | |
this.super(); | |
Object.defineProperty(this, "Behavior:" + behavior, { |
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
function replace_regexp() { | |
local result=$1 | |
local text=$2 | |
shift | |
shift | |
while [[ $# -gt 0 ]]; do | |
text=$(echo $text | sed -E "s/$1/$2/g") | |
shift | |
shift | |
done |
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 | |
//NOTE: For use the Logger function copy these two lines to your code and fill $LOGGER_VARIABLES array by your variables | |
/* | |
$LOGGER_VARIABLES = []; | |
LOGGER(__FILE__, __METHOD__, __LINE__, function () use ($LOGGER_VARIABLES) {var_dump($LOGGER_VARIABLES);}); | |
*/ | |
//NOTE: PHP error reporter | |
//error_reporting(E_ALL); | |
error_reporting(E_ALL ^ E_STRICT); |
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 import($caller_file, $package, $script) { | |
require_once(realpath(dirname($caller_file) . "/" . $package . "/" . $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
import sys | |
import time | |
for i in range(0, 101): | |
sys.stdout.write("Progress: %d%% \r" % i) | |
sys.stdout.flush() | |
time.sleep(0.05) | |
pass | |
sys.stdout.write("\r\n") |