Skip to content

Instantly share code, notes, and snippets.

View Planeshifter's full-sized avatar
🎯
Focusing

Philipp Burckhardt Planeshifter

🎯
Focusing
View GitHub Profile
@Planeshifter
Planeshifter / gist:5847130
Last active December 18, 2015 21:28
Print the length of a std::vector of strings.
#include <Rcpp.h>
#include <string>
#include <vector>
// [[Rcpp::export]]
void print_vector(vector<std::string> input)
{
for( std::vector<string>::iterator i = input.begin(); i != input.end(); ++i)
@Planeshifter
Planeshifter / gist:6107864
Created July 29, 2013 21:09
Creates a node process and directs the output to a log file
nohup node DatabaseQuery.js > output.log
@Planeshifter
Planeshifter / gist:6536299
Last active December 22, 2015 21:49
Get PDF of sum of two Uniforms (Mathematica)
PDF[TransformedDistribution[
x + y, {Distributed[x, UniformDistribution[{0, 1}]],
Distributed[y, UniformDistribution[{-2, 2}]]}], z]
@Planeshifter
Planeshifter / gist:6832830
Last active December 24, 2015 17:08
Regression Analysis Homework Template
\documentclass[a4paper]{scrartcl}
\usepackage{listings}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{inconsolata}
\author{Philipp Burckhardt}
\title{Homework 6, Due Tuesday Oct 10}
@Planeshifter
Planeshifter / instructions.txt
Last active December 25, 2015 13:49 — forked from zachbrowne/instructions.txt
Unity desktop Ubuntu
This is a method to using your Ubuntu 12.04 server without the Unity desktop on a very fast remote desktop program. This is by far the best method to managing your Ubuntu server if you like GUI.
apt-get install --no-install-recommends ubuntu-desktop
apt-get --yes purge unity unity-2d unity-2d-places unity-2d-panel unity-2d-spread
apt-get --yes purge unity-asset-pool unity-services unity-lens-* unity-scope-*
apt-get --yes purge liboverlay-scrollbar*
apt-get --yes purge appmenu-gtk appmenu-gtk3 appmenu-qt
apt-get --yes purge firefox-globalmenu thunderbird-globalmenu
apt-get --yes purge unity-2d-common unity-common
apt-get --yes purge libunity-misc4 libunity-core-5*
R_LIBS_USER="~/R"
@Planeshifter
Planeshifter / gist:7062695
Created October 19, 2013 23:09
Symbolic Link in Linux
sudo ln -s /home/philipp/shinyApps /var/shiny-server/www
@Planeshifter
Planeshifter / gist:8160687
Created December 28, 2013 15:34
Start MongoDB
nohup mongod --dbpath /var/lib/mongodb
@Planeshifter
Planeshifter / gist:9130000
Created February 21, 2014 07:03
custom pandoc command to create reveal.js presentation
pandoc -t html5 --template=template-revealjs.html --standalone --section-divs --variable theme="beige" --variable transition="concave" slides.md -o slides.html --mathjax --include-in-header=slides.css
@Planeshifter
Planeshifter / gist:9183612
Created February 24, 2014 07:57
Wrap a href around links
Find:
(?:(?:https?|ftp):\/\/|www.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]
Replace with:
<a href="$&"> $& </a>