Skip to content

Instantly share code, notes, and snippets.


Chakrit Wichian chakrit

View GitHub Profile
apt-get remove -y docker docker-engine containerd runc
apt-get update
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
View TMUX - Single window group, multiple

TMUX - Single window group, multiple session.

So I have been using tmux for a while and have grown to like it and have since added many many customizations to it. Now once you start getting the hang of it, you'll naturally want to do more with the tool.

Now tmux has a concept of window-group and session and if you are like me you'll want multiple session that connects to the same window group instead of a new window group every time. Basically I just need different views into the same set of windows that I have already created, I don't want to create a new set of windows every time I fire up my terminal.

This is the default case if you simply use the tmux command as your login shell, effectively creating a new group of windows every time you start tmux.

This is less than ideal because, if you are like me, you fire up one-off terminals all the time and you don't want all those one-off jobs to stay running in the background. Plus sometimes you need information fro

chakrit / api.go
Created May 4, 2021 — forked from narze/gov-project-generator.rb
View api.go
package main
import (
chakrit /
Created Feb 23, 2021
Converting Spring Page<T> to Stream<T>
package com.github.chakrit;
import java.util.function.Function;
View Main.elm
module Main exposing (..)
import Browser
import Html exposing (div, input, p, span, strong, text)
import Html.Attributes exposing (value)
import Html.Events exposing (onInput)
type alias Model =
chakrit / gendiff.go
Last active Jul 5, 2019
Generic Diff algorithm in Go.
View gendiff.go
package gendiff
type Op int
const (
noOp = Op(iota)
chakrit / Base64.elm
Last active Jun 11, 2019
Base64 URL encoding
View Base64.elm
module Base64 exposing
( base64FromBytes
, base64ToBytes
, fromBase64String
, toBase64String
import Bitwise as Bits
import Bytes exposing (Bytes)
import Bytes.Decode as D
chakrit / elmgroupof.elm
Created Jun 11, 2019
Elm groupOf function
View elmgroupof.elm
groupOf : Int -> List a -> List (List a)
groupOf count list =
len =
List.length list
if len >= count then
List.take count list :: (groupOf count <| List.drop count list)
else if len > 0 then
View main.go
package main
import (
const Shift = 254
import uuid
OMISE_FEE = 0.0365
class Transaction:
def __init__(self, balance, direction, amount, description):
self.balance = balance
self.direction = direction
self.amount = amount