# stop active raid
mdadm --stop /dev/md[01]
# destroy partition table on hdds
dd if=/dev/zero of=/dev/sda bs=1M count=512
dd if=/dev/zero of=/dev/sdb bs=1M count=512
# create new partition table
sgdisk -og /dev/sda
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -l data_status (curl -s https://iceportal.de/api1/rs/status) | |
set -l data_trip (curl -s https://iceportal.de/api1/rs/tripInfo/trip) | |
# next stop | |
echo (echo $data_trip | jq -r '([ .trip.stops[] | select(.info.passed==false) ] | |
| first).station.name') | |
# train number | |
echo (echo $data_trip | jq -r '"\(.trip.trainType)-\(.trip.vzn)"') | |
# speed | |
echo speed (echo $data_status | jq -r '"\(.speed) km/h"') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import grpc | |
import helloworld_pb2 | |
import helloworld_pb2_grpc | |
# you need to use secure port, | |
# otherwise call credentials won't be transmitted | |
def run(): | |
with open('server.crt', 'rb') as f: | |
trusted_certs = f.read() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################### | |
# LiveConfig mail path lookup by Jonas Friedmann (iWelt AG) # | |
# [email protected] # | |
# http://frd.mn # | |
# http://twitter.com/frdmn # | |
############################################################### | |
STRING=${1} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### General List of Reserved Words | |
### Stuart P. Bentley <[email protected]>, June 4, 2013 | |
## This is a general list of words you may want to consider reserving, | |
## in a system where users can pick any name, in a context where the | |
## system may use names as well. One prominent example of a system | |
## where this is the case would be a site that serves pages for users, | |
## at their username, from the site root, like | |
## http://twitter.com/stuartpb . In this system, you would want to | |
## reserve some routes for pages that would commonly be expected to |