Skip to content

Instantly share code, notes, and snippets.

@gpjt
gpjt / letsencrypt.py
Last active February 29, 2024 03:50
Sample acme code to get a certificate from Let's Encrypt
# There's a lack of sample code for acme/Let's Encrypt out there, and
# this is an attempt to at least slightly remedy that. It's the result
# of my first day's hacking on this stuff, so almost certainly contains
# errors and oversights.
#
# It's not designed to be specifically useful if what you want is
# just a cert -- certbot or dehydrated are better for that. It is sample
# code for people who are building automated systems to deal with large
# numbers of Let's Encrypt certificates to play with.
#
@bendavis78
bendavis78 / capslock_super_esc.md
Last active October 25, 2023 22:11
Mapping Caps Lock to simultaneous Esc and Super (Mod4)

Mapping Caps Lock to simultaneous Esc and Super (Mod4)

The CAPS key can be mapped to an escape key when pressed once, and a super (mod4) key when used in combination with other keys.

Create the file /usr/share/X11/xkb/symbols/custom_opts with the following:

// Make Caps an additional Escape
hidden partial modifier_keys
xkb_symbols "super_esc" {

key { [ Escape ] };

@stramel
stramel / browserlist
Created August 16, 2017 20:20
Polymer Gulp multiple builds
last 3 versions
not Explorer < 11
not ExplorerMobile < 11
@wvengen
wvengen / extend.sh
Last active January 8, 2024 23:28
Extend non-HiDPI external display above HiDPI internal display
#!/bin/sh
# extend non-HiDPI external display on DP* above HiDPI internal display eDP*
# see also https://wiki.archlinux.org/index.php/HiDPI
# you may run into https://bugs.freedesktop.org/show_bug.cgi?id=39949
# https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/883319
EXT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^eDP | head -n 1`
INT=`xrandr --current | sed 's/^\(.*\) connected.*$/\1/p;d' | grep -v ^DP | head -n 1`
ext_w=`xrandr | sed 's/^'"${EXT}"' [^0-9]* \([0-9]\+\)x.*$/\1/p;d'`
@thirteen37
thirteen37 / pixel-arch.md
Last active June 6, 2020 07:47
Installing Arch on the Chromebook Pixel

This describes my basic Arch Linux installation on my Chromebook Pixel.

Note: I'm a coward, so I installed Arch to an SD card instead of wiping out the existing SSD.

Requirements

  • SD card. A very minimal Arch installation with XFCE will need about 2GB, so I think 4GB is the minimum you can get by with.
  • Arch installer on a USB drive. The 2013.05.01 is broken with the recent netctl change. So either get an older or newer one.
  • Some Arch Linux familiarity.
  • Time, patience, and good eyesight.