Skip to content

Instantly share code, notes, and snippets.

View davidk's full-sized avatar
☀️

david davidk

☀️
View GitHub Profile
@davidk
davidk / gist:4bd94276ba3148df37189f67b09a50dc
Last active February 1, 2018 20:03
Firefox Quantum on Fedora - 6000: Renderer not available
# Placed here for Google
# Fix for Firefox Quantum not playing video on Fedora, with error
# 6000: Renderer not available
# This assumes RPMFusion "free" repository is enabled/installed:
# https://rpmfusion.org/Configuration
$ sudo dnf install gstreamer1-libav gstreamer1-vaapi
# Fully close and start Firefox if it is running
@davidk
davidk / i3mk2_filament_unload_petg.gcode
Created July 19, 2017 07:42
Prusa i3 MK2: Unattended filament unloading and cooling
; Unattended filament unload gcode
M107 ; Turn part fan off to heat extruder
M104 S240 ; Set extruder temp
M109 S240 ; Wait for extruder to come to temperature
M702 ; Unload filament
M106 S255 ; Turn part cooling fan on to speed cooling
M109 S49 ; Drop temperature below heatsink fan threshold (wait)
M104 S0 ; Turn hotend off
M107 ; Turn part cooling fan off
@davidk
davidk / flash_uboot_gl-ar300m.md
Last active November 22, 2023 21:51
General instructions for flashing uboot on GL-AR300M, using your system as a tftpd server to supply the AR300M with the firmware

Flashing U-Boot on the GL-AR300M

N.B. This was written from memory, so some steps might be missing/incorrect. Corrections appreciated!

The hidden page for flashing via the embedded webserver doesn't work, but flashing via serial triggered tftp works. This requires a serial to USB adapter (only TX/RX/GND are connected). See here for a pinout.

  1. Go here to grab the latest U-Boot: https://us.gl-inet.com/forums/topic/ar-300m-upgrade-uboot-to-newer-verions/

1a. Downloading requires a new user registration. It's fairly painless (e-mail addr req'd).

@davidk
davidk / camlistore.service
Last active February 1, 2017 20:24
Camlistore/minio systemd service unit files
# Installation (as root):
# sudo cp camlistore.service /etc/systemd/system/camlistore.service
# sudo chmod 664 /etc/systemd/system/camlistore.service
# sudo systemctl daemon-reload
# sudo systemctl enable camlistore.service
# sudo systemctl start camlistore.service
[Unit]
Description=camlistore
After=syslog.target network.target
The locale requested by LANG=en_US.utf8 isn't available here.
Running `locale-gen en_US.utf8' may be necessary.
mosh-server needs a UTF-8 native locale to run.
Unfortunately, the local environment ([no charset variables]) specifies
the character set "US-ASCII",
The client-supplied environment (LANG=en_US.utf8) specifies
the character set "US-ASCII".

Keybase proof

I hereby claim:

  • I am davidk on github.
  • I am keyglitch (https://keybase.io/keyglitch) on keybase.
  • I have a public key whose fingerprint is 4BE4 7641 B61A 2DEE 891A 99AB 301A 3715 12E2 7458

To claim this, I am signing this object:

@davidk
davidk / gogs_on_chip.md
Last active March 15, 2016 01:02
gogs on the NTC CHIP

gogs on the NTC CHIP

# Cross-compile
# Hints: http://dave.cheney.net/2015/08/22/cross-compilation-with-go-1-5
# Mostly, one can pull the Vagrant CHIP-SDK and do the following:

wget https://storage.googleapis.com/golang/go1.6.linux-386.tar.gz
sudo tar -C /usr/local -xvf go1.6.linux-386.tar.gz
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davidk
davidk / chrome_pixel.modules
Last active December 19, 2015 02:28
Chromebook Pixel Configurations
#!/bin/sh
# Location: /etc/sysconfig/modules/ (Fedora 19)
# tpm_tis is needed for suspend to work properly (without it and the patches, the second successful
# would result in a reboot upon wakeup)
/sbin/modprobe chromeos_laptop >/dev/null 2>&1
/sbin/modprobe tpm_tis force=1 interrupts=0 >/dev/null 2>&1
@davidk
davidk / beaglebone_blue_leds_off.sh
Last active December 17, 2015 12:28
Turn off BeagleBone Blue Blinking LEDs (so you can sleep)
#!/bin/bash
# One line glob expansion may lead to ambiguous redirect; this works consistently though.
# Tested on Ubuntu ARM
for led in /sys/devices/ocp.2/gpio-leds.8/leds/beaglebone\:green\:usr*/brightness; do
echo 0 > $led
done