Skip to content

Instantly share code, notes, and snippets.

View RamakrishnaChilaka's full-sized avatar

Ramakrishna Chilaka RamakrishnaChilaka

  • Bangalore, India
  • 09:33 (UTC +05:30)
View GitHub Profile
@RamakrishnaChilaka
RamakrishnaChilaka / netcat_tcp_server.sh
Created August 25, 2021 09:40 — forked from phuesler/netcat_tcp_server.sh
Simple tcp server using netcat
#!/bin/bash
# Simple tcp server using netcat
# - depending on the netcat version either use nc -l 5555 or nc -l -p 5555
# - verify with `telnet locahhost 5555`
# - quit the telnet with `ctrl-]` and then type quit
# - the while loop is there so reopen the port after a client has disconnected
# - supports only one client at a time
PORT=5555;
while :; do nc -l -p $PORT | tee output.log; sleep 1; done
@RamakrishnaChilaka
RamakrishnaChilaka / gist:77a4aa8aeccd7a122c31ce688fd936c5
Created July 9, 2019 05:57
Traverse through DOM tree and capture scrolling positions of each HTML element.
// assuming jquery is present
import $ from 'jquery';
export default function traverse(element, ser_obj) {
if (!element) {
return;
}
var that = makeid;
if (element.scrollTop() || element.scrollLeft()) {