I hereby claim:
- I am haliphax on github.
- I am haliphax (https://keybase.io/haliphax) on keybase.
- I have a public key ASC0LFekXGTz3OedyiQZMCgD_CiApPRAvykdZJCJsqv5wgo
To claim this, I am signing this object:
#!/usr/bin/env bash | |
VERB=enable | |
KEYBOARD_ID=12 | |
TOUCHPAD_ID=13 | |
[ -z "$(xinput list-props 13 | grep -e 'Device Enabled.*:.*0')" ] && VERB=disable | |
xinput $VERB $KEYBOARD_ID | |
xinput $VERB $TOUCHPAD_ID |
def flatten(source): | |
""" | |
Flattens an irregular array into a single dimension. | |
:param list source: The array to flatten | |
:rtype: list | |
:returns: The flattened array | |
""" | |
assert isinstance(source, (list, tuple)), 'Only lists and tuples are supported' |
/*** | |
* Shibboleth IIS Authentication Module | |
* | |
* This module is responsible for taking two attributes from Shibboleth | |
* (uid, memberOf) and using them to construct a user principal that | |
* can be used in IIS authorization rules. Add the generated DLL to | |
* either the GAC or the web site's Bin folder and reference it in the | |
* Modules configuration for IIS. | |
***/ |
var user0 = new string[] { "/a", "/b", "/c", "/d", "/e", "/f" }; | |
var user1 = new string[] { "/b", "/c", "/e", "/f" }; | |
var user2 = new string[] { "/a", "/b", "/d", "/e", "/f" }; | |
var user3 = new string[] { "/a", "/c", "/d", "/e", "/f" }; | |
var user4 = new string[] { "/a", "/b", "/c", "/d", "/e", "/f" }; | |
var user5 = new string[] { "/a", "/b", "/e", "/f" }; | |
var user6 = new string[] { "/a", "/b", "/c", "/e", "/f" }; | |
var user7 = new string[] { "/c", "/d", "/e", "/f" }; | |
var user8 = new string[] { "/d", "/e", "/f" }; | |
var user9 = new string[] { "/b", "/c", "/e", "/f" }; |
// capitalizes the first letter of every word in the given string | |
let properCase (s:string) = | |
// recursive helper function | |
let rec helper (s:string) (i:int) (capitalize:bool) (result:string) = | |
// if we're at the end of the string, return our result | |
if s.Length - 1 < i then | |
result | |
else | |
// recurse to the next character in the input string | |
(helper s (i + 1) (s.[i] = ' ') (result + |
open System.IO | |
// sums up all of the lines in a given file | |
let sumFile (fileName:string) = | |
// wrapper for catching int conversion exceptions | |
let wrapper (sr:System.IO.StreamReader) = | |
try | |
int (sr.ReadLine()) | |
with | |
| :? System.FormatException -> 0 |
/** printable ASCII characters */ | |
const ascii = []; | |
for (let i = 33; i <= 126; ascii.push(String.fromCharCode(i++))); | |
/** generate random string */ | |
const randomString = limit => { | |
const result = []; | |
for (let i = 0; i < limit; i++) { | |
const index = Math.floor(Math.random() * (126 - 33) + 33); |
#!/usr/bin/env bash | |
# install gitmoji as a commit hook | |
# | |
# - uses https://www.npmjs.com/package/gitmoji-cli | |
# - does not require global module installation | |
# - skips hook if message already starts with gitmoji | |
root="$(git rev-parse --show-toplevel)" | |
hook="$root/.git/hooks/prepare-commit-msg" |
import { UserConfig } from "@11ty/eleventy"; | |
import { DOMParser } from "@xmldom/xmldom"; | |
import { transform } from "esbuild"; | |
import { minify } from "html-minifier"; | |
/** cache for content of script tags with an ID */ | |
const scriptCache = new Map<string, string>(); | |
/** DOM parser for navigating the rendered document; warnings are ignored */ | |
const parser = new DOMParser({ errorHandler: { warning: () => {} } }); |
I hereby claim:
To claim this, I am signing this object: