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
| cat <<EOF | sudo bash | |
| # Flush existing rules and set default policies | |
| iptables -F | |
| iptables -t nat -F | |
| iptables -t mangle -F | |
| iptables -t raw -F | |
| iptables -X | |
| iptables -P INPUT ACCEPT | |
| iptables -P FORWARD ACCEPT |
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
| import pyshark | |
| import logging | |
| # Set up logging | |
| logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') | |
| def packet_handler(pkt): | |
| try: | |
| if 'UDP' in pkt: | |
| src_addr = pkt.ip.src |
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
| cat <<'EOF' > index.html | |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>ESP Web Tools with Dynamic Manifest</title> | |
| <style> | |
| #spinner { | |
| display: none; |
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
| NetworkProtocolHTTP::~NetworkProtocolHTTP() | |
| { | |
| for (int i = 0; i < collect_headers_count; i++) | |
| if (collect_headers[i] != nullptr) | |
| { | |
| free(collect_headers[i]); | |
| collect_headers[i] = nullptr; | |
| } | |
| } |
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
| #!/bin/bash | |
| # | |
| # create flask startup scripts for flask apps. | |
| # a typical path: /home/ubuntu/yourProject | |
| # with a venv at: /home/ubuntu/yourProject/venv | |
| # | |
| # adiller oct 2023 | |
| # | |
| ################################################################# | |
| # Function to display usage notes |
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
| python3 -m venv venv | |
| source venv/bin/activate | |
| pip install Flask openai | |
| python ./app.py | |
| ---------------------------------------------- | |
| from flask import Flask, request, jsonify |
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 | |
| # | |
| # Make a backup file of a Mastodon instance. The backup file is a TGZ containing | |
| # the Postgres dump as well as the /public/system (media) files and the | |
| # .env.production file. For loading the dump file contents, see: | |
| # https://github.com/tootsuite/documentation/blob/master/Running-Mastodon/Migration-guide.md | |
| # | |
| # Usage: ./mastodon_backup.sh my_dump_file.tgz | |
| # | |
| # Advanced usage: MASTODON_LIVE_DIRECTORY=/path/to/live ./mastodon_backup.sh my_dump_file.tgz |
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/local/bin/bash | |
| # chddeck_osx.sh for Macintosh OSX 2022 | |
| # original script from https://www.emudeck.com/ EmuDeck installation. | |
| # https://github.com/dragoonDorise/EmuDeck/blob/main/tools/chdconv/chddeck.sh | |
| # modified to run on a local copy of ROM files to compress them before installing on SteamDeck | |
| # | |
| # N O T E S: | |
| # | |
| # install chdman from brew! You need this for the script to do anything... |
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 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/sgug/bin/bash | |
| # This script should be run as your user! | |
| # Some useful variables | |
| build_progress_dir="/usr/people/edodd/btw/tiny_build/output/PROGRESS" | |
| sgug_rse_srpm_archive_root="/usr/people/edodd/rpmbuild/SRPMS" | |
| sgug_rse_git_root="/usr/people/edodd/btw/tiny_build/sgug-rse.git" | |
| sgug_rse_srpm_output_root="/usr/people/edodd/btw/tiny_build/output/SRPMS" | |
| sgug_rse_rpm_output_root="/usr/people/edodd/btw/tiny_build/output/RPMS" | |
| _rpmbuild=$1 | |
| if [[ -z $_rpmbuild ]] ; then |