Skip to content

Instantly share code, notes, and snippets.

View ozturkoktay's full-sized avatar

Oktay Ozturk ozturkoktay

View GitHub Profile
@ozturkoktay
ozturkoktay / find-fanuc-robots.sh
Last active January 23, 2026 16:21
Find Fanuc Robots in the Network on Ubuntu
sudo apt install arp-scan
cd /tmp && sudo arp-scan --localnet | grep -i -E "00:E0:E4|00:E0:E5"
@ozturkoktay
ozturkoktay / git_corruption_recovery.sh
Created January 16, 2026 18:49
Git corruption recovery
#!/bin/bash
# =====================================================
# Git Recovery Script
# =====================================================
# Purpose:
# This script is designed to safely recover a local Git repository
# when the .git folder is corrupted or lost, while preserving all
# local changes and merging them with a remote repository.
#
# What it does:
@ozturkoktay
ozturkoktay / grokking_to_leetcode.md
Created October 31, 2024 23:59 — forked from tykurtz/grokking_to_leetcode.md
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@echo off
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
setlocal
call :setESC
cls
echo %ESC%[93m####### CHOCO IS INSTALLING... ######%ESC%[0m
powershell -Command "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))"
@ozturkoktay
ozturkoktay / AutoConnectLinkedIn.js
Last active October 2, 2022 00:51 — forked from thealphadollar/AutoConnectLinkedIn.js
JS script to send connection requests to your LinkedIn search results with customisation options, accept all received connection requests, and withdraw pending sent connection requests.
// If the script does not work, you may need to allow same site scripting https://stackoverflow.com/a/50902950
Linkedin = {
config: {
scrollDelay: 3000,
actionDelay: 5000,
nextPageDelay: 5000,
// set to -1 for no limit
maxRequests: -1,
totalRequestsSent: 0,
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9
Mozilla/5.0 (iPad; CPU OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H321 Safari/600.1.4
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0)
echo "options iwlwifi 11n_disable=1 wd_disable=1" | sudo tee /etc/modprobe.d/iwlwifi.conf
@ozturkoktay
ozturkoktay / install_ubuntu_apps.sh
Last active November 7, 2025 18:55
Bash script for installing Ubuntu apps.
#!/bin/bash
#
# This script automates the setup of a fresh Ubuntu installation.
# It installs common applications, development tools, and sets up the shell environment.
# Exit immediately if a command exits with a non-zero status.
set -e
print_header() {
tput setaf 1; echo -e "\n===> $1"; tput sgr0

-- Fix Touchpad

wget https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1887190/+attachment/5422562/+files/i2c-hid_standalone.zip

$ unzip i2c-hid_standalone.zip
$ make
$ sudo rmmod i2c_hid
$ sudo insmod /path/to/i2c-hid.ko polling_mode=1
$ sudo cp /path/to/i2c-hid.ko /lib/modules/$(uname -r)/kernel/drivers/hid/i2c-hid/i2c-hid.ko
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash snd_hda_intel.dmic_detect=0"