Skip to content

Instantly share code, notes, and snippets.

@benmarwick
benmarwick / rotate-axis-labels-ggplot2.R
Last active February 19, 2026 16:02
I can never remember how to rotate the x-axis labels with ggplot2: theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5))
# Adapted from https://stackoverflow.com/a/7267364/1036500 by Andrie de Vries
# This is it: theme(axis.text.x = element_text(angle = 90, hjust = 1, vjust = 0.5))
library(ggplot2)
td <- expand.grid(
hjust=c(0, 0.5, 1),
vjust=c(0, 0.5, 1),
angle=c(0, 45, 90),
@jaywilliams
jaywilliams / install-mosh.sh
Last active April 16, 2025 19:16 — forked from palexander/gist:2975305
Compiling and running mosh on Dreamhost (Updated - 2025)
#!/usr/bin/env bash
set -e
# Dreamhost Mosh Install Script
# Jay Williams (https://gist.github.com/jaywilliams/c9ffab789b3f622abc932dd4cfaaeef5)
# Based on the gracious work of:
# Paul R Alexander (https://gist.github.com/palexander/2975305)
# Sami Samhuri https://gist.github.com/samsonjs/4076746
@zkiraly
zkiraly / procedure-to-archive-git-branches.md
Last active March 3, 2026 06:20
Procedure to archive git branches.