Skip to content

Instantly share code, notes, and snippets.

View AndrewKvalheim's full-sized avatar

Andrew AndrewKvalheim

View GitHub Profile
@AndrewKvalheim
AndrewKvalheim / readme.md
Last active June 5, 2021 16:21
Make the Firefox 89 “compact” mode actually compact

screenshot

@AndrewKvalheim
AndrewKvalheim / private-build-plans.toml
Created March 31, 2021 18:06
Iosevka configuration
#
# Proportional
#
[buildPlans.iosevka-custom-proportional]
family = "Iosevka Custom Proportional"
slopes = { upright = "normal", italic = "italic" }
widths = { normal = { css = "normal", menu = 5, shape = 500 } }
ligations = { inherits = "jspt" }
quasiProportionalDiversity = 1
@AndrewKvalheim
AndrewKvalheim / ecm-classika-pid.dot
Created April 29, 2020 22:44
Diagram of ECM Classika PID
graph {
nodesep = 0.2; ranksep = 0.2;
water [shape=plain, group=a];
reservoir [shape=oval, group=a];
split_a [shape=point, group=a];
filter_a [shape=box, label="filter", group=a];
pump [shape=box, group=a];
one_way [shape=diamond, group=a, label="one way", margin=0];
split_b [shape=point, group=a];

Static site generators

Frameworks

Healthy community Zero runtime PostCSS Sitemap API Omit file extensions
[Eleventy] ✔ [#272]
[Eleventy] + [Parcel] ❌ [L180]
[Gatsby.js] ❌ [#962]
[Gridsome] ❌ [#1000]
@AndrewKvalheim
AndrewKvalheim / select-redundant-nodes.js
Last active January 29, 2020 19:18
JOSM script to select redundant nodes in buildings
// Given a selection of buildings, select redundant (i.e. collinear, non-tagged,
// non-glued) nodes.
//
// Dependencies:
//
// - [JOSM Scripting Plugin](https://gubaer.github.io/josm-scripting-plugin/)
//
// Usage:
//
// 1. Select some buildings for analysis, e.g. via Search → `new building`.
@AndrewKvalheim
AndrewKvalheim / monokai.sh
Created August 31, 2012 20:22
Monokai color scheme for mintty
#!/bin/bash
# Applies the Monokai color scheme to the current terminal session.
declare -A map0
map0=( [foreground ]='#F8F8F2' [background ]='#272822'
[cursor ]='#F8F8F0' [selection ]='#49483E'
[pink ]='#F92672' [green ]='#A6E22E'
[yellow ]='#E6DB74' [blue ]='#66D9EF'
[purple ]='#AE81FF' [orange ]='#FD971F'
[gray ]='#75715E' )
@AndrewKvalheim
AndrewKvalheim / all-unlock-options.patch
Last active December 16, 2015 15:39
Allow less-secure screen unlocks if the encryption password isn't synchronized.
diff --git a/src/com/android/settings/ChooseLockGeneric.java b/src/com/android/settings/ChooseLockGeneric.java
index f67213c..e015024 100644
--- a/src/com/android/settings/ChooseLockGeneric.java
+++ b/src/com/android/settings/ChooseLockGeneric.java
@@ -246,7 +246,8 @@ public class ChooseLockGeneric extends PreferenceActivity {
int encryptionStatus = mDPM.getStorageEncryptionStatus();
boolean encrypted = (encryptionStatus == DevicePolicyManager.ENCRYPTION_STATUS_ACTIVE)
|| (encryptionStatus == DevicePolicyManager.ENCRYPTION_STATUS_ACTIVATING);
- if (encrypted) {
+ LockPatternUtils lockPatternUtils = new LockPatternUtils(getActivity());
@AndrewKvalheim
AndrewKvalheim / use-epost-without-proprietary-software.user.js
Created September 23, 2015 22:05
Use epost™ without proprietary software.
// ==UserScript==
// @name Use epost™ without proprietary software.
// @namespace https://Andrew.Kvalhe.im/
// @version 0.1.0
// @description Override the "Adobe Reader Required" message in Canada Post's epost™ service.
// @match https://express.epost.ca/edms/en/pdfPlugin.html*
// @grant none
// ==/UserScript==
window.overRide();

How to upgrade end-of-life Ubuntu 13.04

Ubuntu 13.04 has reached [end-of-life (EOL)][eol], so software updates to it are no longer available. It will continue to check for software updates, however, and fail with error messages such as:

Failed to download repository information.

and:

W: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/raring/main/source/Sources  404  Not Found
/ Documentation: http://www.sitemaps.org/protocol.html
doctype xml
urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'
- pages.each do |page|
url
loc = page.absolute_url
lastmod = page.mtime.iso8601
changefreq = page.data.changefreq || 'weekly'