Skip to content

Instantly share code, notes, and snippets.

View rwp0's full-sized avatar
📚
On one's own way, at one's own pace…

Elvin Aslanov rwp0

📚
On one's own way, at one's own pace…
View GitHub Profile
@rwp0
rwp0 / 0.md
Last active March 21, 2021 16:18
sources

sources

source materials (resources) for reference and learning (lists, draft, code)

org mode not rendered (on pinned repositories)

@rwp0
rwp0 / emacs.org
Last active March 21, 2021 14:55
software environments

emacs

emacs packages

cperl
perl (language)
term
perl(1) (interpreter)
magit
git, github (melpa)
pde
perl
@rwp0
rwp0 / dbi.pl
Last active July 5, 2022 12:17
Perl DBI in Five Steps
#! /usr/bin/env perl
use v5.32;
use warnings;
use DBD::mysql;
my %mysql = (
host => 'example.com',
port => 3306,
database => 'example_database',
@rwp0
rwp0 / Rexfile
Last active July 5, 2022 12:17
FreeBSD package upgrade with Perl's Rex automation
use v5.36;
use Rex -feature => [ '1.4' ];
port 2222; # custom port
user 'root'; # PermitRootLogin prohibit-password
private_key '<path to SSH key>';
# password "<SSH key's passphrase>"; # passphrase if any
key_auth;
group servers => qw(
@rwp0
rwp0 / .tmux.conf
Last active August 15, 2023 09:24
My TMUX Configuration
# -*- shell -*-
# Show current configuration with:
# tmux show-option -g
# Mouse
set-option -g mouse "on" # Shift
# Aliases
set-option -g command-alias[0] "r='rename-window'"
@rwp0
rwp0 / mysql_config_editor.sh
Created July 6, 2022 09:32
Creating MySQL login pathes
mysql_config_editor \
set \
--login-path="local" \
--host="localhost" \
--port="3306" \
--user="root" \
--password
# https://dev.mysql.com/doc/refman/8.0/en/mysql-config-editor.html
@rwp0
rwp0 / .emacs
Created July 15, 2022 21:05
Emacs: make-backup-files
(setq make-backup-files nil)
; https://stackoverflow.com/questions/151945/how-do-i-control-how-emacs-makes-backup-files
@rwp0
rwp0 / freebsd_manuals.js
Created July 16, 2022 18:48
FreeBSD Manuals JavaScript
javascript:window.open('https://www.freebsd.org/cgi/man.cgi?query=' + prompt('FreeBSD Manual'));
// Chrome:
// Settings -> Appearance -> Show home button (second option below "Net Tab page")
@rwp0
rwp0 / call.adb.sh
Last active July 28, 2022 08:20
Call from Android using ADB
adb shell am start -a android.intent.action.CALL -d tel:012910
# Saglam Aile
adb shell am start -a android.intent.action.CALL -d tel:012915
# Umico
adb shell input keyevent KEYCODE_ENDCALL
# End call
# https://stackoverflow.com/questions/25587147/adb-command-to-cancel-hang-up-incoming-call
@rwp0
rwp0 / lid.conf
Last active July 29, 2022 13:54
Debian GNOME Systemd: Don't Sleep on Locking the Lid
# /etc/systemd/logind.conf.d/lid.conf
HandleLidSwitch=lock
HandleLidSwitchDocked=ignore
HandleLidSwitchExternalPower=lock
# https://unix.stackexchange.com/a/628090/455788
# systemctl restart systemd-logind
# kills Xorg/Wayland session