Skip to content

Instantly share code, notes, and snippets.

Claus F. Strasburger cfstras

View GitHub Profile
@cfstras
cfstras / Installing tcpdump on an arm device without package manager.md
Created Jan 23, 2020
Installing tcpdump on an arm device without package manager
View Installing tcpdump on an arm device without package manager.md
DEVICE=1.2.3.4
MIRROR=http://ftp.halifax.rwth-aachen.de/fedora/linux/releases
FEDORA=29
FILE=tcpdump-4.9.2-6.fc29.armv7hl.rpm
PACKAGE=Everything/armhfp/os/Packages/t/$FILE

wget $MIRROR/$FEDORA/$PACKAGE

# see https://gist.github.com/cfstras/4856e48fd4d68eb7debaa20d5e63c6de
@cfstras
cfstras / Git Config Helpers.md
Last active Apr 29, 2020
Git config helpers
View Git Config Helpers.md

Some config helpers for git

~/.gitconfig:

[alias]

# my lazyness
	git = !git # git git git checkout
	ad = add
	ada = add
@cfstras
cfstras / _Setting up your own DynDns server for Fritz!Box.md
Last active Dec 14, 2019
Setting up your own DynDns server for Fritz!Box
View _Setting up your own DynDns server for Fritz!Box.md
@cfstras
cfstras / setup_vpn_pi.md
Last active Sep 12, 2019
Setting up an OpenVPN Raspberry Pi for client devices
View setup_vpn_pi.md
@cfstras
cfstras / shoot
Last active Jul 22, 2019
screenshot script
View shoot
#!/bin/bash
#
# By Sirupsen @ http://sirupsen.dk
# Small changes by cfstras <c@cfs.im>
#
# Description: Very simple script to make you
# select a region of your screen, which will be captured, and
# then uploaded. The URL will then be injected into your clipboard.
#
# Dependencies:
@cfstras
cfstras / .bashrc
Last active Jul 3, 2019
Bash configuration for better history archive
View .bashrc
# first, install fzf
# https://github.com/junegunn/fzf
# Windows:
# choco install fzf
# Arch:
# sudo pacman -S fzf
# Mac:
# brew install fzf
# $(brew --prefix)/opt/fzf/install
@cfstras
cfstras / Windows Docker on Mac.md
Last active Jun 5, 2019
Installing a Windows based Docker host in a Vagrant VM
View Windows Docker on Mac.md

For mac and linux

  • install vagrant docker-machine with windows
# Mac:
brew cask install vagrant
# Linux (Debian):
apt-get install vagrant
@cfstras
cfstras / watch-output.sh
Last active Mar 26, 2019
Simple bash function to watch the output of a command and show it when the output changes
View watch-output.sh
function watch_change() {
local stat
local oldstat
local lasttime
lasttime=$SECONDS
while true; do
stat="$(eval "$@")"
if [[ "$stat" != "$oldstat" ]]; then
oldstat="$stat"
diff=$((SECONDS-lasttime))
@cfstras
cfstras / Make nice documents using Pandoc.md
Last active Mar 14, 2019
Make nice documents using Pandoc
View Make nice documents using Pandoc.md

example generated commandline:

pandoc -t beamer -f markdown  -o "presentation.pdf" "document.md"

pandoc -s --katex -t html5 -f markdown --css ../pandoc.css \
                --pdf-engine-opt='--print-media-type' \
@cfstras
cfstras / 0_Mirror a repository using GitLab CI.md
Last active Oct 17, 2019
How to mirror a repository using GitLab CI
View 0_Mirror a repository using GitLab CI.md

Mirroring a repository using GitLab CI

inspired by https://gitlab.com/freifunkks/mirror-scripts

This can be used, for example, to clone a repository living on github over to GitLab in order to run CI

Setup

  • Setup separate repository with mirror scripts. We'll call it "mirror-scripts"
  • push the two files below.
    • in the .gitlab-ci.yml replace MY_REPO with your repo name
You can’t perform that action at this time.