This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns scrape | |
(:require [babashka.pods :as pods] | |
[clojure.walk :as walk])) | |
(pods/load-pod "bootleg") ;; installed on path, use "./bootleg" for local binary | |
(require '[babashka.curl :as curl]) | |
(def clojure-html (:body (curl/get "https://en.wikipedia.org/wiki/Clojure"))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bb | |
(if *command-line-args* | |
(def in (str (first *command-line-args*))) | |
(do | |
(println "Which bin to run?") | |
(def in (str *input*)))) | |
(println "Watching" "*.zig" "->" (str "./" in)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat input.tsv | | |
lein run -m clojure.main -e ' | |
(import [java.net URLEncoder]) | |
(-> *in* | |
java.io.BufferedReader. | |
line-seq | |
(->> (map #(URLEncoder/encode % "UTF-8")) | |
(clojure.string/join \newline) | |
println))' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat input.tsv | | |
lein run -m clojure.main -e ' | |
(-> *in* | |
java.io.BufferedReader. | |
line-seq | |
(->> (map #(clojure.string/split % #"\t")) | |
(map #(first %)) | |
(clojure.string/join \newline) | |
println))' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cat ip.tsv | parallel -t -j24 --pipe -q awk -F'\t' '{json="curl -s https://sonar.omnisint.io/reverse/" $1 " | jq -cr ."; json | getline output;print $1, output;close(json)}' | tee subdomains.tsv |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript: (() => { | |
let text = prompt('Enter comma-separated domains', ''); | |
let lines = text.split(','); | |
lines.forEach(_ => { | |
open('https://www.bing.com/search?q="' + _ + '"', '_blank'); | |
}); | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################################################################ | |
# ---------------------------------------------------------------------- | |
# ASN/IPv4/Prefix lookup tool. Uses Team Cymru's whois service for data. | |
# ---------------------------------------------------------------------- | |
# example usage: | |
# asn <ASnumber> -- to lookup matching ASN data. Supports "as123" and "123" formats (case insensitive) | |
# asn <IP.AD.DR.ESS> -- to lookup matching route and ASN data | |
# asn <ROUTE> -- to lookup matching ASN data |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[flake8] | |
ignore = E203, E266, E501, W503, F403, F401 | |
max-line-length = 88 | |
max-complexity = 18 | |
select = B,C,E,F,W,T4,B9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) | |
func main() { | |
body := map[string]interface{}{ | |
"domain": "amazon.com", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Mac Setup | |
hosts: 127.0.0.1 | |
connection: local | |
var: | |
brew_cask_apps: | |
- qlmarkdown | |
- qlcolorcode | |
- quicklook-json | |
- qlprettypatch |