Skip to content

Instantly share code, notes, and snippets.

View f-steff's full-sized avatar

Flemming Steffensen f-steff

View GitHub Profile
@mathix420
mathix420 / medium.user.js
Last active November 7, 2024 22:59
Bypass Medium Paywall - Working late 2023 - Greasy Fork, Violentmonkey, Tampermonkey - Click the RAW button to install
// ==UserScript==
// @name Medium Paywall Bypass
// @namespace Violentmonkey Scripts
// @run-at document-start
// @match *://*.medium.com/*
// @match *://medium.com/*
// @match *://*/*
// @grant none
// @version 2.4
// @inject-into content
@cywf
cywf / venv-python.md
Created February 25, 2023 16:32
Explanation guide to python virtual enviornments

Understanding Python Virtual Enviornments

alt text

venv is a built-in module in Python 3 that allows you to create and manage virtual environments. A virtual environment is a self-contained directory that contains its own Python installation and packages, isolated from the system-wide Python environment. This makes it easier to manage dependencies and ensure that your project runs on the specific version of Python and package versions that you need.

To create a virtual environment using venv, follow these steps:

  1. Open a terminal or command prompt.
  2. Navigate to the directory where you want to create the virtual environment.
// ==UserScript==
// @name Gmail Sender Utils
// @namespace https://github.com/szhu
// @match https://mail.google.com/mail/u/*
// @version 1.3
// @author Sean Zhu
// @description Quickly drill down by sender or label in Gmail.
// @homepageURL https://gist.github.com/szhu/1d816086307c5de02bc9a2bb1cf01fe0
// @updateURL https://gist.github.com/szhu/1d816086307c5de02bc9a2bb1cf01fe0/raw/gmail-sender-utils.user.js
// @downloadURL https://gist.github.com/szhu/1d816086307c5de02bc9a2bb1cf01fe0/raw/gmail-sender-utils.user.js
@radiantly
radiantly / noMangleGoogle.user.js
Last active September 12, 2024 14:38
Prevent Google from mangling links on the search results when clicking or copying on Firefox
// ==UserScript==
// @name Prevent link mangling on Google
// @namespace LordBusiness.LMG
// @match https://www.google.com/search
// @grant none
// @version 1.1
// @author radiantly
// @description Prevent google from mangling the link when copying or clicking the link on Firefox
// ==/UserScript==
@ixe013
ixe013 / polyglot-listener.bat
Last active November 13, 2024 12:39
A polyglot batch file/JScript.net application that listens on a port. Try it with `polyglot-listener.bat 1234` to listen on port 1234
@if (@X)==(@Y) @end /* JScript comment
@echo off
REM Polyglot code adapted from https://stackoverflow.com/a/24396149/591064
setlocal enableDelayedExpansion
REM Too few arguments?
if "x%1" == "x" goto usage_help
REM Find the latest JScript.Net compiler
for /f "tokens=* delims=" %%v in ('dir /b /s /a:-d /o:-n "%SystemRoot%\Microsoft.NET\Framework\*jsc.exe"') do (
@TheRealKeto
TheRealKeto / FuturerestoreGuide.md
Last active July 13, 2024 14:22
A guide fully covering the process of using Futurerestore to upgrade, downgrade, or re-restore to an unsigned iOS firmware.

Futurerestore Guide

Futurerestore is a tool that allows users to upgrade, downgrade, or re-restore their iOS device to an unsigned firmware through the use of SHSH2 blobs. This guide will teach you how to use Futurerestore in order to upgrade, downgrade, or re-restore to an unsigned firmware.

Before continuing, keep in mind that this guide is based off of this one, and contains information that can change your device's behavior or even damage it. With that in mind, please read the guide fully, as no one but YOU will be held responsible for any damage caused to your device.

Notes and Hints

Throughout the entirety of this guide, keep in mind that:

  • iOS 13.1.3's SEP and Baseband are NOT compatible with iOS 12.x for all devices. This means that you're NOT able to upgrade, downgrade, or re-restore A10-A12X devices back to iOS 12.x. Attempting to use an incompatible SEP and Baseband will cause Futureresto
@kekru
kekru / traefik-redirect-path.md
Last active October 16, 2024 09:52
Traefik redirect / (root) to sub path with Docker labels

Traefik: redirect base or root path to a subpath

This is tested with Traefik 1.7

This is how to redirect the root or base path to a sub path in Traefik using Docker labels:
Goals

  • https://example.com -> https://example.com/abc/xyz/
  • https://example.com/ -> https://example.com/abc/xyz/
  • https://example.com/something -> no redirect
@akshaybabloo
akshaybabloo / get_dns_records.py
Last active August 6, 2024 09:16
Printing all DNS records using DNSPython in Python 3
#!/usr/bin/env python
# -*- coding utf-8 -*-
#
# Copyright 2016 Akshay Raj Gollahalli
import dns.resolver
def get_records(domain):
"""

Experimental Docker Libnetwork DHCP Driver

The DHCP driver is intended for users to be able to integrate Docker IP address management with their existing IPAM strategies that use DHCP for dynamic address assignment. DHCP enables users to allocate addresses in an organized fashion that will prevent overlapping IP address assignment by associating a unique MAC address from the container eth0 Ethernet interface to an IP address as determined by the DHCP pools defined in the DHCP configuration.

This driver only provides the DHCP client functionality. It does not include a DHCP server. The default driver offers single-host IPAM or for distributed multi-host orchestrated IPAM see the libnetwork overlay driver.

Getting Started

@passos
passos / Dumper.py
Last active March 24, 2023 02:55
A perl Data.Dumper clone for Python
"""
A perl Data.Dumper clone for Python
Author: [email protected]
2011-07-08
Copyright 2011 Jinyu LIU
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.