Skip to content

Instantly share code, notes, and snippets.

View vi2co's full-sized avatar

Vitaliy Shynkar vi2co

View GitHub Profile
</exec>
<echo message="Installing composer..." />
<exec dir="${dir}" executable="php" description="Installing composer." failonerror="true">
<arg value="composer.phar" />
<arg value="install" />
</exec>
{
"AWSTemplateFormatVersion": "2010-09-09",
"Parameters": {
"S3JarBucket": {
"Description": "The name of the S3 bucket that contains the source code of Lambda function.",
"Type": "String"
},
"Namespace": {
"Description": "The environment name (dev)",
"Type": "String",
#!/bin/bash
set -e
if [ $# -eq 0 ]; then
echo "Usage: $0 <namespace>"
echo "For example: $0 dev"
exit 1
else
NAMESPACE=$1
fi
## Default config for each machine
Vagrant.configure(2) do |config|
config.ssh.insert_key = false
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
## Per machine config
config.vm.define "haproxy1" do |haproxy1|
haproxy1.vm.hostname = "lb01.example.com"
Vagrant.configure(2) do |config|
config.ssh.insert_key = false
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
end
config.vm.define "dns" do |dns|
dns.vm.box = "ubuntu/trusty64"
dns.vm.network :private_network, ip: "10.12.10.5"
end
let arr = [1,[6,7],3,[1,2,3,4, [2,3,4]]];
function unfoldArray(arr) {
let arrNew = [];
for (let i = 0; i < arr.length; i++) {
if (arr[i].length === undefined) {
arrNew.push(arr[i]);
} else {
arrNew = arrNew.concat(unfoldArray(arr[i]));