Skip to content

Instantly share code, notes, and snippets.

View CSaratakij's full-sized avatar
🎯
Focusing

Chatchai Saratakij CSaratakij

🎯
Focusing
View GitHub Profile
@CSaratakij
CSaratakij / .fdirrc
Created July 15, 2018 18:48
Fdir junk keys.
alias fd-WWW="cd /home/csaratakij/TTT"
alias fd-git="cd /home/csaratakij/@GitRepository"
alias fd-fdir="cd /home/csaratakij/@GitRepository/FDir"
alias fd-music="cd /home/csaratakij/Music"
alias fd-download="cd /home/csaratakij/Downloads"
alias fd-video="cd /home/csaratakij/Videos"
alias fd-tools="cd /home/csaratakij/Tools"
alias fd-prototypeA="cd /home/csaratakij/@GitRepository/PrototypeA"
alias fd-picture="cd /home/csaratakij/Pictures"
alias fd-godot-custom="cd /home/csaratakij/Tools/Utils/Godot/Custom"
@CSaratakij
CSaratakij / tetris.py
Created May 23, 2018 19:07 — forked from silvasur/tetris.py
Tetris implementation in Python
#!/usr/bin/env python2
#-*- coding: utf-8 -*-
# NOTE FOR WINDOWS USERS:
# You can download a "exefied" version of this game at:
# http://hi-im.laria.me/progs/tetris_py_exefied.zip
# If a DLL is missing or something like this, write an E-Mail (me@laria.me)
# or leave a comment on this gist.
# Very simple tetris implementation
@CSaratakij
CSaratakij / i3Autostart.sh
Created December 9, 2017 12:11
Spawn Terminal Layout in i3wm
#!/bin/sh
#----------------------------------------#
# Auto Start App on specific workspace. #
#----------------------------------------#
# Setup Bar
exec polybar mystatus -q &
# Setup Workspace 8
i3-msg "workspace 8"
@CSaratakij
CSaratakij / check.py
Last active September 26, 2017 08:41
Get expect number and check its total stack and total number for each input.
#!/usr/bin/env python
def run():
inputNum = input("Expect Number : ")
inputNum = int(inputNum)
expectNum = inputNum
previousNum = 0
currentNum = 0
@CSaratakij
CSaratakij / lib.py
Created May 19, 2017 07:44
Refactor Ex.
class Person:
def __init__(self, name):
self.name = name
self._address = ""
def getName(self):
return self.name
def getAddress(self):
return self._address
@CSaratakij
CSaratakij / 51-these-are-not-joysticks.rules
Created November 6, 2016 13:16 — forked from denilsonsa/51-these-are-not-joysticks.rules
Fix for keyboard/mouse/tablet being detected as joystick in Linux β€” Moved to https://github.com/denilsonsa/udev-joystick-blacklist
#
# β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•— β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
# β–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•— β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—
# β–ˆβ–ˆβ•”β–ˆβ–ˆβ–ˆβ–ˆβ•”β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘
# β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•— β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β• β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•‘
# β–ˆβ–ˆβ•‘ β•šβ•β• β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•
# β•šβ•β• β•šβ•β• β•šβ•β•β•β•β•β• β•šβ•β•β•β• β•šβ•β•β•β•β•β•β•β•šβ•β•β•β•β•β• β•šβ•β• β•šβ•β•β•β•β•β•
#
# ╔═════════════════════════════════════════════════════════════════╗
# β•‘ https://github.com/denilsonsa/udev-joystick-blacklist β•‘
@CSaratakij
CSaratakij / dunstrc
Created November 2, 2016 19:53 — forked from alexlangberg/dunstrc
Settings for dunst notifications. Colors from FlatStudio GTK theme (dark). Place in ~/.config/dunst/
[global]
font = Ubuntu 10
# Allow a small subset of html markup in notifications and formats:
# <b>bold</b>
# <i>italic</i>
# <s>strikethrough</s>
# <u>underline</u>
#
# For a complete reference see
@CSaratakij
CSaratakij / .tmux.conf
Last active June 22, 2024 08:10
Tmux's Config that's very close to i3wm (Setting with an idea of using tmux without x-server)
# Config that is very close to a i3 window manager's keybinding.
set -s escape-time 0
setw -g aggressive-resize on
# First remove *all* keybindings
unbind-key -a
# List keys
bind-key ? list-keys
@CSaratakij
CSaratakij / tmux.conf
Created August 30, 2016 19:50 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@CSaratakij
CSaratakij / health.gd
Last active April 15, 2019 21:50
GDScript - Health script with no if-else statement (man...I should have used clamp method for a long long time..^^)
extends Node
const MIN_HEALTH = 0
const MAX_HEALTH = 100
export var current_health = MAX_HEALTH
func _ready():
current_health = clamp(current_health, MIN_HEALTH, MAX_HEALTH)