Skip to content

Instantly share code, notes, and snippets.

View cdown's full-sized avatar

Chris Down cdown

View GitHub Profile
@cdown
cdown / gist:1163649
Last active April 9, 2024 01:10
Bash urlencode and urldecode
urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:$i:1}"
case $c in
@cdown
cdown / gist:5c5b53e1855d7812dfbc
Last active February 27, 2024 19:01
Debian chroot inside Arch
pacman -S wget # needed for debootstrap
curl -o /tmp/db.deb http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.60~bpo70+1_all.deb
mkdir /opt/debootstrap
cd /opt/debootstrap
ar x /tmp/db.deb
tar xf data.tar.gz
mkdir /opt/debian
@cdown
cdown / gist:b94fa58f2e2004574dc1490a847b234d
Last active February 8, 2017 13:47
flip_done timed out patch for linux-zen-flipdone
--- drivers/gpu/drm/i915/intel_display.c 2017-02-08 13:42:57.459809921 +0000
+++ drivers/gpu/drm/i915/intel_display.c 2017-02-08 13:42:37.860244470 +0000
@@ -14348,8 +14348,6 @@
WARN_ON(ret);
}
- drm_atomic_helper_wait_for_dependencies(state);
-
if (intel_state->modeset) {
memcpy(dev_priv->min_pixclk, intel_state->min_pixclk,
@cdown
cdown / keybase.md
Created April 22, 2015 19:18
keybase.md

Keybase proof

I hereby claim:

  • I am cdown on github.
  • I am cdown (https://keybase.io/cdown) on keybase.
  • I have a public key whose fingerprint is 0849 29AC FBC2 3B0B 1A26 A841 DF8D 21B6 1611 8070

To claim this, I am signing this object: