start new:
tmux
start new with session name:
tmux new -s myname
| #! /usr/bin/env python | |
| """ Convert values between RGB hex codes and xterm-256 color codes. | |
| Nice long listing of all 256 colors and their codes. Useful for | |
| developing console color themes, or even script output schemes. | |
| Resources: | |
| * http://en.wikipedia.org/wiki/8-bit_color | |
| * http://en.wikipedia.org/wiki/ANSI_escape_code |
| # Correlation ellipses | |
| doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
| toInstall <- c("ellipse") | |
| if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
| lapply(toInstall, library, character.only = TRUE) | |
| # Function to plot colored correlation ellipses | |
| correlationEllipses <- function(cor){ | |
| require(ellipse) |
Unfortunately, the Cisco AnyConnect client for Mac conflicts with Pow. And by "conflicts", I mean it causes a grey-screen-of-death kernel panic anytime you connect to the VPN and Pow is installed.
As an alternative, there is OpenConnect, a command-line client for Cisco's AnyConnect SSL VPN.
Here's how to get it set up on Mac OS X:
OpenConnect can be installed via homebrew:
brew update
brew install openconnect
| # Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg | |
| $ sudo chown -R `whoami` /usr/local/texlive | |
| $ tlmgr update --self | |
| $ tlmgr install ucs | |
| $ tlmgr install etoolbox | |
| # Install pandoc view homebrew |
| ## Function for arranging ggplots. use png(); arrange(p1, p2, ncol=1); dev.off() to save. | |
| require(grid) | |
| vp.layout <- function(x, y) viewport(layout.pos.row=x, layout.pos.col=y) | |
| arrange_ggplot2 <- function(..., nrow=NULL, ncol=NULL, as.table=FALSE) { | |
| dots <- list(...) | |
| n <- length(dots) | |
| if(is.null(nrow) & is.null(ncol)) { nrow = floor(n/2) ; ncol = ceiling(n/nrow)} | |
| if(is.null(nrow)) { nrow = ceiling(n/ncol)} | |
| if(is.null(ncol)) { ncol = ceiling(n/nrow)} | |
| ## NOTE see n2mfrow in grDevices for possible alternative |
| #!/usr/bin/env ruby | |
| File.foreach(ARGV[0]) do |task| | |
| # Remove the * | |
| the_task = task.gsub(/\*/, '') if task.include? '*' | |
| # Remove trailing newline | |
| the_task = the_task.strip | |
| # Use Brett Terpstra's otask to add the task to OmniFocus inbox | |
| `/Users/david/Applications/OTask/bin/otask -s "#{the_task}"` | |
| end |
| # Adding regions to the background of a ggplot | |
| doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
| toInstall <- c("foreign", "plyr", "ggplot2", "RColorBrewer") | |
| if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
| lapply(toInstall, library, character.only = TRUE) | |
| # House DW-NOMINATE Data: http://voteview.org/dwnominate.asp | |
| dwNominate <- read.dta("ftp://voteview.com/junkord/HL01111E21_PRES.DTA") | |
| # Make a re-coded party variable |
| rm(list = ls()) | |
| doInstall <- TRUE # Change to FALSE if you don't want packages installed. | |
| toInstall <- c("zoo", "tm", "ggplot2", "Snowball") | |
| if(doInstall){install.packages(toInstall, repos = "http://cran.r-project.org")} | |
| lapply(toInstall, library, character.only = TRUE) | |
| # From: http://www.cnn.com/2012/10/03/politics/debate-transcript/index.html | |
| Transcript <- readLines("https://raw.github.com/dsparks/Test_image/master/Denver_Debate_Transcript.txt") | |
| head(Transcript, 20) |
| #/usr/local/bin/python | |
| """Build Rescuetime Graph Data for StatusBoard.app | |
| This script pulls data from a rescuetime account and flattens it into a format | |
| that is easily read by StatusBoard. Okay. Run it with cron or launchd, whatever. | |
| *nick wolfe | |
| http://nameremoved.com/ | |
| """ |