Skip to content

Instantly share code, notes, and snippets.

@divinity76
divinity76 / bitbucket_ignore_pr_userscript.js
Last active Jun 25, 2022
bitbucket ignore pull request userscript for GreaseMonkey / ViolentMonkey / TamperMonkey
View bitbucket_ignore_pr_userscript.js
// ==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==
@divinity76
divinity76 / dreamhost.sh
Last active May 19, 2022
dreamhost account init script..
View dreamhost.sh
#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 gems (bin) dir
mkdir -p ~/.gems/bin;
# install screenie
wget 'https://gist.github.com/divinity76/1a583968c997869b27a5ee2c1ed24259/raw/76453e61a92676386589fbb3f4ef0225ac98fb19/screenie.b64' -O- | base64 -d > ~/.gems/bin/screenie ; chmod 0555 ~/.gems/bin/screenie;
# install ncdu
wget 'https://github.com/divinity76/static_bin/blob/static_ncdu/ncdu?raw=true' -O ~/.gems/bin/ncdu; chmod 0555 ~/.gems/bin/ncdu;
View Quest_Cavebot.txt
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
View python_complaints.md

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)

@divinity76
divinity76 / get_all_github_repos.js
Created Mar 30, 2022
get all github repos of user
View get_all_github_repos.js
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");
View ipv4_scanner.php
<?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");
}
View tibia_broadcast.php
<?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);
@divinity76
divinity76 / aliexpress_total_cost.js
Last active Mar 24, 2022
aliexpress total cost userscript
View aliexpress_total_cost.js
// ==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==
@divinity76
divinity76 / subtitle_tools.php
Last active Mar 12, 2022
php subtitle tools
View subtitle_tools.php
<?php
declare(strict_types=1);
class Subtitle_tools
{
private static function convertToCygpath(string $path): string
{
if (PHP_OS !== 'CYGWIN') {
return $path;
View obfucated.js
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\