Skip to content

Instantly share code, notes, and snippets.

@adnan360
adnan360 / ibus-cli.md
Last active June 15, 2022 02:22
Control ibus layouts right from Linux terminal

Control ibus layouts right from Linux terminal

Ibus is an input tool that allows to type in many languages and keyboard layouts under GNU/Linux. Being able to control ibus layouts is extremely helpful on minimal desktop environments and window managers, like i3, sway etc. You can utilize the learnings of this on Waybar, Polybar etc.

First run the ibus daemon (if not already running):

ibus-daemon -xdr
@ovcharik
ovcharik / wt-two-finger-scroll.ahk
Created December 4, 2019 20:29
Autohotkey script. Throttle touchpad two finger scrolling in Windows Terminal.
; Config
#Persistent
#SingleInstance force
; 200 wheel events per second rate
#HotkeyInterval 1000
#MaxHotkeysPerInterval 200
DeactivateMenuItem := "Deactivate (Win + Shift + W)"
EnableHScrollMenuItem := "Enable HScroll (Win + Shift + H)"
# app: Xdotool
# user input
direction = 'down' # 'up' or 'down' or 'left' or 'right'
# end of user input
time.sleep(1)
system.exec_command("xdotool key space")
time.sleep(1)
activeApp = window.get_active_class()
if activeApp == 'nemo.Nemo' or activeApp == 'nemo-desktop.Nemo-desktop':
if direction == 'up':
@AnatomicJC
AnatomicJC / android-backup-apk-and-datas.md
Last active April 29, 2024 18:16
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

Note: This gist may be outdated, thanks to all contributors in comments.

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

@mzfr
mzfr / findtraitor.py
Created June 11, 2019 13:39
Find users who unstarred your repository
"""Help you find users who unstared your repository
"""
import os
import sys
import requests_cache
import argparse
URL = "https://api.github.com/repos/{}/{}/stargazers?per_page=100&page={}"
@DanielJenkyn
DanielJenkyn / install_obb.sh
Last active February 12, 2024 09:00
Script to install .apk and .obb (Split binary) onto Android device
#!/bin/bash
project_name= com.jenkyncorp.bestapp
reinstall=
# Takes the most recent .apk and .obb (If you have multiple files)
OBB=$(ls -t *.obb | head -n1)
APK=$(ls -t *.apk | head -n1)
while [ "$1" != "" ]; do
@luckman212
luckman212 / frontapp.py
Created May 10, 2019 05:15
simple python script that prints the frontmost (aka focused) app
#!/usr/bin/python
# references
# https://developer.apple.com/documentation/appkit/nsworkspace
# https://bmn.name/post/2016/05/28/current-osx-app/
# https://stackoverflow.com/questions/28815863/how-to-get-active-window-title-using-python-in-mac
# https://apple.stackexchange.com/questions/123730/is-there-a-way-to-detect-what-program-is-stealing-focus-on-my-mac/
try:
from AppKit import NSWorkspace
@jakub-g
jakub-g / mac-pain.md
Last active March 20, 2024 08:53
MacOS for Windows users: overcoming the annoyances

Introduction

For a long time Windows user, starting using Mac can be an exercise in frustration and keeping your nerves at bay. Many things don't work as expected, need to be activated in some ways, keyboard shortcuts are non-existent or wildly different.

This page is a living reference of a Windows long-timer trying to do basic stuff on a Mac. If you see an easier way to achieve certain things, don't hesitate to drop a comment.

Related links:

@adnan360
adnan360 / notification-sidebar.py
Last active July 20, 2020 04:39
A simple sidebar showing all the system notifications - based on xfce4-notifyd
# Written by Adnan Shameem
# License: CC0 - do whatever you want with it
# This script relies on xfce-notifyd. It is lightweight and saves the
# notifications in a ~/.cache/xfce4/notifyd/log file which is formatted
# in INI type format.
# To make this script work,
# 1. Install notification-daemon
# 2. Install xfce4-notifyd
# 3. Run either:
@vraravam
vraravam / osx-defaults.sh
Last active March 17, 2024 01:21
OSX Defaults to setup a brand new machine
#!/usr/bin/env bash
# TODO: Need to figure out the settings for the following:
# 1) Dock: Items with order (not capturing binary data - since that is dependent on installed apps)
# 2) Security & Privacy Preferences: Full Disk Access, Camera, Microphone
# 3) Login items for my user (i.e. apps started when I login)
# 4) Retina displays scaling
# 5) Finder sidebar with order
##