Skip to content

Instantly share code, notes, and snippets.

View phgachoud's full-sized avatar

Gachoud Philippe phgachoud

  • Santiago Chile
View GitHub Profile
@phgachoud
phgachoud / cnxsoft.md
Created June 17, 2020 10:31 — forked from stefanozanella/cnxsoft.md
Emulate a Raspberry Pi with Qemu+ KVM

Booting with CNXSoft image

Reference: http://www.cnx-software.com/2012/07/31/84-mb-minimal-raspbian-armhf-image-for-raspberry-pi/

curl -O https://dl.dropbox.com/u/45842273/2012-07-15-wheezy-raspian-minimal.img.7z

yum install p7zip
7za e 2012-07-15-wheezy-raspian-minimal.img.7z

qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb -no-reboot -serial stdio -append "root=/dev/sda2 panic=1" -hda 2012-07-15-wheezy-raspian-minimal.img -net nic -net user -vnc :0 -net tap,ifname=vnet0,script=no,downscript=no
@phgachoud
phgachoud / console_ansi_control.e
Created October 18, 2018 16:47 — forked from jocelyn/console_ansi_control.e
ANSI console control
note
description: "Summary description for {CONSOLE_ANSI_CONTROL}."
date: "$Date$"
revision: "$Revision$"
EIS: "name=ANSI escape codes", "protocol=URI", "src=http://ascii-table.com/ansi-escape-sequences.php"
EIS: "name=ANSI escape codes (MS)", "protocol=URI", "src=https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences"
class
CONSOLE_ANSI_CONTROL
@phgachoud
phgachoud / vbox-backup.sh
Created August 13, 2018 14:19 — forked from dv336699/vbox-backup.sh
Backup Running VirtualBox VMs
#!/bin/sh
BASEFOLDER=/home/vbox/backups
for VMNAME in $(VBoxManage list runningvms | cut -d ' ' -f1 | sed 's/"//g;')
do
echo ""
VBoxManage controlvm "$VMNAME" acpipowerbutton
echo "Waiting for VM "$VMNAME" to poweroff..."
until $(VBoxManage showvminfo --machinereadable "$VMNAME" | grep -q ^VMState=.poweroff.)