Skip to content

Instantly share code, notes, and snippets.

View CSaratakij's full-sized avatar
🎯
Focusing

Chatchai Saratakij CSaratakij

🎯
Focusing
View GitHub Profile
@andersevenrud
andersevenrud / alacritty-tmux-vim_truecolor.md
Last active May 3, 2024 08:11
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
@debojyoti
debojyoti / lenovo_ideapad_330_ubuntu.md
Last active October 15, 2023 20:13
Lenovo ideapad 330 (15ARR) ubuntu issues and there solutions

Lenovo ideapad 330 (15ARR) ubuntu issues and their solutions

Issue-1: None of the ubuntu distros are getting installed

Solution: Ubuntu distros lower than 18.10 will not work in this laptop, as minimum kernal version required is 4.18.

So install ubuntu 18.10 / xubuntu 18.10 / lubuntu 18.10 / kubuntu 18.10 in UEFI mode

Issue-2: Wifi is not working

@tilkinsc
tilkinsc / sound.c
Created October 31, 2018 14:01
OpenAL how to load an Ogg Vorbis file and play it
// Created by: http://github.com/tilkinsc
// returns ALuint* aka a single openal buffer of ready-to-play ogg vorbis sound samples
// returns 0 on error
ALuint* sound_load_ogg(const char* path) {
ALenum error = 0;
ALuint* sound = 0;
FILE* fp = 0;
OggVorbis_File vf;
@nrtkbb
nrtkbb / maya2018install.sh
Last active June 19, 2023 08:25 — forked from borgfriend/maya2017install.sh
Maya 2018 Installation on Ubuntu 18.04
#!/bin/bash
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then
echo Please run this script using sudo
echo Just type “sudo !!”
exit
fi
#Check for 64-bit arch
if [uname -m != x86_64]; then
@mhingston
mhingston / AES.cs
Last active November 9, 2023 04:48
AES-256-CBC for C# and Node
using System;
using System.IO;
using System.Security.Cryptography;
using System.Text;
class AES
{
public static string Encrypt(string plainText, string keyString)
{
byte[] cipherData;
@NoelFB
NoelFB / Aseprite.cs
Last active April 24, 2024 19:28
ugly C# .ase (aseprite) parser
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Text;
// File Format:
// https://github.com/aseprite/aseprite/blob/master/docs/ase-file-specs.md
// Note: I didn't test with with Indexed or Grayscale colors
@5argon
5argon / csharp.json
Created July 11, 2018 20:16
Snippet for working with Unity ECS
{
// Place your snippets for csharp here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@xon52
xon52 / xon-GridCanvas.vue
Last active March 5, 2024 09:23
Medium - Flexible Canvas Grid (without blurred lines)
<template>
<canvas class="gridCanvas"
:width="width"
:height="height"
></canvas>
</template>
<script>
export default {
name: 'xon-GridCanvas',
@AidanRocke
AidanRocke / gitbook_on_github
Created April 28, 2018 23:20
Gitbook on Github pages
## taken from: http://sangsoonam.github.io/2016/08/02/publish-gitbook-to-your-github-pages.html
# install the plugins and build the static site
gitbook install && gitbook build
# checkout to the gh-pages branch
git checkout gh-pages
# pull the latest updates
git pull origin gh-pages --rebase
@LotteMakesStuff
LotteMakesStuff / 1.md
Last active January 5, 2023 20:54
UPM: How to make a custom package

UPM: How to make a custom package So, Unity has this shiny new package manager, and you have code you want to share between projects - wouldn't it be great if we could bundle up our shared code and plug it into all the projects that need it? Let's figure out how to make our own Package!


Todo

  • Modify the project manifest
  • Make a package manifest
  • Package the manifest up with some test code
  • Try it out in Unity!