Skip to content

Instantly share code, notes, and snippets.

@pbt001
pbt001 / clone-gists.py
Created August 15, 2018 14:51 — forked from SpotlightKid/clone-gists.py
Clone all gists of GitHub username given on the command line.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Clone all gists of GitHub user with given username.
Clones all gist repos into the current directory, using the gist id as the
directory name. If the directory already exists as a git repo, try to perform a
'git pull' in it.
"""
@pbt001
pbt001 / plot_aligned_series.R
Created September 17, 2018 21:22 — forked from tomhopper/plot_aligned_series.R
Align multiple ggplot2 graphs with a common x axis and different y axes, each with different y-axis labels.
#' When plotting multiple data series that share a common x axis but different y axes,
#' we can just plot each graph separately. This suffers from the drawback that the shared axis will typically
#' not align across graphs due to different plot margins.
#' One easy solution is to reshape2::melt() the data and use ggplot2's facet_grid() mapping. However, there is
#' no way to label individual y axes.
#' facet_grid() and facet_wrap() were designed to plot small multiples, where both x- and y-axis ranges are
#' shared acros all plots in the facetting. While the facet_ calls allow us to use different scales with
#' the \code{scales = "free"} argument, they should not be used this way.
#' A more robust approach is to the grid package grid.draw(), rbind() and ggplotGrob() to create a grid of
#' individual plots where the plot axes are properly aligned within the grid.
@pbt001
pbt001 / init.vim
Created October 13, 2018 19:54 — forked from celso/init.vim
Neovim setup for OSX users
syntax on
set ruler " Show the line and column numbers of the cursor.
set formatoptions+=o " Continue comment marker in new lines.
set textwidth=0 " Hard-wrap long lines as you type them.
set modeline " Enable modeline.
set esckeys " Cursor keys in insert mode.
set linespace=0 " Set line-spacing to minimum.
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J)
" More natural splits
set splitbelow " Horizontal split below current.
@pbt001
pbt001 / tmux-cheatsheet.markdown
Created October 21, 2018 16:48 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@pbt001
pbt001 / 1-macOS-10.14-mojave-setup.md
Last active January 15, 2019 10:26 — forked from kevinelliott/1-macOS-10.14-mojave-setup.md
[macOS 10.14 Mojave Mostly-Automated Setup] #pub #dotfile #cfg #automation #macos #brew #mas

To support my open-source work, consider adding me on Patreon.

macOS 10.14 Mojave Mostly-Automated Setup

An easy to refer to document for regularly setting up macOS 10.14 Mojave.

Controversy

The topic of recipe-based frequent fresh reinstalls of macOS is a controversial issue. Some people are against reinstalling macOS, citing that they have never had an issue with Apple provided upgrade installs.

@pbt001
pbt001 / helvetidark.less
Last active October 23, 2018 11:55 — forked from drifteaur/helvetidark.less
[helvetidark] taskpaper theme #taskpaper #less #css #style
// An approximation of the TaskPaper 2 Helvetidark theme for TaskPaper 3
@text-color: rgb(90%, 90%, 90%);
@background-color: rgb(10%, 10%, 10%);
@font-family: 'Helvetica Neue';
@user-font-size: @base-font-size - 2;
@selection-color: rgb(20%, 20%, 20%);
@invisibles-color: mix(@tint-color, @background-color, 70%);
@cursor-color: rgb(40%, 40%, 40%);
@pbt001
pbt001 / day.less
Created October 23, 2018 21:41 — forked from derickfay/day.less
daytime TaskPaper 3 theme
// UI Scale
@base-font-size: 16;
@user-font-size: $USER_FONT_SIZE;
@ui-scale: @user-font-size / @base-font-size;
// UI Colors
@tint-color: darkblue;
@handle-color: white;
@collapsed-color: red;
@pbt001
pbt001 / night.less
Created October 23, 2018 21:45 — forked from derickfay/night.less
nighttime TaskPaper 3 theme
// UI Scale
@base-font-size: 16;
@user-font-size: $USER_FONT_SIZE;
@ui-scale: @user-font-size / @base-font-size;
// UI Colors
@tint-color: rgb(173,216,230);
@handle-color: black;
@collapsed-color: red;
@pbt001
pbt001 / kitty.conf
Created October 27, 2018 00:19 — forked from NeoTheFox/kitty.conf
kitty config with solarized dark theme
# vim:fileencoding=utf-8:ft=conf
# Font family. You can also specify different fonts for the
# bold/italic/bold-italic variants. By default they are derived automatically,
# by the OSes font system. Setting them manually is useful for font families
# that have many weight variants like Book, Medium, Thick, etc. For example:
# font_family Operator Mono Book
# bold_font Operator Mono Thick
# bold_italic_font Operator Mono Medium
font_family Hack
@pbt001
pbt001 / .zshrc
Created October 31, 2018 00:28 — forked from benhoIIand/.zshrc
Configuration for ZSH with aliases
# Path to your oh-my-zsh installation.
export ZSH=/Users/bholland/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="random"
# Uncomment the following line to use case-sensitive completion.