Skip to content

Instantly share code, notes, and snippets.

View shayne's full-sized avatar

Shayne Sweeney shayne

  • EST (UTC-5)
View GitHub Profile
@shayne
shayne / emc2301-openwrt.patch
Created August 26, 2022 17:50
OpenWrt patch to add support for emc2301 pwm fan support cm4
diff --git a/target/linux/bcm27xx/bcm2711/config-5.10 b/target/linux/bcm27xx/bcm2711/config-5.10
index 03d84378b3..c6a08891e5 100644
--- a/target/linux/bcm27xx/bcm2711/config-5.10
+++ b/target/linux/bcm27xx/bcm2711/config-5.10
@@ -57,7 +57,7 @@ CONFIG_BCM2835_DEVGPIOMEM=y
CONFIG_BCM2835_MBOX=y
CONFIG_BCM2835_POWER=y
# CONFIG_BCM2835_SMI is not set
-# CONFIG_BCM2835_THERMAL is not set
+CONFIG_BCM2835_THERMAL=y
@shayne
shayne / Z_.config
Last active August 22, 2022 01:42
sim8200ea_openwrt_picm4.diff
# my .config
#
# Automatically generated file; DO NOT EDIT.
# OpenWrt Configuration
#
CONFIG_MODULES=y
CONFIG_HAVE_DOT_CONFIG=y
CONFIG_HOST_OS_LINUX=y
# CONFIG_HOST_OS_MACOS is not set

Keybase proof

I hereby claim:

  • I am shayne on github.
  • I am shayne (https://keybase.io/shayne) on keybase.
  • I have a public key ASBM_6aN677duEb6y9FPbMYoeIghUdMGpTRAszMmsUE2GQo

To claim this, I am signing this object:

@shayne
shayne / !Tailscale Unraid Setup.bash
Last active June 9, 2023 16:02
Tailscale Unraid Setup
########################################################################
#### DEPRECATED in favor of https://github.com/deasmi/unraid-tailscale
########################################################################
# /boot/config/go
# add the following...
# Tailscale
bash /boot/config/tailscale/install.sh
@shayne
shayne / hi
Last active July 21, 2020 20:53
We couldn’t find that file to show.
@shayne
shayne / main.go
Created June 2, 2018 04:07
Holdup
package main
import (
"context"
"fmt"
"io/ioutil"
"log"
"time"
"github.com/docker/docker/api/types"
@shayne
shayne / usbreset.c
Created December 1, 2016 02:22
reset usb bus linux
#include <stdio.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <linux/usbdevice_fs.h>
void main(int argc, char **argv)
{
const char *filename;
int fd;
filename = argv[1];
sudo systemctl isolate multi-user.target && sudo systemctl isolate graphical.target
@shayne
shayne / gist:47bf6dcec6d13653e4cbfeaab7f2e1b8
Created October 12, 2016 05:11
Copy terminfo to host
infocmp | ssh $remote "cat > $TERM.ti ; tic -o ~/.terminfo $TERM.ti"
@shayne
shayne / gtk-clip
Created October 8, 2016 05:31
[fix] deepin-screenshot clipboard not working
#!/bin/bash
# REPLACE EXISTING FILE WITH THIS
# /usr/share/deepin-screenshot/src/gtk-clip
# source: http://unix.stackexchange.com/a/266761
command -v xclip >/dev/null 2>&1 || { echo "Need command xclip. Aborting." >&2; exit 1; }
[[ -f "$1" ]] || { echo "Error: Not a file." >&2; exit 1; }
TYPE=$(file -b --mime-type "$1")
xclip -selection clipboard -t "$TYPE" < "$1"