Night of 1000 Stars 2015 - LISUGmobile applications, combining PHP, RPG, DB2, and Zend Framework....
Transcript of Night of 1000 Stars 2015 - LISUGmobile applications, combining PHP, RPG, DB2, and Zend Framework....
“A Night of 1000 Stars”
Charles Kaplan
Charles Kaplan
Charles Kaplan is a Senior Account Executive with Maximum Computer
Systems, Inc. and has 39 years of experience in Sales, Sales Management
and Application Development with CBS, Inc., IBM Corp., and the Barsa
Consulting Group. Charles is the President of the Long Island System Users
Group (LISUG).
Charles is an adjunct Professor at Farmingdale State College teaching
Information Technology and Web Development.
Charles is also involved with several non-profit organizations were he
volunteers as a webmaster and in other capacities. As a webmaster, Charles
has designed and implemented websites with innovative features to provide
added value to the membership.
He has also migrated websites from pure HTML to PHP/MySQL to provide
new features and function.
by Charles Kaplan
� Get a Website
� Get the Code – Galleria and Charles Kaplan’s PHP Gallery programs
� Customize Code – Photographer’s Name & Email, Website URL, Theme
� Upload Code
� Upload Photographs
No DataBase, instead – Adaptive Code technique
Implementation Process
© 2015 - Charles Kaplan Simple Photography Website 6
� Existing Website, or
� New Website
� I use: 1and1.com
� Website Organization
� Code goes in “galleria/” directory
� Photos go into “galleria/photos” directory, each subject in its own directory, for example: “galleria/photos/travel/italy”
� URL – http://your.website/galleria/gallery.php
Website
© 2015 - Charles Kaplan Simple Photography Website 7
� Galleria JavaScript Photo Viewer - http://galleria.io
� Classic theme is $free
� Additional themes are priced up to $29
� I use the AZUR theme @ $29 – full screen and captions
� Just change one line of code to use additional themes
� Email [email protected] for PHP programs used to read directories and generate input for galleria with instructions
Get the Code
© 2015 - Charles Kaplan Simple Photography Website 8
� Photographer’s Name $name = “Charles Kaplan”
� Website URL $url = “http://www.ckaplan.com/galleria”
� Email Address $email = “[email protected]”
� Photo Directory $image_dir = “photos/” (default)
� Galleria Theme $theme = “classic/galleria.classic.js”
(default)
Customize the Code
© 2015 - Charles Kaplan Simple Photography Website 9
� Need FTP client
� I use CORE FTP LE ($Free)
� Code goes to: “galleria/” directory
Upload Code
© 2015 - Charles Kaplan Simple Photography Website 10
� Use FTP client to upload photos to galleria/photos
� Photo maximum size is 1280 x 800
� Free Image Resizer - https://imageresizer.codeplex.com/
� Suggestion: Do not resize the original images
� Each subject in its own directory, you can nest directories
� Top Level: Family, Travel, Events, Places, Favorites
� Subdirectories of Travel: Italy, Puerto Rico, Disney, Cape Cod
� For captions, create file with “filename.txt”
Upload Photos
© 2015 - Charles Kaplan Simple Photography Website 11
© 2015 - Charles Kaplan Simple Photography Website 12
� Tell all your family and friends, and don’t forget your Facebook buddies, that they can see your amazing photos @
http://your.website/galleria/gallery.php
Go Live!
Mike Jacobs
Mike Jacobs
Mike Jacobs has been a system administer on
IBM i for the past 25 years or so. He is currently
one of the lead engineers at JP Morgan Chase
& Co., on the board here at LISUG and the IBM
i Large User Group commonly referred to as
the LUG. When not doing things on IBM i, he is
usually doing something else.
Encryption Depiction
By Mike Jacobs
How Encryption Works
Two Protocols in One
• Handshake–Authentication
–Is the Certificate Valid?
• Data Flow
What can be encrypted?
• Data at rest – DASD
– Tape (Physical or Virtual)
• Data in transit – FTP,
– Telnet
– etc
Why Encrypt?
Are you sure you need to encrypt?
More from Spaf
• Securing an environment of Windows platforms from abuse - external or internal - is akin to trying to install sprinklers in a fireworks factory where smoking on the job is permitted.
• The only truly secure system is one that is powered off, cast in a block of concrete and sealed in a lead-lined room with armed guards—and even then I have my doubts.
Prerequisites for ssh
• Portable Utilities 5733-SC1
• PASE (Portable Solutions
Application Environment)
option 33
Setting up ssh
• Set up public & private keys
• If changes are required, modify
the sshd configuration file.
• Start sshd or schedule autostart
of sshd
SSL Prerequisites
• Digital Certificate Manager (DCM), option 34
of OS/400 (5770-SS1)
• TCP/IP Connectivity Utilities for AS/400 (5770-
TC1) IBM HTTP Server for AS/400 (5770-DG1)
• IBM Cryptographic Access Provider products:
– 5770-AC1 (40-bit)
– 5769-AC2 (56-bit)
– 5770-AC3 (128-bit)
SSL Protocols
• SSLV3.0 (Secure Sockets
Layer)
• TLS V1.2(Transport Layer
Security)
System Settings for FTP and Telnet
• CHGFTPA
• CHGTELNETA
• Bounce the Server
What Can Be Encrypted?
• IBM HTTP Server
• Telnet server
• FTP
• DRDA and DDM
• Management Central
• Directory Services (LDAP)
• Client Access Express and applications that are written to the Client Access Express APIs)
• System Console
• HMC
• Etc…
Clark Heiser
Clark HeiserClark Heiser is a Sr. Programmer/Analyst for P.C. Richard & Son,
a 106-yr-old family-run retail business.
He has over 30 years of AS/400 and IBM i experience. His 22
years of experience at P.C. Richard span both software and
hardware. He designs and codes various applications related to
Point-Of-Sale; he is also responsible for maintaining and
upgrading the hardware, and PTF and O/S levels for P.C.
Richard’s 70 IBM i’s.
He finds his varied responsibilities very rewarding and looks
forward to many more years at P.C. Richard.
What Is an Image Catalog?
• An IBM i object (*IMGCLG) that uses CD/DVD imagesto install one or more individual PTF’s, a Group PTF (TCP/IP, Java, Security, etc.), a CUM, or an entire O/S upgrade.
• CD/DVD images are uploaded to the IFS from either the physical media or downloaded from Fix Central.
Why Use an Image Catalog?
• SAVES TIME! Faster than using physical media.
• You’ll never have a media error at the time of the PTF/OS processing. All the prep work is done BEFOREHAND!
• Can combine CUM’s, Group PTF’s, and individual PTF’s into one image catalog. They will be processed automatically in the order you added them.
Making an Image Catalog
• CRTDEVOPT (device type *VRT, only do once for all time)
• CRTIMGCLG
• (Images only) Upload images to IFS folder.
• ADDIMGCLGE for each DVD image or physical DVD to upload.
• (V5R4 and earlier) Create a folder in the IFS.
Using an Image Catalog
• LODIMGCLG (*LOAD)
• VFYIMGCLG
• GO PTF, option 8 or INSPTF.
• Both do the VFYIMGCLG.
• (Optional) LODIMGCLG (*UNLOAD)
Image Catalogs Made EASY
DŭN!!
What Is an Image Catalog?WRKLNK:
What Is an Image Catalog?WRKIMGCLGE:
John Lynch
John Lynch
John Lynch is a graduate from the Rutgers School of Electrical and Computer Engineering and has been working for P.C. Richard & Son as a Software Developer/Analyst for 8 years.
2-Factor Authentication
On IBM i using RPG and Google
Authenticator
What is 2-Factor Auth?
Why do we need it?
Example: Dropbox and Google Authenticator
Example Continued
How does it work?
Message Authentication CodeMAC and HMAC
TOTP – Time Based One-Time Password
• The TOTP algorithm uses a secret key (16 character base32 encoded string) and a time-stamp (Unix time – the number of elapsed seconds since January 1, 1970) as the message
• An HMAC using SHA1 is then calculated to produce a One-Time Password. The HMAC will produce a very long hash string
• To shorten, dynamic truncation is used to get a six digit code
Back to our QR Code
• When we scan the QR Code we are actually scanning the account name and secret key to store in our Google Authenticator App on our device
• Assuming the clocks on the device and server are in sync, then the mobile device can produce predictable codes whether or not it has service or not
• The secret key must remain secret or 2-Factor will be compromised
• The server when validating should compute codes for several 30-second intervals in either direction to account for some time differentials
I don’t understand, can you say that in RPG?
Let it marinate overnight…
Its all down hill from here…
Dynamic Truncation
Demo
Not too bad right?
Steve Wolk
Steve WolkSteven Wolk is the Chief Technology Officer for PC Richard & Son, a family owned and operated chain of 66 appliance and electronics superstores located throughout NY, NJ, CT, and PA. Steve joined PC Richard & Son in 1986. In 2000 he assumed his current position as the company’s first CTO. As CTO he leads a large in-house team of very talented software developers. Together, they bring their combined extensive retail experience to bear in the application of new technologies to improve business processes and efficiency to create a competitive advantage for this unique company. Steve enjoys speaking at conferences and events, including COMMON, and is proud to be a member of Toastmasters International. As a published author, Steve has been interviewed by Argyle Executive Forum on his views of how technology is changing the retail experience. Most recently, an article of his on computer forensics was published by IT Jungle, and he was the focus of a Snapshot within IBM Systems magazine. He graduated from New York Institute of Technology with a B.S. in Computer Science.
The most useful apps…
you've never heard of!
Pushbullet
Macro Express
Pushbullet
Pushbullet
Macro Express
Macro Explorer Window
Macro Express
Capturing a Macro
Macro ExpressSample Macro: Set Mouse Speed
Macro ExpressSample Macro: Size & Position Windows
Macro ExpressWhat else can it do?
• Manipulate files and modify their contents
• Send E-Mails on a schedule, based on program logic
• Launch programs and manipulate their windows
• Automatically activate macros based on criteria:
• Date and time
• A window appearing with a certain title
• A keyboard hotkey
• ANYTHING YOU CAN DO MANUALLY!
The most useful apps…
you've never heard of!
Pushbullet
www.pushbullet.com
Free! $40/year for Pro
Macro Express
www.macros.com
$40 Basic / $60 Pro
Alan Seiden
Alan Seiden
Alan is owner of Alan Seiden Consulting, a group that creates
expertise in the IBM i community while developing web and
mobile applications, combining PHP, RPG, DB2, and Zend
Framework. Co-developer with IBM of the open-source PHP
Toolkit, Alan was one of the first Zend Framework certified
engineers. Alan was a charter member of IBM/COMMON's
PHP Advisory Board and a consultant for IBM's manual PHP:
Zend Core for i5/OS. An award-winning speaker, Alan has
been called "the performance guru of PHP on IBM i.” Alan
Seiden Consulting, Ho-Ho-Kus, New Jersey
IBM I SurpriseAlan Seiden Consulting
Founder, Club Seiden
71
club.alanseiden.com
IBM I SurpriseAlan Seiden Consulting
Contact and tips
Alan Seiden
Alan Seiden Consulting
Ho-Ho-Kus, NJ
72
[email protected] ● 201-447-2437 ● twitter: @alanseiden
Free newsletter: http://alanseiden.com/tips
Trevor Seeney
Trevor SeeneyTrevor Seeney is an experienced software developer and technology consultant. Trevor's recent experience has been focused on developing web-faced applications using RPG and PHP against DB2 and MySQL databases. In recently developed applications the emerging technology known as AJAX has been deployed along with the more familiar HTML, javascript and CSS. Trevor is currently developing Geo-Location applications where the HTTP server is the IBM/i. Trevor has delivered web-centric presentations at COMMON on the subject of javascript and securing CGI applications written in RPG. Previously, Trevor specialized in system security. A COMMON presentation entitled 'How an iSeries/400 is hacked and how to stop it' spawned an article for Midrange Computing and a Webinar on Search-400. Trevor also developed a workstation security product for the System/i, which secures inactive work stations and is commercially available today under the name of ScreenSafer/400.
iMAGICIBM/i Magic Tricks
Executing Commands in SEU
• Into a source member named WAJ of type CMD type one line
CMD
• Into another source member named RETURN of type CLLE type one line
RETURN
• Into another source member named WAJ of type CLLE type one line
WRKACTJOB
• Create command
CRTCMD qgpl/WAJ SRC(____/QCMDSRC) MBR(WAJ) +
PGM(____/RETURN) VLDCHKR(_____/WAJ)
The command WAJ will now execute in SEU under CL syntax
Capturing Screen Images
GETDSPC
A R GET CLRL(*NO)
A B 1919 B 1 2
A R PUT KEEP ASSUME
A B 1919 B 1 2
GETDSPX
A R GET USRDFN
A R PUT KEEP ASSUME
A B 1919 B 1 2
The ROLLUP Program
PGM
DCLF FILE(GETDSPC)
DCL VAR(&CTL) TYPE(*CHAR) LEN(7) +
VALUE(X'00021000730462')
DCL VAR(&C) TYPE(*CHAR) LEN(1920)
DCL VAR(&I) TYPE(*DEC) LEN(2 0)
/* * Get Screen Image * */
OVRDSPF FILE(GETDSPC) TOFILE(GETDSPX) +
WAITRCD(4) LVLCHK(*NO)
CHGVAR VAR(%SST(&B 1 7)) VALUE(&CTL)
SNDRCVF RCDFMT(GET)
CHGVAR VAR(%SST(&C 1 1919)) VALUE(&B)
The ROLLUP Program (cont.)
REPEAT:
CHGVAR VAR(&B) VALUE(%SST(&C 2 1919))
AGAIN:
/* * Perform Screen Modification * */
SNDF RCDFMT(PUT)
CHGVAR VAR(&C) VALUE( %SST(&C 81 1840) || +
%SST(&C 1 80))
CHGVAR VAR(&B) VALUE(%SST(&C 2 1919))
CHGVAR VAR(&I) VALUE(&I + 1)
IF COND(&I *LT 24) THEN(GOTO CMDLBL(AGAIN))
// * Wait for user response, if none then repeat SNDRCVF RCDFMT(PUT) WAIT(*NO) WAIT MONMSG MSGID(CPF0889) EXEC(DO)
RCVMSG MSGTYPE(*EXCP) CHGVAR VAR(&I) VALUE(0) GOTO CMDLBL(REPEAT)
ENDDO �
Launching the Browser from the Command Line
DCL VAR(&URL) TYPE(*CHAR) LEN(104) +
VALUE('http://Kisco6.Kisco.com:81/cgi-bin/SHOWTIME')
DCL VAR(&STRCMD) TYPE(*CHAR) LEN(123)
STRPCO PCTA(*NO)
MONMSG MSGID(IWS4010) EXEC(RCVMSG MSGTYPE(*EXCP))
CHGVAR VAR(&STRCMD) VALUE('start iexplore.exe' |> &URL)
STRPCCMD PCCMD(&STRCMD) PAUSE(*NO)
RETURN
CSS3 Animation
See September 2015 LISUG presentation
fieldset {
border-radius:2%;
background-color: #000080 ;
color: #ffffff ;
width:600px;
margin :25px;
position: relative;top:-25px;
-moz-animation: square-to-circle 6s 9.5s infinite linear alternate ;
-webkit-animation: square-to-circle 6s 9.5s infinite linear alternate ;
-ms-animation: square-to-circle 6s 9.5s infinite linear alternate;
}
@-webkit-keyframes square-to-circle {0% {border-radius:0 0 0 0;-webkit-transform:rotate(0deg);padding:5px;width:550px;left:5px;}25% {border-radius:10% 10% 10% 10%;-webkit-transform:rotate(90deg);padding:10px;
The End
All content available at �www/iPowerSoftware.com/iMagic/
Thank You
“A Night of 1000 Stars”