Skip to content

Instantly share code, notes, and snippets.

@h3po
h3po / Asus-Z170-Deluxe.conf
Last active November 19, 2022 15:53
My lm_sensors config for the Nuvoton NCT6793D on my Asus Z170-Deluxe Motherboard. Haven't figured out the voltages yet. To get the nct6775 driver working with the monitor chip, you need to boot with acpi_enforce_resources=lax to ignore the ACPI address space conflict with the EFI.
chip "nct6793-isa-0290"
label in0 "CPUVCORE"
compute in0 @*2, @/2
label in1 "VIN0"
label in2 "AVCC"
label in3 "3VCC"
label in4 "VIN1"
label in5 "VIN2"
label in6 "VIN3"
label in7 "3VSB"
@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
@nukemberg
nukemberg / knife.sh
Created June 28, 2011 07:51 — forked from ches/knife
bash completion for Chef's knife command (updated for 0.10)
# vim: ft=sh:ts=4:sw=4:autoindent:expandtab:
# Author: Avishai Ish-Shalom <avishai@fewbytes.com>
# We need to specify GNU sed for OS X, BSDs, etc.
if [[ "$(uname -s)" == "Darwin" ]]; then
SED=gsed
else
SED=sed
fi