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
View GitHub Profile
@ayuthmang
ayuthmang / T-Shirt confirmation - example.gs
Last active August 11, 2017 05:27
Send emails using Google Script
var subject_skeletion = "อีเมล์ยืนยันสำหรับสั่งซื้อเสื้อออนไลน์";
var content_skeleton = "สวัสดีครับคุณ %s \n" +
"\n"+
"คุณได้ทำการสั่งไซส์เสื้อไว้เป็นไซส์ %s" +
"หากไม่ใช่ไซส์คุณสามารถติดต่อกลับได้ที่" +
"099-999-9999 หรืออีเมล์ [email protected]" +
"\n" +
"ขอขอบพระคุณที่ไว้วางใจเรา";
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
@ayuthmang
ayuthmang / example.gs
Last active August 11, 2017 05:55
Send emails using Google Script part 1
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
var startRow = 2; // First row of data to process
var numRows = 2; // Number of rows to process
// Fetch the range of cells A2:B3
var dataRange = sheet.getRange(startRow, 1, numRows, 2)
// Fetch values for each row in the Range.
var data = dataRange.getValues();
for (i in data) {
var row = data[i];
@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 หรืออีเมล์ [email protected]\n" +
"\n" +
"ขอขอบพระคุณที่ไว้วางใจเรา";
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
@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 / README.md
Last active December 25, 2023 20:39
Markdown ฉบับภาษาไทย

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

# หัวเรื่อง 1
## หัวเรื่อง 2
### หัวเรื่อง 3
#### หัวเรื่อง 4
##### หัวเรื่อง 5
###### หัวเรื่อง 6
@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 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 / 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 / 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 / README.md
Last active March 13, 2019 06:24
Build teletgraf from source code on macOS Mojave 10.14.3

Hello World