Skip to content

Instantly share code, notes, and snippets.

View orhun's full-sized avatar
⚙️
reinventing the wheel...

Orhun Parmaksız orhun

⚙️
reinventing the wheel...
View GitHub Profile
@orhun
orhun / docker-compose.yml
Last active May 10, 2024 06:20
Set up `softserve` to mirror repositories from GitHub
version: "3.6"
services:
soft-serve:
image: charmcli/soft-serve:latest
container_name: soft-serve
restart: unless-stopped
ports:
- 23231:23231
- 23232:23232
- 23233:23233
@orhun
orhun / notify_followers.sh
Last active March 21, 2023 12:29
Telegram bot for GitHub follower notifications
#!/usr/bin/env bash
set -e
file="followers.txt"
followers=()
page=1
per_page=100
page_result=()
# github_token=
@orhun
orhun / gh-pr-sync.sh
Last active February 13, 2023 14:32
Have you ever wanted to transfer all the pull requests from a repository to another? Me neither!
#!/usr/bin/env bash
set -eu
# repositories should be identical at the time
#SOURCE_REPO="fdehau/tui-rs"
#TARGET_REPO="tui-rs-revival/tui-rs"
# make sure you have the correct scope permissions
#GITHUB_TOKEN=""
@orhun
orhun / changelog_generator.rs
Created January 11, 2023 20:47
Simple changelog generator
fn main() {
// Initialize repository
let repo = git2::Repository::open(std::env::var("REPOSITORY").unwrap()).unwrap();
let mut revwalk = repo.revwalk().unwrap();
revwalk
.set_sorting(git2::Sort::NONE | git2::Sort::TIME)
.unwrap();
revwalk.push_head().unwrap();
// Parse commits
@orhun
orhun / crack.sh
Created May 16, 2022 13:37
Password cracker script for hostapd-wpe results
#!/usr/bin/env bash
# usage: crack.sh <log> <wordlist>
usernames=()
while read -r username; do
read -r challenge
read -r response
if [ "$username" == "test" ]; then
continue
# Please report issues with the package on GitHub or in the comments
# Maintainer: Lunush
pkgname=rates
pkgver=0.6.0
pkgrel=1
pkgdesc="Currency exchange rates in your terminal"
arch=("x86_64")
url="https://github.com/lunush/rates"
license=('Apache' 'MIT')
@orhun
orhun / arch_linux_installation.md
Last active April 20, 2024 02:56
Notes on my Arch Linux installation: UEFI/Secure Boot + systemd-boot, LUKS-encrypted root (XFS), LUKS-encrypted swap (with hibernate & unlocked via TPM)
@orhun
orhun / Arch_Linux_Packaging.md
Last active February 26, 2024 23:43
Custom guide for managing Arch Linux packages

Packaging for Arch Linux

Requirements

@orhun
orhun / cool.sh
Last active April 10, 2021 20:08
Random MOD player
#!/usr/bin/env bash
# Plays a random MOD file from https://modarchive.org
# Depends on XMP (http://xmp.sourceforge.net/)
# https://gist.github.com/orhun/eda9701e357b625c2bada19563872715
rand=$(shuf -i 1-189573 -n 1)
tmp=$(mktemp /tmp/${rand}.XXXXXXXX.mod)
curl https://modarchive.org/jsplayer.php?moduleid=${rand} > ${tmp}
xmp ${tmp}
rm ${tmp}