Skip to content

Instantly share code, notes, and snippets.

View NanoSoftTech's full-sized avatar

NanoSoftTech NanoSoftTech

View GitHub Profile
@NanoSoftTech
NanoSoftTech / freedopa-2.py
Created April 5, 2026 03:59 — forked from earthchie/freedopa-2.py
สคริปต์เจาะสมุดบัญชีรายชื่อผู้มีสิทธิเลือกตั้ง DOPA (แก้ไขแล้ว) ที่ซื้อขายกันใน discord
import discord
from discord.ext import commands
import aiohttp
# 1. ตั้งค่าพื้นฐานของบอท
intents = discord.Intents.default()
intents.message_content = True # เปิดใช้งานการอ่านข้อความ
bot = commands.Bot(command_prefix='!', intents=intents)
@bot.event
@NanoSoftTech
NanoSoftTech / code.gs
Created November 24, 2023 10:38 — forked from neno-tech/code.gs
แจกโค้ดฟอร์มอัปโฟลดไฟล์ + ส่งเตือนไลน์
function doGet(e) {
var htmlOutput = HtmlService.createTemplateFromFile('index');
htmlOutput.message = '';
return htmlOutput.evaluate();
}
function doPost(e) {
var folder = DriveApp.getFolderById('xxx');//เปลี่ยนเป็นไอดีโฟลเดอร์เก็บไฟล์ของท่าน;
var data = Utilities.base64Decode(e.parameter.fileData);
var blob = Utilities.newBlob(data, e.parameter.mimeType, e.parameter.fileName);
#include <ESP8266WiFi.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
WiFiManager wifiManager;
Serial.println("Connecting...");
if (!wifiManager.startConfigPortal("All")) {
#include <ESP8266WiFi.h>
#include <DNSServer.h>
#include <ESP8266WebServer.h>
#include <WiFiManager.h>
ESP8266WebServer server(80);
void handleRoot() {
server.send(200, "text/plain", "hello ALL esp8266!");
}
@NanoSoftTech
NanoSoftTech / http-benchmark.md
Created September 18, 2021 20:55 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@NanoSoftTech
NanoSoftTech / readme.md
Created May 27, 2020 05:39 — forked from endolith/readme.md
How to stream a webcam to a web browser in Ubuntu

Grr this took hours to figure out. I was trying to install MJPG-streamer and running VLC command lines and all this crap but nothing worked.

First install motion:

~> sudo apt-get install motion

Then create a config file:

~> mkdir ~/.motion

~> nano ~/.motion/motion.conf

#!/bin/bash -v
export HOME=/root
### @export "capture-logs"
exec > >(tee /var/log/user-data.log|logger -t user-data -s 2>/dev/console) 2>&1
### @export "get-release-name"
source /etc/lsb-release
echo $DISTRIB_CODENAME
echo "deb http://us-east-1.ec2.archive.ubuntu.com/ubuntu $DISTRIB_CODENAME multiverse" >> /etc/apt/sources.list
@NanoSoftTech
NanoSoftTech / sortimages.sh
Created April 16, 2019 01:21 — forked from alexarje/sortimages.sh
Sort images based on direction (portrait/landscape)
# Based on: https://unix.stackexchange.com/questions/294341/shell-script-to-separate-and-move-landscape-and-portrait-images
# make directories
mkdir portraits
mkdir landscapes
# Check that all images have correct rotation
jhead -autorot *.jpg
jhead -autorot *.JPG
@NanoSoftTech
NanoSoftTech / kku_saml.go
Created November 18, 2018 23:16 — forked from bouroo/kku_saml.go
KKU's SSO service provider in GO lang
package kkusaml
import (
"crypto/x509"
"encoding/base64"
"encoding/xml"
"fmt"
"io/ioutil"
"net/http"
@NanoSoftTech
NanoSoftTech / thai-id-card.go
Created November 18, 2018 23:04 — 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"