Skip to content

Instantly share code, notes, and snippets.

SSH tunnel to remote host socket
ssh -fNT -L /tmp/remote-docker.sock:/var/run/docker.sock <remote-user>@<host-ip>
Map localhost docker host to ssh tunnel
export DOCKER_HOST=unix:///tmp/remote-docker.sock
version: '3'
services:
master:
build:
context: .
dockerfile: ./master.Dockerfile
working_dir: /root/playbooks
volumes:
- /c/repos/ansible/playbooks:/root/playbooks
- /c/repos/ansible/config:/etc/ansible
@kconde2
kconde2 / Function.Array-Group-By.php
Created May 3, 2020 18:39 — forked from mcaskill/Function.Array-Group-By.php
PHP : Groups an array by a given key
<?php
if (!function_exists('array_group_by')) {
/**
* Groups an array by a given key.
*
* Groups an array into arrays by a given key, or set of keys, shared between all array members.
*
* Based on {@author Jake Zatecky}'s {@link https://github.com/jakezatecky/array_group_by array_group_by()} function.
* This variant allows $key to be closures.
@kconde2
kconde2 / docker-compose.yml
Created February 22, 2020 01:26 — forked from mTrax-/docker-compose.yml
Traefik v2 with ssl
version: "3.3"
services:
reverse-proxy:
image: traefik:latest
restart: unless-stopped
command:
- --api
- --providers.docker=true
- --entrypoints.web.address=:80
@kconde2
kconde2 / image_phpstorm_server.png
Created February 11, 2020 14:58 — forked from esilvajr/image_phpstorm_server.png
How to use XDebug inside a docker container.
image_phpstorm_server.png
@kconde2
kconde2 / get-set-html-quilljs-editor.js
Created February 11, 2020 01:35 — forked from fxmontigny/get-set-html-quilljs-editor.js
Insert and get html content with quilljs editor
const editor = $('.editor');
const quill = new Quill(editor);
// set html content
quill.setHTML = (html) => {
editor.root.innerHTML = html;
};
// get html content
@kconde2
kconde2 / helpful-docker-commands.sh
Last active February 6, 2020 16:23 — forked from garystafford/helpful-docker-commands.sh
My list of helpful docker commands
###############################################################################
# Helpful Docker commands and code snippets
###############################################################################
### CONTAINERS ###
docker stop $(docker ps -a -q) #stop ALL containers
docker rm -f $(docker ps -a -q) # remove ALL containers
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter
# exec into container
@kconde2
kconde2 / intro.md
Created December 23, 2019 01:06 — forked from derhuerst/intro.md
Installing the Z Shell (zsh) on Linux, Mac OS X and Windows

Installing zsh – the easy way

The Z shell (zsh) is a Unix shell [...]. Zsh can be thought of as an extended Bourne shell with a large number of improvements, including some features of bash, ksh, and tcsh.

Z shell – Wikipedia

Read more about ZSH at An Introduction to the Z Shell.

Choose one of the following options.

We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
"ISBN";"Book-Title";"Book-Author";"Year-Of-Publication";"Publisher";"Image-URL-S";"Image-URL-M";"Image-URL-L"
"0195153448";"Classical Mythology";"Mark P. O. Morford";"2002";"Oxford University Press";"http://images.amazon.com/images/P/0195153448.01.THUMBZZZ.jpg";"http://images.amazon.com/images/P/0195153448.01.MZZZZZZZ.jpg";"http://images.amazon.com/images/P/0195153448.01.LZZZZZZZ.jpg"
"0002005018";"Clara Callan";"Richard Bruce Wright";"2001";"HarperFlamingo Canada";"http://images.amazon.com/images/P/0002005018.01.THUMBZZZ.jpg";"http://images.amazon.com/images/P/0002005018.01.MZZZZZZZ.jpg";"http://images.amazon.com/images/P/0002005018.01.LZZZZZZZ.jpg"
"0060973129";"Decision in Normandy";"Carlo D'Este";"1991";"HarperPerennial";"http://images.amazon.com/images/P/0060973129.01.THUMBZZZ.jpg";"http://images.amazon.com/images/P/0060973129.01.MZZZZZZZ.jpg";"http://images.amazon.com/images/P/0060973129.01.LZZZZZZZ.jpg"
"0374157065";"Flu: The Story of the Great Influenza Pandemic of 1918 and the Search for the Virus Th