Skip to content

Instantly share code, notes, and snippets.

/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export type paths = Record<string, never>;
export type webhooks = Record<string, never>;
export interface components {
schemas: {
// KEEP
@rustysys-dev
rustysys-dev / functions.sh
Last active May 10, 2022 22:12
Update Golang
update_go() {
local LATEST
local GOBIN
local PATHRC
LATEST="$(curl -sL "https://golang.org/dl/?mode=json" | jq -r .[0].version)"
GOBIN='${HOME}/go/bin'
PATHRC="${HOME}/.bashrc.d/pathrc"
curl -sLo go.tar.gz "https://dl.google.com/go/$LATEST.linux-amd64.tar.gz"
rm -rf "${HOME}/go"
tar -C "${HOME}" -xzf go.tar.gz
@rustysys-dev
rustysys-dev / 20-3rdbutton.conf
Created March 14, 2019 11:51
/etc/X11/xorg.conf.d/20-3rdbutton.conf
Section "InputClass"
Identifier "middle button"
MatchIsPointer "on"
MatchDriver "libinput"
Option "MiddleEmulation" "off"
EndSection
@rustysys-dev
rustysys-dev / pathfinder.go
Last active March 6, 2019 02:10
Find all dirs in given directory.
package main
import (
"flag"
"fmt"
"os"
"path/filepath"
"regexp"
)
@rustysys-dev
rustysys-dev / bklight.sh
Last active March 5, 2019 02:55
Change backlight settings in Fedora 29 MATE
#!/usr/bin/env bash
CURRENT_LEVEL=$(pkexec --user root mate-power-backlight-helper --get-brightness)
if [ $1 == "get" ]; then
echo -e "\nCurrent Level: $CURRENT_LEVEL\n"
exit 0
elif [ -z $1 ] || [ -z $2 ]; then
echo -e "\nUSAGE: change-backlight <inc|dec|set|get> [<val>]\n"
exit 0
fi
@rustysys-dev
rustysys-dev / dnf-history-search.sh
Created March 4, 2019 16:25
Searches your dnf history entries that changed $term
function dnf-history-search () {
if [ -z $1 ]; then
echo -e "\nSpecify search term\n"
return 0
fi
HISTORY=$(sudo dnf history | awk 'NR<=2 { next } { print $1 }')
for item in $HISTORY
do
ITEM=$(sudo dnf history info $item | grep $1)
if ! [ -z "$ITEM" ]; then