Skip to content

Instantly share code, notes, and snippets.

$ sudo camcontrol inquiry /dev/da7
pass7: <ATA Micron_5100_MTFD U810> Fixed Direct Access SPC-4 SCSI device
pass7: Serial Number [redacted]
pass7: 600.000MB/s transfers, Command Queueing Enabled
@rubenerd
rubenerd / freebsd-change-userid.sh
Created May 5, 2018 02:58
Change FreeBSD user ID
sudo pw usermod -n $_username -u $_new_id
@codekipper
codekipper / gist:1118953110d4e95b3bb199b69a20f5bf
Created February 9, 2018 07:02
fixup for megous/orange-pi-4.15
diff --git a/arch/arm/boot/dts/sunxi-h3-h5.dtsi b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
index 2fa8878c8cfe..66d017a94bb4 100644
--- a/arch/arm/boot/dts/sunxi-h3-h5.dtsi
+++ b/arch/arm/boot/dts/sunxi-h3-h5.dtsi
@@ -45,6 +45,8 @@
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/reset/sun8i-h3-ccu.h>
#include <dt-bindings/reset/sun8i-r-ccu.h>
+#include <dt-bindings/clock/sun8i-de2.h>
+#include <dt-bindings/reset/sun8i-de2.h>
@olivertappin
olivertappin / generate-auth-json.sh
Created September 7, 2017 19:03
Reset or install a new auth.json Composer file to authenticate without a password
composer config -g --unset github-oauth.api.github.com
composer config -g github-oauth.github.com __TOKEN__
# Generate a new token by signing into GitHub and going to Settings > Developer Settings > Personal access tokens
# Alternatively, use the following link to generate a new personal access token: https://github.com/settings/tokens/new
@JudsonHat
JudsonHat / RenameToNzbName.sh
Last active May 9, 2025 00:45
nzbget script to rename file to the nzb name
#!/bin/bash
#######################################
### NZBGET POST-PROCESSING SCRIPT ###
#
# This script will rename the file to
# the nzb name.
#
@nikhita
nikhita / update-golang.md
Last active October 12, 2025 14:56
How to update the Go version

How to update the Go version

System: Debian/Ubuntu/Fedora. Might work for others as well.

1. Uninstall the exisiting version

As mentioned here, to update a go version you will first need to uninstall the original version.

To uninstall, delete the /usr/local/go directory by:

@gardar
gardar / PKGBUILD
Created April 3, 2017 17:11
comskip PKGBUILD with comskip-gui
# Maintainer: Nick Burrett <nick@sqrt.co.uk>
pkgname=comskip
pkgver=0.94
pkgrel=1
pkgdesc='Comskip is a free MPEG commercial break detector'.
_gitname='comskip'
url='http://github.com/erikkaashoek/Comskip'
arch=('x86_64' 'i686')
license=('GPL3')
makedepends=('git')
@karlvr
karlvr / 00README.md
Last active May 12, 2025 16:38
Roadwarrior configuration for macOS 10.12, iOS 10 and Windows 10 using strongSwan and user certificates

strongSwan setup for Road Warriors on macOS 10.12, iOS 10 and Windows 10

This setup is for remote users to connect into an office/home LAN using a VPN (ipsec). This is based on (but not the same as) the strongSwan documentation and this guide: https://raymii.org/s/tutorials/IPSEC_vpn_with_Ubuntu_16.04.html

I used strongSwan 5.5.1.

apt-get install -y strongswan strongswan-pki
@mxschmitt
mxschmitt / start.sh
Last active January 10, 2025 20:49
Librespot -> ffmpeg -> vlc http streaming -> Spotify connect
#!/bin/bash
# Using the Librespot client libary for streaming the Spotfiy connect sound via http
# Instruction:
# 1. Drop this script into the root directory of the librespot repository => https://github.com/plietar/librespot
# 2. Install the dependencies => "sudo apt-get install vlc ffmpeg"
# 3. Set the correct privileges => "chmod +x start.sh"
# 4. Set the librespot directory owner to a non-root user
# 5. Switch to this user
# 6. Change the variables under this instruction for your needs
* Find release at http://pkg.freebsd.org/
* create repo file:
> cat /usr/local/etc/pkg/repos/FreeBSD10Release.conf
FreeBSD10Release: {
url: "pkg+http://pkg.freebsd.org/FreeBSD:10:amd64/release/0",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes