Skip to content

Instantly share code, notes, and snippets.

View ayuthmang's full-sized avatar
😊
Hope you have a great year

Ayuth Mangmesap ayuthmang

😊
Hope you have a great year
  • Bangkok, Thailand
View GitHub Profile
@ayuthmang
ayuthmang / README.md
Last active April 5, 2023 10:48
Script for Archive All Courses Udemy

About

Video

Tried to archiving courses that you don't want? Now I have about 26 pages, each page has 9 courses that I claim for free. Right now I don't want it. Hence, I made script that use to archive courses just single copy and paste.

How to use

  1. Open chrome devtools on mac using Cmd + Option + I.
@ayuthmang
ayuthmang / README.md
Last active February 10, 2020 17:16
docker-compose mysql snippet

MySQL Snippets

$ docker run --name some-mysql -e MYSQL_ROOT_PASSWORD=my-secret-pw -d mysql:5.7.27

CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON 'database'.* TO 'database'@'localhost';
FLUSH PRIVILEGES;
@ayuthmang
ayuthmang / README.md
Last active March 13, 2019 06:24
Build teletgraf from source code on macOS Mojave 10.14.3

Hello World

@ayuthmang
ayuthmang / composer-installation-guide-for-macOS.md
Last active July 23, 2018 02:10
Install composer on macOS

Install composer on macOS

Official installation guide

Install the composer

I've adapted some command line below for make our life easier, so just copy and paste line by line and execute it interminal. If you want to view official installation guide let's see official installation guide.

@ayuthmang
ayuthmang / function-declaration.js
Last active June 1, 2018 15:59
Javascript function claration
// Function Declarations
function sum(a, b) {
return a + b
}
// Function Expressions
const sum = function(a, b) {
return a + b;
}
@ayuthmang
ayuthmang / README.md
Last active January 9, 2021 14:23
Install command line for VS Code on Windows, macOS

Call VS Code via command line on windows

Set up by cmd or powershell

  1. Run cmd or powershell as administrator.

  2. Type setx path "%path%;<YOUR VSCODE PATH>".

  3. Open new cmd or powershell and type 'code'.

  4. Press enter.

  5. Open new cmd or powershell and type 'code', the VS Code will be open up.

@ayuthmang
ayuthmang / TCPClient.py
Last active December 6, 2017 16:53
TCPClient-TCPServer from Computer Networking A Top-Down Approach 6th Edition
from socket import *
serverName = '127.0.0.1'
serverPort = 12000
clientSocket = socket(AF_INET, SOCK_STREAM)
clientSocket.connect((serverName,serverPort))
sentence = raw_input('Input lowercase sentence:')
clientSocket.send(sentence)
@ayuthmang
ayuthmang / README.md
Last active December 25, 2023 20:39
Markdown ฉบับภาษาไทย

หัวเรื่อง (Headings)

# หัวเรื่อง 1
## หัวเรื่อง 2
### หัวเรื่อง 3
#### หัวเรื่อง 4
##### หัวเรื่อง 5
###### หัวเรื่อง 6
@ayuthmang
ayuthmang / default
Created November 1, 2017 11:53
Configuration nginx with php-fpm
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@ayuthmang
ayuthmang / T-Shirt confirmation - example.gs
Last active August 11, 2017 06:30
Send emails using Google Script part 2
var subject_skeleton = "อีเมล์ยืนยันสำหรับสั่งซื้อเสื้อออนไลน์";
var content_skeleton = "สวัสดีครับคุณ %s \n" +
"\n"+
"คุณได้ทำการสั่งไซส์เสื้อไว้เป็นไซส์ %s\n" +
"หากไม่ใช่ไซส์คุณสามารถติดต่อกลับได้ที่\n" +
"099-999-9999 หรืออีเมล์ tshirt@example.com\n" +
"\n" +
"ขอขอบพระคุณที่ไว้วางใจเรา";
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();