Skip to content

Instantly share code, notes, and snippets.

Leonid Makarov lmakarov

Block or report user

Report or block lmakarov

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lmakarov
lmakarov / config.json
Created Dec 17, 2018
microk8s crypto mining exploit
View config.json
{
"algo": "cryptonight",
"api": {
"port": 0,
"access-token": null,
"id": null,
"worker-id": null,
"ipv6": false,
"restricted": true
},
@lmakarov
lmakarov / init.sh
Created Aug 23, 2018
Docksal custom command example
View init.sh
#!/usr/bin/env bash
## Initialize stack and site (full reset)
##
## Usage: fin init
set -e # Abort if anything fails
set -x # Echo commands
#-------------------------- Helper functions --------------------------------
@lmakarov
lmakarov / Dockerfile
Created Jul 12, 2018
Node.js via NVM + yarn installation via official install scripts in Docker
View Dockerfile
ENV \
NVM_VERSION=0.33.11 \
NODE_VERSION=8.11.3 \
YARN_VERSION=1.8.0
# Don't use -x here - node/nvm print just too much stuff
RUN set -e; \
# NVM and a defaut Node.js version
export PROFILE="$HOME/.profile"; \
curl -fsSL https://raw.githubusercontent.com/creationix/nvm/v${NVM_VERSION}/install.sh | bash; \
# Reload profile to load nvm (needed by Yarn installation below)
@lmakarov
lmakarov / Dockerfile
Created Jul 12, 2018
Node.js + yarn installation via apt in Docker
View Dockerfile
# Node.js
ENV NODE_VERSION=8.x
RUN set -xe; \
# Node.js repo
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -; \
echo "deb https://deb.nodesource.com/node_${NODE_VERSION} jessie main" | sudo tee /etc/apt/sources.list.d/nodesource.list; \
echo "deb-src https://deb.nodesource.com/node_${NODE_VERSION} jessie main" | sudo tee -a /etc/apt/sources.list.d/nodesource.list; \
# yarn repo
curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -; \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list; \
@lmakarov
lmakarov / Dockerfile
Created Jul 12, 2018
Node.js via NVM manual installation in Docker
View Dockerfile
# Node.js via NVM
ENV \
NVM_VERSION=0.33.11 \
NODE_VERSION=8.11.3
# Don't use -x here - node/nvm print just too much stuff
RUN set -e; \
# Manual nvm installation
NVM_DIR="$HOME/.nvm"; \
PROFILE="$HOME/.profile"; \
git clone --branch "v$NVM_VERSION" --depth 1 https://github.com/creationix/nvm.git "$NVM_DIR"; \
@lmakarov
lmakarov / instructions.txt
Last active May 21, 2018
Play with Docksal on PWD (Play with Docker)
View instructions.txt
curl -L get.docksal.io | CI=true DOCKSAL_VERSION=feature/alpine bash
fin system reset
addgroup docker
adduser docker -D -G docker -s /bin/bash
mkdir projects
cd projects
git clone https://github.com/docksal/drupal8.git
@lmakarov
lmakarov / settings-base_url.php
Last active Feb 10, 2018
Overriding $base_url in Drupal 7
View settings-base_url.php
<?php
/**
* Base URL (optional).
*
* If Drupal is generating incorrect URLs on your site, which could
* be in HTML headers (links to CSS and JS files) or visible links on pages
* (such as in menus), uncomment the Base URL statement below (remove the
* leading hash sign) and fill in the absolute URL to your Drupal installation.
*
View php5.6-modules.txt
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
dom
View php-5.6-v1-v2-modules-diff-summary.txt
-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 / backstop.json
Created Sep 21, 2017
Sample BackstopJS config to compare two URLs
View backstop.json
{
"id": "backstop_default",
"viewports": [
{
"label": "tablet",
"width": 1024,
"height": 768
},
{
"label": "dekstop",
You can’t perform that action at this time.