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 April 26, 2025 10:19
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 February 26, 2025 10:06
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 February 24, 2025 14:17
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
@Brandonbr1
Brandonbr1 / readme.md
Last active April 25, 2025 18:39
This Simply Disables all useless or uneeded for windows 10/11 services to make your computer faster.

Make sure you run this script as admin,otherwise it will fail to execute

About this script

Warning this is a hardcore removal script, unlike the others, This tries to fully remove almost all uneeded services, without making the computer unusable

Disclamer

By running or using this script you accept. I am not hield responsible if anything breaks or stops working on your computer/machine. That is your fault and it is up to you to re-enable the service.

Printers will not work with this script.

@rufoa
rufoa / patch.sh
Last active April 24, 2025 15:53
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 April 26, 2025 18:36
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 April 26, 2025 13:26
Conventional Commits Cheatsheet

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

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: