Skip to content

Instantly share code, notes, and snippets.

View ikbelkirasan's full-sized avatar

Ikbel ikbelkirasan

View GitHub Profile
@ikbelkirasan
ikbelkirasan / change_window_opacity.sh
Last active October 19, 2025 21:46
Change window opacity in Linux using keyboard shortcuts
#!/bin/bash
function get_active_window() {
printf "0x%08x" $(xdotool getactivewindow)
}
function get_current_opacity() {
window="$1"
opacity=$(xprop -id $window | grep _NET_WM_WINDOW_OPACITY | awk '{print $3}')
if [ -z $opacity ]; then
@ikbelkirasan
ikbelkirasan / create_systemd_service.md
Created February 13, 2019 14:23
Create a systemd service

Create a systemd service

  1. Copy the program you want to run to /usr/bin folder and make it executable.
$ sudo cp my_service_program.sh /usr/bin
$ sudo chmod +x /usr/bin/my_service_program.sh
  1. Create the unit file
@ikbelkirasan
ikbelkirasan / delete_github_repos.sh
Created January 15, 2019 04:19
Delete multiple Github repositories
#!/bin/bash
user='github_username'
password_or_oauth_token='pass'
# Delete a bunch of GitHub repos
nukem="repo1 repo2 repo3"
for repo in $nukem; do
echo "Deleting repo: https://github.com/$user/$repo"
VBoxManage modifyvm "MacOS" -- cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "MacOS" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata "MacOS" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "MacOS" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "MacOS" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "MacOS" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
VBoxManage setextradata "MacOS" VBoxInternal2/EfiGopMode 4
@ikbelkirasan
ikbelkirasan / gemfury_setup.md
Last active January 14, 2019 21:39
Setup gemfury-cli

Setup gemfury-cli

  1. Run this command:
$ sudo nano /etc/apt/sources.list.d/fury-cli.list
  1. Add this line:
@ikbelkirasan
ikbelkirasan / create_gksudo.sh
Created January 13, 2019 16:32
Create gksudo in Ubuntu 18.04
#!/bin/bash
mkdir -p ~/.local/bin
echo -e '#!/bin/sh\n/usr/bin/pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY HOME=$HOME "$@"' > ~/.local/bin/gksudo
chmod u+x ~/.local/bin/gksudo
@ikbelkirasan
ikbelkirasan / host_apt_repo_on_github.md
Last active October 13, 2025 07:22
Host an APT repository on Github

Host an APT repository on Github

This guide will help you host an APT repository on Github.

Prerequisites

You need to install the following packages.

  • reprepro
@ikbelkirasan
ikbelkirasan / script.sh
Last active November 27, 2018 20:10
Run a GUI app in a docker container using X11
docker run --rm -it -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix:ro -v $PWD/app:/app vscode
@ikbelkirasan
ikbelkirasan / setup.md
Created November 12, 2018 18:48
Headless Raspbian SSH + WIFI setup

Headless Raspbian SSH + WIFI setup

  1. In the BOOT partition on the SD card, create an empty file called ssh

  2. In the same partition, create another file called wpa_supplicant.conf with the following content.

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=DZ
@ikbelkirasan
ikbelkirasan / readme.md
Created November 2, 2018 11:18
Install Canon LBP6030b drivers on Ubuntu 18.04 (64bit)