Skip to content

Instantly share code, notes, and snippets.

View hiviah's full-sized avatar

Ondrej Mikle hiviah

View GitHub Profile

Keybase proof

I hereby claim:

  • I am hiviah on github.
  • I am hiviah (https://keybase.io/hiviah) on keybase.
  • I have a public key whose fingerprint is B181 A46C 9A32 C678 1187 1EE6 5000 F260 8D62 BB1E

To claim this, I am signing this object:

@hiviah
hiviah / nfc-detect-rewritable-uid-mifare.c
Created October 23, 2017 22:02
A short utility that detects "magic" Chinese Mifare cards with rewritable UID and backdoored read/write on sectors.
/*-
* Free/Libre Near Field Communication (NFC) library
*
* Libnfc historical contributors:
* Copyright (C) 2009 Roel Verdult
* Copyright (C) 2009-2013 Romuald Conty
* Copyright (C) 2010-2012 Romain Tartière
* Copyright (C) 2010-2013 Philippe Teuwen
* Copyright (C) 2012-2013 Ludovic Rousseau
* See AUTHORS file for a more comprehensive list of contributors.
@hiviah
hiviah / chrome_run_in_docker.sh
Created December 8, 2015 16:07
Bash script to run Chrome in docker (X and pulseaudio through unix sockets)
#!/bin/bash
docker run -ti --rm \
-u developer \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e PULSE_SERVER=unix:/home/developer/pulse \
-v /home/user/.pulse/0123456789abcdef0123456789abcdef-runtime/native:/home/developer/pulse \
-w /home/developer \
-v /dev/bus/usb:/dev/bus/usb \
@hiviah
hiviah / Dockerfile
Last active February 1, 2016 13:38
Dockerfile for Chrome on Ubuntu
# Pull base image.
FROM ubuntu
# Setup user with the same UID/GID as on your host system to make X session work over socket
RUN export uid=1000 gid=1000 && \
mkdir -p /home/developer && \
echo "developer:x:${uid}:${gid}:Developer,,,:/home/developer:/bin/bash" >> /etc/passwd && \
echo "developer:x:${uid}:" >> /etc/group && \
chown ${uid}:${gid} -R /home/developer