Skip to content

Instantly share code, notes, and snippets.

@motebaya
motebaya / dont_click_ads.js
Created January 17, 2023 09:53
zippyshare tampermonkey script for click download button
// ==UserScript==
// @name dont click ads
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Mochino
// @include /^https:\/\/www\d+.zippyshare.com\/v\/\w*/
// @match *://www\d+.zippyshare.com\/v\/\w*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
@motebaya
motebaya / blockads_sukidesuost.js
Last active March 7, 2023 15:01
simple tampermonkey script for remove anoying ads and enable right click
// ==UserScript==
// @name block otakudesu
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Mochino a.k.a motebaya
// @include /^https:\/\/otakudesu\.*\/*
// @match *://otakudesu\.*\/*
// @match *://kusonime\.*\/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
@motebaya
motebaya / g_word.php
Created June 12, 2023 11:11
scrape readable word from site with PHPGuzzle and PHPHTMLParser
<?php
/*
@for get readable word to change function or variable name
@credit: t.me/dvinchii a.k.a michino
File: word.php
Size: 1966 Blocks: 8 IO Block: 4096 regular file
Device: 10304h/66308d Inode: 243109 Links: 1
Access: (0777/-rwxrwxrwx) Uid: ( 1000/ mochino) Gid: ( 1000/ mochino)
Access: 2023-05-02 12:32:30.134484200 +0700
@motebaya
motebaya / reg_vars.php
Created June 12, 2023 11:29
php script for replace func, class, and vars name to readable word
<?php
/*
replace all fuc, vars, and class name to readable word
credit: github.com/motebaya a.k.a mochino
Change: 2023-03-17 19:41:39.631431600 +0700
*/
include "../vendor/autoload.php";
@motebaya
motebaya / download_progress.py
Last active August 26, 2023 03:40
async multi threading downloader with rich progress bar
#!/usr/bin/env python3
# @credit: @gist.github.com/motebaya
# @modify: 2023-08-21 10:48:13.274582300 +0700
# @gist: simple async multi threading python for download batch file
# @docs:
# https://rich.readthedocs.io/en/latest/progress.html
# https://github.com/Textualize/rich/discussions/1102
# https://testfiledownload.com/
# https://stackoverflow.com/questions/64282309/aiohttp-download-large-list-of-pdf-files
@motebaya
motebaya / downloader.js
Last active September 26, 2023 19:04
Asynchronous node js file downloader with progress bar
#!/usr/bin/node
const axios = require("axios");
const progress = require("cli-progress");
const fs = require("fs");
const async = require("async");
// https://stackoverflow.com/questions/10420352/converting-file-size-in-bytes-to-human-readable-string
const filesize = (a, b, c, d, e) => {
return (
((b = Math),
@motebaya
motebaya / axios_logging.js
Created October 4, 2023 09:09
axios client logger with winston & axios-logger
import axios from "axios";
import winston from "winston";
import * as AxiosLogger from "axios-logger";
// https://github.com/winstonjs/winston#formats
const logger = winston.createLogger({
level: "debug",
format: winston.format.combine(
winston.format.colorize(),
winston.format.timestamp({ format: "HH:mm:ss" }),
@motebaya
motebaya / download_progress.php
Last active October 4, 2023 09:12
php download progress bar with guzzlehttp & symfony/console
<?php
include "./vendor/autoload.php";
use \GuzzleHttp\Client;
use \Symfony\Component\Console\Helper\ProgressBar;
use \Symfony\Component\Console\Output\ConsoleOutput;
/**
* https://stackoverflow.com/questions/15188033/human-readable-file-size
@motebaya
motebaya / kuro_wp.sh
Created November 21, 2023 14:01
PGR wallpaper auto downloader shell script. site: https://pgr.kurogame.net/wallpapers
#!/usr/bin/bash
# @gist.github.com/motebaya at 21.11.2023 - 8.57PM
extract() { outputWp="Pgr_Wallpaper";if [[ ! -d "$outputWp" ]];then mkdir -p "$outputWp";echo -e " [*] Output: $(realpath $outputWp)";fi;i=1;pictureList=$(curl -s -H "User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" -L "https://media-cdn-zspms.kurogame.net/pnswebsite/website2.0/json/G167/MainMenu.json" | jq '.picture' | jq '[.[] | select(.imgUrl)]' | jq -c '.[]');while IFS="\n" read -r url; do target=$(jq -r '.imgUrl' <<<$url);echo -e " [*] Downloading [\x1b[32m$target\x1b[0m] Wallpaper: $i of $(wc -l <<<\"$pictureList\")";wget -qnc --show-progress "$target" -P "$outputWp";((++i));trap 'echo " [*] Remove Uncompleted: $outputWp/$(basename $target)"; rm -rf "$outputWp/$(basename $target)"; exit 1;' SIGINT ;done <<<"$pictureList";};extract
set debuginfod-url "https://debuginfod.ubuntu.com"
set debuginfod-index-urls "https://debuginfod.ubuntu.com"
set debuginfod enabled on