Skip to content

Instantly share code, notes, and snippets.

View 7enderhead's full-sized avatar

7enderhead 7enderhead

View GitHub Profile
@7enderhead
7enderhead / gen-panbeam.sh
Created October 9, 2024 07:58
Create Pandoc Beamer Presentations in Full and Incremental Mode With and Without Footers
#!/usr/bin/env bash
# Initialize default values
full=false
incremental=false
# Function to display usage instructions
usage() {
echo "Usage: $0 [OPTIONS] output_base_name"
echo "Options:"
@7enderhead
7enderhead / git-status.sh
Created October 7, 2024 21:14
Check Subfolders for Git Status
#!/usr/bin/env bash
# Function to check git status
check_git_status() {
local dir="$1"
cd "$dir" || return
# Check if it's a git repository
if [ -d .git ] || git rev-parse --git-dir > /dev/null 2>&1; then
# Get git status
@7enderhead
7enderhead / repair-insync-apt-key.sh
Last active October 2, 2024 12:17
Insync Repair Expired apt Key
sudo apt-key del ACCAF35C
cd /tmp
wget https://d2t3ff60b2tol4.cloudfront.net/repomd.xml.key
sudo apt-key add ./repomd.xml.key
sudo apt-key list
sudo apt-get update
@7enderhead
7enderhead / watcher.sh
Last active October 15, 2024 20:31
Watch Path for File Changes and Run Tool on Certain Files
#!/usr/bin/env bash
# Function to get the absolute path
get_absolute_path() {
local path="$1"
if [[ -z "$path" ]]; then
path="."
fi
echo "$(cd "$(dirname "$path")" && pwd)/$(basename "$path")"
}
@7enderhead
7enderhead / 6x4.py
Created April 1, 2023 18:45
Create BIOS Master Password for Fujitsu Laptops (6x4 Digit Version) - Python 3 Compatible
#!/usr/bin/python
# Copyright 2009: dogbert <[email protected]>
# Copyright 2023: 7enderhead (https://github.com/7enderhead/)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
@7enderhead
7enderhead / SimpleAuthServer3.py
Last active May 4, 2019 17:44 — forked from fxsjy/SimpleAuthServer.py
SimpleAuthServer: A SimpleHTTPServer with authentication
# Python3 compatible
import http.server
from http.server import SimpleHTTPRequestHandler
import sys
import base64
key = ""
class AuthHandler(SimpleHTTPRequestHandler):
''' Main class to present webpages and authentication. '''