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 / SkinnedMeshUpdater.cs
Created September 22, 2023 08:42 — forked from tsubaki/SkinnedMeshUpdater.cs
update SkinnedMesh
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine.Assertions;
using System;
public class SkinnedMeshUpdater : MonoBehaviour
{
[SerializeField]
SkinnedMeshRenderer original;
@CSaratakij
CSaratakij / unityPlayer.cs
Created June 20, 2023 10:09 — forked from Oleur/unityPlayer.cs
Get current Android activity and init an Android object from Unity
AndroidJavaObject localMediaPlayer = null;
using (AndroidJavaClass javaUnityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"))
{
using (currentActivity = javaUnityPlayer.GetStatic<AndroidJavaObject>("currentActivity"))
{
localMediaPlayer = new AndroidJavaObject("my/plugin/vr/ExoPlayerBridge", currentActivity);
if (localMediaPlayer != null)
{
@CSaratakij
CSaratakij / introrx.md
Created October 1, 2020 04:51 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@CSaratakij
CSaratakij / TriggerContainerEditor.cs
Last active May 18, 2019 09:21 — forked from bzgeb/TriggerContainerEditor.cs
Example Drag & Drop area in a custom inspector for the Unity editor
using UnityEngine;
using System.Collections;
using UnityEditor;
[CustomEditor (typeof(TriggerContainer))]
public class TriggerContainerEditor : Editor
{
private SerializedObject obj;
@CSaratakij
CSaratakij / bspwmrc
Created March 16, 2019 21:48 — forked from TiZ-HugLife/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 / 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 / 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
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

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