Creating a new PHPExcel Object.
$this->PHPExcel = new PHPExcel();
Creating a new sheet:
// Simulating infinite-length leading lookbehind in JavaScript. Uses XRegExp. | |
// Captures within lookbehind are not included in match results. Lazy | |
// repetition in lookbehind may lead to unexpected results. | |
(function (XRegExp) { | |
function prepareLb(lb) { | |
// Allow mode modifier before lookbehind | |
var parts = /^((?:\(\?[\w$]+\))?)\(\?<([=!])([\s\S]*)\)$/.exec(lb); | |
return { |
<?php | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\ConsoleOutputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
/** | |
* Testcase: app/console foo > std 2> err | |
*/ |
rsync (Everyone seems to like -z, but it is much slower for me)
#!/bin/bash | |
# generate new personal ed25519 ssh keys | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <[email protected]>" | |
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <[email protected]>" | |
# generate new host cert authority (host_ca) ed25519 ssh key | |
# used for signing host keys and creating host certs | |
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network |
If you ever need to download an entire website, perhaps for off-line viewing, wget can do the job — for example:
$ wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains website.org --no-parent www.website.org/tutorials/html/
This command downloads the website www.website.org/tutorials/html/.
The options are:
--recursive
: download the entire website--domains website.org
: don't follow links outside website.org#!/usr/bin/env bash | |
# ~/apps/sshpass/bin/sshpass -p 'raspberry' scp -r archives [email protected]:~/ ; ~/apps/sshpass/bin/sshpass -p 'raspberry' ssh [email protected] 'sudo mv ~/archives/* /var/cache/apt/archives/' | |
# ~/apps/sshpass/bin/sshpass -p 'raspberry' scp pi_setup [email protected]:~/ ; ~/apps/sshpass/bin/sshpass -p 'raspberry' ssh [email protected] 'bash ~/pi_setup pi9 109' | |
# for pi in 110 111 112 | |
# do | |
# ~/apps/sshpass/bin/sshpass -p 'raspberry' scp pi_keys [email protected].$pi:~/.ssh/authorized_keys | |
# ~/apps/sshpass/bin/sshpass -p 'raspberry' scp pi_hosts pi_mpihostsfile [email protected].$pi:~/ | |
# ~/apps/sshpass/bin/sshpass -p 'raspberry' scp ~/.ssh/config [email protected].$pi:~/.ssh/ | |
# ~/apps/sshpass/bin/sshpass -p 'raspberry' ssh [email protected].$pi 'cat /etc/hosts pi_hosts | tee hosts ; sudo cp hosts /etc/hosts' |
#!/bin/bash | |
IPT="/sbin/iptables" | |
# Server IP | |
SERVER_IP="$(ip addr show eth0 | grep 'inet ' | cut -f2 | awk '{ print $2}')" | |
# Your DNS servers you use: cat /etc/resolv.conf | |
DNS_SERVER="8.8.4.4 8.8.8.8" | |
# Allow connections to this package servers |
Our Virtual Machines are provisioned using Vagrant from a Linux base box to run using VirutalBox. If the Hard Disk space runs out and you cannot remove files to free-up space, you can resize the Hard Disk using some VirtualBox and Linux commands.
The following steps assume you've got a set-up like mine, where:
/** | |
* Class SoapClientCurl extends SoapClient __doRequest method with curl powered method | |
*/ | |
class SoapClientCurl extends SoapClient{ | |
//Required variables | |
public $url = null; | |
public $certfile = null; | |
public $keyfile = null; | |
public $passphrase = null; |