Skip to content

Instantly share code, notes, and snippets.

View kkremitzki's full-sized avatar

Kurt Kremitzki kkremitzki

View GitHub Profile
@kkremitzki
kkremitzki / setup.bash
Last active August 6, 2019 05:21
A bootstraping script.
#!/bin/bash
apt install -y neovim build-essential git stow
mkdir -p ~/.config/nvim
echo "set expandtab shiftwidth=4" > ~/.config/nvim/init.vim
echo "set -o vi" >> ~/.bashrc
echo "bind -m vi-insert '\C-l':clear-screen" >> ~/.bashrc
@kkremitzki
kkremitzki / SteamEnergy.py
Last active December 11, 2017 13:35
Very rough calculation of how many years it would take current human energy needs to drop Earth's core temp by 1 °C.
# The objective is to find the number of years at current total human energy
# use it would take to decrease the temperature of the Earth's 'core' by one
# degree Celsius. The maximum depth of the crust is 100 km so we'll offset
# the average radius by that amount to get the volume, multiply by the
# average density to get the mass. Then we'll multiply by the mass-weighted
# average specific heat and then by 1 °C to cancel things out.
# Using the equation Q = m Cp ΔT, we find the total energy available from
# that one degree drop. Divide by the current total human energy use per year
# to arrive at the number of years it would take.
@kkremitzki
kkremitzki / README-setup-tunnel-as-systemd-service.md
Created November 25, 2017 00:32 — forked from drmalex07/README-setup-tunnel-as-systemd-service.md
Setup a secure (SSH) tunnel as a systemd service. #systemd #ssh #ssh-tunnel #ssh-forward

README

Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name of target host:

[Unit]
Description=Setup a secure tunnel to %I
After=network.target

Keybase proof

I hereby claim:

  • I am kkremitzki on github.
  • I am kkremitzki (https://keybase.io/kkremitzki) on keybase.
  • I have a public key ASCUIhOR7S9h3RBGLSZY2S07XnYVWVMrbBhp3CfbKc9HFAo

To claim this, I am signing this object:

#!/bin/bash
# Released under GPL v2.0
# bernd@bimstatik.org
# based on script for vagrant box from FreeCAD source, https://github.com/FreeCAD/FreeCAD/blob/master/vagrant/FreeCAD.sh
# modified Jan 28 2016 by Kurt Kremitzki
# tested on Ubuntu Xenial = 16.04
cd
INSTALL_PREFIX=/opt/local/FreeCAD-0.17-py3