Publications by hrbrmstr
Wrangling Content Security Policies in R
(header image via MDN Web Docs) The past two posts have used R to look at the safety/security (just assume those terms are in scare quotes from now on in every post) of web-y thing-ys. We’ll continue that theme with this post where we focus on a [sadly unused] HTTP server header: Content Security Policy (referred to as CSP in the remainder of t...
9398 sym R (18389 sym/13 pcs) 4 img
Collecting Content Security Policy Violation Reports in S3 (‘Effortlessly’/’Freely’)
In the previous post I tried to explain what Content Security Policies (CSPs) are and how to work with them in R. In case you didn’t RTFPost the TLDR is that CSPs give you control over what can be loaded along with your web content and can optionally be configured to generate a violation report for any attempt to violate the policy you create. ...
8578 sym R (841 sym/4 pcs)
Handling & Sharing PCAPs Like a Boss with PacketTotal
The fine folks over at @PacketTotal bequeathed an API token on me so I cranked out an R package for it to enable more dynamic investigations work (RStudio makes for an amazing incident responder investigations console given that you can script in multiple languages, code in C[++], and write documentation all at the same time using R ‘projects�...
1155 sym
Assumptions Matter More Than Dependencies
There’s been alot of talk about “dependencies” in the R universe of late. This is not really a post about that but more of a “really, don’t do this” if you decide you want to poke the dependency bear by trying to build a deeply flawed model off of CRAN package metadata. CRAN packages undergo checks. Here’s one for akima (I :heart: m...
5256 sym R (11968 sym/11 pcs) 1 tbl
Rome Was Not Built In A Day But widgetcard Was!
I saw a second post on turning htmlwidgets into interactive Twitter Player cards and felt somewhat compelled to make creating said entities a bit easier so posited the following: Wld this be useful packaged up, #rstats?https://t.co/sfqlWnEeJVhttps://t.co/troKzmzTNv (TLDR/V: Single function to turn an HTML widget into a deployable interactive Twi...
2661 sym R (1667 sym/5 pcs) 2 img
Wicked Fast, Accurate Quantiles Using ‘t-Digests’ in R with the {tdigest} Package
@ted_dunning recently updated the t-Digest algorithm he created back in 2013. What is this “t-digest”? Fundamentally, it is a probabilistic data structure for estimating any percentile of distributed/streaming data. Ted explains it quite elegantly in this short video: Said video has a full transcript as well. T-digests have been baked into m...
2421 sym R (865 sym/4 pcs)
A Limited-but-Functional Couchbase Free Text Search & Retrieval Un-package; or, “How I Abused Couchbase & R to Perform Bulk IP Whois Full-text Searches” (a Cobbler’s Tale)
Researching “the internet” (i.e. $DAYJOB) means having to deal with a ton of “unique” (I’m being kind) data formats. This is ultimately a tale of how I performed full-text searches across one of them. It all started off innocently enough. This past week I need to be able to do full-text searches across metadata about who is using which ...
5474 sym Python (5154 sym/4 pcs) 2 img
Lost In [SQL] Translation: Charting d[b]plyr Mapped SQL Function Support Across All Backends
Like more posts than I care to admit, this one starts innocently enough with a tweet by @gshotwell: Is there a reference document somewhere of which dplyr commands work on various database backends? #rstats — Gordon Shotwell (@gshotwell) April 9, 2019 Since I use at least 4 different d[b]plyr backends every week, this same question surfaces i...
3523 sym R (4182 sym/4 pcs) 2 img
Quick Hit: Scraping javascript-“enabled” Sites with {htmlunit}
I’ve mentioned {htmlunit} in passing before, but did not put any code in the blog post. Since I just updated {htmlunitjars} to the latest and greatest version, now might be a good time to do a quick demo of it. The {htmlunit}/{htmunitjars} packages make the functionality of the HtmlUnit Java libray available to R. The TLDR on HtmlUnit is that i...
3814 sym R (4331 sym/4 pcs) 6 img
Quick Hit: Updates to QuickLookR and {rdatainfo}
I’m using GitUgh links here b/c the issue was submitted there. Those not wishing to be surveilled by Microsoft can find the macOS QuickLook plugin project and {rdatainfo} project in SourceHut and GitLab (~hrbrmstr and hrbrmstr accounts respectively). I hadn’t touched QuickLookR or {rdatainfo} at all since 2016 since it was really just an exam...
1808 sym 12 img