Skip to content

Instantly share code, notes, and snippets.

View muhrifqii's full-sized avatar
:octocat:

Muhammad Rifqi Fatchurrahman muhrifqii

:octocat:
View GitHub Profile
@muhrifqii
muhrifqii / cursor.desktop
Last active July 2, 2025 10:42
cursor updater linux
[Desktop Entry]
Name=Cursor App
Type=Application
Categories=Utility;Development;
Exec=sh -c '/{HOME PATH HERE}/Applications/cursor/cursor.AppImage --no-sandbox; $SHELL'
Icon=/{HOME PATH HERE}/Applications/cursor/cursor.jpg
@muhrifqii
muhrifqii / contribution_finder.sh
Created June 16, 2025 06:49
Count local git contribution by commit count
GIT_PATH="~/gitlab"
cd $GIT_PATH && for repo in $(find . -type d -name ".git" | sed 's|/.git||'); do
cd "$repo" 2>/dev/null || continue
if [ -d .git ]; then
author=$(git config user.name 2>/dev/null || echo "unknown")
email=$(git config user.email 2>/dev/null || echo "unknown")
commit_count=0
if [ "$author" != "unknown" ]; then
commit_count=$(git log --oneline --author="$author" 2>/dev/null | wc -l)
@muhrifqii
muhrifqii / INSTALL.sh
Last active August 22, 2023 08:55
install prepare commit message hook
curl -o .git/hooks/prepare-commit-msg https://gist.githubusercontent.com/muhrifqii/a8a4e140040f54b3452ef14b9c31d9c3/raw
chmod +x .git/hooks/prepare-commit-msg
@muhrifqii
muhrifqii / prepare-commit-msg
Last active May 15, 2024 04:36
git hooks to add jira ticket number as prefix in commit message. put it on .git/hooks/prepare-commit-msg
#!/bin/bash
FILE=$1
MESSAGE=$(cat $FILE)
TICKET="$(git rev-parse --abbrev-ref HEAD | grep -Eo '(\w+/)?(\w+-)?[0-9]+' | tail -1 | grep -Eo '(\w+[-])?[0-9]+' | tr "[:lower:]" "[:upper:]") :"
if [[ $TICKET == " : " || "$MESSAGE" == "$TICKET"* ]];then
exit 0;
fi
echo "$TICKET $MESSAGE" > $FILE
@muhrifqii
muhrifqii / xcode-clean.sh
Created June 12, 2020 04:12
Freed your storage space used by Xcode
#!/bin/sh
text_magenta=$(tput setaf 5)
text_bold=$(tput bold)
text_normal=$(tput sgr0)
archives_path=~/"Library/Developer/Xcode/Archives"
derived_data_path=~/"Library/Developer/Xcode/DerivedData"
simulator_data_path=~/"Library/Developer/CoreSimulator/Devices"
device_support_path=~/"Library/Developer/Xcode/iOS DeviceSupport"
from scipy.optimize import brentq
from scipy.interpolate import interp1d
eer = brentq(lambda x : 1. - x - interp1d(fpr, tpr)(x), 0., 1.)
thresh = interp1d(fpr, thresholds)(eer)
@muhrifqii
muhrifqii / tmux-cheatsheet.markdown
Created November 23, 2016 05:38 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@muhrifqii
muhrifqii / rastaplp.py
Created September 22, 2016 09:56
RASTA-PLP translation from matlab code
import numpy as np
def rastaplp(signal, sr = 16000, modelorder = 8):
# powerspectrum
p_spectrum = powspec(signal, sr)
# group powerspectrum to critical band
a_spectrum = audspec(p_spectrum, sr)
nbands = len(a_spectrum[0])
@muhrifqii
muhrifqii / rnn related research
Created September 22, 2016 05:57
RNN Research