Skip to content

Instantly share code, notes, and snippets.

View marcolivierarsenault's full-sized avatar

Marc-Olivier Arsenault marcolivierarsenault

View GitHub Profile
@marcolivierarsenault
marcolivierarsenault / .vimrc
Created March 20, 2017 17:50
My own vimrc config file
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer:
" Marc-Olivier Arsenault
" marcolivier.arsenault@gmail.com
"
" Version:
" 1.0 - 20/03/2017
"
" Blog_post:
" Highly inspired from Awesome vim file
@marcolivierarsenault
marcolivierarsenault / Spy.py
Last active January 4, 2017 14:37
Protocol sniffer between two serial port. Dump the output to a file and in the consol
'''
Protocol sniffer between two serial port. Dump the output to a file and in the consol
@Author Marc-Olivier Arsenault
@Date Jan 3rd 2017
'''
import serial
import sys
port1 = "/dev/ttyS1"
port2 = "/dev/ttyS3"
git config --global alias.lg "log --branches --remotes=origin --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' HEAD"
@marcolivierarsenault
marcolivierarsenault / backup with apt.txt
Created November 4, 2015 02:20 — forked from bepcyc/backup with apt.txt
BAckup and restore with aptitude in Ubuntu or Debian
before backup:
dpkg --get-selections > packages.txt
while restoring:
dpkg --clear-selections
dpkg --set-selections < packages.txt
aptitude install
{
"vars": {
"@gray-darker": "lighten(#000, 13.5%)",
"@gray-dark": "lighten(#000, 20%)",
"@gray": "lighten(#000, 33.5%)",
"@gray-light": "lighten(#000, 60%)",
"@gray-lighter": "lighten(#000, 93.5%)",
"@brand-primary": "#000033",
"@brand-success": "#5cb85c",
"@brand-info": "#5bc0de",
@marcolivierarsenault
marcolivierarsenault / gtkrc
Created November 21, 2014 15:28
/usr/share/themes/Adwaita/gtk-2.0/gtkrc - File to correct the theme for black Adwaita
# Color scheme originally contributed by Franco Gotusso as Clearlooks-DarkOrange
# Based on Clearlooks-DarkCoffee by Chibi and edited by bvc as Clearlooks-DarkCoffee2
style "clearlooks-default"
{
GtkMenuItem::selected_shadow_type = none
GtkWidget::interior_focus = 1
GtkButton::default_border = { 3, 3, 3, 3 }
GtkButton::default_outside_border = { 3, 3, 3, 3 }
GtkRange::trough_border = 2
qemu-system-x86_64 \
-enable-kvm -M q35 -m 512 -cpu host -smp 1,sockets=1,cores=1,threads=1 \
-bios /usr/share/qemu/bios.bin \
-vnc :0 -k en-us \
-device piix4-ide,bus=pcie.0,id=piix4-ide1 \
-drive file=/media/data/vm/tequila/tequila.img,id=disk,format=raw -device ide-hd,bus=piix4-ide1.0,drive=disk \
-net nic,vlan=0 \
-net tap,vlan=0,ifname=tun1,script=/etc/qemu-ifup
qemu-system-x86_64 \
-enable-kvm -M q35 -m 8192 -cpu host -smp 4,sockets=1,cores=4,threads=1 \
-bios /usr/share/qemu/bios.bin -vga none \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1 \
-device piix4-ide,bus=pcie.0,id=piix4-ide \
-device vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on,romfile=/media/data/vm/gin/MSI.HD7770.1024.120611.rom \
-device vfio-pci,host=01:00.1,bus=pcie.0 \
-drive file=/media/data/vm/gin/gin.img,id=disk,format=raw -device ide-hd,bus=piix4-ide.0,drive=disk \
-drive file=/media/data/vm/gin/tonic.img,id=disk1,format=raw -device ide-hd,bus=piix4-ide.1,drive=disk1 \
-usb -usbdevice host:093a:2521 -usbdevice host:258a:0001 \
# Master configuration file for the QEMU driver.
# All settings described here are optional - if omitted, sensible
# defaults are used.
# VNC is configured to listen on 127.0.0.1 by default.
# To make it listen on all public interfaces, uncomment
# this next option.
#
# NB, strong recommendation to enable TLS + x509 certificate
# verification when allowing public access