Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View CSaratakij's full-sized avatar
🎯
Focusing

Chatchai Saratakij CSaratakij

🎯
Focusing
View GitHub Profile
@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 April 17, 2024 23:05
Android Phantom, Cached And Empty Processes
@tsunyoku
tsunyoku / guide.MD
Last active April 14, 2024 13:10
osu! install guide for Linux (up-to-date)

osu! install guide for Linux

I know a lot of people have been facing issues setting up osu! on Linux. Most of the guides online are either outdated or just all over the place, so I hope to maintain a good guide here that is relatively easy to follow.

I'd like to start by saying I have only tested this on Debian-based distributions, however it should work fine on others.

If you have any problems during or after installation, please don't hesitate to contact me on Discord (tsunyoku#0066) and I will try my best to help.

Installing Lutris

@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)
{
@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 July 27, 2023 20:35
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 August 14, 2023 06:29
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;
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active April 23, 2024 03:48
True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

True Color (24-bit) and italics with alacritty + tmux + vim (neovim)

This should make True Color (24-bit) and italics work in your tmux session and vim/neovim when using Alacritty (and should be compatible with any other terminal emulator, including Kitty).

Testing colors

Running this script should look the same in tmux as without.

curl -s https://gist.githubusercontent.com/lifepillar/09a44b8cf0f9397465614e622979107f/raw/24-bit-color.sh >24-bit-color.sh