Skip to content

Instantly share code, notes, and snippets.

@derjohn
derjohn / update-huawei-matebook-firmware-linux.md
Last active March 27, 2024 19:05
Update your Huawei Matebook Pro X (and others) from the Linux shell with fwupd

Huawei Matebook BIOS update with Linux

Tested with Huawei Matebook X Pro (MACH-WX9) This is more or less a step by step tutorial, written 02/2021. Sadly at the moment Huawei does not ship a package in Linux Vendor Firmware Service.

WARNING

Please note that you can damage ("brick") your device if something goes wrong or is done incorrectly. This is for the advanced user! I can only say that I flashed the new firmware 0.1.33 to my MACH-WX9 successfully.

Original docs

dennemann.blog THX!!!

@yebyen
yebyen / argo-setup.sh
Last active June 13, 2023 13:23
ArgoCD with Ingress, ingress-nginx, on KiND
#!/bin/bash
# from https://argoproj.github.io/argo-cd/getting_started/
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
cat <<EOF | kubectl apply -f -
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
@daehahn
daehahn / wsl2-network.ps1
Last active April 29, 2024 08:27
WSL 2 TCP NETWORK FORWARDING
# WSL2 network port forwarding script v1
# for enable script, 'Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser' in Powershell,
# for delete exist rules and ports use 'delete' as parameter, for show ports use 'list' as parameter.
# written by Daehyuk Ahn, Aug-1-2020
# Display all portproxy information
If ($Args[0] -eq "list") {
netsh interface portproxy show v4tov4;
exit;
}
@alexchiri
alexchiri / get-started-with-kind-in-wsl2-installation-instructions.md
Last active May 2, 2024 20:37
Get started with kind in WSL2 - installation instructions
@christopher-talke
christopher-talke / deploy.sh
Last active December 15, 2022 08:15
Docker Deployment via Remote SSH
#!/bin/bash
# Basic Script to Automate Docker Deployment
# - Details for how this script works, see here:
# - https://gist.github.com/christopher-talke/11c655de511dd799a1d9c3cf156e7a94#gistcomment-2935112
# Created By: christopher.talke <christopher.talke@gmail.com>
##### VARIABLES SECTION #####
@ChaosEngine
ChaosEngine / Samsung_SCX-3400_Series.ppd
Created September 2, 2018 11:13
Samsung SCX-3405W Cups PPD file
*PPD-Adobe: "4.3"
*%%%% PPD file for SCX-3200 with CUPS.
*%%%% Created by the CUPS PPD Compiler CUPS v1.5.0.
*FormatVersion: "4.3"
*FileVersion: "2.0.0"
*LanguageVersion: English
*LanguageEncoding: ISOLatin1
*PCFileName: "scx3200.ppd"
*Product: "(SCX-3200)"
*Manufacturer: "Samsung"
#!/bin/bash
system=$(lsb_release --description)
system_name=$(lsb_release --id --short)
system_version=$(lsb_release --release --short)
system_main_version=${system_version%%.*}
is_debian=false
is_ubuntu=false
is_mint=false
@Necklaces
Necklaces / ufw_vpn_killswitch_tutorial.md
Last active February 28, 2024 22:13
GNU/Linux UFW VPN kill switch tutorial

GNU/Linux UFW VPN kill switch tutorial

This is a quick guide for setting up a kill switch using UFW (Uncomplicated FireWall). It is assumed you are using OpenVPN and optionally Network-Manager with network-manager-openvpn.

1. (Optional) IP Addresses

Before we can start we're going to need the IP address (or the IP addresses) of your VPN so that we can whitelist those later on, write them down. They are obviously going to be different for every VPN and VPNs with multiple servers, so I'll leave this up to you.

2. Install UFW

On some systems UFW is installed and enabled by default (Ubuntu, for example). Installation procedure is going to be different for every distribution of GNU/Linux, but it's usually something like

@tiagoengel
tiagoengel / noise-cancellation.sh
Last active May 12, 2023 20:41
Hiss / White / Static noise cancellation on Linux using Pulseaudio and Sox
#!/bin/bash
# You'll need to have sox, pavucontrol and alsa-utils installed, and the snd_aloop kernel module loaded.
# You can configure your system to load it on startup or load it manually with "sudo modprobe snd_aloop"
# Once this is script is running, you need to start recording audio in the application of your
# preference, open pavucontrol, go to the recording tab and change the recording source of that application
# to "Monitor of Loopback ..."
time=5
@olih
olih / jq-cheetsheet.md
Last active May 15, 2024 22:26
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq