This file contains hidden or 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 | |
function redirect($url) { | |
if (!headers_sent()) { | |
header("Location: $url"); | |
} else { | |
echo "<script type='text/javascript'>window.location.href='$url'</script>"; | |
echo "<noscript><meta http-equiv='refresh' content='0;url=$url'/></noscript>"; | |
} | |
} |
This file contains hidden or 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 | |
title "Matrix" | |
setlocal enabledelayedexpansion | |
for /f "tokens=2 delims=[]" %%a in ('ver') do for /f "tokens=2 delims=. " %%a in ("%%a") do set /a "FullScreen=-((%%a-6)>>31)" | |
if "%1"=="" ( | |
for %%a in (FontSize:00080008 FontFamily:00000030 WindowSize:00320050 ScreenColors:0000000a CodePage:000001b5 ScreenBufferSize:00320050 FullScreen:!FullScreen! | |
) do for /f "tokens=1,2 delims=:" %%b in ("%%a") do ( | |
>nul reg add HKCU\Console\TheMatrix /v %%b /t reg_dword /d 0x%%c /f | |
) |
This file contains hidden or 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
from time import time | |
milliseconds = round(time() * (10 ** 3)) | |
rand = lambda _seed, _min, _max: (_seed % (_max - _min + 1)) + _min | |
random = rand(milliseconds, 0, 100) | |
print(random) |
This file contains hidden or 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
from selenium import webdriver | |
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.common.by import By | |
def view(user, _view): | |
print('-' * (len(user) + 8)) | |
view_count = 0 | |
options = Options() | |
options.add_argument("--headless") |
This file contains hidden or 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
#!/usr/bin/env bash | |
if [ -t 0 ]; then | |
read -p "b: " binary_text | |
else | |
binary_text=$(cat -) | |
fi | |
binary_array=($binary_text) |
This file contains hidden or 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
function formatBytes(bytes, decimals = 2) { | |
if (Number.isNaN(bytes)) return "Incalculable"; | |
if (!+bytes) return "0 B"; | |
let i = 0; | |
for (i; bytes >= 1024; i++) bytes /= 1024; | |
const dm = bytes % 1 === 0 ? 0 : decimals; | |
const units = ["B", "KB", "MB", "GB", "TB", "PB"]; |
NewerOlder