Skip to content

Instantly share code, notes, and snippets.

@j4cksw
j4cksw / docker-compose.yml
Created December 14, 2025 04:37
Docker compose for SOC NestJS 2025
version: "3.9"
services:
postgres:
image: postgres:16
container_name: taskmanager_postgres
restart: always
environment:
POSTGRES_USER: task_user
POSTGRES_PASSWORD: task_password
POSTGRES_DB: task_manager
@j4cksw
j4cksw / ResidentEvil4.lua
Created May 30, 2020 22:31
RE4 Ultra wide fix
require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName())
--GAME VARS
fAdditionalFOV = 0
fDefaultEngineAspectRatio = 1.777777791
fDefaultAspectRatio = 1.333333373
fDefaultEngineWidthScale = 1280.0
fDefaultEngineHeightScale = 720.0
fDefaultEngineTextWidthScale = 512.0
*** Settings ***
Library Selenium2Library
*** Test Case ***
Headless Google
Open Browser https://www.google.com headlesschrome
Maximize Browser Window
Input Text lst-ib somkiat
Press Key lst-ib \\13
Wait Until Page Contains somkiat.cc
*** Test case ***
Upload exciting photo
Wait Until Element Is Visible ${Tap task}
Click Element ${Tap task}
Wait Until Element Is Visible ${Create Task Button}
Click Element ${Create Task Button}
Execute Javascript ${Attach File Button}
Wait Until Element Is Visible ${Choose File Button}
Choose File ${Choose File Button} Desktop:\\eko_work\\dog1.jpg
package main
/*
Required imagemagick
$brew install imagemagick
And Ghostscript
$brew install ghostscript
@j4cksw
j4cksw / samplepdf.go
Created April 5, 2018 05:30
# install imageMagick
package main
import (
"fmt"
"github.com/jung-kurt/gofpdf"
"gopkg.in/gographics/imagick.v3/imagick"
)
func main() {
@j4cksw
j4cksw / farmer.go
Last active August 13, 2017 13:40
package main
import (
"encoding/json"
"log"
"net/http"
mgo "gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
*** Settings ***
Library Selenium2Library
*** Variables ***
${IMPORT MATERIAL MENU} xpath=/html/body/div[2]/div[2]/div[1]/div[2]/h4/a
${ADD IMPORT MATERIAL LINK} xpath=//*[@id="editImportMaterial"]/form/div[1]/div[2]/div/div
${MATERIAL 1st ROW} xpath=//*[@id="materialPopup"]/div/div/div[2]/table/tbody[1]/tr
${SEARCH FARMER BUTTON} xpath=//*[@id="editImportMaterial"]/form/ng-form/div[1]/div[1]/div/div
${FARMER 1st ROW} xpath=//*[@id="farmerPopup"]/div/div/div[2]/table/tbody[2]/tr
*** Settings ***
Library Selenium2Library
*** Variables ***
${InputSearchforCal} (2+2)^3
*** Test Cases ***
TC1-Show Google Calculator
#Open Web browser firefox
Open Browser http://google.co.th firefox
*** Settings ***
Library Selenium2Library
Test Template Check calculator result
*** Test cases ***
Normal add 2+2 4
Normal subtract 3-1 2
Powered (2+2)^3 64
*** Keywords ***