Skip to content

Instantly share code, notes, and snippets.

View dvgamerr's full-sized avatar

Kananek Thongkam dvgamerr

View GitHub Profile

MySQL

docker run --name my-mysql -e MYSQL_ROOT_PASSWORD=password -d mysql:latest

PostgreSQL

λ bundle
Bundler 2.5.3 is running, but your lockfile was generated with 2.5.5. Installing Bundler 2.5.5 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 2.5.5
Installing bundler 2.5.5
Fetching https://github.com/rails/rails.git
Fetching gem metadata from https://rubygems.org/.........
Resolving dependencies...
Fetching rake 13.1.0
@@||chrome.cloudflare-dns.com^
@@||swupdate.openvpn.net^
||mobile.events.data.microsoft.com^
@@||api.segment.io^
||trafficmanager.net
||events.gfe.nvidia.com^
||googleads.g.doubleclick.net^
||api.segment.io^
||outcome-ssp.supersonicads.com^
||app-measurement.com^
@dvgamerr
dvgamerr / command.bat
Created April 24, 2023 16:39
MP4 to Gif windows
choco install ffmpeg gifski
REM Hi-Resolution Gif
ffmpeg -i movie.mp4 -vf scale=720:-1 ./frame%04d.png
gifski -o movie.gif ./frame*.png
REM Normal gif
ffmpeg -y -i movie.mp4 -vf "fps=23,scale=720:-1:flags=lanczos" movie.gif
@dvgamerr
dvgamerr / database-docker-command.md
Created January 9, 2023 17:03
database-docker-command

MySQL $ docker run --name my-mysql -e MYSQL_ROOT_PASSWORD=password -d mysql:latest

PostgreSQL $ docker run --name my-postgres -e POSTGRES_PASSWORD=mysecretpassword -d -p 5432:5432 postgres

Oracle 12c $ docker run -d --name oracle12c -p 1521:1521 container-registry.oracle.com/database/enterprise:12.2.0.1

MariaDB

@dvgamerr
dvgamerr / bypass-tpm-boot.bat
Created October 1, 2022 06:19
How to Bypass TPM 2.0 and Secure Boot on VirtualBox to Install Windows 11 22H2
reg add HKLM\system\setup\LabConfig /v BypassTPMCheck /d 1
reg add HKLM\system\setup\LabConfig /v BypassRAMCheck /d 1
reg add HKLM\system\setup\LabConfig /v Bypasssecurebootcheck /d 1
@echo off
@"powershell" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
refreshenv
choco feature enable -n allowGlobalConfirmation
choco install googlechrome bitwarden
@dvgamerr
dvgamerr / systemd.md
Last active November 29, 2023 15:57
How to update WSL Systemd support is now available in WSL
  1. check version WSL wsl --version
  2. Update WSL to v0.67.6 wsl.exe --update --web-download or microsoft/WSL
  3. Edit file sudo nano /etc/wsl.conf and using CTRL+O to save and CTRL+X to exit.
[boot]
systemd=true
  1. Install Docker https://docs.docker.com/engine/install/ubuntu/
  2. wsl.exe --shutdown after reboot and check systemctl list-unit-files --type=service
@dvgamerr
dvgamerr / Linux.md
Created September 23, 2022 05:32
Disable swap on boot in `Raspbian 10`
  1. Identify configured swap devices and files with cat /proc/swaps.
  2. Turn off all swap devices and files with swapoff -a.
  3. Remove any matching reference found in /etc/fstab.
@dvgamerr
dvgamerr / alienworlds_bot.js
Last active June 24, 2021 21:44 — forked from pich4ya/alienworlds_bot.js
บอทปั้มเงิน TLM เกม Alien Worlds (เงินจะเอาไปแลกเงินจริงใน Binance ได้) ไว้ทดสอบเฉย ๆ อย่าเอาไปใช้จริง คนเขียนไม่รับผิดชอบต่อบั๊กใด ๆ ทั้งสิ้น
// บอทปั้มเงิน TLM เกม Alien Worlds (เงินจะเอาไปแลกเงินจริงใน Binance ได้)
// ไว้ทดสอบเฉย ๆ อย่าเอาไปใช้จริง คนเขียนไม่รับผิดชอบต่อบั๊กใด ๆ ทั้งสิ้น
//
// วิธีใช้:
// 1. สมัคร + เข้า https://play.alienworlds.io/
// 2. ต้องเคย mine แบบ manual ก่อน 1 ครั้ง
// 3. ก๊อปสคริปท์นี้ไปแปะใน Console (F12)
// น่าจะมีบั๊กพวก rate limit อะไรทั้งหลาย กับ if/loop บางอันเอาออกได้
// ลองรันเล่น ๆ 5 ชม จาก user เปล่า ๆ ได้มา 8 TLM (ขึ้นกับดวงและอื่นๆด้วยมั่ง)
// ใครว่าง ๆ แก้เป็นยิงเข้า API โดยตรงไม่ผ่าน JS น่าจะเสถียรกว่าเยอะมาก