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
<?php | |
class SimpleHasher{ | |
/* | |
/* Simple hash | |
*/ | |
private $hash_algo; | |
function __construct( $algo = 'sha256' ){ |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Fri May 8 00:07:46 2020 | |
@author: ToishY | |
My favorite online string increment tool "was" dead (http://www.mynikko.com/tools/tool_incrementstr.html), so I made this snippet back then. | |
Haven't tested it fully but seems to work. | |
Note: |
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
<?php | |
/* Create an alphanumeric captcha the easy way - by ToshY | 05-05-2019 */ | |
function imageCaptcha($chars = 6, $lines, $bg_colour = array('R'=>204,'G'=>153,'B'=>255), $line_colours = array(array('R'=>153,'G'=>51,'B'=>102)), $txt_colours = array(array('R'=>0,'G'=>0,'B'=>0),array('R'=>255,'G'=>255,'B'=>255)), $fonts = array('arial.ttf')){ | |
// dimensions / fontsize based on amount of characters | |
$MW = round($chars * ( 100 / 3) ); $MH = round($MW / 3); $fs = round( ( 30 * (1 - exp( -0.005 * $MW ) ) ) , 2); | |
// init image with user dimensions | |
$img = imagecreatetruecolor( $MW, $MH ); |
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
# -*- coding: utf-8 -*- | |
""" | |
Created on Sun Nov 22 16:16:46 2020 | |
@author: ToshY | |
One of the more "reliable" ways to check for fonts on the current system with the help of MatPlotLib (and FontTools). | |
Returns list of dictonaries, where each dictonary denotes a single font, with a Path object, the name, the font family | |
and the style. |
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
ffmpeg -ss 00:00:10 -i "input.mp4" -vframes 1 -q:v 2 -s 960:540 "output.jpg" |
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
ffmpeg -i "input.mp4" -vcodec libwebp -filter:v fps=fps=23.976 -lossless 1 -loop 0 -preset default -an -vsync 0 -s 320:180 -ss 00:00:15 -t 00:00:10 "output.webp" |
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
version: '3.7' | |
services: | |
wireguard: | |
image: ghcr.io/linuxserver/wireguard | |
container_name: wireguard | |
cap_add: | |
- NET_ADMIN | |
- SYS_MODULE | |
environment: |
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
printf "Key-Type: 1\nKey-Length: 2048\nSubkey-Type: 1\nSubkey-Length: 2048\nName-Real: %s\nName-Email: %s\nExpire-Date: 0\nPassphrase: %s" $USER_GPG $EMAIL_GPG $PASSPHRASE_GPG | gpg --batch --gen-key |
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
version: '3.9' | |
services: | |
ngrok-app: | |
image: shkoliar/ngrok | |
container_name: ngrok-app | |
ports: | |
- 4040:4040 | |
environment: | |
AUTH_TOKEN: "<ngrok-auth-key>" |
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
find . -type f -print | grep php | wc -l |