## First do the unix account setup http://wiki.dreamhost.com/Unix_account_setup | |
cd ${HOME} | |
# create the first level directories (and log/setup) | |
mkdir -pv soft run www log log/setup backup data | |
# create the second level directories within run (our own FHS) | |
for subdir in bin etc include lib man share | |
do | |
mkdir -pv run/${subdir} | |
done | |
# symlink so that man pages stay all in the same place |
To remove a submodule you need to: | |
Delete the relevant line from the .gitmodules file. | |
Delete the relevant section from .git/config. | |
Run git rm --cached path_to_submodule (no trailing slash). | |
Commit and delete the now untracked submodule files. |
#!/bin/sh | |
# | |
# git-export - Create an unversioned copy of a tree. | |
# | |
# USAGE | |
# git export [<tree-ish>] <path> | |
# | |
# Author: Yuki <paselan@gmail.com> | |
# License: MIT License | |
# |
## This file contains functions that I've found useful when working | |
## with the nbpMatching package. Context for the examples can be seen | |
## in Appendix E in | |
## http://jakebowers.org/PAPERS/WongRacialContext2012.pdf | |
## (forthcoming in the Journal of Politics). | |
## Make matrices of absolute distances | |
scalar.dist<-function(var){ | |
## Utility function to make n x n abs dist matrices | |
## Cribbed from older versions of optmatch |
library(optmatch) | |
example(match_on) | |
#' @param x An ISM or blocked ISM | |
#' @param rs Names of rows to keep | |
#' @param cs Names of columns to keep | |
submatrix <- function(x, rs, cs) { | |
subset(x, | |
x@rownames %in% rs, |
From http://concord-consortium.github.io/developer-notes/automating-gh-pages-integration.html:
How to setup a git repo so gh-pages automatically tracks commits to master and ‘git push origin’ updates the remote master and gh-pages branches.
Setup a test repo:
mkdir pages-test
cd pages-test/
git init .
The MBP is my development machine, so I needed all of my tools installed with the ability to update them with ease. In the past, I used MacPorts to take care of my MySQL, Memcached, and Ruby installions and it worked just fine. This time around however, I wanted something new and fun. Homebrew.
Homebrew is a new package manager for OS X. Unlike Fink or MacPorts, Homebrew integrates with the core operating system, reducing the number of extra libraries to install etc. Another neat feature is the ability to write software package recipes in Ruby, awesome.
Here are some raw installation instructions (clean system). I like to keep everything under user ownership to make life more enjoyable, say no to sudo.
You will need the latest version of xcode, you can get it here. After the installation is complete, you may continue.
sudo mkdir /usr/local
--- | |
title: | |
author: | |
date: | |
documentclass: | |
- scrartcl | |
header-includes: | |
- \usepackage{paralist} | |
- \usepackage{booktabs} | |
- \usepackage{numprint, xspace, paralist} |
// [[Rcpp::depends(RcppParallel)]] | |
// [[Rcpp::depends(RcppEigen)]] | |
#include <Rcpp.h> | |
#include <RcppEigen.h> | |
#include <RcppParallel.h> | |
using namespace std; | |
using namespace Rcpp; | |
using namespace RcppParallel; |