Skip to content

Instantly share code, notes, and snippets.

View AppleBoiy's full-sized avatar
🍅
Tomata

Chaipat J. AppleBoiy

🍅
Tomata
View GitHub Profile
@AppleBoiy
AppleBoiy / remove_git_commit.sh
Created May 24, 2024 03:10
Delete all git commit history
#!/bin/bash
clear && cat << EOF
##########################################| WARNING |##########################################
!THIS SCRIPT WILL DELETE ALL COMMIT HISTORY AND PUSH A NEW INITIAL COMMIT.
Make sure you really want to do this before proceeding.
##########################################| WARNING |##########################################
@AppleBoiy
AppleBoiy / Debugger.cs
Created April 7, 2024 02:59
Unity: Show message from console in build
using System;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/// <summary>
/// Monitors and displays debug logs in a Unity application.
/// </summary>
public class Debugger : MonoBehaviour
{
@AppleBoiy
AppleBoiy / unity_layout.wlt
Created January 29, 2024 18:29
Unity Layout Setup
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &1
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
@AppleBoiy
AppleBoiy / Makefile
Created January 26, 2024 09:35
Git w/ submodules script
clear:
find . -name "__pycache__" -exec rm -rf {} \;
find . -name ".DS_Store" -exec rm -rf {} \;
fetp:
git fetch && git pull
save:
git add . && git commit -m "$(msg)" && git push
@AppleBoiy
AppleBoiy / README.md
Created November 30, 2023 18:08
add bits/stdc++.h to Mac

Bits/stdc++.h

This is a header file that includes every standard library. It is primarily used for competitive programming.

Platform Status
macOS

Installation

@AppleBoiy
AppleBoiy / create_docker_group.md
Created November 21, 2023 06:45
ISSUE: Docker Rancher - Permission Denied when using docker from WSL

stackoverflow issue: https://stackoverflow.com/q/72528606/22440363

$ docker ps
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json": dial unix /var/run/docker.sock: connect: permission denied

FIX

sudo addgroup --system docker
@AppleBoiy
AppleBoiy / Footer_.md
Last active February 5, 2024 06:50
Footer for markdown
@AppleBoiy
AppleBoiy / README.md
Last active November 11, 2023 13:02
build.gradle for simple Java program

Gradle: Build Automation Tool

NOTE This method is quite advanced and is not recommended for beginners. It uses Gradle, a build automation tool, to compile and run complex programs that consist of multiple source-code files.

Project structure:

.
├── build.gradle
[tool.black]
line-length = 88
target-version = ['py310']
include = '\.pyi?$'
exclude = '''
/(
\.git
| \.hg
| \.mypy_cache
| \.tox
@AppleBoiy
AppleBoiy / alias_eza.md
Last active June 11, 2024 15:54
eza-ls

Alias eza for ls command

Put to shell configure file

first install eza by homebrew

brew install eza

Basic setup