Skip to content

Instantly share code, notes, and snippets.

View okb1100's full-sized avatar

Oğuzcan Küçükbayrak okb1100

View GitHub Profile
@okb1100
okb1100 / aur.sh
Last active August 8, 2022 18:24
#linux-stuff [aur build script]
#!/bin/bash
# This script clones the git repo of the aur package
# Then executes makepkg -sri. Simple.
if [ -z "$1" ]; then
echo "Usage: ./aur.sh <pkgname>";
exit 2;
fi
cd /tmp/;
git clone https://aur.archlinux.org/$1.git;
@okb1100
okb1100 / steam.sh
Last active October 30, 2021 16:45
#linux-stuff [steam swrast thing]
#!/bin/bash
## Install Steam and fix swrast problem on Arch Linux
## Modify this script to use with Nvidia or Intel GPUs
sudo pacman -Syu steam ttf-liberation xf86-video-ati mesa-libgl lib32-mesa-libgl lib32-alsa-plugins
steam &
sleep 5
killall steam
find ~/.steam/root/ \( -name "libgcc_s.so*" -o -name "libstdc++.so*" -o -name "libxcb.so*" \) -print -delete
find ~/.local/share/Steam/ \( -name "libgcc_s.so*" -o -name "libstdc++.so*" -o -name "libxcb.so*" \) -print -delete
steam
@okb1100
okb1100 / deprem.py
Last active October 30, 2021 16:45
#random [Günlük deprem verilerini alıp 2.0 şiddetinden büyük olanları yazdırır]
#!/usr/bin/env python3
#The MIT License (MIT)
#Copyright (c) 2016 Oğuzcan 'okb1100' Küçükbayrak
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#copies of the Software, and to permit persons to whom the Software is
#furnished to do so, subject to the following conditions:
@okb1100
okb1100 / monitor-dvi.sh
Last active October 30, 2021 16:44
#linux-stuff [xrandr dvi converter]
xrandr --newmode "1280x1024_60.00" 109.00 1280 1368 1496 1712 1024 1027 1034 1063 -hsync +vsync
xrandr --addmode DVI-0 1280x1024_60.00
xrandr --output DVI-0 --mode 1280x1024_60.00
@okb1100
okb1100 / localeRemove.sh
Last active October 30, 2021 16:43
#linux-stuff [removes all files in /usr/share/locale/ except turkish and english to open up space]
#!/bin/sh
## It is not guaranteed that your system will work as it is after this operation.
## I did it because I needed space.
#Find directories that do not include the string 'tr' and 'en' then remove them.
find /usr/share/locale -type d | grep -v -e 'tr' -e 'en' | sudo xargs rm -rf
@okb1100
okb1100 / lysbot.py
Last active October 30, 2021 16:40
#scraping
from urllib.request import urlopen
import re
import time
import winsound
print("2017-LYS Sonuçları Açıklandı Mı?")
def bip():
while True:
winsound.Beep(2500,1500)
@okb1100
okb1100 / autoCheck.js
Last active December 31, 2021 13:35
#random
/*
Zorunlu ders anketleri sayfalarının her birinde tarayıcı konsolunda bu satırı çalıştırmak en son seçeneği işaretleyecektir.
*/
document.querySelectorAll('[type=radio]"]').forEach((el) => el.click())
@okb1100
okb1100 / jackfix.sh
Last active October 30, 2021 16:43
#hackintosh [Thinkpad X1 Carbon 2nd Gen Headphone jack noise fix. (needs CodecCommander and hda-verb)]
# Thinkpad X1 Carbon 2nd Gen Headphone jack fix. (needs CodecCommander and hda-verb)
# This script needs to be run after every boot.
#!/bin/bash
hda-verb 0x1a SET_PIN_WIDGET_CONTROL 0x24
hda-verb 0x21 SET_UNSOLICITED_ENABLE 0x83
echo -e "Done"
@okb1100
okb1100 / EXCLUDE
Last active October 30, 2021 16:42
#linux-stuff [Simple home directory backup script]
/home/okb/YaDisk
/home/okb/lost+found
/home/okb/.cache
/home/okb/.ecryptfs
/home/okb/*.socket
/home/okb/.Trash-*
/home/okb/.local/share/Trash
/home/okb/.recycle
/home/okb/.config/chromium
/home/okb/.vagrant.d
@okb1100
okb1100 / showip.sh
Last active October 30, 2021 16:41
#linux-stuff [Show local ip of host]
#!/bin/sh
IFACE="wlp3s0"
echo " $(ip -br addr show dev $IFACE | awk '{print $3}' | sed 's/\/[0-9].//') "