Skip to content

Instantly share code, notes, and snippets.

@yoyonel
yoyonel / frug.cpp
Created April 29, 2016 21:21 — forked from jfalcou/frug.cpp
C++ FRUG 07/04/2016
#include <initializer_list>
#include <functional>
#include <iostream>
#include <utility>
#include <tuple>
//--------------------------------------------------------
// Appliquer une fonction sur une ligne d'arguments
template<class F, class...Ts> F for_each_args(F f, Ts&&...a)
{
@yoyonel
yoyonel / Dockerfile
Created September 9, 2016 21:36 — forked from ruffsl/Dockerfile
Small ROS Network Example
FROM ros:indigo-ros-base
# install ros tutorials packages
RUN apt-get update && apt-get install -y \
ros-indigo-ros-tutorials \
ros-indigo-common-tutorials \
&& rm -rf /var/lib/apt/lists/
@yoyonel
yoyonel / git-dmz-flow.md
Created October 19, 2016 12:53 — forked from djspiewak/git-dmz-flow.md
Git DMZ Flow

Git DMZ Flow

I've been asked a few times over the last few months to put together a full write-up of the Git workflow we use at RichRelevance (and at Precog before), since I have referenced it in passing quite a few times in tweets and in person. The workflow is appreciably different from GitFlow and its derivatives, and thus it brings with it a different set of tradeoffs and optimizations. To that end, it would probably be helpful to go over exactly what workflow benefits I find to be beneficial or even necessary.

  • Two developers working on independent features must never be blocked by each other
    • No code freeze! Ever! For any reason!
  • A developer must be able to base derivative work on another developer's work, without waiting for any third party
  • Two developers working on inter-dependent features (or even the same feature) must be able to do so without interference from (or interfering with) any other parties
  • Developers must be able to work on multiple features simultaneously, or at lea
@yoyonel
yoyonel / .powerline9k
Created March 12, 2017 17:26
Fichier de configuration Powerline9k - configuration rjorgenson
# url: https://github.com/bhilburn/powerlevel9k/wiki/Show-Off-Your-Config
# rjorgenson's configuration:
POWERLEVEL9K_MODE='awesome-patched'
POWERLEVEL9K_PROMPT_ON_NEWLINE=true
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX="%{%F{249}%}\u250f"
POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX="%{%F{249}%}\u2517%{%F{default}%} "
POWERLEVEL9K_SHORTEN_DIR_LENGTH=4
POWERLEVEL9K_SHORTEN_STRATEGY="truncate_middle"
POWERLEVEL9K_OS_ICON_BACKGROUND="black"
POWERLEVEL9K_OS_ICON_FOREGROUND="249"
@yoyonel
yoyonel / install_for_debian_mate.sh
Last active April 24, 2021 08:14
Shell script d'installation pour debian (mate)
#!/bin/bash
echo "1. Installation des packages (essentiels) pour l'host"
sudo apt-get install -y \
htop iotop bmon \
mesa-utils \
apt-file \
usbutils \
dconf-cli \
zsh \
######################
### DESIGN CHANGES ###
######################
# Met ZSH comme shell de base
set-option -g default-shell /bin/zsh
# remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
@yoyonel
yoyonel / .zshrc
Last active October 7, 2017 16:18
.zshrc configuration file
# https://askubuntu.com/questions/324725/getting-command-not-found-working-under-zsh
if [[ -s '/etc/zsh_command_not_found' ]]; then
source '/etc/zsh_command_not_found'
fi
# http://virtualenvwrapper.readthedocs.io/en/latest/install.html#basic-installation
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source ~/.local/bin/virtualenvwrapper.sh
@yoyonel
yoyonel / install_docker.sh
Last active June 12, 2017 09:29
Script d'installation pour 'docker' (via apt)
#!/usr/bin/env bash
wget -O - https://get.docker.com/ | sh -
sudo usermod -aG docker $USER
# edition du fichier de settings pour docker
sudo $EDITOR /etc/default/docker
# restart du daemon docker
@yoyonel
yoyonel / install_docker-compose.sh
Created June 12, 2017 09:30
Script d'installation de 'docker-compose' (via apt)
#!/usr/bin/env bash
echo "Installation de Docker-compose"
curl -L "https://github.com/docker/compose/releases/download/1.8.1/docker-compose-$(uname -s)-$(uname -m)" -o ./docker-compose
sudo mv docker-compose /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
which docker-compose
docker-compose --version
@yoyonel
yoyonel / waveform.py
Created August 6, 2017 08:26 — forked from mixxorz/waveform.py
Generate waveform images from audio files
# Requires pydub (with ffmpeg) and Pillow
#
# Usage: python waveform.py <audio_file>
import sys
from pydub import AudioSegment
from PIL import Image, ImageDraw