Skip to content

Instantly share code, notes, and snippets.


boB Rudis hrbrmstr

View GitHub Profile
hrbrmstr /
Created Dec 12, 2020 — forked from kevwan/
The simplest way to write Dockerfile!

1. choose a simple linux image

For example alpine, it's only about 5MB.

2. set timezone if necessary

RUN apk add --no-cache tzdata
ENV TZ America/New_York
View xpath-cheatsheet.js
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// 0. XPath Examples.
// More:
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
View scrape.R
get_page <- function(page_num = 1) {
# this is to be kind to the web site
# it does not have a robots.txt so this should be the default wait
# time between requests since the desires of the scraper are not
# greater than that of the site owner and you'd be abusing
# their resources if you did not put a delay in between requests
View ex.sql
ROW_NUMBER() OVER (PARTITION BY [product_id], shop_code
[doc_date]) - ROW_NUMBER() OVER (PARTITION BY [product_id], shop_code, mark_1
View forso.R
pg <- read_html("")
blocks <- html_nodes(pg, ".block")
items_and_quantity <- html_nodes(blocks, xpath=".//div[@class='col-block' and contains(., 'Item(s)')]")
items <- html_nodes(items_and_quantity, xpath=".//strong[contains(., 'Item(s)')]/following-sibling::span") %>% html_text(trim=TRUE)
hrbrmstr /
Last active Oct 17, 2018
really pathetic child text tag extraction
View power-mining.R
doe <- read_html("")
dir.create("~/Data/doe-cache-dir", showWarnings = FALSE)
html_nodes(doe, xpath=".//a[contains(., 'XLS')]") %>%
hrbrmstr / gpg-agent.conf
Created Sep 1, 2018 — forked from nl5887/gpg-agent.conf
Using GPG Agent on OS-X
View gpg-agent.conf
launchctl unload -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
launchctl load -w -S Aqua /System/Library/LaunchAgents/gpg.agent.daemon.plist
View mikrotik-coinhive-asn-aso.csv
asn org iso3c n
AS262661 Linknet Telecomunicaçoes BRA 2771
AS262988 Pombonet Telecomunicações e Informática BRA 2439
AS262296 Windx Networks BRA 2382
AS52909 Vox Telecomunicações do Brasil Ltda BRA 1518
AS263030 CNET Provedor de Internet Ltda ME BRA 1492
AS263468 Rapnet Comunicacao Multimidia Ltda BRA 1460
AS262579 GE Network Provedor de Internet LTDA BRA 1455
AS264479 Turbozone Internet BRA 1450
AS263991 Fernanda Cristina Ruiz Matiazzo - Me BRA 1445
View AS50607.csv
created_at x event hj_asn hj_prefix hj_name by_asn by_org day
2018-07-09T09:27:23Z BGP HJ AS3491 PCCW Global, Inc. AS50607 Stowarzyszenie e-Poludnie 2018-07-09
2018-07-09T09:27:20Z BGP HJ AS22414 Craigslist, Inc. AS50607 Stowarzyszenie e-Poludnie 2018-07-09
2018-07-09T09:27:17Z BGP HJ AS46179 MediaFire, LLC AS50607 Stowarzyszenie e-Poludnie 2018-07-09
2018-07-09T09:27:15Z BGP HJ AS32934 Facebook, Inc. AS50607 Stowarzyszenie e-Poludnie 2018-07-09
2018-07-09T08:11:34Z BGP HJ AS41231 Canonical Group Limited AS50607 Stowarzyszenie e-Poludnie 2018-07-09
2018-07-09T07:42:50Z BGP HJ AS45753 NETSEC NOC AS50607 Stowarzyszenie e-Poludnie 2018-07-09
2018-07-09T06:28:54Z BGP HJ AS137915 ZTC-AS-AP Zero Technology Co. ,LIMITED, HK AS50607 Stowarzyszenie e-Poludnie 2018-07-09
2018-07-09T05:02:10Z BGP HJ AS57976 Blizzard Entertainment, Inc AS50607 Stowarzyszenie e-Poludnie 2018-07-09