Skip to content

Instantly share code, notes, and snippets.

@6LYTH3
6LYTH3 / name.py
Created March 10, 2024 15:54
A Good Name
good = {
"วันจันทร์": {
"บริวาร": ["ก", "ข", "ค", "ฆ", "ง"],
"อายุ": ["จ", "ฉ", "ช", "ซ", "ฌ", "ญ"],
"เดช": ["ฎ", "ฏ", "ฐ", "ฑ", "ฒ", "ณ"],
"ศรี": ["ด", "ต", "ถ", "ท", "ธ", "น"],
"มนตรี": ["ศ", "ษ", "ส", "ห", "ฬ", "ฮ"],
"อุตสาหะ": ["ย", "ร", "ล", "ว"],
"มูลละ": ["บ", "ป", "ผ", "ฝ", "พ", "ฟ", "ภ", "ม"]
},
@6LYTH3
6LYTH3 / dimond.py
Created October 25, 2022 03:39
Dimond Problem
def main():
# Input #
# first input: number of layer
input_layers = int(input())
input_shapes = []
for i in range(input_layers):
shape = str(input())
# skip duplicate
if shape.upper() in input_shapes:
@6LYTH3
6LYTH3 / my_mqtt.ino
Last active January 3, 2021 08:24
Connect MQTT with NodeMCU 8266
#include <ESP8266WiFi.h>
#include <PubSubClient.h>
const char* ssid = "ssid_name";
const char* password = "ssid_password";
const char* mqtt_server = "broker.emqx.io";
const char mqtt_username[50] = "";
const char mqtt_password[50] = "";
const int mqtt_port = 1883;
@6LYTH3
6LYTH3 / Prime.py
Created January 4, 2019 03:14
list of prime number
def is_prime(x):
print(x)
a = (x//i == x/i for i in range(x-1, 1, -1))
print(" - ", list(a))
prime = []
for i in range(1, 10):
if is_prime(i):
prime.append(i)
# print(prime)
@6LYTH3
6LYTH3 / Dockerfile
Created July 23, 2017 09:26
For iform
FROM tomcat:latest
COPY iforms.war /usr/local/tomcat/webapps/
/*
docker run --name imysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=1234 -d mysql:latest
docker run -it -p 8080:8080 iform:0.2
*/
@6LYTH3
6LYTH3 / Footer.css
Last active July 13, 2016 08:52
This is easy way to set dynamic footer on your page
@6LYTH3
6LYTH3 / FindingGooglePhoto.py
Last active June 13, 2016 14:02
Hacking the url path of Google Photo
#!/usr/bin/env python
"""
Author: Blythe LilYoojun
Lib Require: socks and Tor proxy
"""
import socket
import socks
import requests
import time
@6LYTH3
6LYTH3 / ldap_auth.go
Last active August 29, 2015 14:19 — forked from sfreiberg/ldap_auth.go
package main
import (
"github.com/jbcrail/ldap"
"fmt"
)
func main() {
server := "ldap01.example.com:389"
#!/usr/bin/python
import urllib2
from HTMLParser import HTMLParser
class Find(HTMLParser):
__dataTable = 0
__data = []
__recording = False
def __init__(self):
#!/usr/bin/python
from fabric.api import *
from fabric.contrib.console import confirm
import sys
import os
import subprocess
env.hosts = ['192.168.1.8']
env.user = 'root'