Skip to content

Instantly share code, notes, and snippets.

View lmakarov's full-sized avatar

Leonid Makarov lmakarov

  • FFW
  • Strasbourg, France
View GitHub Profile
@lmakarov
lmakarov / ids_rsa.pub
Created June 2, 2015 17:44
Public SSH Key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDFyiDrGK0hcEbIb+Ql48ZAnXsQ7mB3pCiGkAftBlmmQA30Gx9PPqLk+2nwylLaolOYWZpwCAnifB64TBe1IZLIqnFRjkQHwoiUZiXRQoV6WRziiFfF3dq9BkkdY5mB3redxGMyjDQc85P0I8O94H0D2JMN2+YZgAk3Md3c+TYXnXuPm17voK3ipADh2Dr8PvPwAsBAalW1ekPZ7Su6f/dYiVfxdDkdlfF1DedRXFpASXJR1oL4D3D9aW5pOI8yEEzyPRGM0iia+JCqFN/wWWws9+r22gAGy/4+UBT8na3MQNhEcG6QCq6YzlxDWDJywgsVn/QoK92NIl3OLlkzEgB5pPg/DzJaaYhmj7ELmeT04xSgjgix0wNbPAr9MlYhncszWWj7kCiwVqKSuVyxJMqnBfvFtp8UaxSbRszsLOlf8yvT/tcrcgD760FzTnG6lncEI0nqc3rgSk13zvkgulv3XDJvkk8lStjdPAizH3EhyXEVOzhAJD5N0COrSRxF6h5I4vMAlRgCuXXRHseQLZot+YsLsVggEe3l20pKXcuXZboUYk+7C3Wi+pOFDVIp7L9uWPWy/WMBM+fp1HSebTFlxS+u5P2EAEsSPOXE52FwGiU80XTf5YCeEQWtjajZUAhGru+MwoU5v3QZyKLoD0WV1qQx/GB7dL/YnDwOLwXFbw==
@lmakarov
lmakarov / install-docker-compose.sh
Created June 30, 2015 16:47
Install docker-compose in boot2docker 1.7.0+
#!/bin.sh
DOCKER_COMPOSE_VERSION=1.3.0
# Download docker-compose to the permanent storage
echo 'Downloading docker-compose to the permanent VM storage...'
sudo mkdir -p /var/lib/boot2docker/bin
sudo curl -sL https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` -o /var/lib/boot2docker/bin/docker-compose
sudo chmod +x /var/lib/boot2docker/bin/docker-compose
sudo ln -sf /var/lib/boot2docker/bin/docker-compose /usr/local/bin/docker-compose
//10.0.75.1/C on /C type cifs (rw,relatime,vers=3.02,sec=ntlmssp,cache=strict,username=admin,domain=DESKTOP-9IMQO37,uid=0,nof
orceuid,gid=0,noforcegid,addr=10.0.75.1,file_mode=0755,dir_mode=0755,iocharset=utf8,nounix,serverino,mapposix,nobrl,mfsymlink
s,noperm,rsize=1048576,wsize=1048576,actimeo=1)
//10.0.75.1/C on /c type cifs (rw,relatime,vers=3.02,sec=ntlmssp,cache=strict,username=admin,domain=DESKTOP-9IMQO37,uid=0,nof
orceuid,gid=0,noforcegid,addr=10.0.75.1,file_mode=0755,dir_mode=0755,iocharset=utf8,nounix,serverino,mapposix,nobrl,mfsymlink
s,noperm,rsize=1048576,wsize=1048576,actimeo=1)
FROM httpd:alpine
COPY 100MB.zip /usr/local/apache2/htdocs/
$ docker build -t myhttpd .
Sending build context to Docker daemon  104.9MB
Step 1/2 : FROM httpd:alpine as chmod
 ---> 8014d2ecbd73
FROM httpd:alpine
COPY 100MB.zip /usr/local/apache2/htdocs/
RUN chown -R www-data:www-data /usr/local/apache2/htdocs
$ docker build -t myhttpd2 .
Sending build context to Docker daemon  104.9MB
Step 1/3 : FROM httpd:alpine as chmod
@lmakarov
lmakarov / test.sh
Created August 24, 2017 00:29
Bats tests alternative with pure bash
#!/usr/bin/env bash
# Abort on errors
#set -e
# Echo commands
#set -x
#-------------------------- Helper functions --------------------------------
@lmakarov
lmakarov / lambda-basic-auth.js
Created August 30, 2017 19:15
Basic HTTP Authentication for CloudFront with Lambda@Edge
'use strict';
exports.handler = (event, context, callback) => {
// Get request and request headers
const request = event.Records[0].cf.request;
const headers = request.headers;
// Configure authentication
const authUser = 'user';
const authPass = 'pass';
@lmakarov
lmakarov / backstop.json
Created September 21, 2017 22:58
Sample BackstopJS config to compare two URLs
{
"id": "backstop_default",
"viewports": [
{
"label": "tablet",
"width": 1024,
"height": 768
},
{
"label": "dekstop",
@lmakarov
lmakarov / php-5.6-v1-v2-modules-diff-summary.txt
Created November 11, 2017 21:12
docksal/cli v1 vs v2 diffs
-PHP Version => 5.6.30-0+deb8u1
+PHP Version => 5.6.32
-DTrace Support => enabled
+DTrace Support => disabled
-enable_dl => Off => Off
+enable_dl => On => On
-error_log => /dev/stdout => /dev/stdout
@lmakarov
lmakarov / php5.6-modules.txt
Created November 14, 2017 01:08
Acquia Cloud configs
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom