Skip to content

Instantly share code, notes, and snippets.

@Informatic
Informatic / domain.xml
Last active April 7, 2024 23:20
How to use Windows 10 OEM license in libvirt VM (<smbios mode='host' /> does not work as Windows seems to verify UUID; apparmor/security configuration changes may be needed)
<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
<!-- ... -->
<qemu:commandline>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/slic.bin'/>
<qemu:arg value='-acpitable'/>
<qemu:arg value='file=/some/path/msdm.bin'/>
<qemu:arg value='-smbios'/>
<qemu:arg value='file=/some/path/smbios_type_0.bin'/>
<qemu:arg value='-smbios'/>
@Stewmath
Stewmath / .xbindkeysrc
Last active June 28, 2022 08:26
Livesplit global hotkeys workaround
# Livesplit hotkeys
#
"livesplithk Page_Up"
Page_Up
"livesplithk Page_Down"
Page_Down
"livesplithk Insert"
Insert
"livesplithk Delete"
Delete
@CMCDragonkai
CMCDragonkai / free_monad_interpreter_pattern.md
Last active June 7, 2021 01:35
Haskell: Free Monad + Interpreter Pattern

Free Monad + Interpreter Pattern

It's like creating the front end and back end of a compiler inside Haskell without the need of Template Haskell!

Write your DSL AST as a Free Monad, and then interpret the monad any way you like.

The advantage is that you get to swap out your interpreter, and your main code

import java.util.*;
import rx.*;
import rx.Observable.Operator;
import rx.Observable;
import rx.observers.TestSubscriber;
import rx.subjects.*;
public class RxEventBus<T> {
@benjchristensen
benjchristensen / EventBus.java
Last active February 24, 2022 03:02
EventBus.java
import rx.Observable;
import rx.subjects.PublishSubject;
import rx.subjects.SerializedSubject;
import rx.subjects.Subject;
/**
* Simple pass-thru event bus with error handling and reconnect.
*/
public class EventBus {
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing
@letmaik
letmaik / .travis.yml
Last active December 15, 2021 23:10
Deploy snapshots to Sonatype after Travis CI build
language: java
env:
global:
- SONATYPE_USERNAME=yourusername
- secure: "your encrypted SONATYPE_PASSWORD=pass"
after_success:
- python addServer.py
- mvn clean deploy --settings ~/.m2/mySettings.xml