Skip to content

Instantly share code, notes, and snippets.

View itoonx's full-sized avatar
👻
Deep

Makkhawan Voraboot itoonx

👻
Deep
View GitHub Profile
@itoonx
itoonx / bitcoinjs-lib.js
Created September 15, 2016 08:35 — forked from fanatid/bitcoinjs-lib.js
bitcoin multisig transaction demo
var bitcoin = require('bitcoinjs-lib') // 1.4.x ?
var privKeys = [
'L2ALJznyt2croGHs8duBK2TZMB3Bc5ZpFZQSmR5QQUMPDDcUWeTw', // n2t8F1D41xy6f3d2B6DtjXRRsn8dgUzQ6C
'L3gM5giJqPAJcWyD8eKv94d4QgqyzqrYeAA9DnuJe23FszsnqD1w', // mjgF67B4pyEHuGTLU5jS333EasUrZBaxMB
'KwdYxYAbxntKvrMQtDHAamPT1pyuYkDRfAwESBqCGRdz9abQo3dW', // mwzPpNMFwLoJPXw2ez8mz6RrdYGaqZDind
'L5LTWMRBt27dHde1mnvV1RzW1mxQuQBxpm2TvNHsMaNvAQKqKov2', // mt7K2ChnJSp96k93HYdC8B9oqUmqLyESpL
'L4qQgxEbKJFJKans2UxFRzXisS7o3oBkyJGirAUgTxS9CfTo9Cd4', // mmvbfVqYrXdy1i4x9UzWc4PtgN7VjMNjeY
]
@itoonx
itoonx / improved-lnd-bitcoind-install.md
Created January 28, 2018 07:09 — forked from bretton/improved-lnd-bitcoind-install.md
updated & improved guide to installing LND, Bitcoind, on Ubuntu 16.04 Server on testnet

Intro

the following guide is an updated install process based on the following, which needs some improvement still

This guide here is specific to getting lnd and bitcoind running on ubuntu 16.04 LTS for testnet.

It does not address mainnet, or using btcd, or neutrino.

btcd guide here

// บอทปั้มเงิน TLM เกม Alien Worlds (เงินจะเอาไปแลกเงินจริงใน Binance ได้)
// ไว้ทดสอบเฉย ๆ อย่าเอาไปใช้จริง คนเขียนไม่รับผิดชอบต่อบั๊กใด ๆ ทั้งสิ้น
//
// วิธีใช้:
// 1. สมัคร + เข้า https://play.alienworlds.io/
// 2. ต้องเคย mine แบบ manual ก่อน 1 ครั้ง
// 3. ก๊อปสคริปท์นี้ไปแปะใน Console (F12)
// น่าจะมีบั๊กพวก rate limit อะไรทั้งหลาย กับ if/loop บางอันเอาออกได้
// ลองรันเล่น ๆ 5 ชม จาก user เปล่า ๆ ได้มา 8 TLM (ขึ้นกับดวงและอื่นๆด้วยมั่ง)
// ใครว่าง ๆ แก้เป็นยิงเข้า API โดยตรงไม่ผ่าน JS น่าจะเสถียรกว่าเยอะมาก
@itoonx
itoonx / gist:9332fd7ae7acba235c178005b6c6eaf2
Created October 22, 2021 08:10 — forked from yonjah/gist:5082855
Blocking DDOS bots with JavaScript for fun and profit! Or how easy it is to break the current protection methods and how to make it better.
TL;DR - jump to the challenge at the end
====ON BLOCKING EVIL BOTS=====
On a resent job interview I had for "Incapsula" a few days ago I was put to the challenge to break
their bot protection mechanism. Apparently node.js is not that common among bot writes and most bots
are not able to run javascript.
The challenge had two parts -
1. find what the code does.
2. implement a bot that will break the code without using js.
3. think how to make this code unbreakable
@itoonx
itoonx / jimp-example.js
Created April 7, 2023 20:37 — forked from ASteinheiser/jimp-example.js
An example of how to use Jimp to read a base64 image string, resize, removeExif data, then return as an image buffer.
let imageBuffer = Buffer.from(body.profilePicture.split(',')[1], 'base64');
console.log(imageBuffer);
Jimp.read(imageBuffer, function(err, image) {
if (err) {
context.done(err,
prepareErrorResponse(response, 'Unable to remove EXIF data from profile picture'));
}
console.log('before transform: ', image);
image = image.resize(400, 400).exifRotate((err, exifRotatedData) => {