Skip to content

Instantly share code, notes, and snippets.

View eschen42's full-sized avatar

Arthur Eschenlauer eschen42

View GitHub Profile
@eschen42
eschen42 / brew-install-gitfs-error.md
Last active May 29, 2017 15:54
'brew install gitfs' and 'brew info gitfs' - "Error: wrong number of arguments (0 for 1..3)"

cannot install formula gitfs

steps to recreate

build and run .linuxbrew/Dockerfile image

run the following in bash and observe output

linuxbrew@78f515fa1f4d:~$ brew update
Already up-to-date.

linuxbrew@78f515fa1f4d:~$ brew update
Already up-to-date.
@eschen42
eschen42 / docker_image_dump
Created September 2, 2017 15:55
Dump a Docker image as the skeleton of a DockerFile
#!/bin/bash
# emit skeletion of DockerFile for the image given by the first (and only) argument
echo "# Here is a skeleton DockerFile for docker image '$1'"
docker history --no-trunc $1 \
| sed '1 d; s/.* ago [ ]*/RUN /; s/[ ][ ]*[0-9.][0-9.]*[kMG]*B[ ][ ]*$//; s/^RUN .bin.sh -c #.nop. [ ]*//' \
| tac
@eschen42
eschen42 / Dockerfile.planemo
Last active September 11, 2017 17:17
Dockerfile to run planemo
# ref: https://gist.github.com/eschen42/d5b7850ea74c6dd8f37714f7d48955fc
# Objective - To create a Docker environment in which I can run planemo
# To build
# sudo docker build -t eschen42/planemo .
# To run and delete the container on exit
# sudo docker run --rm -ti eschen42/planemo
# You will be logged in as the 'debian' user without superuser privileges.
# For superuser privileges, supply arguments, e.g.:
# sudo docker run --rm -ti eschen42/planemo bash -c "export TERM=xterm; /bin/bash"
@eschen42
eschen42 / docker_swab_orphans
Last active December 4, 2020 21:54
Remove exited containers, orphaned volumes, and unnamed repositories
#!/bin/sh
echo find and destroy exited containers
echo ---
sudo docker rm $( echo $( \
sudo docker ps -a --filter="status=exited" -q) )
echo ...
echo find and destroy unnamed orphaned volumes
echo ---
sudo docker volume rm $( \
sudo docker volume ls -q -f 'dangling=true' | grep -v '[g-zA-Z-]' )
@eschen42
eschen42 / docker_bash_exec
Last active September 9, 2017 15:06
Run bash in a new or existing container
#!/bin/sh
# Run bash within an already-running container
# arg1 - ID or nickname of a running container
if [ "'${COLUMNS}x'" = "'x'" ]; then
echo Please 'export COLUMNS' before running this script.
else
sudo docker exec -ti $1 bash -c "export TERM=xterm; export COLUMNS=$COLUMNS; /bin/bash"
fi
@eschen42
eschen42 / another old windows _vimrc
Last active October 10, 2022 12:36
my old Windows _vimrc
set nocompatible
" source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/gvimrc_example.vim
" source $VIMRUNTIME/mswin.vim
behave xterm
set selectmode=mouse
set guifont=Courier:h9
" Cursor is Magenta
highlight Cursor guibg=Magenta guifg=NONE
au BufNewFile,BufRead *.mzXML set ft=xml
@eschen42
eschen42 / Dockerfile.devtools
Created January 7, 2018 06:57
Dockerfile with RStudio, R 3.4.3, and devtools
# RStudio with vignette-building capability
# Step 1 - build from this Dockerfile
# docker build -t eschen42/devtools .
# Step 2 - create a home directory
# mkdir ~/rstudio
# Step 3 - run the container with this new directory
# docker run --rm -ti -p 8787:8787 -v ~/rstudio:/home/rstudio eschen42/devtools
# Step 4 - browse to RStudio as http://localhost:8787
FROM rocker/verse:3.4.3
@eschen42
eschen42 / Dockerfile.devplan
Last active January 10, 2018 06:00
Dockerfile to run planemo and rstudio with devtools and planemo
# Planemo and RStudio with vignette-building capability (via R package 'devtools')
# Step 1 - Build from this Dockerfile (you must cd to the directory containing it first)
# docker build -t eschen42/devplan .
# Step 2 - Create a home directory, e.g.:
# mkdir ~/devplan
# Step 3 - Run the container with this new directory; note that the container will create
# files in this directory with UID 1000 (which is user rstudio on the guest), e.g.:
# docker run --name devplan --rm -ti -p 8787:8787 -p 8790:9090 -v ~/devplan:/home/rstudio eschen42/devplan
# Step 4 - On the host, browse to RStudio at http://localhost:8787
# Step 5 - Set up /home/rstudio/.ssh (on the guest; ~/devplan/.ssh on the host) if desired
@eschen42
eschen42 / texlive.profile
Created February 16, 2018 13:46
texlive scripted install for linux_x86_64 into /home/rstudio
## # References
## - https://www.tug.org/texlive/doc/texlive-en/texlive-en.html - The TEX Live Guide
## - http://tug.org/texlive/acquire-netinstall.html - Installing TeX Live over the Internet
## - This documents where to get install-tl, the TEX Live installer
## - http://tug.org/texlive/quickinstall.html - TeX Live - Quick install
## - This documents how to install install-tl, the TEX Live installer
## - Note that, if you want to run the GUI, you will need to install
## - the perl-tk package on Debian, Ubuntu, and other apt-based distributions
## - something similar on other distributions ...
## - http://tug.org/texlive/doc/install-tl.html#PROFILES