This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[snippets]] | |
description = "Pull and merge GitHub PR" | |
command = "git pull origin pull/<issue_number>/head" | |
tag = ["git", "github"] | |
output = "" | |
[[snippets]] | |
description = "Featch GitHub PR" | |
command = "git fetch origin pull/<issue_number>/head:<new_branch_name>" | |
tag = ["git", "github"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
IFS=: read -ra BIN_DIRS <<< "${PATH:-/usr/local/bin:/usr/bin:/bin}" | |
APPS_HOME="${XDG_DATA_HOME:-$HOME/.local/share}/applications" | |
for bin_dir in "${BIN_DIRS[@]}"; do | |
for bin_path in "$bin_dir"/qemu-system-*; do | |
[ -x "$bin_path" ] || continue | |
bin_name="$(basename "$bin_path")" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
"""OBS Build Trigger System for GitHub Repositories | |
This script looks into a specific repository branch on GitHub and triggers | |
a build request through the OBS API if the last commit hash has changed. | |
To get the API Token for your OBS Project run: | |
$ osc token --create [PROJECT] [PACKAGE] | |
based on https://github.com/mschnitzer/obs-build-trigger |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Creating and rotating snapshots of LVM volumes | |
# | |
# https://gist.github.com/SmartFinn/013dc2670f6605826acfae8e25c11178 | |
# | |
# Copyright (c) 2023 Serhii Yeremenko (https://github.com/SmartFinn) | |
# | |
# Permission to use, copy, modify, and/or distribute this software for any | |
# purpose with or without fee is hereby granted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
Forward email marked with custom label to Telegram. | |
Sergei Eremenko (https://github.com/SmartFinn) © 2020 | |
**/ | |
// Custom trigger to run script every 1 min | |
function startCustomTrigger() { | |
ScriptApp.newTrigger('checkInbox').timeBased().everyMinutes(1).create() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script sends an email when a new user logged in the router | |
# | |
# Required permissions: | |
# | |
# [x] read [x] write | |
# [x] policy [x] test | |
# | |
# written by Sergei Eremenko (https://github.com/SmartFinn) | |
:global TokensOfLoggedUsers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/Makefile | |
/.rsyncignore |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -f | |
# Copyright (c) 2020 Sergei Eremenko (https://github.com/SmartFinn) | |
# | |
# Permission to use, copy, modify, and/or distribute this software for any | |
# purpose with or without fee is hereby granted. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | |
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | |
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | |
# INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# | |
# Copyright (c) 2021 Sergei Eremenko (https://github.com/SmartFinn) | |
# | |
# Permission to use, copy, modify, and/or distribute this software for any | |
# purpose with or without fee is hereby granted. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | |
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | |
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Simple script that creates various directories to test your $LS_COLORS setup | |
set -euo pipefail | |
mkdir -p test | |
cd test | |
# File | |
touch FILE |