Skip to content

Instantly share code, notes, and snippets.

View cminovici's full-sized avatar

Catalin Minovici cminovici

View GitHub Profile
@cminovici
cminovici / whois.php
Created February 13, 2019 07:21
PHP code to get WHOIS information of a domain
<?php
/*************************************************************************
php easy :: whois lookup script
==========================================================================
Author: php easy code, www.phpeasycode.com
Web Site: http://www.phpeasycode.com
Contact: webmaster@phpeasycode.com
*************************************************************************/
$domain = $_GET['domain'];
Clusterul este - scm-log.emag.network
Format din masinile:
scm-log1-all-prod.emag.network
scm-elastic1-all-prod.emag.network
scm-elastic2-all-prod.emag.network
scm-elastic3-all-prod.emag.network
curl -XGET 'http://scm-elastic3-all-prod.emag.network:9200/_cat/indices?v' -H 'Content-Type: application/json' -d '{}'
curl -XGET 'http://scm-elastic3-all-prod.emag.network:9200/logstash-scmr_*/_stats?format=json' -H 'Content-Type: application/json' -d '{}'
curl -XGET 'localhost:9200/_cat/indices?v' -d '{}'
@cminovici
cminovici / mailhog.sh
Last active April 8, 2019 01:48
Mailhog install & configure
#!/usr/bin/env bash
PHP_INI_PATH="/etc/php.ini";
PHP_INI_CLI_PATH="/etc/php-cli.ini";
FOLDER_PATH="$HOME/mailhog";
PORT_NUMBER=8025;
MAILHOG_FILE="$FOLDER_PATH/MailHog_linux_amd64";
MHSEND_FILE="$FOLDER_PATH/mhsendmail_linux_amd64";
@cminovici
cminovici / HeidiDecode.js
Last active September 4, 2015 12:10 — forked from jpatters/HeidiDecode.js
Decodes a password from HeidiSQL. HeidiSQL passwords can be found in the registry. Use File -> Export Settings to dump all settings. Great for if you forget a password.
function heidiDecode(hex) {
var str = '';
var shift = parseInt(hex.substr(-1));
hex = hex.substr(0, hex.length - 1);
for (var i = 0; i < hex.length; i += 2)
str += String.fromCharCode(parseInt(hex.substr(i, 2), 16) - shift);
return str;
}
document.write(heidiDecode('755A5A585C3D8141786B3C385E3A393'));