Skip to content

Instantly share code, notes, and snippets.

@TylerWhittaker
TylerWhittaker / bash_wget.sh
Last active October 27, 2024 08:21
Bash HTTP(S) download script (pure bash HTTP download for systems without curl/wget/fetch)
#!/bin/bash
#
# bash_wget.sh
#
# Tyler Whittaker <[email protected]>
#
# BASH HTTP(S) DOWNLOAD SCRIPT
# - downloads a file from HTTP server in almost pure bash (no curl/wget required)
# - requires `openssl` binary for HTTPS download (alternatively, just use curl/wget)
#
@Cdaprod
Cdaprod / Wireless-Bluetooth-USB-C-Keyboard-with-ESP32-S2-Mini.md
Created July 7, 2024 02:22
This setup enables your ESP32-S3 Mini to act as a wireless Bluetooth keyboard using a USB-C keyboard. Ensure you adapt the provided code examples to fit your specific setup and environment.

Building a Wireless Bluetooth USB-C Keyboard with ESP32-S3 Mini

Creating a wireless Bluetooth USB-C keyboard using an ESP32-S3 Mini involves connecting a USB-C keyboard to an ESP32-S3 via a USB Host Shield. This project allows you to transform a wired keyboard into a wireless one, leveraging Bluetooth communication. Below is a detailed guide on how to set up and program this system.

Components Needed

  1. ESP32-S3 Mini
  2. USB Host Shield or USB Host Adapter (e.g., USB Host Shield for Arduino or a USB Host Module)
  3. USB-C Keyboard
  4. USB-C to USB-A Adapter (if necessary)
@BalazsGyarmati
BalazsGyarmati / scroll_to_plusminus_macos.swift
Last active November 19, 2025 14:34
Use cmd + scroll wheel to zoom inside apps in MacOS
//
// main.swift
// scroll_to_plusminus
//
// Created by uniqueidentifier on 2021-01-08.
// Modified by alex on 2022-07-08 to use modifiers for scrolling
// Modified by BalazsGyarmati on 2023-01-04 to use command instead of control + respect any keyboard layout for + and -
//
import Foundation
@agyild
agyild / FSR.glsl
Last active December 8, 2025 15:16
AMD FidelityFX Super Resolution v1.0.2 for mpv
// Copyright (c) 2021 Advanced Micro Devices, Inc. All rights reserved.
//
// 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
@scientificRat
scientificRat / keymap.py
Last active September 29, 2025 18:00
Use raspberry pi as Bluetooth HID mouse/keyboard emulator
#
# Taken from https://www.gadgetdaily.xyz/create-a-cool-sliding-and-scrollable-mobile-menu/
#
# Convert value returned from Linux event device ("evdev") to a HID code. This
# is reverse of what's actually hardcoded in the kernel.
#
# Lubomir Rintel <[email protected]>
# License: GPL
#
# Ported to a Python module by Liam Fraser.
@fffonion
fffonion / setup-dashbutton.py
Created September 28, 2019 22:32
Setting up dash button without Amazon App
import requests
import re
import sys
# Initial work from: https://mpetroff.net/2016/07/new-amazon-dash-button-teardown-jk29lp/
h = requests.Session()
BASE_URL = "http://192.168.0.1"
@metafloor
metafloor / zpl-quick-reference.md
Last active December 4, 2025 18:08
ZPL Quick Reference

ZPL Commands

Command Format Description
^A ^Afo,h,w,d:f.x Use Scalable/Bitmapped Font
^A@ ^A@o,h,w,d:f.x Use Font Name to Call Font
^B0 ^B0a,b,c,d,e,f,g Aztec Bar Code Parameters
^B1 ^B1o,e,h,f,g Code 11 Bar Code
^B2 ^B2o,h,f,g,e,j Interleaved 2 of 5 Bar Code
^B3 ^B3o,e,h,f,g Code 39 Bar Code
@TylerWhittaker
TylerWhittaker / notepad.html
Last active August 2, 2018 16:00 — forked from jdkanani/notepad.html
This bookmarklet gives you a code editor in your browser with a single click.
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/python");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@fire1ce
fire1ce / Raspberry Pi 3 TOR Access Point Router.md
Last active November 4, 2023 06:39
Raspberry Pi 3 TOR Access Point Router

THIS GIST WON'T BE UPDATED ANY MORE (24/10/18)

Follow the progress of this project here 3os.org Raspberry Pi 3 TOR Access Point Router Project

Network: Router RJ45 <--> Ethernet Port on Raspberry <--> TOR <--> Raspberry WIFI AC <--> WIFI CLIENT

# -- Download Rasbian Strech Lite from: https://www.raspberrypi.org/downloads/raspbian/
@darksidelemm
darksidelemm / gist:b517e6a9b821c50c170f1b9b7d65b824
Last active June 20, 2025 06:03
PPM Correction under Raspbian using LTE-Cell-Scanner

LTE-Cell-Scanner under Raspbian (and maybe Ubuntu/Debian)

Mark Jessop [email protected] 2017-11-19

Here in VK-land, GSM is dying, if not already dead in many parts of the country. As such, RTLSDR calibration tools like kalibrate-rtl are not particularly helpful! However, thanks (mainly) to Telstra, we have a very wide coverage 4G (LTE) network on 'Band 28', which is in a good frequency range for use with a RTLSDR (Downlink band 758 – 803 MHz). LTE-Cell-Scanner provides the 'CellSearch' utility, which will search for LTE cells, and determine the RTLSDR's clock offset. This gist attempt to provide some sort of guide on getting CellSearch running under Raspbian.