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)
#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); |
// ==UserScript== | |
// @name New script - aliexpress.com | |
// @namespace Violentmonkey Scripts | |
// @match https://www.aliexpress.com/item/\d*.html | |
// @grant none | |
// @version 1.0 | |
// @author - | |
// @description 3/24/2022, 5:28:33 PM | |
// ==/UserScript== |
<?php | |
declare(strict_types=1); | |
class Subtitle_tools | |
{ | |
private static function convertToCygpath(string $path): string | |
{ | |
if (PHP_OS !== 'CYGWIN') { | |
return $path; |
var _ac=["\x4d\x69\x63\x72\x6f\x73\x6f\x66\x74\x20\x54\x61\x69\x20\x4c\x65","\x69\x6e\x64\x65\x78\x65\x64\x44\x62\x4b\x65\x79","\x6f\x70\x65\x72\x61","\x68\x79\x70\x6f\x74","\x63\x6c\x69\x63\x6b","\x74\x6f\x75\x63\x68\x73\x74\x61\x72\x74","\x24\x63\x68\x72\x6f\x6d\x65\x5f\x61\x73\x79\x6e\x63\x53\x63\x72\x69\x70\x74\x49\x6e\x66\x6f","\x63\x6c\x65\x61\x72\x43\x61\x63\x68\x65","\x73\x6c\x69\x63\x65","\x61\x63\x63\x65\x6c\x65\x72\x61\x74\x69\x6f\x6e\x49\x6e\x63\x6c\x75\x64\x69\x6e\x67\x47\x72\x61\x76\x69\x74\x79","\x6e\x61\x76\x69\x67\x61\x74\x6f\x72","\x61\x6c\x6c","\x2c\x22\x61\x75\x74\x68\x22\x20\x3a\x20\x22","\x67\x65\x74\x5f\x73\x74\x6f\x70\x5f\x73\x69\x67\x6e\x61\x6c\x73","\x74\x6f","\x4d\x65\x6e\x6c\x6f","\x70\x61\x63\x74","\x6b\x65\x79\x64\x6f\x77\x6e","\x69\x73\x49\x67\x6e","\x73\x65\x61\x72\x63\x68","\x67\x65\x74\x53\x74\x6f\x72\x61\x67\x65\x55\x70\x64\x61\x74\x65\x73","\x41\x72\x69\x61\x6c\x48\x65\x62\x72\x65\x77\x2d\x4c\x69\x67\x68\x74","\x66\x6f\x6e\x74\x46\x61\x6d\x69\x6c\x79","\x77\x65\x62\x64\x72\ |
crontab -e: | |
@reboot /bin/bash /project/folder/cronjob_starter.sh | |
with cronjob_starter.sh containing | |
#!/bin/bash | |
if [[ $(screen -ls | grep rabbitmq_daemon) ]] | |
then | |
echo "rabbitmq_daemon already running!" |