Skip to content

Instantly share code, notes, and snippets.

View CSaratakij's full-sized avatar
🎯
Focusing

Chatchai Saratakij CSaratakij

🎯
Focusing
View GitHub Profile
@th3d0g
th3d0g / PListiOS.cs
Last active September 22, 2024 13:02
Unity PostProcessBuid script for editing the PList file within the Xcode project. This example will enable push notifcations.
using UnityEngine;
using UnityEditor;
using UnityEditor.Callbacks;
using System.Collections;
#if UNITY_IOS
using UnityEditor.iOS.Xcode;
#endif
using System.IO;
// PListiOS - Edit the PList file.
@JavadocMD
JavadocMD / CompileIndicator.cs
Last active June 23, 2023 18:39
A Unity script to play a sound effect when script compiling starts and ends.
using System;
using System.Reflection;
using UnityEditor;
using UnityEngine;
// I recommend dropping this script in an Editor folder.
// You should have two audio clips somewhere in the project.
// You'll need to edit-in the paths of those clips (from your project root folder) in the static initializer below.
// Example path: "Assets/Editor/CompileIndicator/start.mp3"
@yujen
yujen / Sprites-Additive.shader
Last active March 31, 2025 18:22
Additive color tint sprite shader modified from Unity built-in Sprites-Default.shader
Shader "Sprites/Additive"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Additive Tint", Color) = (1,1,1,1)
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
}
SubShader

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 => user.followers > 6)
@benloong
benloong / UIDissolve.shader
Last active February 11, 2025 15:39 — forked from nukeop/dissolve.shader
Dissolve shader for Unity
Shader "UI/Dissolve"
{
Properties
{
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
_StencilComp ("Stencil Comparison", Float) = 8
_Stencil ("Stencil ID", Float) = 0
_StencilOp ("Stencil Operation", Float) = 0
@mnlwldr
mnlwldr / i3blocks.conf
Created June 25, 2016 15:19
Show the current active Window for i3blocks
[window_name]
command=xprop -id $(xprop -root | awk '/_NET_ACTIVE_WINDOW\(WINDOW\)/{print $NF}') | awk '/_NET_WM_NAME/{$1=$2="";print}' | cut -d'"' -f2
interval=1
color=#ffffff
interface Fooable {
fun foo(): String
}
class FooImpl : Fooable {
override fun foo() = "I am fooImpl"
}
class AnotherFooImpl : Fooable {
override fun foo() = "I am anotherFooImpl"
@MattRix
MattRix / UnityEditorIcons.txt
Last active April 26, 2025 11:15
A list of all the built-in EdtiorGUI icons in Unity. Use EditorGUIUtility.IconContent([icon name]) to access them.
ScriptableObject Icon
_Popup
_Help
Clipboard
SocialNetworks.UDNOpen
SocialNetworks.Tweet
SocialNetworks.FacebookShare
SocialNetworks.LinkedInShare
SocialNetworks.UDNLogo
animationvisibilitytoggleoff
@subfuzion
subfuzion / github-wiki-how-to.md
Last active March 13, 2025 09:40
GitHub Wiki How-To

How do I clone a GitHub wiki?

Any GitHub wiki can be cloned by appending wiki.git to the repo url, so the clone url for the repo https://myorg/myrepo/ is: [email protected]:myorg/myrepo.wiki.git (for ssh) or https://github.com/my/myrepo.wiki.git (for https).

You make edits, and commit and push your changes, like any normal repo. This wiki repo is distinct from any clone of the project repo (the repo without wiki.get appended).

How do I add images to a wiki page?

@andrewrk
andrewrk / log.txt
Created January 8, 2016 13:31
conversation about fast int types in #musl irc channel
[16:00:47] <andrewrk> in practice, are the int_fastN_t types worth using?
[16:01:04] <andrewrk> what about cache performance?
[16:01:26] <nsz> no but it has nothing to do with technical reasons
[16:01:40] <andrewrk> go on?
[16:02:26] <nsz> the standard failed to clearly specify the intent of these types (is it for fast storage access, arithmetics,..?)
[16:03:00] <nsz> and the consequence is that implementations (glibc/gcc) made horrible choices (int_fast16_t is 64bit on 64bit machines)
[16:03:08] <andrewrk> ugh
[16:03:24] <andrewrk> well I'm playing with a toy language / compiler and I'm thinking about integer types
[16:03:24] <nsz> so a int_fast16_t division is much slower than an int16_t one
[16:03:36] <andrewrk> so what if we were to toss out the spec and imagine it better?