Skip to content

Instantly share code, notes, and snippets.

View DarkOnion0's full-sized avatar
❄️
NixOS is awesome !

Alexo DarkOnion0

❄️
NixOS is awesome !
View GitHub Profile
@XVilka
XVilka / TrueColour.md
Last active July 9, 2024 23:28
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@mattes
mattes / check.go
Last active June 12, 2024 19:31
Check if file or directory exists in Golang
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) {
// path/to/whatever does not exist
}
if _, err := os.Stat("/path/to/whatever"); !os.IsNotExist(err) {
// path/to/whatever exists
}
@573
573 / readme.md
Last active January 20, 2024 21:02
nix complains "error: cannot auto-call a function that has an argument without a default value ('stdenv')"?

Add on top of default.nix: with import {}; or simply run as nix-build '' (i. e. for nix-build complaining) or rather nix-build -E 'with import {}; callPackage ./default.nix {}' (or even import)

@Zekfad
Zekfad / conventional-commits.md
Last active July 29, 2024 16:53
Conventional Commits Cheatsheet

Quick examples

  • feat: new feature
  • fix(scope): bug in scope
  • feat!: breaking change / feat(scope)!: rework API
  • chore(deps): update dependencies

Commit types

  • build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
  • ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
  • chore: Changes which doesn't change source code or tests e.g. changes to the build process, auxiliary tools, libraries
@SkyLissh
SkyLissh / .vimrc
Last active April 7, 2022 06:39
Vim configuration & Plugins
set number
set mouse=a
set numberwidth=1
set clipboard=unnamedplus
syntax enable
set showcmd
set ruler
set encoding=utf-8
set showmatch
set sw=2
@ferferga
ferferga / delete_ghcr_dangling_images.sh
Created September 7, 2021 17:12
Deletes untagged images from GitHub Container Registry package using gh cli
#!/bin/bash
set -e
# Simple script to remove dangling images from GHCR.
# You need to have installed gh cli and jq for this script to work properly
# You need to be logged to 'gh' first
container="debian/buildd"
temp_file="ghcr_prune.ids"
rm -rf $temp_file
@DarkOnion0
DarkOnion0 / README.md
Last active June 3, 2023 12:29
Basic android nix-shell

Android nix-shell

This is a basic sample of a nix-shell for android flashing

Installation

curl --progress-bar \
 https://gist.githubusercontent.com/DarkOnion0/44493c8786460d6464c1375c25fb3343/raw/16fcc1133e752aaaeeb30bf07fda90812fde4cd5/default.nix > /tmp/android-shell.nix \
 && nix-shell /tmp/android-shell.nix