Skip to content

Instantly share code, notes, and snippets.


Cristian Sandu crazyquark

View GitHub Profile
crazyquark /
Created May 16, 2020 — forked from artizirk/
Apple macOS Catalina under Linux KVM with GVT-g Intel GPU passthrough notes
crazyquark /
Created May 15, 2020 — forked from shamil/
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
crazyquark /
Last active May 10, 2020 — forked from ryross/
Move Odroid filesystem to SSD
## Instructions to switch odroid over to external ssd
# You shouldn’t see any errors when running this process, if you do. Stop immediately and ask me.
# run lsblk to see all the hard drives. You should see a line starting with mmcblk0 and then 2 more underneath it with
# mmcblk0p1 and mmcblk0p2. That’s the sd card disk and the sd card partitions. You’ll also see a line starting with
# sda (and/or sdb if there are two usb drives). We want to use the sd* one.
#pull out some of the values from lsblk so we can automate the rest of the script
read new_partition new_drive mountpoint <<< `lsblk -e 179 -l -o NAME,PKNAME,FSTYPE,MOUNTPOINT |grep 'vfat\s*/media/odroid' | awk {'print $1" "$2" "$4'}`
crazyquark / web-audio-fetch-stream.js
Created Jul 12, 2019 — forked from revolunet/web-audio-fetch-stream.js
Web Audio streaming with fetch API
View web-audio-fetch-stream.js
// loads remote file using fetch() streams and "pipe" it to webaudio API
// remote file must have CORS enabled if on another domain
// mostly from
function play(url) {
var context = new (window.AudioContext || window.webkitAudioContext)();
crazyquark / ds-duino.ino
Created May 10, 2019 — forked from dougalcampbell/ds-duino.ino
Digispark and nodejs - talking to the Digispark Arduino-compatible microcontroller via USB with the node-hid library
View ds-duino.ino
* Accept control commands via USB.
* Commands start with '!' and end with '.'
* Commands have three parts: action, pin, value: !AAPPVV.
* E.g. '!01p101.' is DigitalWrite, Pin1, value = 1
* Note: This is currently *very* crude. Much improvement could be made.
* I think the use of strncpy is eating a lot of memory. Refactor?
crazyquark /
Created Mar 22, 2019 — forked from jexchan/
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C ""
crazyquark / iTunes12-Wine-Ubuntu.txt
Created May 10, 2018 — forked from schorschii/iTunes12-Wine-Ubuntu.txt
How to install iTunes 12 on Linux Mint 18 with working Store
View iTunes12-Wine-Ubuntu.txt
Trying to run iTunes with Wine, i faced various problems. Here is a working solution how to install iTunes on Debian-based systems (in my case Linux Mint 18.1) - with support for the iTunes Store. Warning: Syncing i-devices is still not possible.
When installing it with the playonlinux-"iTunes 12"-script, log in into the Store was not possible in my case. Wine showed the follwing error when trying to log in: SecurityContext failed with error 0x80090304
1. Install current Wine version (2.0.1) directly from the winehq repository
wget -nc
sudo apt-key add Release.key
sudo apt-add-repository 'deb xenial main'
sudo apt-get update
sudo apt-get install --install-recommends winehq-stable
wine --version
crazyquark / index.html
Created Apr 30, 2018 — forked from bellbind/index.html
[threejs] simplified gltf2 loader example
View index.html
<!doctype html>
<meta charset="utf-8" />
<script src=""></script>
<script src="script.js" defer="defer"></script>
crazyquark / gist:ef6172da915a1b0803d41465b924d92a
Created Feb 1, 2017 — forked from alphazo/gist:3303282
Clone MiFare cards using chinesse UUID writable cards
View gist:ef6172da915a1b0803d41465b924d92a

libnfc supports UUID writable cards and even has some dedicated tools for them.

However it doesn't work with some of the cards found on eBay that are even simpler to use. Sector 0 is unlocked and can be written without any additional commands. libnfc requires a small patch to get it working.

Following has been tested under ArchLinux with modified libnfc 1.5.1, mfoc 0.10.2 and a SCL3711 dongle.

Patch & recompile libnfc

The patch is fairly simple, open libnfc-1.5.1/utils/nfc-mfclassic.c and comment 2 lines (it was lines 384 and 385 for me):

  // Try to write the trailer
crazyquark / .gitconfig
Created Jul 12, 2016 — forked from samsalisbury/.gitconfig
Git diff and merge with p4merge (OSX)
View .gitconfig
keepBackup = false
tool = p4merge
[mergetool "p4merge"]
cmd = /Applications/ "\"$PWD/$BASE\"" "\"$PWD/$REMOTE\"" "\"$PWD/$LOCAL\"" "\"$PWD/$MERGED\""
keepTemporaries = false
trustExitCode = false
keepBackup = false
tool = p4merge