Skip to content

Instantly share code, notes, and snippets.

View dominikbucher's full-sized avatar
🚀
Focusing

Dominik Bucher dominikbucher

🚀
Focusing
View GitHub Profile
@dominikbucher
dominikbucher / ValidAccessor.scala
Last active August 29, 2015 14:03
Scala Macro for Safe Field Access in MongoDB
/**
* Checks if a field accessor string like "properties.validated" is valid
* within nested case classes, e.g.:
*
* case class User(val properties: UserProperties)
* case class UserProperties(val validated: Boolean)
*
* In the above example, valid[User]("properties.validated") would yield true.
*
* This is useful for compile time checking when doing MongoDB queries
@dominikbucher
dominikbucher / ImprValidAccessor.scala
Last active August 29, 2015 14:04
Improved Scala Macro for Safe Field Access in MongoDB
/**
* Checks if a field accessor string like "properties.validated" is valid
* within nested case classes, e.g.:
*
* case class User(val properties: UserProperties)
* case class UserProperties(val validated: Boolean)
*
* In the above example, create an accessor object by calling
*
* val acs = accessors[User]
@dominikbucher
dominikbucher / RemoveNIPlugins.ps1
Created April 13, 2023 21:25
Uninstall Native Instruments Plugins using PowerShell
# Uninstalls all Native Instruments Plugins on Windows
# ====================================================
# NI plugins can quickly get a bit out of hand, as there are so many of it. The officiall uninstall
# instructions are to do it manually via program manager, this does the same but speeds up the
# process slightly.
# Note that this simply calls all the uninstallers after you confirmed it. Meaning you still have to
# click through the uninstallers, but at least not manually start them.
$uninstallKeys = Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*
$uninstallKeys += Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*