Skip to content

Instantly share code, notes, and snippets.

Avatar

Lattapon Yodsuwan clozed2u

View GitHub Profile
View iTermColorsToTerminalColors.swift
#!/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"
View docker-compose.yml
gogs:
image: gogs/gogs:latest
ports:
- "3000:3000"
- "10022:22"
volumes:
- ./data:/data
drone:
image: drone/drone:0.4
# build: .
@clozed2u
clozed2u / Gogs-Docker.adoc
Created May 13, 2016 — forked from mgreau/Gogs-Docker.adoc
Gogs Docker Env (docker-compose)
View Gogs-Docker.adoc

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' \
@clozed2u
clozed2u / gogs.sh
Created May 13, 2016 — forked from anoochit/gogs.sh
gogs.sh config gogs with nginx
View gogs.sh
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
@clozed2u
clozed2u / optimize-ssd.md
Last active Apr 4, 2018 — forked from ummels/os-x-enable-trim.md
Optimize non-Apple SSDs on OS X.
View optimize-ssd.md

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
View tmux-cheatsheet.markdown

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname