This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
random.seed() | |
def rand_str(str_len, chars = '01234567890qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM'): | |
ret_str = '' | |
for x in range(str_len): | |
ret_str += random.choice(chars) | |
return ret_str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
A port of the Fraksl Android App by Ella Jameson | |
WASD to move, QE to rotate, [UP][DOWN] to zoom, P to take a picture in the sketch directory | |
*/ | |
void mirror_screen() | |
{ | |
loadPixels(); | |
for(int row = 0; row < height; row++) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import string | |
import urllib.request as urlreq | |
import csv | |
filename = 'random_tinyurls.csv' | |
def random_string(stringLength=10): | |
letters = string.ascii_lowercase + string.digits | |
return ''.join(random.choice(letters) for i in range(stringLength)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Logger module by Ella J. (nimaid) | |
# | |
# This module provides basic logging of STDOUT and STDERR to a text file | |
# Usage: | |
# | |
# import logger | |
# logger.start("/path/to/my/log.txt") | |
# ... | |
# logger.stop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e # Causes script to exit on errors (and therefore causes a build failure) | |
#~~~~~~~~~~~~~~~~~~~~~~ DOCKER SETUP SCRIPT BEST PRACTICES ~~~~~~~~~~~~~~~~~~~~~~~# | |
# # | |
# This bash script is designed to be used in a RUN command in a Dockerfile. It is # | |
# structured so as to encourage good practices when creating a Docker image. # | |
# # | |
# When a Docker command finishes, a snapshot of the filesystem is taken. Then, # | |
# Docker figures out what files were created/changed/deleted, and only saves the # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set exe_7z=C:\Program Files\7-Zip\7z.exe | |
REM https://superuser.com/questions/281573/what-are-the-best-options-to-use-when-compressing-files-using-7-zip | |
REM best for <16GB of RAM | |
set command_7z=a -mx=9 -mfb=273 -ms=on |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ask_question(question='Please choose', options=['Y', 'N'], default=None): | |
opt_list = [] | |
for opt in options: | |
if opt not in opt_list: | |
opt_list.append(opt) | |
opt_list = [x.upper() for x in opt_list] | |
if len(opt_list) < 1: | |
raise Exception('No options provided!') | |
if default != None: | |
default = default.upper() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
echo | |
echo "Reverse SSH Tunnel Port Forwarding Helper" | |
echo "v0.8.2 by nimaid" | |
echo | |
function usage | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
echo | |
function usage() { | |
echo Usage: $(basename $0) port | |
exit 1 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
PYTHONEXE=python | |
PSSCRIPT=/root/TheFatRat/tools/power.py | |
POWERSTAGER="$PYTHONEXE $PSSCRIPT" | |
ICON=pdf.ico | |
echo |
OlderNewer