Skip to content

Instantly share code, notes, and snippets.

@kevinoid
kevinoid / .gitignore
Created October 3, 2012 19:23
An example program using Dispatch with SSL certificate verification
# Git ignore file
project/target/
target/
@kevinoid
kevinoid / benchmark-defer-timeout-error.js
Created March 3, 2016 21:33
An example of how to add timeouts and recover from errors in deferred benchmarks with Benchmark.js.
/**
* An example of how to add timeouts and recover from errors in deferred
* benchmarks with Benchmark.js.
*
* @see https://github.com/bestiejs/benchmark.js/issues/123
* @copyright Copyright 2016 Kevin Locke <kevin@kevinlocke.name>
* @license MIT
*/
'use strict';
@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

[...]

@kevinoid
kevinoid / LICENSE.txt
Created October 3, 2012 20:31
An example program using AsyncHttpClient with SSL certificate verification
CC0 1.0 Universal
Statement of Purpose
The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator and
subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").
Certain owners wish to permanently relinquish those rights to a Work for the
@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 / session-manager-to-bookmarks.py
Created December 23, 2016 04:20
Script to convert Firefox Session Manager sessions to bookmarks.html
#!/usr/bin/env python3
"""Convert Firefox Session Manager sessions to bookmarks.html."""
import argparse
import json
import logging
import os
import sys
__version__ = '0.1.0'
@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 / 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 / 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 / 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