emacs packages
- cperl
- perl (language)
- term
perl(1)
(interpreter)- magit
- git, github (melpa)
- pde
- perl
emacs packages
perl(1)
(interpreter)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( |
#! /usr/bin/env perl | |
use v5.32; | |
use warnings; | |
use DBD::mysql; | |
my %mysql = ( | |
host => 'example.com', | |
port => 3306, | |
database => 'example_database', |
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 |
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") |
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 |
# /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 |
-- create database user and grant privileges with a single command | |
GRANT ALL PRIVILEGES | |
ON TABLE <database>.* | |
TO <user> | |
IDENTIFIED BY <password>; | |
SHOW GRANTS FOR <user>; | |
-- output: GRANT ALL PRIVILEGES ON `<database>`.* TO '<user>'@'%' | |
-- % is the default host for the user (ie. IP address or hostname where the user connects from) |
function move_sheet () { | |
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet(); | |
var sheets_number = spreadsheet.getNumSheets(); | |
// https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet#getnumsheets | |
spreadsheet.moveActiveSheet(sheets_number); | |
// https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet#moveActiveSheet(Integer) | |
} |