Skip to content

Instantly share code, notes, and snippets.

View jmark's full-sized avatar

Johannes Markert jmark

  • German Aerospace Center (DLR)
  • Cologne, Germany
View GitHub Profile
@jmark
jmark / reconnectFritzBox7360SL.sh
Last active February 26, 2016 18:41
Bash script: Force reconnect for router Fritz!Box 7360 SL (FRITZ!OS: 06.20)
#!/bin/bash
# date: 2015-01-24
# Inspiration from: http://www.gtkdb.de/index_7_1302.html
payload=$(cat <<EOF
<?xml version="1.0" encoding="utf-8"?>
<s:Envelope
s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
@jmark
jmark / reconnectSpeedportW700V.sh
Last active August 29, 2015 14:14
Bash script: Force reconnect router Speedport W700V
#!/bin/bash
# date: 2015-01-24
wget 'http://192.168.2.1/cgi-bin/disconnect.exe' -O /dev/null > /dev/null 2>&1
sleep 3
wget 'http://192.168.2.1/cgi-bin/connect.exe' -O /dev/null > /dev/null 2>&1
sleep 30
@jmark
jmark / rename-to-exif-timestamp.sh
Created January 24, 2015 21:21
Rename image files to their creation date (unix timestamp) based on exif metadata
#!/bin/bash
# date: 2015-01-24
# purpose: Rename image files to their creation dates
# (unix timestamp) based on exif metadata
for file in *;
do
tstmp=$(exiv2 "$file"\
| grep -ia "image timestamp"\
@jmark
jmark / vpnc.md
Last active March 29, 2017 12:11
Configuring vpnc on Arch Linux box

Vpnc and Split Tunnel

Synopsis

How to setup a vpn tunnel to a CISCO(tm)-type vpn connection via the vpn tool and configure the ip routing in a way that only the packets destined for the vpn network are routed there. Thus, normal packets, like internet, are just handled like normal. I will show this by a specific example on connecting to the UKlan network of the University of Cologne.

@jmark
jmark / checkpoint-file-version.ipynb
Created November 4, 2016 16:50
Stretched Box with Density Gradient
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmark
jmark / file01.ipynb
Last active November 11, 2016 13:06
Stretched turbulent box with powerspectra (2d and 3d)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jmark
jmark / .gitignore
Last active May 30, 2019 09:45
Dynamic Arrays in C++ for CFD Applications
main
@jmark
jmark / .gitignore
Last active November 17, 2021 15:59
Tutorial jupyter notebook for Klimakoffer.jl
Klimakoffer.jl
.ipynb_checkpoints
@jmark
jmark / Makefile
Last active May 4, 2022 12:36
Minimal example to reproduce error for parsing 'arr[]' in function typedefs in CBinding.jl
CC = gcc
CCFLAGS = -I.
LDFLAGS = -L.
all: main libexample.so
main: main.c example.o
$(CC) -o $@ -Wall -Werror $(CCFLAGS) $^
@jmark
jmark / Makefile
Created January 26, 2023 11:17
Computing a stencil on a t8code mesh.
T8_DIR = $(HOME)/install/t8code/main
T8_INC = -I$(T8_DIR)/include
T8_LIB = -L$(T8_DIR)/lib -Wl,-rpath=$(T8_DIR)/lib
LIBS = -lz -lsc -lp4est -lt8
CXX = mpicxx
all: stencil