Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dillera
dillera / create-startup.bash
Created November 22, 2023 20:46
A bash script that will create a systemd startup file using local env vars for security
#!/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
@dillera
dillera / gist:3efa529674685b2d23e996fff29d54cc
Created September 19, 2023 13:52
simple openAI translation service
python3 -m venv venv
source venv/bin/activate
pip install Flask openai
python ./app.py
----------------------------------------------
from flask import Flask, request, jsonify
@dillera
dillera / mastodon_backup.sh
Created December 23, 2022 21:06 — forked from nolanlawson/mastodon_backup.sh
Script to back up a Mastodon instance (for non-dockerized installs)
#!/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
#!/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...
'########:'##::::'##:::::::'##:'####:'##::: ##:'########:'########:
##.....:: ##:::: ##::::::: ##:. ##:: ###:: ##: ##.....::... ##..::
##::::::: ##:::: ##::::::: ##:: ##:: ####: ##: ##:::::::::: ##::::
######::: ##:::: ##::::::: ##:: ##:: ## ## ##: ######:::::: ##::::
##...:::: ##:::: ##:'##::: ##:: ##:: ##. ####: ##...::::::: ##::::
##::::::: ##:::: ##: ##::: ##:: ##:: ##:. ###: ##:::::::::: ##::::
##:::::::. #######::. ######::'####: ##::. ##: ########:::: ##::::
..:::::::::.......::::......:::....::..::::..::........:::::..:::::
-----------------------
#!/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
7:11:54.942 > Entering iwmDisk::mount - /APPLE/GAMES/CHOPLIFTER.PO
17:11:54.942 >
17:11:54.942 > Looking for Media Type- should be a PO image...
17:11:54.944 > Media Type PO
17:11:54.946 > idle
17:11:54.948 > enable
17:11:54.948 > f3 fc ff ff ff c3 83 80 80 80 80 82 81 80 84 83 90 c1 d1 f9 80 80 80 80 ee bf c8
17:11:54.949 > handling control command
17:11:54.949 > Device 83 Control Code f9
17:11:54.950 > Control List is at 41 51
@dillera
dillera / 332-ip12.txt
Last active February 28, 2022 21:38
IRIX 4D1 3.3.2 Full Install on IP12
______________________________________________________________________________
8888888888 Y88b d88P
888 Y88b d88P
888 Y88o88P
8888888 Y888P
888 d888b
888 d88888b
@dillera
dillera / log4j_rce_check.py
Created December 16, 2021 14:01 — forked from byt3bl33d3r/log4j_rce_check.py
Python script to detect if an HTTP server is potentially vulnerable to the log4j 0day RCE (https://www.lunasec.io/docs/blog/log4j-zero-day/)
#! /usr/bin/env python3
'''
Needs Requests (pip3 install requests)
Author: Marcello Salvati, Twitter: @byt3bl33d3r
License: DWTFUWANTWTL (Do What Ever the Fuck You Want With This License)
This should allow you to detect if something is potentially exploitable to the log4j 0day dropped on December 9th 2021.
@dillera
dillera / ffkilltabs
Created December 8, 2021 16:28
Firefox Kill Tabs
/* START -----------------------------------------------------------------to hide the native tabs */
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* to hide the native tabs */
#TabsToolbar {
visibility: collapse;
}
#main-window[privatebrowsingmode="temporary"] #TabsToolBar {
visibility: visible !important;
}
/* Minimize sidebar header to a light blue stripe (except Bookmarks, History, Sync'd Tabs); appears normally on hover */