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 / gke-config-connector.sh
Created July 22, 2021 19:11
Set up a GKE Standard cluster with Config Connector
# Configuring gcloud
export PROJECT_ID=my-project-12345
export COMPUTE_REGION=us-central1
gcloud components update
gcloud config set project ${PROJECT_ID}
gcloud config set compute/region ${COMPUTE_REGION}
# Setting up a GKE cluster
export CLUSTER_NAME=cnrm-cluster-1
@lmakarov
lmakarov / gke-fullpilot.sh
Created July 22, 2021 19:05
Create a GKE Standard cluster matching GKE Autopilot configuration (aka Fullpilot)
# Configuring gcloud
export PROJECT_ID=my-project-12345
export COMPUTE_REGION=us-central1
gcloud components update
gcloud config set project ${PROJECT_ID}
gcloud config set compute/region ${COMPUTE_REGION}
# Setting up a GKE cluster
export CLUSTER_NAME=my-cluster-1
@lmakarov
lmakarov / config.json
Created December 17, 2018 03:54
microk8s crypto mining exploit
{
"algo": "cryptonight",
"api": {
"port": 0,
"access-token": null,
"id": null,
"worker-id": null,
"ipv6": false,
"restricted": true
},
@lmakarov
lmakarov / init.sh
Created August 23, 2018 17:10
Docksal custom command example
#!/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 July 12, 2018 18:48
Node.js via NVM + yarn installation via official install scripts in Docker
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 July 12, 2018 18:46
Node.js + yarn installation via apt in Docker
# 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 July 12, 2018 18:42
Node.js via NVM manual installation in Docker
# 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 19:15
Play with Docksal on PWD (Play with Docker)
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 February 10, 2018 00:00
Overriding $base_url in Drupal 7
<?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.
*
@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