Skip to content

Instantly share code, notes, and snippets.

View bylatt's full-sized avatar

Lattapon Yodsuwan bylatt

  • Bangkok, Thailand
View GitHub Profile
@bylatt
bylatt / tmux-cheatsheet.markdown
Created November 25, 2018 20:06 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@bylatt
bylatt / gogs.sh
Created May 13, 2016 16:25 — forked from anoochit/gogs.sh
gogs.sh config gogs with nginx
APP_NAME="gogs"
MYSQL_PASSWORD="change_me"
HOSTNAME="example.com"
# setup mysql server and database
debconf-set-selections <<CONFIG
mysql-server-5.5 mysql-server/root_password password ${MYSQL_PASSWORD}
mysql-server-5.5 mysql-server/root_password_again password ${MYSQL_PASSWORD}
CONFIG
apt-get install -y --force-yes mysql-server
@bylatt
bylatt / Gogs-Docker.adoc
Created May 13, 2016 16:24 — forked from mgreau/Gogs-Docker.adoc
Gogs Docker Env (docker-compose)

Replace 192.168.99.100 by your DOCKER_HOST IP

# Configure the server
curl 'http://192.168.99.100:3000/install' \
  -H 'Origin: null' -H 'Accept-Encoding: gzip, deflate' \
  -H 'Accept-Language: fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4' \
  -H 'Upgrade-Insecure-Requests: 1' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36' \
@bylatt
bylatt / docker-compose.yml
Created May 13, 2016 16:24 — forked from tam7t/docker-compose.yml
drone-gogs compose
gogs:
image: gogs/gogs:latest
ports:
- "3000:3000"
- "10022:22"
volumes:
- ./data:/data
drone:
image: drone/drone:0.4
# build: .
#!/usr/bin/xcrun swift
import AppKit
enum iTermColors: String {
case Ansi0 = "Ansi 0 Color"
case Ansi1 = "Ansi 1 Color"
case Ansi2 = "Ansi 2 Color"
case Ansi3 = "Ansi 3 Color"
case Ansi4 = "Ansi 4 Color"
@bylatt
bylatt / optimize-ssd.md
Last active April 4, 2018 20:36 — forked from ummels/os-x-enable-trim.md
Optimize non-Apple SSDs on OS X.

Optimize non-Apple SSDs on OS X. (Run the following commands in the terminal.)

Enable TRIM support

Check IOAHCIBlockStorage version:

open /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/version.plist