Skip to content

Instantly share code, notes, and snippets.

View chanmix51's full-sized avatar

Grégoire HUBERT chanmix51

View GitHub Profile
@julianlam
julianlam / expose-directory-on-host-to-lxc-container.md
Last active May 22, 2024 15:15
Exposing a directory on the host machine to an LXC container #blog

Exposing a directory on the host machine to an LXC container

  1. Log into the container and create an empty directory, this will be the mount point
  2. Log out and stop the container.
  3. Open to your container's config file
    • For regular LXC containers: /var/lib/lxc/mycontainer/config
    • For unprivileged LXC containers: $HOME/.local/share/lxc/mycontainer/config
  4. Add a new line above the lxc.mount directive, that follows the format below. Substitute proper paths as necessary:
    • lxc.mount.entry = /path/to/folder/on/host /path/to/mount/point none bind 0 0
  • Both of these paths are relative to the host machine.
@lyrixx
lyrixx / post-checkout
Created June 26, 2013 13:37
Git post checkout
#!/bin/bash
# Put this file at: .git/hooks/post-checkout
# and make it executable
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587
PREV_COMMIT=$1
POST_COMMIT=$2
NOCOLOR='\e[0m'
@pborreli
pborreli / 01_requirements.sh
Last active December 5, 2019 17:59
All you need to generate timelapse video of a github project development activity like : http://www.youtube.com/watch?v=nY1j3O4nWDI&hd=1
brew install gource
brew install ffmpeg
@chanmix51
chanmix51 / create-pomm-silex.sh
Last active February 25, 2018 17:11
Silex project bootstrap with Pomm
#!/bin/bash
mkdir -p bin sources/{config,twig,sql,lib/{Model,Controller}} web/{css,images,js} tests documentation log
chmod 777 log
> web/favicon.ico
cat > bin/generate_model.php <<"EOF"
<?php // bin/generate_model.php
$app = require(__DIR__."/../sources/bootstrap.php");
@ziadoz
ziadoz / awesome-php.md
Last active May 10, 2024 15:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.