Skip to content

Instantly share code, notes, and snippets.

View Gr4vity4's full-sized avatar
🪲
Focusing

Prawared Bw Gr4vity4

🪲
Focusing
View GitHub Profile
[Nest] 27 - 12/22/2024, 2:52:32 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
Error: connect ENETUNREACH 2406:da18:243:7404:56b2:8f18:3105:a93a:5432 - Local (:::0)
at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
at __node_internal_exceptionWithHostPort (node:internal/errors:671:12)
at internalConnect (node:net:1100:16)
#include "arduino.h"
#include "WiFi.h"
#include "Wire.h"
// #include "Battery.h"
#include <WiFiUDP.h>
#include <EEPROM.h>
#define ARDUINO_RUNNING_CORE 1
// start custom
#define DEFAULT_SSID_LENGTH 16
@Gr4vity4
Gr4vity4 / gist:14ef4e627414fdb0c515ed3116f1e953
Last active September 9, 2023 04:49
mission-merge-v2.py
# ===== global =====
import time, sensor, image , lcd
from Maix import I2S, GPIO
from fpioa_manager import fm
# ===== import controls =====
from image import SEARCH_EX, SEARCH_DS
from machine import I2C
import time
import VL53L0X
# ===== global =====
import time, sensor, image , lcd
from Maix import I2S, GPIO
from fpioa_manager import fm
# ===== import controls =====
from image import SEARCH_EX, SEARCH_DS
from machine import I2C
import time
import VL53L0X
import sensor,image,lcd,time
import KPU as kpu
from Maix import I2S, GPIO
from fpioa_manager import fm
from machine import UART
from time import sleep_ms, ticks_ms, ticks_diff
from image import SEARCH_EX, SEARCH_DS
fm.register(2, fm.fpioa.GPIOHS1)
key_st = GPIO(GPIO.GPIOHS1, GPIO.IN)
#include <Arduino.h>
void setup() {
// Disable unused peripherals to save power (optional)
// Disable HSI48 oscillator (optional if not used)
RCC->CRRCR &= ~RCC_CRRCR_HSI48ON;
// Enable HSI16 oscillator
RCC->CR |= RCC_CR_HSION;
while ((RCC->CR & RCC_CR_HSIRDY) == 0);
@Gr4vity4
Gr4vity4 / mockup-response.json
Last active February 28, 2023 04:03
mockup response
{
"id": 1,
"timestamp": "2023-01-19T08:21:55.360z",
"total_amount": "4100.00",
"result": "จำนวนเงินรางวัล",
"status": "สถานะ รอผล, ไม่ถูกรางวัล, ถูกรางวัล, โพยถูกยกเลิก",
"drawing_date": "งวดวันที่",
"close_date": "ปิดรับวันที่ + เวลา",
"ticket_batch": "xxxx",
"winning_number": [
let provinces = [
'กรุงเทพฯ',
'กระบี่',
'กาญจนบุรี',
'กาฬสินธุ์',
'กำแพงเพชร',
'ขอนแก่น',
'จันทบุรี',
'ฉะเชิงเทรา',
'ชลบุรี',
@Gr4vity4
Gr4vity4 / index.html
Created November 14, 2021 11:18
jQuery QR Code Generator
<div class="qr-code-generator">
<input type="text" class="qr-url" placeholder="URL or Text">
<input type="number" class="qr-size" value="128" min="20" max="500">
<button class="generate-qr-code">Generate</button>
<br>
<div id="qrcode"></div>
{
"BEE":{
"estimate_time":"ภายใน 1 - 2 วัน",
"courier_code":"BEE",
"price":"29",
"available":true,
"remark":"optional",
"err_code":"ERR_DEFAULT",
"courier_name":"BEEExpress"
},