Skip to content

Instantly share code, notes, and snippets.

View hrbrmstr's full-sized avatar
💤
#tired

boB Rudis hrbrmstr

💤
#tired
View GitHub Profile
@jimhester
jimhester / 0.9.3.png
Last active July 11, 2018 11:18
Run R code with different versions of package dependencies, this will work in the same session as long as you don't run into issues unloading the namespaces
0.9.3.png
@cpsievert
cpsievert / europe.R
Last active December 1, 2017 23:05 — forked from halhen/europe.R
library(tidyverse)
library(plotly)
# I'm being lazy, please don't do this
# setwd("~/Downloads/Version 2_0_1/")
d <- read_csv('GEOSTAT_grid_POP_1K_2011_V2_0_1.csv') %>%
rbind(read_csv('JRC-GHSL_AIT-grid-POP_1K_2011.csv') %>%
mutate(TOT_P_CON_DT = '')) %>%
mutate(

The FBI Unified Crime Reporting folks have released a treaure trove of data but stuck it behind either an API or a ReactJS interactive bulk download selection process. The links here were generated from the obfuscated js data elements. This shld make it easier for folks to download the entire data set in bulk.

@hrbrmstr
hrbrmstr / gg_tweet.R
Last active October 16, 2020 04:49
use the magick device to make ggplots conform to twitter card or in-stream image optimal sizes, with or without "retina" resolution
library(httr)
library(magick)
library(hrbrthemes)
library(ggplot2)
theme_tweet_rc <- function(grid = "XY", style = c("stream", "card"), retina=TRUE) {
style <- match.arg(tolower(style), c("stream", "card"))
switch(
@simonecorsi
simonecorsi / git-create-remote.sh
Last active January 16, 2018 04:59
This function will walk you through the creation of a remote repository on github without wasting your precious time going to the website :)
# This function will walk you through the creation of a remote repository on github
# without wasting your precious time going to the website :)
# how:
# - source it in your (bash|zsh)rc
# - change the alias at the bottom of the script to your needs
# - call it, follow instructions... profit
function createRemoteGitRepository() {
local RED='\033[0;31m'
local NC='\033[0m' # No Color
local GITHUB_USER=''
Only including this file so the title of the gist isn't `.gitignore`
@seanhandley
seanhandley / docker-compose.yml
Last active January 23, 2025 09:49
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@jonocarroll
jonocarroll / boyermoor.py
Last active November 26, 2021 22:41
Boyer-Moore Implementations for @coolbutuseless' comparisons
def alphabet_index(c):
"""
Returns the index of the given character in the English alphabet, counting from 0.
"""
return ord(c.lower()) - 97 # 'a' is ASCII character 97
def match_length(S, idx1, idx2):
"""
Returns the length of the match of the substrings of S beginning at idx1 and idx2.
"""
@noamross
noamross / put64.R
Last active November 17, 2023 22:22
Simple R object to base64 conversion. Free to a good home in your R package! If you put it in your package, let me know 🙂
# Copyright 2018 Noam Ross
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@roycewilliams
roycewilliams / mta-sts_scans-io_dns-any_2018-08-24.txt
Created September 16, 2018 03:24
MTA-STS hostnames from the scans.io "DNS ANY" dataset as of 2018-08-24
mta-sts.0xdeadbeef600ddecafbad.de,cname,sb33.not-your-server.de
mta-sts.123apps.net,cname,mta-sts.luteijn.email
mta-sts.79p.de,cname,79p.de
mta-sts.abel-battenberg.de,a,78.46.137.164
mta-sts.abel-fkb.de,a,78.46.137.164
mta-sts.adrien-martin.net,cname,adrien-martin.net
mta-sts.akademeia.moe,cname,mta-sts.luteijn.email
mta-sts.akademiaf2p.pl,cname,ha.hetzner.tensquaregames.com
mta-sts.alainwolf.ch,cname,mta-sts.urown.net
mta-sts.alainwolf.net,cname,mta-sts.urown.net