Skip to content

Instantly share code, notes, and snippets.

View amabirbd's full-sized avatar

Al Muntasir Abir amabirbd

View GitHub Profile
@amabirbd
amabirbd / gist:b84ca52c9eb5d9d3b2b3d4cb5c0e39cb
Created April 10, 2022 16:45
Forwarding proxy with nodeJS proxy
const net = require("net");
const server = net.createServer();
// Listening to connection event
server.on("connection", (ClientToProxySocket) => {
console.log("Client connected to the proxy");
ClientToProxySocket.once("data", (data) => {
//checking if connection is HTTP or HTTPS
let isTLSConnection = data.toString().indexOf("CONNECT") !== -1;
@amabirbd
amabirbd / gist:0a315cfdbe29b2133bdcb796b638c088
Created February 15, 2023 17:12
problem solving for airwrk
function isPalindrome(val) {
let str = val.toString();
let rev = str.split("").reverse().join("");
return str === rev;
}
console.log(isPalindrome(129))
function findTriplets(arr) {