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 / gist:f212ca48026c4d97a6b743168816b1ea
Created August 24, 2018 03:11
Ubuntu VM and just installing C Lightning Node
docker run --rm --name lightning --network container:bitcoind_mainnet -v /scratch/bitcoin/mainnet/bitcoind:/root/.bitcoin -v /scratch/bitcoin/mainnet/clightning:/root/.lightning --entrypoint /usr/bin/lightningd cdecker/lightningd:master --network=bitcoin --log-level=debug --alias=[YOUR NAME HERE] --rgb=[YOUR COLOR HERE]
@itoonx
itoonx / rpcclient.py
Created August 24, 2018 03:13
OMNI RPC Client Module
import requests, getpass
import time, json
class RPCHost():
def __init__(self):
USER=getpass.getuser()
self._session = requests.Session()
try:
with open('/home/'+USER+'/.bitcoin/bitcoin.conf') as fp:
RPCPORT="8332"
@itoonx
itoonx / RatchadaToken.json
Created August 30, 2018 00:41
Ratchada Token Base on ERC20
{
"tokenName": "Ratchada Token",
"symbol": "SEX",
"contractAddress": "0x4751bb9185ae336ff615740f752e79dbd1125e10",
"decimals": 18,
"transferEvent": "Transfer(address,address,uint256)",
"enable": true,
"network": "ropsten",
"contractABI": [{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function
@itoonx
itoonx / Bitcoin_MultiSig_Wallet.js
Created March 2, 2019 21:26
Bitcoin_MultiSig_Wallet.js
const crypto = require('crypto');
const bitcoinjs = require('bitcoinjs-lib');
module.exports = (user_id, currency_type) => {
// Generate a P2SH, pay-to-multisig (3-of-4) address
// แปลง user_id ให้เป็น string ก่อน
let shash = String(user_id);
@itoonx
itoonx / segwit.md
Last active March 4, 2019 20:21
Bitcoin Segwit
/**
*Submitted for verification at Etherscan.io on 2019-07-29
*/
pragma solidity ^0.4.24;
contract UtilFairWin {
function getRecommendScaleBylevelandTim(uint level,uint times) public view returns(uint);
function compareStr (string _str,string str) public view returns(bool);
function getLineLevel(uint value) public view returns(uint);
@itoonx
itoonx / command
Created October 23, 2019 17:37
Basic AT Commands for SIM900A GSM/GPRS Module
TO CHECK THE MODEM:
AT
OK
TO CHANGE SMS SENDING MODE:
AT+CMGF=1
@itoonx
itoonx / file.json
Created February 19, 2020 17:56
Bank
{
"th": {
"bbl": { "code": "002", "color": "#1e4598", "official_name": "BANGKOK BANK PUBLIC COMPANY LTD.", "nice_name": "Bangkok Bank" },
"kbank": { "code": "004", "color": "#138f2d", "official_name": "KASIKORNBANK PUBLIC COMPANY LTD.", "nice_name": "Kasikornbank" },
"rbs": { "code": "005", "color": "#032952", "official_name": "THE ROYAL BANK OF SCOTLAND PLC", "nice_name": "Royal Bank of Scotland" },
"ktb": { "code": "006", "color": "#1ba5e1", "official_name": "KRUNG THAI BANK PUBLIC COMPANY LTD.", "nice_name": "Krungthai Bank" },
"jpm": { "code": "008", "color": "#321c10", "official_name": "JPMORGAN CHASE BANK, NATIONAL ASSOCIATION", "nice_name": "J.P. Morgan" },
"mufg": { "code": "010", "color": "#d61323", "official_name": "THE BANK OF TOKYO-MITSUBISHI UFJ, LTD.", "nice_name": "Bank of Tokyo-Mitsubishi UFJ" },
"tmb": { "code": "011", "color": "#1279be", "official_name": "TMB BANK PUBLIC COMPANY LIMITED.", "nice_name": "TMB Bank" },
"scb": { "code": "014", "col
@itoonx
itoonx / cloudSettings
Last active November 24, 2020 16:44
cloudSettings
{"lastUpload":"2020-11-24T09:44:36.209Z","extensionVersion":"v3.4.3"}
// บอทปั้มเงิน 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 น่าจะเสถียรกว่าเยอะมาก