Skip to content

Instantly share code, notes, and snippets.

View azriel91's full-sized avatar
🤍
instilling peace

Azriel Hoh azriel91

🤍
instilling peace
View GitHub Profile

For anyone coming here from Google, try either:

A rather permanent driver solution:

Unplug any external mouse and reboot.

Go to Device Manager.

Right click the only device under "Mice and other pointing devices" > "Update Driver" > "Browse my computer for drivers" > "Let me pick..." > "HID-compliant mouse" > "Next".

@azriel91
azriel91 / state_boxed_opt.rs
Created July 29, 2023 02:12
Peace framework: Random types
use std::{
fmt::Display,
ops::{Deref, DerefMut},
};
use serde::Serialize;
use type_reg::{
untagged::{BoxDataTypeDowncast, BoxDtDisplay, DataType, DataTypeWrapper, FromDataType},
TypeNameLit,
};
@azriel91
azriel91 / gradle.sublime-build
Last active June 2, 2023 01:15
Sublime Text Gradle build system
{
// Put this script in:
//
// ```text
// ~/.config/sublime-text-3/Packages/User/gradle.sublime-build
// ```
//
// 1. Install Java: `sudo apt install -y openjdk-19-jdk`.
// 2. Install gradle.
// 3. Set `GRADLE_HOME` in `~/.profile`.
#! /bin/bash
#
# Install winehq-stable by following instructions on https://wiki.winehq.org/Ubuntu
#
# Then:
wine64 --version # wine-8.0
export WINEPREFIX=~/.wine64
winecfg -v win10
wine64 ~/Downloads/Lumina-0.2.1-win64.exe
@azriel91
azriel91 / ansi_colours.sh
Last active January 10, 2023 03:41
Prints ANSI colours to the console so that it is easily readable, and fits in one screen
#! /bin/bash
#
# ansi colours
# basic
printf '\e[1mbasic:\e[0m\n'
for code in {0..15}
do
if [[ $(echo "$code % 8" | bc) -ge 1 ]]
then
@azriel91
azriel91 / japanese_cheese_cake.md
Created October 21, 2022 22:05
Recipe for making a Japanese cheese cake

Japanese Cheese Cake

Adapted from takestwoeggs/japanese-cotton-cheesecake.

  • Amounts multiplied by 1.4 (because the cheese block I bought is 250g).
  • Using tartaric acid (cream of tartar) instead of lemon juice.

Resources / Data

@azriel91
azriel91 / any_fn_with_id.rs
Created December 10, 2021 03:22
Store any function and call it with borrowed ID.
// Cargo.toml
//
// [dependencies]
// resman = { version = "0.11.0", features = ["debug"] }
// futures = "0.3.18"
// tokio = { version = "1.13.0", features = ["rt"] }
use std::{fmt::Debug, marker::PhantomData};
use futures::{
@azriel91
azriel91 / Preferences.sublime-settings
Last active July 23, 2023 18:58
Sublime Text key bindings
{
"always_show_minimap_viewport": true,
"auto_complete": false,
"color_scheme": "Packages/User/base16-tomorrow-night-bright.tmTheme",
"copy_with_empty_selection": false,
"default_line_ending": "unix",
"draw_minimap_border": false,
"draw_white_space": "all",
"extra_file_exclude_patterns":
[
@azriel91
azriel91 / paint_net_install.sh
Created February 27, 2021 07:58
Wine paint.net
sudo apt install wine winetricks
winetricks -q dotnet472
wine ~/Downloads/Paint.NET.3.5.11.Install.exe
@azriel91
azriel91 / starship.toml
Last active May 14, 2024 01:52
Starship configuration
format = """\
$time\
$directory\
$memory_usage\
$env_var\
$git_branch\
$git_commit\
$git_state\
$git_status\
$cmd_duration\