Skip to content

Instantly share code, notes, and snippets.

// Token: 0x04004F84 RID: 20356
public static global::Logger Bob = new global::Logger("Bob");
// Token: 0x04004F85 RID: 20357
public static global::Logger Mike = new global::Logger("Mike");
// Token: 0x04004F86 RID: 20358
public static global::Logger Brian = new global::Logger("Brian");
// Token: 0x04004F87 RID: 20359
@judge2020
judge2020 / migrate.py
Created January 5, 2018 21:14
migrate users.ini to usersDB.json
import pprint
import json
from configobj import ConfigObj
pp = pprint.PrettyPrinter(indent=4)
db = ConfigObj(infile='users.ini')
tmp = db['suggestion_count']
@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
@judge2020
judge2020 / QtBuild.bat
Last active February 16, 2018 02:41
Qt build with openssl for VC 2017
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=amd64 -no_logo
which nmake
echo "%OPENSSL_LIBS%"
pause
set _ROOT=C:\QtBuild
cd %_ROOT%
( dir /b /a "%dir%" | findstr . ) > nul && (
echo %dir% non-empty
) || (
echo %dir% empty

To build nginx, run in terminal

wget https://gist.github.com/judge2020/e3461e06c065830d1359adca1be90893/raw/b77d7cd58606002b12392fc066fe1cdda5c0cd30/build_nginx.sh && source build_nginx.sh
using System;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace SendKeysToAnyApplication
{
class Program
{
delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 10.0.16299.0
which nmake
cd C:\QtBuild
c:
( dir /b /a "%dir%" | findstr . ) > nul && (
echo %dir% non-empty
) || (
echo %dir% empty
git clone https://github.com/qt/qt5 .
)
from line_profiler import LineProfiler
import random, math
levels = [0]
for level in xrange(1,100):
level += 1
exp = int(15 * level * (level+5))
levels.append(exp)
def getExpLevel(experience):
@judge2020
judge2020 / gsuite_smtp.json
Created April 23, 2018 20:26
G Suite SMTP Relay settings update request json
{
"1": [
{
"1": "(ab:cd, likely some authorization thing)",
"2": 14,
"7": "Name of group",
"16": 1,
"20": {
"5": [
{
@judge2020
judge2020 / checkcert.sh
Last active May 4, 2018 16:51
checkcert.sh
# usage: sh checkcert.sh www.google.com
echo | openssl s_client -showcerts -servername $1 -connect $1:443 2>/dev/null | openssl x509 -inform pem -noout -text