Skip to content

Instantly share code, notes, and snippets.

View vincepare's full-sized avatar

Vincent Paré vincepare

View GitHub Profile
@vincepare
vincepare / README.md
Last active July 3, 2021 00:07
Find the readwrite layer and filesystem root of a docker container - DEPRECATED, use https://github.com/vincepare/docker-backup instead

Finds the readwrite layer (top-most layer) and filesystem root of a docker container.

Accessing the readwrite layer from the docker host can be useful to backup ephemeral container data, while finding the filesystem root allow to browse a container directory structure without having to login into.

Please not that this could only work with union filesystem based storage driver like AUFS and Overlay2. Currently, only AUFS is supported, feel free to contribute to add Overlay2 support.

@vincepare
vincepare / dcp.sh
Last active January 21, 2018 15:15
Bash helper script to automate docker-compose.yml file detection
#!/usr/bin/env bash
#
# Use as a drop-in replacement for docker-compose that will automatically find your docker-compose.yml file.
# Author : Vincent Paré
function dcp {
local candidates=()
if [ -n "$DCP_COMPOSE" ]; then
candidates+=("$DCP_COMPOSE")
@vincepare
vincepare / registryDump.bat
Created December 11, 2015 00:09
Automatic Windows registry dump batch script - export multiple reg keys at once (useful for backups)
:: Windows registry dump batch script
:: Copyright (c) 2015 Vincent Paré
:: Licensed under the Apache 2.0 license : http://opensource.org/licenses/Apache-2.0
@echo off
pushd %~dp0
echo Export directory : %CD%
:: Get current timestamp
set hour=%time:~0,2%
@vincepare
vincepare / startup.py
Last active November 4, 2016 07:17
Automatic indentation detection for Notepad++ (requires Python Script extension)
# -*- coding: utf-8 -*-
# Automatic indentation detection for Notepad++
# Version 1.0.1
# Copyright (c) 2015 Vincent Paré
# Licensed under the Apache 2.0 license : http://opensource.org/licenses/Apache-2.0
# Tested on Python Script 1.0.8.0 (Python 2.7.6) @ Notepad++ 6.7.8.2
import sys
from Npp import *
sys.stderr = console
@vincepare
vincepare / trashit.sh
Last active August 29, 2015 14:24
Move target (file or directory) to trash folder, keeping directory structure
#!/usr/bin/env bash
#
# Trash It
# Move target (file or directory) to trash folder, keeping directory structure.
# This aims to be an ersatz recycle bin.
#
# Author : Vincent Paré
#
# Usage:
# trashit <trashfolder> <target>