Skip to content

Instantly share code, notes, and snippets.

View MartinSadovy's full-sized avatar

Martin Sadovy MartinSadovy

View GitHub Profile
@MartinSadovy
MartinSadovy / README
Last active February 18, 2022 10:46
macOs czech keyboard for programmers
https://karabiner-elements.pqrs.org/
place my.json to:
/Users/sodae/.config/karabiner/assets/complex_modifications
@MartinSadovy
MartinSadovy / \etc\default\grub
Created November 10, 2019 17:44
working local! qemu 4, kernel 5.3
GRUB_CMDLINE_LINUX_DEFAULT="amd_iommu=on vfio-pci.ids=10de:1f08,10de:10f9,10de:1ada,10de:1adb quiet video=efifb:off udev.log_priority=3"
<?xml version='1.0' encoding='UTF-8'?>
<domain type='kvm'>
<name>Windows 10</name>
<uuid>c6b932ba-388b-2cb6-e3d4-aaabd29e4f79</uuid>
<metadata>
<vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
</metadata>
<memory unit='KiB'>4194304</memory>
<currentMemory unit='KiB'>4194304</currentMemory>
<memoryBacking>
@MartinSadovy
MartinSadovy / kvm config.xml
Created March 17, 2019 20:57
GPU passthrough, unraid, nvidia rtx
<!-- use q35-3.0 -->
<!--vendor_id is replacing none and kvm->hidden is required -->
<features>
<acpi/>
<apic/>
<hyperv>
<relaxed state='on'/>
<vapic state='on'/>
### Keybase proof
I hereby claim:
* I am martinsadovy on github.
* I am sodae (https://keybase.io/sodae) on keybase.
* I have a public key ASDasI_gXoa_EPUGc4riFmBzVx8UHjOGqB4FYoy7o1Odago
To claim this, I am signing this object:
@MartinSadovy
MartinSadovy / RecursiveWatchService.kt
Last active October 23, 2017 15:46
Using Java WatchService in recursive. Classic WatchService provides only file name without path, this provides absolute path
package cz.sodae.utils
import java.nio.file.*
import java.nio.file.attribute.BasicFileAttributes
import java.util.concurrent.ConcurrentHashMap
interface RecursiveWatchServiceListener {
fun onCreate(path: Path)
fun onModify(path: Path)
#!/bin/sh
# pacman -Sy easy-rsa
# EasyRSA 3.0 + http://www.stj.me/2016/02/17/openvpn-ddwrt.html
# run as ROOT!
echo "set_var EASYRSA_DN \"org\"" >> vars
CLIENT_OUT_DIR="/home/sodae/keys-openvpn/"
@MartinSadovy
MartinSadovy / README.md
Last active September 1, 2017 18:22
lpass: search in show

Interactive console LastPass

Usage: lps [keyword]

Then it asks you to copy or show password:

  • if you want to copy, write that number before name of entry
  • if you want show the password, show [number] (or s [number], or s[number])
@MartinSadovy
MartinSadovy / blebeacon.sh
Last active October 9, 2016 16:57 — forked from gbirke/ibeacon.sh
Init script for iBeacon
#!/bin/sh
### BEGIN INIT INFO
# Provides: blebeacon
# Required-Start: $bluetooth
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# X-Interactive: true
# Short-Description: Start/stop Bluetooth iBeacon
### END INIT INFO
<?php
/**
* @see api: https://github.com/bahbka/pebble-my-data/blob/master/README.md
* @author Martin Sadový
*/
class Pebble
{
/**
* Font