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
#get onto litmis | |
ssh [email protected] | |
#git ibmichroot project | |
git clone https://bitbucket.org/PHPDave/ibmichrootpulled1.22.2017 -c http.sslVerify=false | |
#switch to chroot project | |
cd ibmichrootpulled1.22.2017/pkg/ | |
#Create PHP Pkg with content attached to this gist | |
joe pkg_perzl_php-7.0.13.lst | |
#Install PHP rpms from Perzl | |
./pkg_setup.sh pkg_perzl_php-7.0.13.lst |
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
-- Get the libary list information | |
SELECT * FROM QSYS2.LIBRARY_LIST_INFO; | |
-- Get the jobd of the current user and the current user name | |
SELECT a.JOBD,CURRENT USER FROM QSYS2.USER_INFO a WHERE AUTHORIZATION_NAME = CURRENT USER; | |
-- Get Job log information | |
SELECT * FROM table(QSYS2.JOBLOG_INFO('*')) a; | |
-- Get Even more info from the Special Registers | |
SELECT CURRENT CLIENT_ACCTNG AS ACCOUNTINGSTRINGSPCREG, | |
CURRENT CLIENT_APPLNAME AS APPLICATIONNAMESPCREG, | |
CURRENT CLIENT_PROGRAMID AS CLIENTPROGRAMIDSPCREG, |
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
#WorkSpace | |
export GOPATH=$HOME/work | |
#Binaries produced by GO | |
export PATH=$PATH:$GOPATH/bin |
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
package main | |
import ( | |
"fmt" | |
"github.com/phpdave/string" | |
) | |
func main() { | |
fmt.Printf(string.Reverse("\nHello I'm writing some go code\n")) | |
} |
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
--TRANSDATE is Decimal(6,0) with no leading zero in MDDYY format in a 4 million record file | |
--i.e. 10199, 10116, 120816 | |
WITH TABLE_TRANSACTION_WITH_YYYYMMMD_DATE as | |
( | |
SELECT a.*, | |
CASE | |
WHEN SUBSTR(DIGITS(TRANSDATE),5,2)>70 THEN '19' || SUBSTR(DIGITS(TRANSDATE),5,2) || SUBSTR(DIGITS(TRANSDATE),1,4) | |
ELSE '20' || SUBSTR(DIGITS(TRANSDATE),5,2) || SUBSTR(DIGITS(TRANSDATE),1,4) | |
END AS TRANSDATEYYYYMMDD | |
FROM MYLIB.TRANSACTIONS a |
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
<? | |
$temp = tempnam(sys_get_temp_dir(), 'Prefix'); | |
//or | |
$temp = tmpfile(); | |
fwrite($temp, "Hello There!"); | |
fseek($temp, 0); | |
// or could do rewind($temp) | |
echo fread($temp, 1024); | |
fclose($temp); // this removes the file |
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
/* Creating view MYLIB.ACCOUNTVIEW */ | |
CREATE OR REPLACE VIEW MYLIB.ACCOUNTVIEW AS | |
SELECT | |
CMPNME AS COMPANY_NAME, | |
ADDR AS COMPANY_ADDRESS | |
FROM MYLIB.ACCTPF; | |
/* Setting system view name to ACCOUNTVIE for MYLIB.ACCOUNTVIEW */ | |
RENAME MYLIB.ACCOUNTVIEW TO SYSTEM NAME ACCOUNTVIE; |
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 customer | |
? curl -XPUT "localhost:9200/customer?pretty" | |
{ | |
"acknowledged" : true, | |
"shards_acknowledged" : true | |
} | |
#view indices | |
? curl "localhost:9200/_cat/indices?v" | |
health status index uuid pri rep docs.count docs.deleted store.size pri.store.size | |
yellow open customer RqYz-8QcSq-BrmMhbRDRQw 5 1 0 0 650b 650b |
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 SEQUENCE MYLIB.MYAUTO_INCREMENTING_SEQ | |
AS BIGINT | |
START WITH 1 | |
INCREMENT BY 1 | |
NO ORDER | |
NO CYCLE | |
NO MINVALUE | |
NO MAXVALUE | |
CACHE 20; |
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
#Server (note sometimes nc is netcat instead) | |
nc -v -v -l -n -p 2222 >/dev/null | |
#Client | |
time yes|nc -v -v -n 192.168.0.8 2222 >/dev/null | |
#Stop by using ctrl+c | |
sent 87478392, rcvd 0 | |
real 0m9.993s | |
#Take the bytes sent times by 8 (conversion bytes->bits) and divided by time elapsed to get Mb/s (Megabits per second) | |
#70Mb/s (=87478392*8/9.993) |