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 / Net-SSLeay.md
Last active November 17, 2023 21:19
Perl under WSL from Scratch
******************************************************************************
* COULD NOT FIND LIBSSL HEADERS                                              *
*                                                                            *
* The libssl header files are required to build Net-SSLeay, but they are     *
* missing from /usr. They would typically reside in /usr/include/openssl.    *
*                                                                            *
* If you are using the version of OpenSSL/LibreSSL packaged by your Linux    *
* distribution, you may need to install the corresponding "development"      *
* package via your package manager (e.g. libssl-dev for OpenSSL on Debian    *
@yewtudotbe
yewtudotbe / what-happened-downtime-july2023.md
Last active May 9, 2024 18:12
Why yewtu.be was down? (July 2023)

On the 30th of June, my cloud provider, Oracle Cloud, decided to shutdown all my servers hosted on two Oracle Cloud accounts.
It is known that this provider will randomly ban accounts without any reason.

Why yewtu.be doesn't accept new registrations nor logging into an account?

Unfortunately and this is 100% my fault for forgetting that, I only had data duplication between servers located in the two Oracle Cloud accounts and no backups.
I thought that I wouldn't get all my accounts in trouble at the same time and able to recover the data from one of the two accounts but unfortunately this turned out otherwise.

Implementing some backup was something I had in my notes for a long time but I think I forgot about it, maybe due to the huge amount of work I spend on the open source projects.
I'm deeply sorry if you have lost your subscriptions list or playlists or watch history. I did try to contact Oracle Cloud for recovering the data, I'm waiting for their answer but you should be certain that they

@briandfoy
briandfoy / grab-gist
Last active June 30, 2023 12:42
A Mojo::UserAgent program to grab all the files in a gist
#!/usr/bin/perl
=encoding utf8;
=head1 NAME
grab-gist - download all the files in a gist
=head1 SYNOPSIS
@rwp0
rwp0 / chrome.google.policies.reg
Last active May 30, 2023 15:37
Google Chrome Policies for Unix (JSON) and Windows (REG) with Google SafeSearch and Youtube Restrict
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome]
"ForceGoogleSafeSearch"=dword:00000001
"ForceYouTubeRestrict"=dword:00000001
@rwp0
rwp0 / autoexec.bat
Last active April 18, 2023 23:47
Windows 11 CMD AutoExec Commands
@ echo off
rem Save as c:\autoexec.bat
color a
rem Bright green foreground
prompt ^>
rem Minimal prompt
cls
@rwp0
rwp0 / chrome.org
Last active March 22, 2023 15:45
Google Chrome Perldoc Blead Custom Search Engine
  1. chrome://settings/searchEngines
  2. Site search
  3. Add (button)
  4. Add search engine (popup window)

Search engine
Perldoc Blead Function
Shortcut
pf
URL with %s in place of query
https://perldoc.perl.org/blead/functions/%s
@rwp0
rwp0 / .perltidyrc
Last active March 16, 2023 09:17
My Perl Coding Style with Perl-Tidy
# Indent
--indent-columns=2 # Short: -i, Default: 4
# Output
--standard-output # Short: -st, Default: --nostandard-output (Short: -nst)
# Functions
--space-function-paren # -sfp
--space-prototype-paren=2 # -spp
@rwp0
rwp0 / pdf.pl
Last active March 14, 2023 05:26
Merge PDF Documents using PDF-API2 Perl Distribution
#! /usr/bin/env perl
use v5.37.9;
use PDF::API2;
chdir 'PATH_WITH_PDFS';
my $pdf = PDF::API2 -> new;
my $source1 = PDF::API2 -> open( '1.pdf' );
@rwp0
rwp0 / perl.sh
Last active February 13, 2023 07:03
Print Specific Line Contents in File
perl -n -e 'print if $. == 15' file.txt
# where $_ is line's content
# -n creates: while (<>) { ... } around files, making Perl iterate over lines
# -e option's value goes into { ... }
# https://perldoc.perl.org/perlvar#$.
@rwp0
rwp0 / dns.md
Last active January 23, 2023 10:26
Perl NS Query with Net::DNS