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 / bspwmrc
Created March 16, 2019 21:48 — forked from HugLifeTiZ/bspwmrc
bspwm config files
#! /bin/sh
bspc config top_padding 24
bspc config bottom_padding 0
bspc config left_padding 0
bspc config right_padding 0
bspc config border_width 3
bspc config window_gap 16
# Borders and gaps
@CSaratakij
CSaratakij / solution.md
Last active February 21, 2024 11:19
SQL query practice : 6002526

SQL query practice : (6002526)

Lesson 1 : SELECT queries 101

  1. Find the title of each film
SELECT title FROM movies;
  1. Find the director of each film
@CSaratakij
CSaratakij / reverse_array.py
Created November 14, 2018 09:14
Reverse array
def main():
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9]
print("Before reverse : ")
print(numbers)
numbers = reverse_array(numbers)
print("")
import random
def main():
random.seed()
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
print("Before shuffle : " + str(numbers))
numbers = shuffle(numbers)
print("After shuffle : " + str(numbers))
@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
@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 / .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