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 / .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 / 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 / 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 / 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 / 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 / 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 / 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 / .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 / work.cpp
Last active July 25, 2018 09:31
Result
#include <iostream>
#include <string>
#include <vector>
#include <stdbool.h>
struct OrderInfo
{
int price = 0;
std::string customerName;
@CSaratakij
CSaratakij / CustomCollision.cs
Created September 26, 2018 14:49
Custom Collision
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
public class CustomCollision : MonoBehaviour