just started trying Python, and..
1: Python doesn't have constants. you can't do
class C {
const FOO=123;
}
in Python. (however "constants" are conventionally ALL_UPPERCASE, and linters may complain if you're modifying an ALL_UPPERCASE)
<?php | |
declare(strict_types=1); | |
init(); | |
function record():array{ | |
$autoit=new AutoIt(); | |
$stdin=fopen("php://stdin","rb"); | |
stream_set_blocking($stdin,false); | |
$image_binaries=[]; | |
$filename="recorded".bin2hex(random_bytes(4)).".png"; |
php -r 'ini_set("memory_limit","-1");$a=[];for($i=0;;++$i){echo "leaked {$i}MB\r";$a[]=random_bytes(1*1024*1024);}'; |
screen -S emergency_diskspace -dm | |
sleep 1 # workaround https://savannah.gnu.org/bugs/?54164 | |
screen -S emergency_diskspace -X stuff ' | |
mkdir /emergency_diskspace; | |
cd /emergency_diskspace; | |
for i in {0..9} | |
do | |
echo creating 10gb_\$i | |
dd if=/dev/urandom of=10gb_\$i bs=10M count=1000 iflag=fullblock status=progress; | |
done |
// ==UserScript== | |
// @name Bitbucket ignore pull request - bitbucket.org | |
// @namespace divinity76 | |
// @include /^https\:\/\/bitbucket\.org\// | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description screenshot: https://user-images.githubusercontent.com/1874996/175759481-27eb41c5-6874-44f1-a428-d195a7bcbab8.png - 6/26/2022, 1:10:55 AM | |
// ==/UserScript== |
#fix unicode | |
[[ -z $(grep LANG ~/.bash_profile) ]] && echo '[[ -z "${LANG}" ]] && export LANG='\''en_US.UTF-8'\''' >> ~/.bash_profile | |
#make sure .bashrc is loaded on ssh login | |
[[ -z $(grep bashrc ~/.bash_profile) ]] && echo 'source ~/.bashrc' >> ~/.bash_profile | |
# create .local/bin | |
mkdir -p ~/.local/bin; | |
# install screenie | |
wget 'https://gist.github.com/divinity76/1a583968c997869b27a5ee2c1ed24259/raw/76453e61a92676386589fbb3f4ef0225ac98fb19/screenie.b64' -O- | base64 -d > ~/.local/bin/screenie ; chmod 0555 ~/.local/bin/screenie; | |
# install ncdu | |
wget 'https://github.com/divinity76/static_bin/blob/static_ncdu/ncdu?raw=true' -O ~/.local/bin/ncdu; chmod 0555 ~/.local/bin/ncdu; |
setMeleeKill Buff | |
setMeleeKill Undead Warlock | |
setMeleeKill Lizard Templar | |
setMeleeKill Mad Wolf | |
setAvoidFront Mad Wolf | |
setMeleeKill Sesto Elemento | |
setMeleeKill Crazy Eye | |
setAvoidFront Crazy Eye | |
setMeleeKill Apocalypse | |
setAvoidFront Apocalypse |
just started trying Python, and..
1: Python doesn't have constants. you can't do
class C {
const FOO=123;
}
in Python. (however "constants" are conventionally ALL_UPPERCASE, and linters may complain if you're modifying an ALL_UPPERCASE)
function get_all_github_repos_of_user(user) { | |
let extractedRepos = []; | |
let wget = function(url) { | |
let xhr = new XMLHttpRequest(); | |
xhr.open("GET", url, false); | |
(xhr.send()); | |
return xhr.responseText; | |
}; | |
let domparser = function(html) { | |
return (new DOMParser()).parseFromString(html, "text/html"); |
<?php | |
declare(strict_types=1); | |
$ip_range_start = 0; | |
$ip_range_start = ip2long("0.5.0.0"); | |
$ip_range_end = 0xFFFFFFFF; | |
if (0) { | |
$ip_range_start = ip2long("45.62.204.200"); | |
$ip_range_end = ip2long("45.62.204.230"); | |
} |
<?php | |
declare(strict_types=1); | |
$message = 'Looking for people to join lvl 350 armor quest. meet us at lvl 350 door in premium area 12:15! (UTC+2/Poland time)'; | |
$hostname = "tibiafun.zapto.org"; | |
$port = 7171; | |
$account = 123; | |
$password = "?"; | |
$charname = "Stupid Broadcaster"; | |
broadcast_headless($message, $hostname, $port, $account, $password, $charname); |