Skip to content

Instantly share code, notes, and snippets.

View Syakhisk's full-sized avatar
💻
most likely on my laptop at the moment

Syakhisk Al-Azmi Syakhisk

💻
most likely on my laptop at the moment
View GitHub Profile
@Syakhisk
Syakhisk / remove-kwin-scripts-shortcuts.sh
Last active April 13, 2024 09:18
Remove keyboard shortcuts registered by kwin scripts on KDE
# source https://forum.kde.org/viewtopic.php?f=111&t=174964#p455215
qdbus org.kde.kglobalaccel /component/kwin org.kde.kglobalaccel.Component.cleanUp
@Syakhisk
Syakhisk / generals.vim
Created June 14, 2022 00:51
eternal-sin (vscode-neovim) configuration
" $HOME/.config/nvim/vim/generals.vim
function! VSCodeNotifyVisual(cmd, leaveSelection, ...)
let mode = mode()
if mode ==# 'V'
let startLine = line('v')
let endLine = line('.')
call VSCodeNotifyRange(a:cmd, startLine, endLine, a:leaveSelection, a:000)
elseif mode ==# 'v' || mode ==# "\<C-v>"
let startPos = getpos('v')
let endPos = getpos('.')
@Syakhisk
Syakhisk / import-require.js
Created May 17, 2022 07:47
use import and require node js
import { createRequire } from "module";
const require = createRequire(import.meta.url);
const data = require("./data.json");
################################################################################
################# Arch Linux mirrorlist generated by Reflector #################
################################################################################
# With: reflector --sort rate --latest 10
# When: 2022-01-29 13:02:09 UTC
# From: https://archlinux.org/mirrors/status/json/
# Retrieved: 2022-01-29 13:00:22 UTC
# Last Check: 2022-01-29 12:44:12 UTC
@Syakhisk
Syakhisk / Pipfile
Created October 7, 2021 20:35 — forked from dazfuller/Pipfile
Multi-process loading of data into MySQL from Python
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
[packages]
mysql-connector-python = "*"
version: "3"
services:
db:
image: mysql:5.7
volumes:
- './mysql_dump:/var/lib/mysql'
- './data:/data'
environment:
UPLOAD_LIMIT: 1G
# Iterate through parameters
# and return first found command
# useful for exporting environment variables
# i used this for my .profile
# written in bash
# Fallback between choices
function fallback-ab(){
command -v "$1" > /dev/null && echo "$1" || echo "$2"
@Syakhisk
Syakhisk / backtick-escape-switch.md
Created August 6, 2021 22:55
Switch Backtick/Tilde Key to Escape Key (Keychron K6/Other Small Keyboard)

Switch Backtick/Tilde Key to Escape Key (Keychron K6/Other Small Keyboard)

Small keyboards (+- 68 keys) will join the F rows as well as the Escape key to the numbers row, since this bothers me so much, I wanted to remap the backtick to Escape key BUT only on this keyboard (other keyboard will have their normal mapping).

After scouring on the internet for hours I made this gist you don't have to go through what I did.

Install evtest

sudo pacman -S evtest # Arch based
sudo apt install evtest # Debian based