Skip to content

Instantly share code, notes, and snippets.

@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.

@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 / 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 / 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 / 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 / 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.
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
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
@kconde2
kconde2 / multiple-repository-and-identities-git-configuration.md
Created October 6, 2020 15:34 — forked from bgauduch/multiple-repository-and-identities-git-configuration.md
Git config with multiple identities and multiple repositories

Setup multiple git identities & git user informations

/!\ Be very carrefull in your setup : any misconfiguration make all the git config to fail silently ! Go trought this guide step by step and it should be fine 😉

Setup multiple git ssh identities for git

  • Generate your SSH keys as per your git provider documentation.
  • Add each public SSH keys to your git providers acounts.
  • In your ~/.ssh/config, set each ssh key for each repository as in this exemple: