Skip to content

Instantly share code, notes, and snippets.

View NicolasEhrhardt's full-sized avatar

Nicolas Ehrhardt NicolasEhrhardt

View GitHub Profile
@NicolasEhrhardt
NicolasEhrhardt / extractinfo.sh
Last active March 30, 2022 00:11
{OpenVPN, Freebox, Ubuntu} Script de reformatage du fichier de configuarion
#/bin/bash
# make output file
basedir=~/.openvpn
vpnconfigdir=$basedir/$2
mkdir -p $basedir
mkdir -p $vpnconfigdir
# print Gateway
sed -n 's/remote \([^ ]\+\) [0-9]\+/passerelle: \1/p' $1
@NicolasEhrhardt
NicolasEhrhardt / Makefile
Last active August 29, 2015 14:10
Makefile of pidgin-xmpp-ignore-groups
CC ?= gcc
PLUGINDIR ?= $(shell pkg-config --variable=plugindir purple)
CFLAGS += -Wall -fPIC
LDFLAGS += -L$(PLUGINDIR) -ljabber -shared
CPPFLAGS += $(shell pkg-config --cflags glib-2.0 purple)
LIBS += $(shell pkg-config --libs glib-2.0 purple)
TARGET = libxmpp-ignore-groups.so

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@NicolasEhrhardt
NicolasEhrhardt / Terminal.md
Last active August 29, 2015 14:02
Useful commands

ctrl + (←|→) move between args

ctrl + (A|E) move (beginning | end)

ctrl + U delete line

ctrl + K delete after cursor

ctrl + W delete previous word

@NicolasEhrhardt
NicolasEhrhardt / rotateAll.sh
Created May 14, 2014 04:24
Images operations on folder
#/bin/bash
input=$1
output=$2
mkdir -p $output
for line in $(ls $1)
do
convert $input/$line -rotate -90 $ouput/$line