Skip to content

Instantly share code, notes, and snippets.

View itoonx's full-sized avatar
👻
Deep

Makkhawan Voraboot itoonx

👻
Deep
View GitHub Profile
คำสั่ง หน้าที่ รายละเอียด
File/Directory Basics
ls List files แสดงรายชื่อไฟล์และไดเร็คทอรี่
cp Copy files สำเนาไฟล์
mv Rename files เปลี่ยนชื่อไฟล์
rm Delete files ลบไฟล์
ln Link files สร้างไฟล์เชื่อมโยง
cd Change directory ย้ายไปยังไดเร็คทอรี่ที่ต้องการ
pwd Print current directory name แสดงชื่อไดเร็คทอรี่ปัจจุบัน
mkdir Create directory สร้างไดเร็คทอรี่ใหม่
DO NOT GIVE ME HIGH LEVEL STUFF, IF I ASK FOR FIX OR EXPLANATION, I WANT ACTUAL CODE OR EXPLANATION!!! I DON'T WANT "Here's how you can blablabla"
- Be casual unless otherwise specified
- Be terse
- Suggest solutions that I didn’t think about—anticipate my needs
- Treat me as an expert
- Be accurate and thorough
- Give the answer immediately. Provide detailed explanations and restate my query in your own words if necessary after giving the answer
- Value good arguments over authorities, the source is irrelevant
- Consider new technologies and contrarian ideas, not just the conventional wisdom
tep-by-step description:
We start creating a new transaction which we hash and sign.
Add four-byte version field: 01000000
One-byte varint specifying the number of inputs: 01
32-byte hash of the transaction from which we want to redeem an output (reverse order): be66e10da854e7aea9338c1f91cd489768d1d6d7189f586d7a3613f2a24d5396
Four-byte field denoting the output index we want to redeem from the transaction with the above hash (counting from zero): 00000000
Now comes the scriptSig. For the purpose of signing the transaction, this is temporarily filled with the scriptPubKey of the output we want to redeem. First we write a one-byte varint which denotes the length of the scriptSig (0x19 = 25 bytes): 19
Then we write the actual scriptSig (which is the scriptPubKey of the output we want to redeem): 76 a9 14 dd6cce9f255a8cc17bda8ba0373df8e861cb866e 88 ac (look to the bottom line line on https://blockchain.info/tx/96534da2f213367a6d589f18d7d6d1689748cd911f8c33a9aee754a80de166be?show_adv=true )
@itoonx
itoonx / libpq.md
Created March 11, 2025 00:56 — forked from netsensei/libpq.md
pqsl, pg_dump and pg_restore via hombrew

Installing pqsl, pg_dump and pg_restore via hombrew

These instructions allow you to intall psql, pg_dump & pg_restore without a full installation of postgresql.

First, install libpq via homebrew

brew doctor
brew update
brew install libpq
@itoonx
itoonx / end-session.md
Created February 17, 2025 06:57 — forked from zbeyens/end-session.md
Store these in your project .ai folder

End Session Instructions

  1. Create a new file: .ai/status/YYYY-MM-DD.md

  2. Structure the update with sections:

    • Development Steps
    • Key Decisions
    • Next Steps
import requests
from tronpy import Tron
import trontxsize
from tronpy.keys import PrivateKey
def get_bandwidth_price():
url = "https://api.trongrid.io/wallet/getchainparameters"
response = requests.get(url)
data = response.json()
CREATE OR REPLACE FUNCTION "public"."create_profile_on_signup"() RETURNS "trigger"
LANGUAGE "plpgsql" SECURITY DEFINER
AS $$begin
INSERT INTO public.profile (id)
VALUES (
NEW.id
);
RETURN NEW;
end;$$;
const {
id,
createClient,
CreateAccountError,
CreateTransferError,
TransferFlags,
} = require("tigerbeetle-node");
console.log("Import ok!");
@itoonx
itoonx / .aider.config.yml
Created October 6, 2024 00:04
Aider configuration file
##########################################################
# Sample .aider.conf.yml
# This file lists *all* the valid configuration entries.
# Place in your home dir, or at the root of your git repo.
##########################################################
# Note: You can only put OpenAI and Anthropic API keys in the yaml
# config file. Keys for all APIs can be stored in a .env file
# https://aider.chat/docs/config/dotenv.html
@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