Skip to content

Instantly share code, notes, and snippets.

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

Orzklv orzklv

🏴
For me, open source is a moral thing.
View GitHub Profile
@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"
@orzklv
orzklv / google.sh
Created May 31, 2023 15:18
Googling from shell script
google() {
if [ -z "$1" ]; then
echo "No argument supplied"
return
fi
echo "Searching for $@"
search_string="$@"
# Linux users should change "open" to "xdg-open"
# or create alias open="xdg-open"
open "https://www.google.com/search?q=$search_string"
@orzklv
orzklv / paru.sh
Created May 31, 2023 15:18
Install paru AUR manager on Arch Linux
# We need to install rust
sudo pacman -S rustup, base-devel
# Install rust components
rustup # accept all defaults
# Let's clone the source code first
git clone https://aur.archlinux.org/paru.git
# Go to folder and install it
@orzklv
orzklv / clean.sh
Created May 31, 2023 15:17
If you're an aesthetic developer who keeps all projects in a single developer like I do at ~/Developer, this script will help you to clean cached dependencies of your projects and clean some space~
cleaner() {
# my DEVSPACE is ~/Developer, set your own DEVSPACE and add it to
# your ~/.zshrc or ~/.bashrc file to let this script detect it
# check if DEVSPACE is set, if not, set it to the current directory
if [ -z "$DEVSPACE" ]; then
DEVSPACE="$(pwd)";
fi
# change current directory to DEVSPACE
cd $DEVSPACE;
# loop through project folders in current path and ...
@orzklv
orzklv / custom-location-org.sh
Created May 31, 2023 15:17
Set custom location for GitHub user or Organization
curl -H "Authorization: bearer GH_PAT_HERE" -d '{"location":"YOUR CUSTOM LOCATION"}' https://api.github.com/orgs/ORG_NAME
@orzklv
orzklv / push-with-personal-token.sh
Created May 31, 2023 15:16
Pushing with GitHub Personal Token
#!/bin/bash
# shellcheck disable=SC2164
cd "$(dirname "$0")"
export GITHUB_ACCESS_TOKEN=""
export GITHUB_USERNAME=""
export REPOSITORY_NAME=""
git push https://"$GITHUB_ACCESS_TOKEN"@github.com/"$GITHUB_USERNAME"/"$REPOSITORY_NAME".git
@orzklv
orzklv / transfer.js
Created April 24, 2023 14:11
Transfer all repositories of an organization to another
const axios = require('axios');
const GITHUB_TOKEN = 'YOUR_GITHUB_TOKEN';
const SOURCE_ORG = 'SOURCE_ORG';
const TARGET_ORG = 'TARGET_ORG';
const api = axios.create({
baseURL: 'https://api.github.com',
headers: {
'Authorization': `token ${GITHUB_TOKEN}`,
'Accept': 'application/vnd.github+json',
@orzklv
orzklv / Dockerfile
Last active March 25, 2023 10:51
Using archlinux as docker container
FROM archlinux:latest
CMD /sbin/init
@orzklv
orzklv / arch.md
Last active May 30, 2025 11:54
Arch Installation bible written by Sokhibjon. This installation process suits and follows taste of Sokhibjon, so feel free to modify and create your `own` way of installing Arch Linux.

Arch Linux installation if you were Sokhibjon

#arch #linux #archlinux

Please, keep in mind that everything after # is a comment and should not be executed. Also, { something | something } means that you have to make decision and choose one of them, and then write it without curly braces and pipe.

Connect to the network: