(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:
| read_delim_nul <- function(path, encoding = 'utf8', ...) { | |
| #' Read a delimited text file that contains NULL bytes. | |
| #' | |
| #' @param path One or more file paths. | |
| #' @param encoding File encoding. | |
| #' @param ... Arguments to read_delim. | |
| # can process multiple file paths | |
| if (length(path) > 1) { | |
| return( |
| import hashlib | |
| """ | |
| Calculate Amazon S3 ETag for one or more files. | |
| Example: | |
| python e3tag.py files/1.txt files/2.txt files/3.txt | |
| """ | |
| -- Open selected file using neovim in an iTerm2 window | |
| -- Requires iTerm2 version 2.9+ | |
| (* Install: | |
| * | |
| * (1) Save this script as an Application | |
| * (2) Cmd + drag the application to Finder toolbar | |
| * (3) Click the new shortcut to open selected file in neovim using iTerm2 | |
| *) |
| usps | fips | alphanum | state_name | cen_division | cen_region | |
|---|---|---|---|---|---|---|
| AL | 1 | 1 | Alabama | East South Central | South | |
| AK | 2 | 2 | Alaska | Pacific | West | |
| AZ | 4 | 3 | Arizona | Mountain | West | |
| AR | 5 | 4 | Arkansas | West South Central | South | |
| CA | 6 | 5 | California | Pacific | West | |
| CO | 8 | 6 | Colorado | Mountain | West | |
| CT | 9 | 7 | Connecticut | New England | Northeast | |
| DE | 10 | 8 | Delaware | South Atlantic | South | |
| DC | 11 | 9 | District of Columbia | South Atlantic | South |
| #!/usr/bin/env python | |
| import sys | |
| import random | |
| from itertools import islice | |
| """ | |
| Reservoir sampling of input file/stream. Handles header rows. | |
| """ |
| #!/bin/bash | |
| # Make a folder for each of the 50 states | |
| mkdir -p al-alabama | |
| mkdir -p ak-alaska | |
| mkdir -p az-arizona | |
| mkdir -p ar-arkansas | |
| mkdir -p ca-california | |
| mkdir -p co-colorado | |
| mkdir -p ct-connecticut |
| // Reading CSV data into Stata is sometimes complicated by the presence of double quotes. | |
| // The import delimited command often provides the solution: | |
| import delim "data.csv", clear delim(",") varn(1) charset("utf8") |
| -- Open new iTerm2 window and navigate to current Finder directory | |
| -- Requires iTerm2 version 2.9+ | |
| (* Install: | |
| * | |
| * (1) Save this script as an Application | |
| * (2) Cmd + drag the application to Finder toolbar | |
| * (3) Click the new shortcut to open iTerm2 window in current directory | |
| *) |