Skip to content

Instantly share code, notes, and snippets.

View jsta's full-sized avatar
🪼
...

Jemma Stachelek jsta

🪼
...
View GitHub Profile

Keybase proof

I hereby claim:

  • I am hrbrmstr on github.
  • I am hrbrmstr (https://keybase.io/hrbrmstr) on keybase.
  • I have a public key whose fingerprint is 8BEC EF50 9D70 C613 A59C 5AD7 CBB9 4084 59AD 8A98

To claim this, I am signing this object:

@hrbrmstr
hrbrmstr / themes.R
Last active April 16, 2018 19:48
various themes
theme_map <- function(base_size=9, base_family="") {
require(grid)
theme_bw(base_size=base_size, base_family=base_family) %+replace%
theme(
axis.line=element_blank(),
axis.text=element_blank(),
axis.ticks=element_blank(),
axis.title=element_blank(),
panel.background=element_blank(),
panel.border=element_blank(),
@clhenrick
clhenrick / README.md
Last active March 3, 2025 23:02
PostgreSQL & PostGIS cheatsheet (a work in progress)
@nocturnalgeek
nocturnalgeek / MailinatorAliases
Last active June 18, 2025 22:06
A list of alternate domains that point to @mailinator.com
@binkmail.com
@bobmail.info
@chammy.info
@devnullmail.com
@letthemeatspam.com
@mailinater.com
@mailinator.net
@mailinator2.com
@notmailinator.com
@reallymymail.com
@jakevdp
jakevdp / CategoricalCMAP.ipynb
Last active June 8, 2025 22:34
Example of a categorical color map in matplotlib
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@briandk
briandk / pasteUsingSepAndCollapseInR.R
Created November 27, 2014 07:11
Understanding `sep` and `collapse` in R using `paste()
# The difference between the `sep` and `collapse` arguments
# in paste can be thought of like this:
#
# paste can accept multiple *vectors* as input, and will
# concatenate the ith entries of each vector pairwise
# (or tuplewise), if it can.
#
# When you pass paste multiple vectors, sep defines what
# separates the entries in those tuple-wise concatenations.
#
library(curl)
d3 <- "https://github.com/mbostock/d3/archive/v3.0.6.zip"
tmp <- tempfile()
curl::curl_download(d3, tmp, mode = "wb")
unzip(tmp)
unlink(tmp)
library(gistr)
gistr::gist_create(files = "d3-3.0.6/d3.js")
@Chandler
Chandler / slack_history.py
Last active March 27, 2025 01:16
Download Slack Channel/PrivateChannel/DirectMessage History
print("UPDATE AUG 2023: this script is beyond old and broken")
print("You may find interesting and more up to date resources in the comments of the gist")
exit()
from slacker import Slacker
import json
import argparse
import os
# This script finds all channels, private channels and direct messages
@wizioo
wizioo / gitignore_per_git_branch.md
Last active June 19, 2025 10:35
HowTo have specific .gitignore for each git branch

How to have specific .gitignore for each git branch

Objective

My objective is to have some production files ignored on specific branches. Git doesn't allow to do it.

Solution

My solution is to make a general .gitignore file and add .gitignore.branch_name files for the branches I want to add specific file exclusion. I'll use post-checkout hook to copy those .gitignore.branch_name in place of .git/info/exclude each time I go to the branch with git checkout branch_name.

@romunov
romunov / rename.R
Last active February 6, 2016 14:15
rename column names given a data.frame of old and new values
xy <- data.frame(x = 1:3, y = letters[1:3], z = LETTERS[1:3])
chg <- data.frame(old = colnames(xy), new = toupper(colnames(xy)))
library(plyr)
colnames(xy) <- mapvalues(x = colnames(xy),
from = as.character(chg$old),
to = as.character(chg$new))