Skip to content

Instantly share code, notes, and snippets.

View yunfachi's full-sized avatar
🏴‍☠️
github.com/orgs/community/discussions/101476

yunfachi

🏴‍☠️
github.com/orgs/community/discussions/101476
View GitHub Profile
@yurifrl
yurifrl / test.sh
Last active October 26, 2023 15:58
Testing build nix derivations, passing arguments to nix-buld
# https://nix-dev.science.uu.narkive.com/gkWG24xs/error-cannot-auto-call-a-function-that-has-an-argument-without-a-default-value-stdenv
nix-build --no-out-link -E 'with import <nixpkgs> {}; callPackage ./default.nix {}'
# the --no-out-link will no create the @result link
@rishavpandey43
rishavpandey43 / git-commit-styleguide.md
Last active October 18, 2024 11:22
This gist consist of the rules and best practice of good conventional git commit message

Git Commit Messages Style-Guides

  • Use the present tense ("Add feature" not "Added feature")
  • Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
  • Limit the first line to 72 characters or less
  • Reference issues and pull requests liberally after the first line
  • When only changing documentation, include [ci skip] in the commit title
  • Consider starting the commit message with an applicable emoji

Types

@yunfachi
yunfachi / default.nix
Last active December 10, 2023 17:10
Nix / NixOS : Import all files from current directory
{...}: {
# imports by full path without copying to /nix/store
imports = builtins.map (n: toString ./. + "/${n}") (builtins.attrNames (builtins.removeAttrs (builtins.readDir ./.) [(builtins.unsafeGetAttrPos "_" {_ = null;}).file]));
# copies all files from the current directory to /nix/store and imports from /nix/store
# imports = builtins.map (n: "${./.}/${n}") (builtins.attrNames (builtins.removeAttrs (builtins.readDir ./.) [(builtins.unsafeGetAttrPos "_" {_ = null;}).file]));
}