- Accessible UK Train Times - Bookmarkable urls for journeys (eg. /leeds/scunthorpe
- BR Fares - Shows all the valid fares for a given route
- Open Train Times - Shows all the trains (except most freight) travelling through a given station
- Traintimes.im - Good for showing all the places you can get a direct train to from a given station.
- RailMiles Mileage Engine - Calculates distance between stations
- Timetables 2 - Create a timetable for a given station, including trains which don't actually stop.
- Trains Can Be Cheaper - Cheapest route finder, including split tickets
- National Rail Map
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
# A naive dns server with a Redis backend | |
# Set keys in Redis you want to be authoritative for (set google.com. 127.0.0.1) | |
# Tip: Use Redis's ttl functions to have temporary names | |
# Currently only does A records, feel free to fix that | |
# | |
# Licensed under the PSF License | |
# Thanks to: http://code.activestate.com/recipes/491264-mini-fake-dns-server/ | |
# Author: @Kaerast <alice@kaerast.info> | |
import socket |
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
openapi: 3.0.1 | |
info: | |
title: REST Proxy API | |
description: >- | |
The Confluent REST Proxy provides a RESTful interface to a Kafka cluster, making it easy to produce and consume messages, view the state of the cluster, and perform administrative actions without using the native Kafka protocol or clients. | |
<p>Some example use cases are</p> | |
<ul> | |
<li>Reporting data to Kafka from any frontend app built in any language not supported by official Confluent clients</li> | |
<li>Ingesting messages into a stream processing framework that doesn’t yet support Kafka</li> | |
<li>Scripting administrative actions</li> |
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: | |
debug : False # Debug mode, only for development | |
instance_name : "searx" # displayed name | |
contact_url: False # mailto:contact@example.com | |
enable_stats: False # activate /stats page - note: it may leak usage data | |
brand: | |
git_url: https://github.com/searx/searx | |
git_branch: master | |
issue_url: https://github.com/searx/searx/issues |
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
# MySQL | |
SELECT CONCAT(table_schema, '.', table_name), | |
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, | |
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA, | |
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx, | |
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size, | |
ROUND(index_length / data_length, 2) idxfrac | |
FROM information_schema.TABLES | |
ORDER BY data_length + index_length DESC | |
LIMIT 10; |
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
require 'net/http' | |
require 'json' | |
# We could just use localhost, but it's nice to print usable urls in debug | |
@jenkins = `hostname`.strip | |
# Get the list of jobs on the Jenkins instance | |
res = Net::HTTP.get_response(URI('http://'+@jenkins+'/api/json')) | |
jobs = JSON.parse(res.body)['jobs'] |
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
version: '2' | |
services: | |
zookeeper: | |
image: "confluentinc/cp-zookeeper:5.4.0" | |
hostname: zookeeper | |
ports: | |
- '32181:32181' | |
environment: | |
ZOOKEEPER_CLIENT_PORT: 32181 | |
ZOOKEEPER_TICK_TIME: 2000 |
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 -xe | |
# Parse server.properties to get Zookeeper hosts | |
ZK_HOST=$(grep 'zookeeper.connect=' /etc/kafka/server.properties | cut -d'=' -f 2) | |
# Find the most newly created directory of Kafka in the /opt directory | |
KAFKA_PATH=$(find /opt/ -maxdepth 1 -name kafka-2* -print0 | xargs -0 ls -d -1 -t | head -n1) | |
# Manually configured list of brokers to rebalance across (zero-indexed) | |
BROKER_LIST="0,1,2" |
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
function ezclone() { | |
# assumes cloning from a git@ url... | |
# clone to git_src by default | |
repo_base=~/git_src | |
if [[ "$1" == "golang" ]]; then | |
repo_base=~/go/src | |
shift | |
fi |
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
{ | |
"config": {"view": {"continuousWidth": 400, "continuousHeight": 300}}, | |
"data": {"name": "data-9f7cabe0332f8f1e8f65ae37f185d2a2"}, | |
"mark": "bar", | |
"encoding": { | |
"color": {"type": "nominal", "field": "Condition"}, | |
"column": {"type": "nominal", "field": "Condition"}, | |
"tooltip": {"type": "quantitative", "field": "sum"}, | |
"x": {"type": "nominal", "field": "Age group"}, | |
"y": {"type": "quantitative", "field": "sum"} |