Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jpaugh
jpaugh / gist:f08c62bea5689c490204c3347870884e
Created January 9, 2024 16:29
SO AskUbuntu Syslog output during login attempt
Jan 9 10:16:53 asrock org.gnome.Shell.desktop[7997]: The XKEYBOARD keymap compiler (xkbcomp) reports:
Jan 9 10:16:53 asrock org.gnome.Shell.desktop[7997]: > Warning: Unsupported maximum keycode 569, clipping.
Jan 9 10:16:53 asrock org.gnome.Shell.desktop[7997]: > X11 cannot support keycodes above 255.
Jan 9 10:16:53 asrock org.gnome.Shell.desktop[7997]: > Internal error: Could not resolve keysym Invalid
Jan 9 10:16:53 asrock org.gnome.Shell.desktop[7997]: Errors from xkbcomp are not fatal to the X server
Jan 9 10:16:56 asrock kernel: [ 1059.772067] wlp4s0: No active IBSS STAs - trying to scan for other IBSS networks with same SSID (merge)
Jan 9 10:17:00 asrock kernel: [ 1064.048187] rfkill: input handler enabled
Jan 9 10:17:01 asrock CRON[8002]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Jan 9 10:17:01 asrock CRON[8003]: (unms) CMD (/home/unms/app/update.sh --cron > /dev/null 2>&1 || true)
Jan 9 10:17:19 asrock systemd[1]: fprintd.service: Succeeded.
@jpaugh
jpaugh / .bashrc
Created September 6, 2017 13:53
An auto-reloading .bashrc file
if _BASHRC_WAS_RUN 2>/dev/null; then
:;
else # Stuff that only needs to run the first time we source .bashrc.
# Useful to allow re-sourcing new changes, without breaking/changing things in this section
alias _BASHRC_WAS_RUN=true
# ... continued ...
fi
# Last mod time of a file or files
get_file_timestamp () {
@jpaugh
jpaugh / XPath in the browser.js
Created September 30, 2020 16:41
How to test XPath in the browser
function iterate(i) {
var result = [];
do {
var next = i.iterateNext();
result[result.length] = next;
} while (next != null)
return result;
}
iterate(document.evaluate("//a[@href and data-mediatype]", document, null, XPathResult.ANY_TYPE))
@jpaugh
jpaugh / scrollIntoView.js
Last active July 30, 2019 20:23
An implementation of scrollIntoView which actually does the thing.
/**
* function scrollIntoViewSensibly
* Author: Jonathan Paugh; MIT License
* Source: https://gist.github.com/jpaugh/265bbaadd7d3d243d2d52e558863847d
*
* Scroll the parent element until the child is visible. This is like the 'nearest' option to [Element.scrollIntoView],
* except that it actually works --- even in IE, and even when the child is partially visible already. It's not a drop-in
* replacement, though: to make a polyfil for [Element.scrollIntoView], you'd want to find the nearest scrollable parent
* yourself, and then accept that all options passed to the polyfil would be ignored.
*
@jpaugh
jpaugh / AsEnumerableVsCasting.cs
Last active April 17, 2019 14:00
Test whether AsEnumerable differs from casting regarding a hidden extension method.
using System;
using System.Collections.Generic;
using System.Linq;
namespace AsEnumerableVsCasting
{
class AsEnumerableVsCasting
{
static void Main(string[] args)
{
@jpaugh
jpaugh / en-bcv-parser.js
Last active August 21, 2018 14:15
Human -> OSIS Bible reference parser, copied from the following, but without the function wrapper: https://raw.githubusercontent.com/openbibleinfo/Bible-Passage-Reference-Parser/master/js/en_bcv_parser.js
var bcv_parser, bcv_passage, bcv_utils, root,
hasProp = {}.hasOwnProperty;
root = self;
bcv_parser = (function() {
bcv_parser.prototype.s = "";
bcv_parser.prototype.entities = [];
@jpaugh
jpaugh / keybase.proof
Created November 15, 2017 18:45
keybase proof
### Keybase proof
I hereby claim:
* I am jpaugh on github.
* I am jpaugh (https://keybase.io/jpaugh) on keybase.
* I have a public key ASBMWiTSoNsFFtCJvDAGy8pd9WKJQjjQLuZBxbFl6ejDCwo
To claim this, I am signing this object:
@jpaugh
jpaugh / Reference.hs
Last active December 16, 2015 04:59
Creative way to represent Biblical references in Haskell.
-- |A list of `Range's. This is the comprehensive ref type, and
-- can form an arbitrarily complex reference to the scripture.
data Reference = Reference [Range] -- [ x ] means list of x's
deriving (Show, Eq)
-- |A Range of verses, or a single ref. "Range" is a bit of a misnomer,
-- since we can have a single reference "Range".
data Range
= Range
@jpaugh
jpaugh / The gist
Created June 25, 2012 13:06
The gist
Do you catch my drift?
@jpaugh
jpaugh / OOPed-my-brain.java
Last active October 1, 2015 04:08
The night after...
/**
* This is what happens when I try eating breakfast after having spent
* the previous night hacking away on some graphical programming.
* ActionScript 3 was the language of choice---or, urm, Haxe---but the
* code is here prescribed in Java. (ActionScript 3---or actually
* Haxe---supports all of the language constructs I use here; I just
* don't remember the syntax exactly; and, after several years using
* OOP, my brain can OOPs! without any particular language.)
*/