Skip to content

Instantly share code, notes, and snippets.

View extratone's full-sized avatar
🗿
sudo exit

David Blue extratone

🗿
sudo exit
View GitHub Profile
@gtankha
gtankha / Regular_Expression_HEX_gt.md
Last active July 12, 2024 11:51
Regular Expressions - Match HEX Values

Regular Expression -- Match HEX Values

This file is intended to explain the details of how a specific regular expression works. This particular regular expression is used to match a HEX value. The description below will detail each component of the regular expression and how it works.

Summary

We will be evaluating the following regular expressions used to match HEX values:

/^#?([a-f0-9]{6}|[a-f0-9]{3})$/

@mattbell87
mattbell87 / remote-wsl.md
Last active April 6, 2025 11:03
VSCode Remote: Connect to WSL2 from another machine

VSCode Remote: Connect to WSL2 from another machine

Do you want to do remote development on your WSL2 container in Visual Studio Code? Read this.

Proxy jump method

  1. On the host set up OpenSSH for Windows
  2. Run wsl --update to make sure you are running the latest WSL
  3. Open WSL and install another SSH server inside WSL with sudo apt-get install openssh-server
  4. Now run sudo systemctl enable --now ssh to automatically start ssh when WSL starts.
@AlecSchneider
AlecSchneider / youtube-dl.sh
Created November 1, 2020 16:03
Shows how to install pip -> youtube-dl and download videos
apk add py3-pip
pip3 install youtube-dl
# download video
youtube-dl --no-check-certificate link
# run in background
youtube-dl --no-check-certificate -q link &
@AlecSchneider
AlecSchneider / python_on_iphone.sh
Last active November 18, 2024 16:18
How to install apk and Python on your iPhone using the iSH Shell
cd
# you can do this all in one command
wget -qO- http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86/apk-tools-static-2.10.5-r1.apk | tar -xz sbin/apk.static && ./sbin/apk.static add apk-tools && rm sbin/apk.static
apk add python3
@HendrikRunte
HendrikRunte / dawn2dusk.js
Last active September 9, 2024 18:10
Scriptable.app widget displaying the exact time of today's sunrise and sunset. Which comes in handy in the wintertime …
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: orange; icon-glyph: sun;
///////////////////////////////////////////////////////////////////////
// dawn2dusk.js
// Origin:
// https://gist.github.com/HendrikRunte/4b5d03cb26e31508bc96553ad3c10f47
// Take it and have fun.
// Hendrik Runte, Nov 12, 2020, 17:33.
BIG iOS URL SCHEME LIST
HAD TO MAKE A DROPBOX FILE BECAUSE THIS LIST WAS TOO LONG TO POST IN THE COMMENTS OR NOT MAKE THE WORKFLOW APP TAKE FOREVER TO READ IT.
☠JAILBREAK/SYSTEM APPS
--------------------------
activator://
itms-apps://
itms-services://
@j1n6
j1n6 / noop_sync.vbs
Last active August 29, 2022 09:37
Powershell to sync and push to remote git repository via Windows Scheduled Tasks
' Hack to workaround the Powershell Console popup running on a Windows Scheduled Task
' Powershell limitations: https://github.com/PowerShell/PowerShell/issues/3028
'
' Add this file in the same git root directory as the sync.ps1
'
Dim shell,command
Dim oFSO : Set oFSO = CreateObject("Scripting.FileSystemObject")
Dim sScriptDir : sScriptDir = oFSO.GetParentFolderName(WScript.ScriptFullName)
command = "powershell.exe -nologo -File " & sScriptDir & "\sync.ps1"
@corbindavenport
corbindavenport / screenshot-tool.sh
Last active September 22, 2022 13:35
Bash script for automatically capturing screenshots
# How to use:
# ./screenshot-tool.sh [export directory] [seconds between screenshots]
# Example: ./screenshot-tool.sh ~/Pictures 5
# Install scrot if it's not already installed
if ! [ -x "$(command -v scrot)" ]; then
sudo apt install -y scrot
fi
# Set directory to parameter $1
@atnbueno
atnbueno / click-to-delete.user.js
Last active August 22, 2023 04:29
A userscript to delete page elements when clicked twice while pressing Alt, Control, and Shift simultaneously
// ==UserScript==
// @name Click to delete
// @author Antonio Bueno
// @namespace userscripts.atnbueno.com
// @description This script deletes page elements if clicked twice while simultaneously pressing Alt, Control, and Shift
// @version 2.0
// @grant none
// ==/UserScript==
/*
@jacopocolo
jacopocolo / arena-random-image-widget.js
Last active March 14, 2025 00:49
Scriptable widget that load a random image from an are.na channel
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: black; icon-glyph: user-md;
// just replace the url below with the url if the channel you want to use
// image channels only, doesnt supoort text or anything else
const channel = 'https://www.are.na/una/color-tx32pz_qsu0'
const url = 'https://api.are.na/v2/channels/'+channel.substring(channel.lastIndexOf('/') + 1)+'/contents';
const req = new Request(url)