This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```{r echo = FALSE, results = 'show'} | |
library(knitr) | |
``` | |
# Vergleich Pendeln mit Auto vs. Bahn mit BahnCard 50 | |
```{r} | |
# Fahrten pro Jahr (Wochenenden pro Jahr abzgl. Urlaub/Feiertage) | |
n.fahrten <- (52 - 7) * 2 # Fahrten in eine Richtung |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(caret) | |
library(doMC) | |
registerDoMC(cores = 4) # use multiple cores | |
set.seed(1234) | |
col.of.interest <- c( | |
'response', 'A', 'B', 'C' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This can take a while. Run in a screen environment. | |
# Modify for the version you want to install. | |
RVERSION=3.2.2 | |
sudo apt-get install screen gfortran libreadline6-dev libx11-dev libxt-dev | |
cd ~ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
MAINTAINER [email protected] | |
RUN apt-get update &&\ | |
apt-get install --no-install-recommends -y \ | |
ksh \ | |
xvfb \ | |
wget &&\ | |
apt-get clean -y && rm -rf /var/lib/apt/lists/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- bundle exec jekyll build 2>&1 | tee output.log | |
- grep -i "error" output.log > /dev/null ; test $? -ne 0 # fail if there is an error in output.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gs -dBATCH -dNOPAUSE -sDEVICE=png16m -r600 -dUseCropBox -sOutputFile=item-%03d.png input.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm -ti --name=LaTeX -v $PWD:/tex/ dettmering/latex-build latexmk -pdf /tex/bla.tex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run -d -u $(id -u):$(id -g) \ | |
--name=hass --net=host --restart=always \ | |
-v /home/pi/hass:/config \ | |
-v /etc/localtime:/etc/localtime:ro \ | |
homeassistant/raspberrypi3-homeassistant:latest | |
docker run -d --restart=always -v /home/pi/homegear/etc:/etc/homegear:Z -v /home/pi/homegear/lib:/var/lib/homegear:Z -v /home/pi/homegear/log:/var/log/homegear:Z -e TZ=Europe/Berlin -e HOST_USER_ID=$(id -u) -e HOST_USER_GID=$(id -g) --net=host --name homegear homegear/rpi-homegear:stable | |
docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer --no-auth |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ip6tables single-host firewall script | |
# Define your command variables | |
ipt6="/sbin/ip6tables" | |
# Flush all rules and delete all chains | |
# for a clean startup | |
$ipt6 -F |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
FILE_A=$1 | |
FILE_B=$2 | |
PAGE_COUNT_A=$(pdfinfo $FILE_A | grep Pages | awk '{print $2}') | |
PAGE_COUNT_B=$(pdfinfo $FILE_B | grep Pages | awk '{print $2}') | |
if [ $PAGE_COUNT_A -eq $PAGE_COUNT_B ]; | |
then |