Skip to content

Instantly share code, notes, and snippets.

View orzklv's full-sized avatar
🏴
For me, open source is a moral thing.

オルジクロフソヒブジョン orzklv

🏴
For me, open source is a moral thing.
View GitHub Profile
{
homeConfigurations = {
# ___ __
# / | ____ ____ / /__
# / /| | / __ \/ __ \/ / _ \
# / ___ |/ /_/ / /_/ / / __/
# /_/ |_/ .___/ .___/_/\___/
# /_/ /_/
# For all my current OSX machines
"sakhib@apple" = home-manager.lib.homeManagerConfiguration {
@orzklv
orzklv / before-flake.nix
Created August 15, 2024 15:56
My life before flake-utils.lib.eachDefaultSystem was:
...
let
lib = nixpkgs.lib;
systems = [
"aarch64-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
@orzklv
orzklv / readme.md
Last active October 23, 2024 17:42
How to migrate from homebrew to Nix package manager by Orzklv!

How to migrate from Homebrew to Nix

#homebrew #brew #nix #nixos

I'll be honest with ya'll, you don't wanna get away from Homebrew completely, yes, I'll explain!

I've been using Nix package manager in all my MacOS machines about 3-4 months and I always kept Homebrew installed. You see, Nix is a very good package manager and with its home-manager, it becomes a good config farm as well. However, installing & managing GUI & unfree apps via Nix has been a quite painful experience for me. Sometimes, it wouldn't run properly, crash or wouldn't even start. Also, Nix doesn't have most of GUI packages that Homebrew has. Therefore, I keep homebrew and use it only for its "casks" registry to install GUI & unfree apps whereas having nix to manage dot file configurations and cli apps.

@orzklv
orzklv / linkedshit.rs
Created March 14, 2024 14:37
Linked List implementation on Rust
use std::mem;
pub struct List<T> {
head: Link<T>,
}
type Link<T> = Option<Box<Node<T>>>;
struct Node<T> {
elem: T,
@orzklv
orzklv / readme.md
Last active March 6, 2024 16:26
How can we all profit from this chat

image

This message was sent in a private chat consisting communities leaders listed here

I agree with his point, honestly :D

He literally spoke out the current state of this chat. Yes, we might come up with ideas and try to (sorta) exchange with experiences. In the end, it’s just only a few communities that are profiting from this chat.

We all came here, because ALL of US wanted something or somehow profit from being together for the sake of our own communities.

@orzklv
orzklv / lazy-git.sh
Created February 21, 2024 17:22
Lazy git for faster shit commiting
lazygit() {
USAGE="
lazygit [OPTION]... <msg>
GIT but lazy
Options:
--fixup <commit> runs 'git commit --fixup <commit> [...]'
--amend runs 'git commit --amend --no-edit [...]'
-f, --force runs 'git push --force-with-lease [...]'
@orzklv
orzklv / git-log.sh
Created February 21, 2024 17:22
Prettier way of showing git log
glog() {
setterm -linewrap off 2> /dev/null
git --no-pager log --all --color=always --graph --abbrev-commit --decorate --date-order \
--format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' "$@" \
| sed -E \
-e 's/\|(\x1b\[[0-9;]*m)+\\(\x1b\[[0-9;]*m)+ /├\1─╮\2/' \
-e 's/(\x1b\[[0-9;]+m)\|\x1b\[m\1\/\x1b\[m /\1├─╯\x1b\[m/' \
-e 's/\|(\x1b\[[0-9;]*m)+\\(\x1b\[[0-9;]*m)+/├\1╮\2/' \
-e 's/(\x1b\[[0-9;]+m)\|\x1b\[m\1\/\x1b\[m/\1├╯\x1b\[m/' \
@orzklv
orzklv / crash.log
Created February 10, 2024 22:43
Telegram crash log
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: Telegram [17224]
Path: /Applications/Telegram.app/Contents/MacOS/Telegram
Identifier: ru.keepcoder.Telegram
Version: 10.7.1 (259074)
App Item ID: 747648890
App External ID: 863422799
@orzklv
orzklv / default.nix
Created January 28, 2024 09:35
NIx Flake Example
{ lib
, llvmPackages
, cmake }:
llvmPackages.stdenv.mkDerivation rec {
pname = "rust";
version = "0.1.0";
src = ./.;
@orzklv
orzklv / java.reg
Last active July 6, 2023 07:39
Add OpenJDK 18 to registrars on Windows 11. This action is not being automatically done on default if you install Java with scoop.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\JavaSoft]
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\JavaSoft\Java Runtime Environment]
"CurrentVersion"="18.0.1"
[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\JavaSoft\Java Runtime Environment\18.0]
"JavaHome"="C:\\Users\\Sakhib\\Scoop\\apps\\openjdk\\current"
"MicroVersion"="0"