Skip to content

Instantly share code, notes, and snippets.

View mickours's full-sized avatar

Michael Mercier mickours

  • Ryax Technologies
  • Grenoble
View GitHub Profile
@mickours
mickours / release.nix
Last active June 19, 2018 20:00
Nix environment for releasing pypi package
# Use this environment to publish this package on pypi:
#
# # Enter the environment
# nix-shell release.nix
#
# # create the package
# python setup.py bdist
#
# # register to pypi (if not registered yet)
# twine register dist/project_name-x.y.z.tar.gz
#==============================================================================
# vim: softtabstop=2 shiftwidth=2 expandtab fenc=utf-8 cc=81 tw=80
#==============================================================================
#
# DESCRIPTION: An applicance for batsim experimentation
#
#==============================================================================
---
extend: default/chroot/debian8.yaml
@mickours
mickours / arch_config
Last active January 6, 2017 05:24
My Arch packages and configuration depending on the context
Work:
base-devel
maven
python2-virtualenv
linux-headers
vagrant
virtualbox
docker
nmap
tree
@mickours
mickours / nmap cmd
Created June 4, 2015 09:04
Get the local NTP server adresse and stat
nmap -sU -p 123 --script ntp-info 10.0.0.*/24
@mickours
mickours / .tmux.conf
Created June 4, 2015 08:59
My tmux configuration file
# Allows for faster key repetition
set -s escape-time 0
# Keep quiet and don't display warnings.
set-option -g quiet on
# Interact with xterm clipboard.
set-option -g set-clipboard on
# Window numbering starts from '1', '0' is too far away.
set-option -g base-index 1
# Ring the terminal bell from any window, in URxvt this is disabled, but activity is recorded.
set-option -g bell-action any
@mickours
mickours / .vimrc
Last active December 18, 2015 15:39
My vimrc file
set nocompatible " be iMproved
filetype off " required!
" Setting up Vundle - the vim plugin bundler
let iCanHazVundle=1
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
echo "Installing Vundle.."
echo ""
silent !mkdir -p ~/.vim/bundle
@mickours
mickours / template.sh
Last active December 15, 2015 05:09
Template for Bash script. Including main structure with argument and colored OK / FAIL message for shell script
#!/bin/bash
#############################################################################
# my script NAME #
#############################################################################
#
# *Description*
# this script must be used ...
#
#
#
@mickours
mickours / backup.sh
Last active December 15, 2015 05:09
Arch linux whole system backup script
#!/bin/bash
if [ $# -lt 1 ]; then
echo "No destination defined. Usage: $0 destination" >&2
exit 1
elif [ $# -gt 1 ]; then
echo "Too many arguments. Usage: $0 destination" >&2
exit 1
elif [ "$(whoami)" != "root" ]; then
echo "ERROR: You must be root to run this script.
@mickours
mickours / Debian based config
Last active December 15, 2015 04:59
Bash script to configure a debian-based distribution (like ubutnu) It checks the user rights and install the package only if necessary
#!/bin/bash
#################################
# Config script for Ubuntu #
#################################
# exit if error
set -e
# check rights