Skip to content

Instantly share code, notes, and snippets.

@helb
helb / fx json to csv.md
Created March 14, 2018 17:15
fx json to csv

example input:

[helb@kookaburra~/tmp/alienvault] $ cat input.json 
{
    "indicators": [
        {
            "indicator": "127.0.0.1",
            "description": "",
            "created": "2018-03-13T00:53:33",
@helb
helb / unsub.js
Last active July 9, 2018 09:23
YouTube – unsubscribe all
// run in console on https://www.youtube.com/feed/channels (and wait):
document.querySelectorAll("paper-button[subscribed]").forEach((btn, i) => {
setTimeout(()=>{
btn.click();
setTimeout(()=>{
document.querySelector("paper-button.style-blue-text").click()
}, 500)
}, 1000 + (i*2500));
});
@helb
helb / curl
Created May 27, 2019 14:11
DoH odvr vs google
* Trying 2a00:1450:4014:800::200e:443...
* TCP_NODELAY set
* Connected to dns.google.com (2a00:1450:4014:800::200e) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* Trying 2606:4700::6810:f8f9:443...
* TCP_NODELAY set
* Connected to cloudflare-dns.com (2606:4700::6810:f8f9) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
@helb
helb / antik.js
Last active August 16, 2022 20:38
puppeteer-search-example
const puppeteer = require("puppeteer");
const websites = [
{ url: "https://www.antikvariaty.cz/", search: "input[name=fulltxt]", submit: "button[type=submit]" },
{ url: "https://www.trhknih.cz/", search: "input#searchbox", submit: "button[type=submit]" },
{ url: "https://antikvariat11.cz/", search: "input#searchbox", submit: "input[name=Submit]" },
{ url: "https://www.antikvariat-benes.cz/", search: "input.srch_input", submit: "a.srch_btn" },
{ url: "https://www.antikvariat-levneknihy.cz/", search: "input[name=hledany_text]", submit: "input.submit" }
];