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
| #Parameter ${1} is the directory you want to effect like /www/zendsvr/htdocs/ or /www/zendsvr/writeable/uploads | |
| function http-permissions() { | |
| system -i "CHGAUT OBJ('${1}') USER(NOGROUP) DTAAUT(*RX) OBJAUT(*NONE) SUBTREE(*ALL)" | |
| system -i "CHGPGP OBJ('${1}') NEWPGP(NOGROUP) RVKOLDAUT(*NO) SUBTREE(*ALL)" | |
| #Usage: on the command line | |
| #http-permissions /www/zendsvr/htdocs/ | |
| #/www/zendsvr/htdocs/ will be given permissions recursively to the apache group | |
| } | |
| function http-write-permissions() { |
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
| # learn what php-cli is doing | |
| cat /usr/local/zendsvr/bin/php-cli | |
| # learn what configuration values are set | |
| cat /etc/zce.rc | |
| # learn what extensions are enabled in php.ini | |
| cat /usr/local/zendsvr/etc/php.ini | grep extension | |
| # see extensions included | |
| /usr/local/zendsvr/bin/php-cli -r "phpinfo();" | grep conf.d | |
| # things you should probably create for setting up php-cli specific configuration |
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
| #!/QOpenSys/usr/bin/bash | |
| echo “Your running MyShellScript” | |
| #use shell utilities | |
| if test -d mydir; | |
| then | |
| echo "true"; | |
| else | |
| echo "false"; | |
| fi |
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
| CREATE OR REPLACE PROCEDURE modify_department_transaction ( | |
| -- Required parameters | |
| IN p_trns_type SMALLINT, | |
| IN p_deptno CHAR(3), | |
| -- Optional parameters | |
| IN p_when_Changed TIMESTAMP DEFAULT NULL, | |
| IN p_deptname VARCHAR(36) DEFAULT NULL, | |
| IN p_mgrno CHAR(6) DEFAULT '*NOCHG', | |
| IN p_location CHAR(16) DEFAULT '*NOCHANGE', |
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
| CREATE PROCEDURE MYLIB.KILLJOBSGIVENFILE ( ) | |
| LANGUAGE SQL | |
| SPECIFIC MYLIB.KILLJOBSSP | |
| BEGIN | |
| --Variable to control loop | |
| DECLARE END_TABLE INT DEFAULT 0; | |
| --If there's no record update END_TABLE to 1 to end the loop | |
| DECLARE CONTINUE HANDLER FOR NOT FOUND | |
| SET END_TABLE = 1; |
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 | |
| $sql="SELECT | |
| CAST(1 as smallint) as smallint, | |
| CAST(2 as INTEGER) as INTEGER, | |
| CAST(3 as BIGINT) as BIGINT, | |
| CAST(4. as real) as real, | |
| CAST(5.1 as FLOAT) as FLOAT, | |
| CAST(6.1 as DOUBLE) as DOUBLE, | |
| CAST(7.1 as DECIMAL) as DECIMAL, | |
| CAST(8.1 as NUMERIC) as NUMERIC, |
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 | |
| /*before this is all your code that is doing things to the browser and perhaps submitting some data via ajax*/ | |
| //Lets make the webdriver wait for the ajax call | |
| $webdriverWait = new WebDriverWait($driver, 10); | |
| $webdriverWait->until( | |
| //pass in our closure | |
| function($driver) | |
| { | |
| echo 'loop...'; | |
| try |
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
| #Setup FireFox on Amazon Linux | |
| curl -X GET -o RPM-GPG-KEY-lambda-epll https://lambda-linux.io/RPM-GPG-KEY-lambda-epll | |
| sudo rpm --import RPM-GPG-KEY-lambda-epll | |
| curl -X GET -o epll-release-2015.09-1.1.ll1.noarch.rpm https://lambda-linux.io/epll-release-2015.09-1.1.ll1.noarch.rpm | |
| sudo yum -y install epll-release-2015.09-1.1.ll1.noarch.rpm | |
| sudo yum --enablerepo=epll install firefox-compat | |
| wget -O firefox-latest.tar.bz2 "https://download.mozilla.org/?product=firefox-latest&os=linux64&lang=en-US" | |
| bzcat firefox-latest.tar.bz2 | tar xvf - | |
| #setup Xvfb - X virtual framebuffer is a display server implementing the X11 display server protocol |
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
| find /var/www/html/www.example.com/ -name "*.php" -print | xargs sed -i 's/dev.example.com/www.example.com/g' |