Skip to content

Instantly share code, notes, and snippets.

View marcolivierarsenault's full-sized avatar

Marc-Olivier Arsenault marcolivierarsenault

View GitHub Profile
# 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
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 \
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
{
"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 / 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
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 / 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"
@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
# change the prefix from 'C-b' to 'C-a'
# (remap capslock to CTRL for easy access)
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# start with window 1 (instead of 0)
set -g base-index 1
# start with pane 1
@marcolivierarsenault
marcolivierarsenault / Alt Coin Scraper
Created January 15, 2018 17:56
lamda function to get all the lambda function and store them in a database
import json
import decimal
import urllib.request
import boto3
dynamodb = boto3.resource('dynamodb')
table = dynamodb.Table('AltCoinHistory')
def lambda_handler(event, context):