HGStyle / GDPS endpoint finder
0 polubień
0 forków
1 plików
Ostatnio aktywne 1 month ago
Finds the endpoint/server URL of any GDPS easily
| 1 | import re # Required by the function |
| 2 | import os # Required by the interface |
| 3 | |
| 4 | def find_gdps_endpoint(data: bytes): # Input data should be the bytes of the whole binary file ! |
| 5 | # DO NOT REMOVE THE FOLLOWING COMMENT |
| 6 | # THIS FUNCTION IS COPYRIGHTED UNDER MIT LICENSE BY HGSTYLE 2023-end of the time |
| 7 | # READ THE LICENSE AT: https://hgstyle.mit-license.org/ |
| 8 | # Get the URLs using a regex that I copy-pasted from Stack Overflow |
| 9 | result = re.findall(r"\w+://\w+\.\w+\.\w+/?[\w\.\?=#]*".encode(), data) |
| 10 | # Set the domains to exclude |
xeaf / Bookmarklet.js
0 polubień
0 forków
1 plików
Ostatnio aktywne 1 month ago
Bookmarklet utility to copy the shortest version of a link without using external services
| 1 | javascript:(function(){var t,o,a=window.location.hostname,i=a.split(".").pop();a.includes("amazon")?(t=window.location.href.match(/https:\/\/(?:www\.)?([a-zA-Z0-9-]+)\.amazon\.[a-zA-Z]{2,}\/.*\/dp\/([A-Z0-9]{10})/))&&(o=`https://${t[1]||"www"}.amazon.${i}/dp/${t[2]}`):a.includes("ebay")?(t=window.location.href.match(/https:\/\/(?:www\.)?ebay\.[a-zA-Z]{2,}\/itm\/(\d+)/))&&(o=`https://www.ebay.${i}/itm/${t[1]}`):a.includes("cdiscount")&&(t=window.location.href.match(/https:\/\/(?:www\.)?cdiscount\.[a-zA-Z]{2,}\/.*\/f-(\d+)-([a-zA-Z0-9]+)\.html/))&&(o=`https://www.cdiscount.com/f-${t[1]}-${t[2]}.html`),o?navigator.clipboard.writeText(o).then((()=>{alert(`The following link has been copied into your clipboard:\n${o}`)})).catch((()=>{alert("Please click the document and then click the bookmarklet!")})):alert("This service is not yet supported on this domain: "+a)})(); |
HGStyle / JavaScript sucks
0 polubień
0 forków
1 plików
Ostatnio aktywne 1 month ago
If JavaScript doesn't suck, then try to tell what will this program output. (you can do anything you want like beautifying it but you can't run it)
| 1 | (()=>{let _;for(let i=0;i<10;(($)=>{})(i-1)){(($)=>{_=[Array(i)].map((_)=>{_.length+(+typeof undefined)})+($+parseInt($.toString()+(true/10)))+(typeof NaN+!$)+(typeof(null&""))+(_*-i||_)+$+[]+{}+!i+([i.toString()].map(parseInt))+(--i)+(i++)+i})(i++)/parseInt.length+parseInt.toString()};console.log((_+0*Infinity).replace(/\[/,_+[]));})(); |
HGStyle / Cosmopolitan Libc Fix
0 polubień
0 forków
1 plików
Ostatnio aktywne 1 month ago
Fixes Cosmopolitan not working on Linux
| 1 | sudo wget -O /usr/bin/ape https://cosmo.zip/pub/cosmos/bin/ape-$(uname -m).elf |
| 2 | sudo chmod +x /usr/bin/ape |
| 3 | sudo sh -c "echo ':APE:M::MZqFpD::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register" |
| 4 | sudo sh -c "echo ':APE-jart:M::jartsr::/usr/bin/ape:' >/proc/sys/fs/binfmt_misc/register" |
HGStyle / PIP APT Fix
0 polubień
0 forków
1 plików
Ostatnio aktywne 1 month ago
Fix PIP wanting you to install packages with APT
| 1 | #!/bin/bash |
| 2 | |
| 3 | # Define the pip config directory and file |
| 4 | PIP_CONFIG_DIR="$HOME/.config/pip" |
| 5 | PIP_CONFIG_FILE="$PIP_CONFIG_DIR/pip.conf" |
| 6 | |
| 7 | # Create the config directory if it doesn't exist |
| 8 | mkdir -p "$PIP_CONFIG_DIR" |
| 9 | |
| 10 | # Add or update the break-system-packages option |
Nowsze
Starsze