Skip to content

Instantly share code, notes, and snippets.

View akarca's full-sized avatar
🏠
Working from home

Serdar Akarca akarca

🏠
Working from home
View GitHub Profile
@akarca
akarca / isimler
Created January 6, 2023 14:16 — forked from emrekgn/isimler
Türkçe İsim Listesi
JALE
ALİ
MAHMUT
MANSUR KÜRŞAD
GAMZE
MİRAÇ
YÜCEL
KUBİLAY
HAYATİ
BEDRİYE MÜGE
@akarca
akarca / kill_cmfsyncagent.sh
Last active January 8, 2024 19:02
Kill CMFSyncAgent and sharingd processes if they demand high cpu
#!/bin/bash
#
# Sometimes my mac's fans run loud because CMFSyncAgent and sharingd processes are consuming high amount of CPU.
# This script watches the processes and kills them. Stop this script if you want to use AirDrop
# Kill CMFSyncAgent if it consumes more than 70% cpu
# Kill sharingd if it consumes more than 30% cpu
#
while true
do
ps aux | grep CMFSyncAgent | awk '$3>70 {print $2}' | xargs kill -9
@akarca
akarca / add-requirement
Created January 7, 2025 13:29
pip install and add package name and version to requirements.txt
#!/usr/bin/env bash
if [ -z "$1" ]
then
echo "No argument supplied. Usage: add-requirement Django"
fi
FILE="requirements.txt"
if [ -f $FILE ]; then
@akarca
akarca / fish_prompt.fish
Created March 26, 2025 01:29
Fish Prompt and Right Prompt
function fish_prompt --description 'Write out the prompt'
set -l laststatus $status
set -l git_info
if set -l git_branch (command git symbolic-ref HEAD 2>/dev/null | string replace refs/heads/ '')
set git_branch (set_color -o blue)"$git_branch"
set -l git_status
if not command git diff-index --quiet HEAD --
if set -l count (command git rev-list --count --left-right $upstream...HEAD 2>/dev/null)