Skip to content

Instantly share code, notes, and snippets.

View Wiz-Amit's full-sized avatar
🏠
Working from home

Amit Hazra Wiz-Amit

🏠
Working from home
View GitHub Profile
@Wiz-Amit
Wiz-Amit / fetch-whois.js
Last active February 19, 2022 13:19
Fetch Whois records using RDAP in javascript
whois("example.com").then((response) => console.log(response));
async function fetchEndpoint(extension) {
let endpoint;
try {
let response = await fetch("https://data.iana.org/rdap/dns.json");
let data = await response.json();
let services = data["services"];
let service = services.find((s) => s[0].includes(extension));
@Wiz-Amit
Wiz-Amit / watermark-image.php
Last active October 31, 2020 16:13
Watermark (merge) images using php
<?php
/**
* Load Image
* @param string $path
* @return resource|false
*/
function loadImage(string $path)
{
return imagecreatefromstring(file_get_contents($path));
@Wiz-Amit
Wiz-Amit / wp-security-checklist.md
Last active December 12, 2023 22:26
WordPress Security Checklist