Skip to content

Instantly share code, notes, and snippets.

View ocdtrekkie's full-sized avatar
🤷‍♂️
Writing whatever comes to mind

Jacob Weisz ocdtrekkie

🤷‍♂️
Writing whatever comes to mind
View GitHub Profile
@ocdtrekkie
ocdtrekkie / HAControllerNew.xaml
Last active March 30, 2020 18:05
XAML HAController interface made with XAML Studio
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<StackPanel Orientation="Vertical" Padding="10">
<Grid>
<Grid.ColumnDefinitions>
This file has been truncated, but you can view the full file.
execve("/usr/bin/dotnet", ["dotnet", "--version"], [/* 10 vars */]) = 0
brk(NULL) = 0xa5d000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 12288, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f7ee6ee3000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=20905, ...}) = 0
mmap(NULL, 20905, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f7ee6edd000
close(3) = 0
@ocdtrekkie
ocdtrekkie / WindowsUpdateTest.vb
Created December 27, 2019 02:15
Windows Update and Elevation Test
Imports WUApiLib
Imports System.Security.Principal
Module Module1
Sub Main()
'https://docs.microsoft.com/en-us/windows/win32/wua_sdk/searching--downloading--and-installing-updates
Dim winUpdateSession As New UpdateSession()
winUpdateSession.ClientApplicationID = "HAController"
Dim winUpdateSearcher As IUpdateSearcher = winUpdateSession.CreateUpdateSearcher()

Authored in 2010

When you want to make your application do things by the user pressing a hotkey / key combination, even when your application does not have focus, you will need a so called global hotkey. A global hotkey is a form of "keyboard hook" which is a low level way of monitoring the computer for a certain key combination, aka hotkey. Below is a simple class, which let's you register a hotkey and define what code should execute, once the hotkey is pressed.

    Public Class Hotkey

#Region "Declarations - WinAPI, Hotkey constant and Modifier Enum"
@ocdtrekkie
ocdtrekkie / keybase.md
Created August 18, 2015 00:00
Keybase

Keybase proof

I hereby claim:

  • I am ocdtrekkie on github.
  • I am ocdtrekkie (https://keybase.io/ocdtrekkie) on keybase.
  • I have a public key whose fingerprint is 7116 FC11 50C0 C96E F251 B9A8 9324 AC39 21F3 DE70

To claim this, I am signing this object: