Skip to content

Instantly share code, notes, and snippets.

View maythiwat's full-sized avatar
💤
Sleepy

Maythiwat Chomchuen maythiwat

💤
Sleepy
View GitHub Profile
@maythiwat
maythiwat / example.php
Created November 4, 2023 11:30
RDCW Slip Verify - PHP Image Upload Example
<?php
function suba_inquiry($file) {
// Change this!
$clientId = 'xxxx';
$clientSecret = 'xxxx';
$ch = curl_init('https://suba.rdcw.co.th/v1/inquiry');
curl_setopt($ch, CURLOPT_USERPWD, "{$clientId}:{$clientSecret}");
@maythiwat
maythiwat / example.php
Last active October 15, 2023 15:11
RDCW Slip Verify - PHP cURL Example
<?php
/**
* Inquire Transfer Slip validity and details
*
* @param string $clientId Application Client ID
* @param string $clientSecret Application Client Secret
* @param string $payload Payload String from QR Code
*
* @return object|null Returns validity and details on successful, or null on failure
@maythiwat
maythiwat / up.ps1
Last active September 2, 2021 14:19
lolis.love upload script
# Get-MimeType (modified, original: https://stackoverflow.com/a/13053795)
function Get-MimeType() {
param($extension = $null);
$mimeType = $null;
if ($null -ne $extension) {
$drive = Get-PSDrive HKCR -ErrorAction SilentlyContinue;
if ($null -eq $drive) {
$drive = New-PSDrive -Name HKCR -PSProvider Registry -Root HKEY_CLASSES_ROOT
}

Keybase proof

I hereby claim:

  • I am maythiwat on github.
  • I am maythiwat (https://keybase.io/maythiwat) on keybase.
  • I have a public key whose fingerprint is 8F70 C105 17C8 E673 17E4 90DC 8949 943A 2F8B 2427

To claim this, I am signing this object:

@maythiwat
maythiwat / inline.js
Created August 14, 2021 20:45
popcat.click automate script (w/o event dispatcher)
(async()=>{
let vue = document.getElementById('app').__vue__;
let x = async () => {
let captcha_token = await vue.$recaptcha('pop')
let dumb = '&captcha_token=' + captcha_token + '&token=' + vue.token
await fetch('https://stats.popcat.click/pop?pop_count=800' + dumb)
};
await x(); // first req
setInterval(async () => {
await x();
@maythiwat
maythiwat / SearchSugg.php
Created June 23, 2019 13:26
Google Search Suggestion
<?php
$url = 'https://suggestqueries.google.com/complete/search?output=toolbar&hl=th&q=';
$url = $url . urlencode('orn bnk48');
$data = utf8_encode(file_get_contents($url));
$data = simplexml_load_string($data);
$sugg = (array)$data->CompleteSuggestion;
@maythiwat
maythiwat / mewnich.php
Created June 23, 2019 10:56
Facebook Get Access Token
<?php
function iCurl($url, $data = false, $header = false) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.81 Safari/537.36');
if($header){
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
@maythiwat
maythiwat / update.js
Last active June 23, 2019 09:48
HoneyGain Auto Update
// clean ver. by Maythiwat Chomchuen
// original cr. Tanakorn Chotayakrit
const superagent = require('superagent');
const token = 'your token';
function refreshBalance() {
superagent.get('https://dashboard.honeygain.com/api/v1/users/balances').set('Authorization', token).end((err, res) => {
if (err) {
console.log(err);