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 / shxc.sh
Created September 18, 2023 13:20
Save the commandline alongside its output in file
sh -xc "perl SCRIPT.pl --option1 --option2 argument FILE" > OUTPUT_FILE 2>&1
@rwp0
rwp0 / bookmark_tools.html
Last active September 17, 2023 15:27
FireFox Keywords Bookmarks File
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<DL>
<DT><A HREF="https://en.wikipedia.org/wiki/%S" ADD_DATE="1694962643" LAST_MODIFIED="1694962643" SHORTCUTURL="wp" TAGS="keywords, WikiMedia">Wikipedia</A>
<DT><A HREF="https://en.wiktionary.org/wiki/%S" ADD_DATE="1694962530" LAST_MODIFIED="1694962653" SHORTCUTURL="wt" TAGS="keywords, WikiMedia">Wiktionary</A>
<HR>
<DT><A HREF="https://man.freebsd.org/cgi/man.cgi?query=%s" ADD_DATE="1694962793" LAST_MODIFIED="1694962793" SHORTCUTURL="fm" TAGS="keywords, Unix">FreeBSD</A>
<DT><A HREF="https://man.openbsd.org/%s" ADD_DATE="1694962755" LAST_MODIFIED="1694962758" SHORTCUTURL="om" TAGS="keywords, Unix">OpenBSD</A>
<DT><A HREF="https://perldoc.perl.org/blead/functions/%s" ADD_DATE="1694964181" LAST_MODIFIED="1694964214" SHORTCUTURL="p" TAGS="keywords,Perl">Perl</A>
</DL>
@rwp0
rwp0 / uniq.md
Last active August 30, 2023 13:33
Find Duplicate Lines in Files using sort(1) and uniq(1) Command Combination

Long descriptive version

sort FILE | uniq --repeated --count

Short CLI version

sort FILE | uniq -d -c
@rwp0
rwp0 / perl_to_unix_mappings.csv
Last active September 12, 2023 11:11
Perl to Unix Table: Cultural influence of Unix on Perl symbol names
Perl Function / Method Namespace (eg. Package) Command / Syscall / C Function
compare File::Compare cmp(1)
catdir File::Spec cat(1)
catfile File::Spec cat(1)
basename File::Basename basename(1)
dirname File::Basename dirname(1)
grep CORE grep(1)
find File::Find find(1)
s/// CORE sed(1)
tr// CORE tr(1)
@rwp0
rwp0 / configure.perl.sh
Last active August 20, 2023 13:34
Configure and Build Perl Development Release 🐪
sh ./Configure -des -Dusedevel -Duseithreads -DDEBUGGING=both
@rwp0
rwp0 / Block-Domain.ps1
Created July 10, 2023 17:18
PowerShell Script to Block Domains with Windows Firewall
# Block-Domain [ -Domain <domain> ]
param (
[string] $Domain = 'example.com'
)
$server = '8.8.8.8' # Google
@rwp0
rwp0 / files.txt
Created July 3, 2023 10:01
Wikipedia User JS/CSS Files
https://en.wikipedia.org/wiki/User:Rwp0/common.js
https://en.wikipedia.org/wiki/User:Rwp0/common.css
@rwp0
rwp0 / enable.DefaultImagesSetting.ps1
Last active June 20, 2023 16:15
Enable Chrome Images in Registry using PowerShell
New-ItemProperty -path HKLM:\SOFTWARE\Policies\Google\Chrome ^
-Name DefaultImagesSetting ^
-Value 0 ^
-PropertyType String ^
-Force
<#
DefaultImagesSetting : 0
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google
@rwp0
rwp0 / download.ps1
Last active June 17, 2023 21:34
PowerShell Download File over HTTP
Invoke-WebRequest `
-URI $URL `
-OutFile $File
@rwp0
rwp0 / .git-credentials
Last active June 15, 2023 12:50
Save Git username and password locally as plaintext with Credential Helper
https://USER:PASS@DOMAIN
# -rw-------
# store