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 / adb-dns.sh
Last active September 15, 2022 17:19 — forked from sharunkumar/adb-dns.bat
Enabling / Disabling Private DNS in android via ADB
# to disable private dns
adb shell settings put global private_dns_mode off
# to enable private dns with hostname (example with dns.adguard.com)
adb shell settings put global private_dns_mode hostname
adb shell settings put global private_dns_specifier dns.adguard.com
@rwp0
rwp0 / vmware_sdk.pl
Created September 20, 2022 16:45
Getting VMware Perl SDK to work: Server version unavailable at 'sdk/vimService.wsdl'
#!/usr/bin/perl
BEGIN {
$ENV{'PERL_LWP_SSL_VERIFY_HOSTNAME'} = 0;
eval {
# required for new IO::Socket::SSL versions
require IO::Socket::SSL;
IO::Socket::SSL->import();
IO::Socket::SSL::set_ctx_defaults( SSL_verify_mode => 0 );
};
@rwp0
rwp0 / task_arguments.pl
Last active September 23, 2022 07:51
Rex Task Arguments / Parameters
task 'mytask', sub {
my $parameters = shift;
my $parameter1_value = $parameters->{parameter1};
my $parameter2_value = $parameters->{parameter2};
};
rex -H hostname mytask --parameter1=value1 --parameter2=value2
# https://www.rexify.org/docs/faq/index.html#howcanipassparameterstoatask
@rwp0
rwp0 / compile-php-extension.sh
Created September 23, 2022 14:01 — forked from Chekote/compile-php-extension.sh
How to compile a PHP extension into a shared module for any PHP version
# How to compile a PHP extension into a shared module for any PHP version
# download and decompress required PHP version source (e.g. 5.6.30). See http://php.net/releases/
wget http://php.net/get/php-5.6.30.tar.bz2/from/this/mirror -O php-5.6.30.tar.bz2
tar xvf php-5.6.30.tar.bz2
# compile and install PHP to temporary location (e.g. ~/php-install)
cd php-5.6.30/
time ./configure --prefix=${HOME}/php-install
make -j 8
@rwp0
rwp0 / keybase.md
Created September 26, 2022 10:42
keybase.md

Keybase proof

I hereby claim:

  • I am rwp0 on github.
  • I am rwp0 (https://keybase.io/rwp0) on keybase.
  • I have a public key ASDTknqXv0a984jhEsPJupx-yco9EN4lSAUELg--dlvdjgo

To claim this, I am signing this object:

@rwp0
rwp0 / apache.org
Last active September 27, 2022 08:17
Apache dump virtual hosts and running configuration
httpd -S -f /usr/local/apache2/conf/httpd.conf
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
@rwp0
rwp0 / zip.org
Created September 27, 2022 12:26
FreeBSD Zip Directory
@rwp0
rwp0 / find.sh
Created September 27, 2022 17:38
FreeBSD Find Large Files
# find large files
find . -size +1GB
@rwp0
rwp0 / apache_redirect.org
Created September 28, 2022 14:13
Apache redirect
@rwp0
rwp0 / ip.sh
Created September 29, 2022 08:47
Get Global IP Address
curl ipinfo.io
# json