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 / 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 May 3, 2022 21:23
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)
@CSaratakij
CSaratakij / main.py
Created August 18, 2016 17:01
Test Exit Turtle
#!/usr/bin/env python3
import turtle, sys
from turtle import Turtle
from turtle import Screen
class MyTurtle(Turtle):
def quit(self, btn, fun):

Bomb Lab necessities

The bomb lab is most easily completed if you understand the following tools and commands. Also, if I am describing a program, assume that you run it from command line.

Strings

In case you have never used strings before it basically just tells you all the strings in an executable. If I were to run it on the bomb I would simply run

Most active GitHub users in Thailand

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 29 Jul 2015 01:52:41 GMT till Fri, 29 Jul 2016 01:52:41 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user =&gt; user.followers &gt; 6)