Skip to content

Instantly share code, notes, and snippets.

View isontheline's full-sized avatar

isontheline isontheline

View GitHub Profile
@agners
agners / securetar-extract.py
Last active June 16, 2025 16:16
Extract SecureTar encrypted tar.gz files
#!/usr/bin/env python3
# /// script
# requires-python = ">=3.10"
# dependencies = [
# "securetar",
# ]
# ///
import gzip
import io
import os
@verstoff
verstoff / patreon-downloader.js
Last active April 22, 2025 00:44
Download all files on Patreon
// Copy-paste it to the browser console on Patreon posts page
setInterval(function() {
let clicked = Array.from(document.querySelectorAll('a')).some(
item => {
if (item.href.startsWith('https://www.patreon.com/file?') && !item.downloaded) {
item.click()
item.downloaded = true
return true
}
}
@3110
3110 / atom-ble-keyboard.ino
Last active May 3, 2024 15:32
ATOM Lite/MatrixをBLEキーボードにする
/*
* ATOM Lite/MatrixをBLEキーボードにするサンプルプログラム
*
* 送信するキーを変更するにはSEND_KEYの値を変更してください。
*
* コンパイルにはESP32 BLE Keyboard library(https://github.com/T-vK/ESP32-BLE-Keyboard)が必要です。
* 事前にインストールしておいてください。
*/
#include <BleKeyboard.h> // https://github.com/T-vK/ESP32-BLE-Keyboard
@mhdhejazi
mhdhejazi / Catalyst-ScaleFactor.swift
Created April 27, 2020 10:42
Change the window scale factor in a Mac Catalyst app with the help of Dynamic (https://github.com/mhdhejazi/Dynamic)
override func viewDidAppear(_ animated: Bool) {
view.window?.scaleFactor = 1.0 // Default value is 0.77
}
extension UIWindow {
var scaleFactor: CGFloat {
get {
Dynamic.NSApplication.sharedApplication
.windows.firstObject.contentView
.subviews.firstObject.scaleFactor ?? 1.0
@staminajim
staminajim / DispatchQueue+Dedupe.swift
Created January 8, 2019 11:47
Simple CGD Based Debouncing / Deduping
// Copyright (c) 2019, SeatGeek, Inc
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice, this
// list of conditions and the following disclaimer.
//
// * Redistributions in binary form must reproduce the above copyright notice,
@fnky
fnky / ANSI.md
Last active March 21, 2026 06:06
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@c0eos
c0eos / acme-cert-dump-all.py
Last active November 26, 2019 21:47
Dump all certificates from Traefik's acme.json to .pem files (updated from julien-marchand : https://gist.github.com/julien-marchand/0372bc63e0d1338ac1f35b2346f4f3a7)
#!/usr/bin/env python
import argparse
import base64
import json
import os
def main():
parser = argparse.ArgumentParser(
description="Dump all certificates out of Traefik's acme.json file")
@HoldOffHunger
HoldOffHunger / bradvin.social.share.urls.txt
Last active November 30, 2025 22:50
Social Share URL's (Summary)
https://www.facebook.com/sharer.php?u={url}
https://www.facebook.com/dialog/share?app_id={app_id}&display={page_type}&href={url}&redirect_uri={redirect_url}
https://reddit.com/submit?url={url}&title={title}
https://twitter.com/intent/tweet?url={url}&text={title}&via={user_id}&hashtags={hash_tags}
https://www.linkedin.com/sharing/share-offsite/?url={url}
https://api.whatsapp.com/send?phone={phone_number}&text={title}%20{url}
https://www.tumblr.com/widgets/share/tool?canonicalUrl={url}&title={title}&caption={text}&tags={hash_tags}
http://pinterest.com/pin/create/button/?url={url}
https://www.blogger.com/blog-this.g?u={url}&n={title}&t={text}
https://www.evernote.com/clip.action?url={url}&title={title}
@cubapp
cubapp / adjust-2-sea-pressure.py
Last active February 28, 2024 20:22
Python: How to get the adjusted-to-sea level barometric pressure from actual pressure, temperature and height above the sea level
# Actual atmospheric pressure in hPa
aap = 990
# Actual temperature in Celsius
atc = 10
# Height above sea level
hasl = 500
# Adjusted-to-the-sea barometric pressure
a2ts = aap + ((aap * 9.80665 * hasl)/(287 * (273 + atc + (hasl/400))))
@stefanbuck
stefanbuck / upload-github-release-asset.sh
Last active October 23, 2025 10:14
Script to upload a release asset using the GitHub API v3.
#!/usr/bin/env bash
#
# Author: Stefan Buck
# License: MIT
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447
#
#
# This script accepts the following parameters:
#
# * owner