Skip to content

Instantly share code, notes, and snippets.

View ouoam's full-sized avatar
🦦

Phumphathai Chansriwong ouoam

🦦
  • Bangkok, Thailand
View GitHub Profile
@ouoam
ouoam / unicode2utf8.cpp
Last active August 15, 2025 02:54
Convert Unicode to UTF-8
// Convert Unicode to UTF-8
static inline String TinyGsmDecodeHex16bitUTF8(String& instr) {
String result;
for (uint16_t i = 0; i < instr.length(); i += 4) {
char buf[5] = {0,0,0,0,0};
buf[0] = instr[i];
buf[1] = instr[i + 1];
buf[2] = instr[i + 2];
buf[3] = instr[i + 3];
uint16_t b = strtol(buf, nullptr, 16);
@ouoam
ouoam / pd.py
Last active April 22, 2025 16:06
Improve sigrok UART decoder
##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2011-2014 Uwe Hermann <uwe@hermann-uwe.de>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the License, or
## (at your option) any later version.
##
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ouoam
ouoam / connect.ps1
Created May 21, 2021 03:43
Chia connect to all known nodes
$hosts = @()
$hosts += "node.chia-th.com:8444"
$hosts += "node.chia.net:8444"
$hosts += "introducer-apne.chia.net:8444"
$hosts += "introducer-apse.chia.net:8444"
$hosts += "introducer-or.chia.net:8444"
$hosts += "introducer-va.chia.net:8444"
$hosts += "introducer-eu.chia.net:8444"
@ouoam
ouoam / main.py
Created April 15, 2021 12:24
live capture arp python pyshark
"""
Phumphathai Chansriwong 61010827
"""
import pyshark
import sys
import os
class colors:
"""
THXFORTESTING
FEEDBACAT
@ouoam
ouoam / logic_parking_lot.cpp
Last active January 30, 2021 14:51
solve the parking lot game but only lv.1
#include <iostream>
#include <stdint.h>
#include <queue>
#include <set>
uint32_t encode(uint8_t map[]) {
uint8_t tempMap[30];
for (int i = 0; i < 30; i ++) {
tempMap[i] = map[i];
}
! 7/9/2020 http://www.niceoppai.net
www.niceoppai.net###text-33
www.niceoppai.net###text-90
www.niceoppai.net##.textwidget > center
www.niceoppai.net##.mng_rdr.wpm_pag > center
www.niceoppai.net###sct_footer_banner
||blogspot.com^$domain=www.anime-sugoi.com|www.niceoppai.net
@@||1.bp.blogspot.com/-tiGDYaW_8Q4/XQ5nG-oOjkI/AAAAAAAAAlg/OdPIeQTB_d43NhVJT3RyBGj9-hsBcnHRACLcBGAs/s0/bgniceoppaitrue.png
! 7/9/2020 https://www.anime-sugoi.com
# Made by @xdavidhu (github.com/xdavidhu, https://xdavidhu.me/)
# Merge with https://github.com/Pinoccio/tool-serial-pcap/blob/master/serial-pcap
# And https://wiki.wireshark.org/CaptureSetup/Pipes
import serial
import io
import os
import subprocess
import signal
import time
@ouoam
ouoam / mtm-380sd.ino
Last active October 27, 2020 06:06
Read MTM-380SD RS-232 data output
#include <SoftwareSerial.h>
SoftwareSerial mySerial(10, 11); // RX, TX
void setup() {
Serial.begin(115200);
mySerial.begin(9600);
}
uint8_t buffs[3][16];