Skip to content

Instantly share code, notes, and snippets.

@kevinoid
kevinoid / MSAccessLinkNoID.ahk
Last active October 5, 2020 13:44
AutoHotkey script to dismiss (i.e. cancel) the Microsoft Access "Select Unique Record Identifier" dialog when linking a table or view without a primary key.
; AutoHotkey script to dismiss the "Select Unique Record Identifier" dialog
; when linking a table or view without a primary key.
;
; Written in 2020 by Kevin Locke <kevin@kevinlocke.name>
; Based on https://www.autohotkey.com/boards/viewtopic.php?p=295064#p295064
;
; To the extent possible under law, the author(s) have dedicated all copyright
; and related and neighboring rights to this software to the public domain
; worldwide. This software is distributed without any warranty.
;
@kevinoid
kevinoid / Generate-DesignerFiles.ps1
Created June 26, 2020 02:35
Script to (re-)generate .designer files for .aspx, .ascx, .master, .resx, .settings, and other files which generate code at design time.
##!/usr/bin/env pwsh
<#
.SYNOPSIS
Generate .designer files for a project or solution.
.NOTES
Copyright 2020 Kevin Locke <kevin@kevinlocke.name>
Available under the MIT License: https://opensource.org/licenses/MIT
@kevinoid
kevinoid / sway.log
Created May 16, 2020 21:15
Sway debug log for Vim clipboard issue
2020-05-16 15:09:49 - [sway/main.c:152] Linux kevinolos 5.6.3 #22 SMP Sat Apr 11 06:52:07 MDT 2020 x86_64 GNU/Linux
2020-05-16 15:09:49 - [sway/main.c:168] Contents of /etc/os-release:
2020-05-16 15:09:49 - [sway/main.c:152] PRETTY_NAME="Debian GNU/Linux bullseye/sid"
2020-05-16 15:09:49 - [sway/main.c:152] NAME="Debian GNU/Linux"
2020-05-16 15:09:49 - [sway/main.c:152] ID=debian
2020-05-16 15:09:49 - [sway/main.c:152] HOME_URL="https://www.debian.org/"
2020-05-16 15:09:49 - [sway/main.c:152] SUPPORT_URL="https://www.debian.org/support"
2020-05-16 15:09:49 - [sway/main.c:152] BUG_REPORT_URL="https://bugs.debian.org/"
2020-05-16 15:09:49 - [sway/main.c:168] Contents of /etc/debian_version:
2020-05-16 15:09:49 - [sway/main.c:152] bullseye/sid
@kevinoid
kevinoid / .bashrc
Created July 31, 2019 16:31
GnuPG pinentry script for terminal or graphical interface based on $PINENTRY_USER_DATA.
# ~/.bashrc: executed by bash(1) for non-login shells.
# If file exists (likely) copy fragment below into existing script:
# If stdin is a terminal
if [ -t 0 ]; then
# Set GPG_TTY so gpg-agent knows where to prompt. See gpg-agent(1)
export GPG_TTY="$(tty)"
# Set PINENTRY_USER_DATA so pinentry-auto knows to present a text UI.
export PINENTRY_USER_DATA=USE_TTY=1
@kevinoid
kevinoid / error-reporting.js
Last active April 11, 2023 03:50
More Robust Client-Side JavaScript Error Reporting
// JavaScript error reporting functions, including automatic window.onerror
// and unhandledrejection reporting.
//
// Based on:
// https://kevinlocke.name/bits/2019/07/30/more-robust-javascript-error-reporting/
//
// API:
// reportError(message, error):
// Report an exception with optional message and exception value.
// reportRejection(message, cause):
@kevinoid
kevinoid / keybase.md
Created July 13, 2019 19:19
Keybase verification

Keybase proof

I hereby claim:

  • I am kevinoid on github.
  • I am kevinoid (https://keybase.io/kevinoid) on keybase.
  • I have a public key whose fingerprint is E98C 0D0D 7CD6 8D7D DDCF 7034 498A 12A1 584E A6F9

To claim this, I am signing this object:

@kevinoid
kevinoid / JsonCollectionDeserializer.cs
Created August 12, 2018 22:49
.NET JSON deserializer for collection types which supports preserving order
// <copyright file="JsonCollectionDeserializer.cs" company="Kevin Locke">
// Copyright 2018 Kevin Locke
//
// Permission to use, copy, modify, and/or distribute this software for any
// purpose with or without fee is hereby granted, provided that the above
// copyright notice and this permission notice appear in all copies.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
@kevinoid
kevinoid / glxgears-noroot-child.strace
Last active May 20, 2019 16:04
firejail --noprofile strace glxgears (with ASLR disabled and trace trimmed)
set_robust_list(0x7ffff6660fe0, 24) = 0
execve("/usr/bin/nvidia-modprobe", ["/usr/bin/nvidia-modprobe", "-c=255"], 0x7fffffffcc80 /* 0 vars */) = 0
brk(NULL) = 0x55555575d000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = 0
openat(AT_FDCWD, "/etc/ld.so.preload", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
close(3) = 0
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=188467, ...}) = 0
@kevinoid
kevinoid / example-unbound.conf
Last active October 22, 2023 15:23
Setup Unbound with Dnsmasq on OpenWrt
server:
do-not-query-localhost: no
domain-insecure: "0.168.192.in-addr.arpa"
domain-insecure: "example.local"
local-zone: "168.192.in-addr.arpa." nodefault
private-address: 10.0.0.0/8
private-address: 169.254.0.0/16
private-address: 172.16.0.0/12
private-address: 192.168.0.0/16
private-address: fd00::/8
@kevinoid
kevinoid / README.md
Last active February 15, 2017 02:27
Example of Yargs issue locating config under Mocha

To demonstrate the issue, notice the difference between the following:

$ node index.js
string

and

$ npm run test
number

[...]