Skip to content

Instantly share code, notes, and snippets.

View CSaratakij's full-sized avatar
🎯
Focusing

Chatchai Saratakij CSaratakij

🎯
Focusing
View GitHub Profile
@ericreeves
ericreeves / active_border.ahk
Last active April 26, 2024 02:58
AHK Script for Active Window Border in Windows 11 22H2
;
; Inspiration / Code Jacked from the following resources:
; https://www.reddit.com/r/windowsporn/comments/x6299x/a_small_effect_on_window_switching/
; https://superuser.com/questions/1190658/fine-tune-this-red-border-around-active-window-ahk-script/1191059#1191059?newreg=d3acdcdab8714e76a5efeca9996e792f
; https://www.autohotkey.com/boards/viewtopic.php?f=6&t=110505
; https://discord.com/channels/898554690126630914/898556726108901386/1053662963585781760 # Komorebi Discord
;
#NoEnv
#SingleInstance, Force
@red-dragon65
red-dragon65 / Deck ui.md
Last active February 21, 2024 16:26
How to properly run Steam Decks UI on Manjaro

This guide is deprecated! Please take a look at the alternative solutions below.

This guide was created to run the steam deck ui on a linux desktop before valve officially updated big picture mode for the steam client. This guide no longer serves any purpose.

Big Picture Mode

  • The steam client now officially uses the steam deck ui (gamepad ui) for big picture mode.

HoloISO

  • A reversed engineered version of valves steam deck OS
@agnostic-apollo
agnostic-apollo / Android-Phantom,Cached-And-Empty-Processes.md
Last active November 10, 2024 00:51
Android Phantom, Cached And Empty Processes
@nakov
nakov / FileXor.cs
Created March 10, 2021 17:50
C# Encrypt / Decrypt File with XOR
using System.IO;
void EncryptFile(string inputFile, string outputFile)
{
using (var fin = new FileStream(inputFile, FileMode.Open))
using (var fout = new FileStream(outputFile, FileMode.Create))
{
byte[] buffer = new byte[4096];
while (true)
{
/*
A simple little editor extension to copy and paste all components
Help from http://answers.unity3d.com/questions/541045/copy-all-components-from-one-character-to-another.html
license: WTFPL (http://www.wtfpl.net/)
author: aeroson
advise: ChessMax
editor: frekons
*/
#if UNITY_EDITOR
@mattyellen
mattyellen / UnityAsyncOperationAwaiter.cs
Created July 26, 2020 19:36
Allows the use of async/await (instead of yield) with any Unity AsyncOperation
public static class ExtensionMethods
{
public static TaskAwaiter GetAwaiter(this AsyncOperation asyncOp)
{
var tcs = new TaskCompletionSource<object>();
asyncOp.completed += obj => { tcs.SetResult(null); };
return ((Task)tcs.Task).GetAwaiter();
}
}
@jdavid82
jdavid82 / .vimrc
Last active December 2, 2024 09:40
vim settings for full stack C# development in Windows 10
"Allow project specific .vimrc execution
set exrc
"no backup files
set nobackup
"only in case you don't want a backup file while editing
set nowritebackup
"no swap files
@enif-lee
enif-lee / CryptoUtil.cs
Created March 27, 2020 05:50
C# AES256 encryption and decryption example for using easily.
public class CryptoUtil
{
public static byte[] EncryptAes256(byte[] bytes, byte[] key)
{
using var aes = new RijndaelManaged
{
Key = CreateDeriveBytes(key, 32),
};
aes.GenerateIV();
@ZacharyPatten
ZacharyPatten / WindowsCmdCommand.cs
Created February 26, 2020 20:28
Example of running commands in Windows from C#
using System;
using System.Diagnostics;
class Program
{
static void Main()
{
WindowsCmdCommand.Run("dir", out string output, out string error);
Console.WriteLine("OUTPUT: " + output);
Console.WriteLine("ERROR: " + error);
@favoyang
favoyang / BuildAddressables.cs
Last active June 7, 2024 18:10
Build addressable bundles when clicking the build button
/// <summary>
/// The script gives you choice to whether to build addressable bundles when clicking the build button.
/// For custom build script, call PreExport method yourself.
/// For cloud build, put BuildAddressablesProcessor.PreExport as PreExport command.
/// Discussion: https://forum.unity.com/threads/how-to-trigger-build-player-content-when-build-unity-project.689602/
///
/// License: The MIT License https://opensource.org/licenses/MIT
/// </summary>
using UnityEditor;
using UnityEditor.AddressableAssets;