Skip to content

Instantly share code, notes, and snippets.

View anoochit's full-sized avatar

Anuchit Chalothorn anoochit

View GitHub Profile
@anoochit
anoochit / th-address.json
Created November 20, 2023 11:31 — forked from mennwebs/th-address.json
Thai Address from Postal Code - JSON
This file has been truncated, but you can view the full file.
[
{
"zipCode": "10100",
"subDistrictList": [
{
"subDistrictId": "100801",
"districtId": "1008",
"provinceId": "10",
"subDistrictName": "ป้อมปราบ"
@anoochit
anoochit / nginx-tuning.md
Created May 3, 2023 05:09 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@anoochit
anoochit / flutter_github_ci.yml
Created March 18, 2023 02:22 — forked from rodydavis/flutter_github_ci.yml
Flutter Github Actions Build and Deploy Web to Firebase Hosting, iOS to Testflight, Android to Google Play (fastlane)
name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build_web:
@anoochit
anoochit / build.gradle
Created February 20, 2023 03:27 — forked from wendreof/build.gradle
7-How-to-Safely-Build-Assigned-Flutter-App-with-GitHub-Actions
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
@anoochit
anoochit / liff.dart
Created March 14, 2022 13:34 — forked from nukotsuka/liff.dart
LIFF SDK wrapper for Dart generated by js_facade_gen
@JS()
library liff;
import 'package:js/js.dart';
import 'package:js/js_util.dart' show promiseToFuture;
@JS()
external Liff get liff;
@anonymous
@anoochit
anoochit / thai-id-card.go
Created May 11, 2021 13:21 — forked from bouroo/thai-id-card.go
Thai National ID Card reader in GO
package main
// Require pcscd, libpcsclite
import (
"bufio"
"bytes"
"fmt"
"io/ioutil"
"os"
"strconv"
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: monitoring-influxdb
namespace: kube-system
spec:
replicas: 1
template:
metadata:
labels:
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: admin-user
@anoochit
anoochit / HID_mouse.ino
Last active May 15, 2019 22:34 — forked from chegewara/HID_mouse.ino
ESP32 arduino library with new HID class
#include <BLEDevice.h>
#include <BLEUtils.h>
#include <BLEServer.h>
#include "BLE2902.h"
#include "BLEHIDDevice.h"
#include "HIDTypes.h"
#include <driver/adc.h>
static BLEHIDDevice* hid;
@anoochit
anoochit / ESP32_wifi_dns.c
Created October 22, 2016 02:42 — forked from MakerAsia/ESP32_wifi_dns.c
ESP32 (ESP-IDF) WiFi connect and resolve DNS
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_wifi.h"
#include "esp_event.h"
#include "lwip/inet.h"
#include "lwip/ip4_addr.h"
#include "lwip/dns.h"