Skip to content

Instantly share code, notes, and snippets.

View nhz-io's full-sized avatar
🙃
Gate Gate Pāragate Pārasaṃgate Bodhi Svāhā

Kumarajiva nhz-io

🙃
Gate Gate Pāragate Pārasaṃgate Bodhi Svāhā
  • Nanohertz
View GitHub Profile
@K1ethoang
K1ethoang / Active StarUml version 6 for Window | MacOS | Linux.md
Last active September 18, 2025 08:45
Active StarUml version 6 for Window | MacOS | Linux
@ToluClassics
ToluClassics / embedding.rs
Last active October 26, 2024 02:20
Bert in Rust
use std::borrow::Borrow;
use tch::nn::ModuleT;
use tch::nn::{self};
use tch::{Kind, Tensor};
#[derive(Debug)]
pub struct Dropout {
dropout_prob: f64,
}
@haipnh
haipnh / intel-nvidia-offload-rendering.md
Last active September 3, 2024 16:26
Intel for display, NVIDIA for computing and offload rendering

Purposes

  1. iGPU will be used for main display and rendering daily-use softwares in default
  2. Dedicated GPUs will be used for computing or offload rendering
  3. Reduce the used VRAM of Dedicated GPU, which is mostly used for X11 server rendering

Tested Hardware Configuration

OS: Ubuntu 18.04.4 LTS
Mainboads
├── iGPU
@giuseppe998e
giuseppe998e / nixos-btrfs-tmpfs.md
Last active September 11, 2025 08:48
Install NixOS with BTRFS and IN-RAM root

Install NixOS with BTRFS and IN-RAM root

1. Format and partition the hard drive

  1. Create the GPT partition table
    • $ parted /dev/sdX mklabel gpt
  2. Create the UEFI FAT32 partition (which will be /dev/sdXY)
    • $ parted /dev/sdX mkpart esp fat32 1MiB 512MiB
    • $ parted /dev/sdX set 1 esp on
    • $ parted /dev/sdX set 1 boot on
  • $ mkfs.fat -F 32 -n UEFI /dev/sdXY
@Zeioth
Zeioth / gist:d8c1fd75b5721c2170b4a2a5f19a986e
Last active April 27, 2025 14:45
Sway HiDPI settings (GTK/QT/Sway) - How to
set $cursor_size 54
```
# GTK
# This is the only place where you must set GTK scaling
set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set $gnome-schema gtk-theme 'Matcha-dark-sea'
gsettings set $gnome-schema icon-theme 'Numix-Square'
gsettings set org.gnome.desktop.interface text-scaling-factor 2.73
@rufoa
rufoa / patch.sh
Last active July 3, 2025 16:48
sublime merge 2 build 2068 linux
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
target="${1:-/opt/sublime_merge/sublime_merge}"
check_sha() {
local sha_valid
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active September 11, 2025 14:43
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@qoomon
qoomon / conventional-commits-cheatsheet.md
Last active September 20, 2025 05:23
Conventional Commits Cheatsheet

my sublime setup for haskell includes:

  • SublimeHaskell, but with most features disabled. mostly for syntax highlighting. (as was pointed out, it is sufficient to grab the *theme file and omit the rest of the plugin. And even that is optional.)
  • for auto-formatting:
    • this (slightly modified) external-command plugin: https://github.com/lspitzner/SublimeExternalCommand
    • brittany (installed so that is on path)
    • the below keybind (you can open the user keybindings in sublime and merge the below)
    • you can either select some function and reformat that by pressing f9, or select nothing (whole file gets formatted)
  • for quick compilation feedback:
@renatoathaydes
renatoathaydes / client.groovy
Last active June 16, 2021 12:18
HTTP Server / Client in Groovy
/*
* This is a runnable groovy script.
* Run with "groovy client.groovy".
*
* Don't forget to start the server.groovy script first (shown in this gist).
*/
import groovy.transform.CompileStatic
import groovy.transform.Immutable
import groovy.transform.ToString