Skip to content

Instantly share code, notes, and snippets.

@hacker-bastl
hacker-bastl / bahn.sh
Created February 3, 2018 16:49
WIFIonICE token login automation
#!/bin/bash
# change this to the MAC of your device
MAC="XX:XX:XX:XX:XX:XX"
# get the CSRF token required for login
TOKEN=$(curl --silent --cookie COOKIE --cookie-jar COOKIE 'http://login.wifionice.de/de/' | grep CSRFToken | cut -d '"' -f 12)
@Nervengift
Nervengift / ice-status.sh
Last active December 5, 2021 20:16
statusline for German high speed trains (ICE)
#!/bin/bash
set -e
tripInfo=$(curl -s https://iceportal.de/api1/rs/tripInfo/trip|jq '.trip')
status=$(curl -s https://iceportal.de/api1/rs/status)
next=$(echo $tripInfo|jq '.stopInfo.actualNext as $next|.stops[]|select(.station.evaNr == $next)')
if [ -z "$next" ]; then
echo "Endstation"
exit 0
fi
@nauerster
nauerster / index.html
Created October 27, 2014 19:01
CSS - Fixed Header Variable Width Table // source http://jsbin.com/vajoy
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS - Fixed Header Variable Width Table</title>
<!-- CSS Includes -->
<link href="http://getbootstrap.com/dist/css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="http://netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<style id="jsbin-css">
/* http://www.ericknauer.info or https://github.com/nauerster */