Skip to content

Instantly share code, notes, and snippets.

@judge2020
judge2020 / Aworker.js
Created May 8, 2019 01:59
Cloudflare Workers: block proxy IPs
// Using a global variable so we aren't
// pulling from the proxy API on each
// and every subsequent request
// (note that the Workers billing still applies here)
//
// This could be "truly global" with KV but
// it's not really needed here unless the proxy list
// starts blocking CF ips.
//
//
apt install python ffmpeg
curl -L http://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
chmod a+rx /usr/local/bin/youtube-dl
youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio' --merge-output-format mp4 https://youtube.com/watch?v=fVLDxmjeyVo
@judge2020
judge2020 / cloudflare-hot-link-protection-with-stub.js
Last active October 1, 2019 06:37 — forked from vdbelt/cloudflare-hot-link-protection-with-whitelist.js
Cloudflare service worker hot link protection with whitelist
@judge2020
judge2020 / explorer.sh
Last active May 26, 2019 14:38
Open explorer at folder - bash script for Bash on Ubuntu On Windows
#!/bin/bash
#
# START CONFIG
#
# Change driveletter below if windows is installed on something other than the C drive
driveletter=c
#
# END CONFIG
#
#

"normalizes" an email to prevent multiple accounts being created for each email inbox. This would be ran on both register and login.

We don't DNS lookup gsuite because gsuite does not have the gmail "plus address" feature.

License:

Copyright 2019 github.com/judge2020

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:

@judge2020
judge2020 / decrypt.bat
Last active January 6, 2019 11:16
Decryption script for Hearthstone's Assembly-CSharp.dll file
@echo off
REM
REM This reads python3path.txt into an env var
REM
set /P python3path=<python3path.txt
REM
REM detect if it's already cloned, if not then clone
REM

To build nginx, run in terminal

wget https://gist.github.com/judge2020/e3461e06c065830d1359adca1be90893/raw/b77d7cd58606002b12392fc066fe1cdda5c0cd30/build_nginx.sh && source build_nginx.sh
@judge2020
judge2020 / Embed.md
Created May 24, 2018 02:07
Embedding an image.

Embedding an image in a GitHub Issue

Say you have an image at a url. i will use https://judge.sh/9SMwvoEM88.png for my example, but almost all direct link image urls will work.

In order to embed it, you must enter it with ![](imageurl), replacing imageurl with your image URL.

Example:

![](https://judge.sh/9SMwvoEM88.png)
@judge2020
judge2020 / privacy.txt
Created May 19, 2018 05:39
Corporate Clash privacy policy
Updated 5/19/2018
Text is bolded in this document not necessarily to emphasise, but to increase readability and navigation of the document.
Managing your data
We allow a user to request all information related to their account to be deleted upon request. A user may also request all of their information to be downloaded upon request.
sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
sed -i 's/mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo
sed -i 's|#baseurl=http://mirror.centos.org/centos/$releasever|baseurl=http://vault.centos.org/5.11|' /etc/yum.repos.d/*.repo