Skip to content

Instantly share code, notes, and snippets.

View CSaratakij's full-sized avatar
🎯
Focusing

Chatchai Saratakij CSaratakij

🎯
Focusing
View GitHub Profile
using UnityEngine;
public class Example : MonoBehavoiur
{
[SerializeField]
GameObject prefab;
bool isTrigger = false;
void OnTriggerEnter(Collider col)
@CSaratakij
CSaratakij / utils.cs
Created February 27, 2020 10:47
Shuffle sample (Generic)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Utils : MonoBehaviour
{
int[] numbers = new int[] {
1, 2, 3, 4, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0
};
@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 / PDF_To_JPG
Last active April 10, 2019 05:36
Nautilus convert .pdf to .jpg script intregation (multiple select files support)
#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
COUNTER=0
echo -e "Start converting files..."
notify-send "Start converting files..."
for path in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; do
@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 / solution.md
Last active October 1, 2025 23:39
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;