Saturday, October 13, 2018

xcode programming resources

The Swift 4 Programming Language Guide from Apple
Section 8, Lecture 77

Swift Programming Language Guide

You can download The Swift Programming Language Guide from Apple for free here:
Read in iBooks:

StackOverflow

Apple Developer Forum

https://forums.developer.apple.com/

Apple API Reference

Apple Guides and Sample Code


Friday, October 12, 2018

Polling

https://techoctave.com/c7/posts/60-simple-long-polling-example-with-javascript-and-jquery

Saturday, October 6, 2018

PHP: SSH to Remote Server

Install phpseclib into the specified location :

# cd /path/to/install/phpseclib
# composer require phpseclib/phpseclib
or
# composer require phpseclib/phpseclib:~2.0


http://phpseclib.sourceforge.net/ssh/2.0/examples.html



<?php
require __DIR__ . '/../vendor/autoload.php';

use phpseclib\Net\SSH2;
use phpseclib\Crypt\RSA;

$ssh = new SSH2('web.goweekend.ca');
$key = new RSA();
$key->loadKey(file_get_contents('/home/apache/.ssh/id_rsa'));

if (!$ssh->login('dboard', $key)) {
    exit('Login Failed');
}

$deploymentScript = 'sudo /autoDeployment/deployApplication.sh uat install ETFTrade server1 /path/to/earFiles/ETFTrade.ear 100 true';
$ssh->setTimeout(1800);
$ssh->exec(
    $deploymentScript, function ($str) {
        echo $str;
        flush();
        ob_flush();
});

?>