Skip to content

Instantly share code, notes, and snippets.

View ilumin's full-sized avatar
🏠
Working from home

O Teerasak Vichadee ilumin

🏠
Working from home
  • Bangkok, Thailand
View GitHub Profile
@ilumin
ilumin / cheatsheet-cloudskillsboost-1735.md
Last active June 8, 2023 02:57
Cloudskillsboost: Deploy a Compute Instance with a Remote Startup Script

[!todo] Configure a Linux Compute Engine instance that installs the Apache web server software using a remote startup script. In order to confirm that a compute instance Apache has successfully installed, the Compute Engine instance must be accessible via HTTP from the internet.

Instead of storing startup scripts directly in the instances' metadata, ==you have decided to store the scripts in a Cloud Storage bucket and then configure the virtual machines to point to the relevant script file in the bucket==.

Note

Intermediate level not show tutorial content

projectID: qwiklabs-gcp-00-5891a493aa66

@ilumin
ilumin / pre-request.js
Created February 21, 2023 15:35
Pre-request script to prepare header for LNMarket
const requestTimestamp = new Date().getTime()
const requestPath = `/${pm.request.url.path.join('/')}`
const requestMethod = pm.request.method
let requestParams = ''
if (requestMethod.match(/^(GET|DELETE)$/)) {
requestParams = new URLSearchParams(pm.request.url.query.all()).toString()
} else {
requestParams = pm.request.body.raw
? JSON.stringify(JSON.parse(pm.request.body.raw))
{
"basics": {
"name": "Teerasak Vichadee",
"label": "Technical Lead & Product Owner at Ascend Corporation (Aden)",
"picture": "",
"email": "iolumin@gmail.com",
"phone": "",
"website": "",
"summary": "\"This is the true joy in life to solving customer's problem, fixing bug, refactoring code, invent new technology or improve system performance.\"\n\nFull Stack Developer / Technical Lead / Product Owner / Tech Consultant \nThat's what the other said about me\n\nBut me thinking of myself as ...\nA bachelor of Mathematics, and still have some Mathematics theorem inside my head.\nA programmer, a Full Stack developer and love to learn new programming language.\nA business supporter, no business no tech and without tech a hard business.\nA rookie runner (always).\nA gamer.\nA book lover, I love history and Sci-Fi.\nA father.\nA problem solver (and maker too!).",
"location": {
@ilumin
ilumin / machine.js
Last active December 3, 2020 08:41
Generated by XState Viz: https://xstate.js.org/viz
/**
defined: actions in config
note:
- states: contain state of machine
- on: contain event support on state
- event can define as string of state name or an object of target state and action
- action can do side effect
# Mutate context by assign
*/
@ilumin
ilumin / machine.js
Created November 10, 2020 10:26
Generated by XState Viz: https://xstate.js.org/viz
const authMachine = Machine({
id: "authentication",
initial: "unauthorized",
context: {
user: undefined,
message: undefined,
},
states: {
unauthorized: {
entry: "resetUser",
@ilumin
ilumin / es6-compose.md
Created January 27, 2020 11:08 — forked from JamieMason/es6-compose.md
ES6 JavaScript compose function

ES6 JavaScript Compose Function

Definition

const compose = (...fns) =>
  fns.reduceRight((prevFn, nextFn) =>
    (...args) => nextFn(prevFn(...args)),
    value => value
 );
@ilumin
ilumin / comments.md
Created January 12, 2020 10:31 — forked from sturmenta/comments.md
Firebase Functions Send Mail
@ilumin
ilumin / IAMCredentials.json
Created July 11, 2019 03:33 — forked from ServerlessBot/IAMCredentials.json
Minimum credential set for Serverless Framework
{
"Statement": [
{
"Action": [
"apigateway:*",
"cloudformation:CancelUpdateStack",
"cloudformation:ContinueUpdateRollback",
"cloudformation:CreateChangeSet",
"cloudformation:CreateStack",
"cloudformation:CreateUploadBucket",
@ilumin
ilumin / SketchSystems.spec
Created February 28, 2019 06:26
My Awesome Sketch
My Awesome Sketch
First State
some event -> Second State
Second State

How we incorporate next and cloudfront (2018-04-21)

Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw

This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!

It assumes some knowledge of AWS.

Goals