Skip to content

Instantly share code, notes, and snippets.

View maurice-audin's full-sized avatar

Maurice Audin maurice-audin

View GitHub Profile
$ which precmd
precmd () {
echo -n -e "\a"
/home/hybris/.scripts/term-fontsize
}
$ cat /home/hybris/.scripts/term-fontsize
#! /bin/bash
@maurice-audin
maurice-audin / proxy.DOMAIN_TLD.conf
Last active May 14, 2020 19:07
Apache basic proxy for DNS migration
# DOMAIN_TLD=yourdomain.example.com
# TARGET_IP=192.168.1.2
# cp proxy.DOMAIN_TLD.conf proxy.${DOMAIN_TLD}.conf
# sed -i "s/DOMAIN_TLD/${DOMAIN_TLD}/g" proxy.${DOMAIN_TLD}.conf
# sed -i "s/TARGET_IP/${DOMAIN_TLD}/g" proxy.${DOMAIN_TLD}.conf
# a2ensite proxy.${DOMAIN_TLD}.conf
# systemctl reload apache2
# Adapt DOMAIN_TLD and TARGET_IP
<VirtualHost *:80>
@maurice-audin
maurice-audin / logs.sh
Created September 26, 2017 08:05
ZNC logs
#! /bin/bash
# Call without argument for today's logs, or with date (ex: 2017-01-29) for specific day
DEST=ZNC_SERVER
DATE=$(date +%Y-%m-%d)
if [ x$1 != x ]; then DATE=$1; fi
# Launch detached screen

Keybase proof

I hereby claim:

  • I am hybris42 on github.
  • I am hybris42 (https://keybase.io/hybris42) on keybase.
  • I have a public key ASCgvMmLY-UVqmX7pXgZ1Ij7pBAcmCVbq7b1QBOfdp6BVgo

To claim this, I am signing this object:

@maurice-audin
maurice-audin / Dockerfile
Last active July 6, 2018 06:26
Dockerfile for firefox + flash + pulseaudio
FROM debian:sid
# Install
RUN echo "deb http://ftp.fr.debian.org/debian/ sid main contrib" > /etc/apt/sources.list
RUN apt-get -q update
RUN apt-get -q install -y adduser ca-certificates iceweasel openssh-server pulseaudio
RUN apt-get -q install -y flashplugin-nonfree
RUN mkdir /var/run/sshd
ADD id_dsa.pub /root/.ssh/authorized_keys
#! /bin/bash
if [ $# -ne 1 ]; then
echo "usage: debversion package.deb"
exit 1
fi
if [ ! -e $1 ]; then
echo "file not found"
exit 1
fi
@maurice-audin
maurice-audin / tablify.py
Created July 24, 2014 12:21
CSV to pretty table
#! /usr/bin/env python
import prettytable
import sys
if len(sys.argv) != 2:
print "usage: tablify FILE.csv"
exit(1)
data = []
@maurice-audin
maurice-audin / notifier.py
Last active August 29, 2015 14:03
Use IrssiNotifier with mcabber, "set events_command = ~/.mcabber.d/notifier.py"
#! /usr/bin/env python
import sys
import string
import urllib
import urllib2
import shlex
from subprocess import Popen, PIPE
encryption_password = "XXX"