Skip to content

Instantly share code, notes, and snippets.

View rkh's full-sized avatar

Konstantin Haase rkh

View GitHub Profile
rskelley9 /
Last active October 31, 2023 10:28
Workaround: Connect your Chromecast to a Hotel Wireless Network


I recently relocated for new employment. I've been staying in an extended stay hotel for about 3 weeks now. The hotel I'm staying in gives its guests free Wifi access. However, it requires users to accept terms and conditions on a splash page via browser interface before they can use the network. This makes it difficult to use my Chromecast with the network, as it doesn't have a means of accessing that splash page. While I could call the IT help line, I decided to explore a work-around.

Like many networks, my hotel's network attempts to improve security by using MAC address filtering. Luckily, Mac OS X (10.4 - 10.10) makes it very easy to spoof your network card's MAC address.

Here's how to add a devices like Chromecast, AppleTV, Roku to a wireless network that requires a browser to authenticate and accept terms and conditions.

Before You Start

lmarburger / local_jump_error.rb
Created February 10, 2014 21:20
Return value from LocalJumpError
View local_jump_error.rb
begin { return 42 }.call
rescue LocalJumpError => e
puts "LocalJumpError: exit_value=#{e.exit_value}"
#=> "LocalJumpError: exit_value=42"
coffeemug / gist:6168031
Last active February 3, 2022 23:16
The fun of implementing date support
View gist:6168031
After spending the better part of the month implementing date support
in RethinkDB, Mike Lucy sent the team the following e-mail. It would
have been funny, if it didn't cause thousands of programmers so much
pain. Read it, laugh, and weep!
So, it turns out that we're only going to support dates between the
year 1400 and the year 10000 (inclusive), because that's what boost
jamiehodge / sequel_dot.rb
Created May 6, 2013 07:31
sequel DB diagrams
View sequel_dot.rb
#! /usr/bin/env ruby
# Usage:
# ruby sequel_dot.rb [SEQUEL-DATABASE-URI] >
# Or pipe directly to Graphviz:
# ruby sequel_dot.rb [SEQUEL-DATABASE-URI] | dot -Tgif > output.gif
# Note adapted from Jeremy Evans' and Rohit Namjoshi's son's code at
svenfuchs / gist:5364262
Last active December 16, 2015 02:39
Travis CI Office
View gist:5364262

The Travis CI office

How to get to the Travis CI office:

The address is Prinzessinnenstrasse 20, on the left driveway:

mattetti / tracepoint_middlware.rb
Created March 6, 2013 06:34
test middleware for Ruby 2.0 logging the method dispatches going on when a request is being handled.
View tracepoint_middlware.rb
class TracePoint
class Middleware
def initialize(app)
@app = app
def call(env)
stats = {}
trace = do |tp|
mattsoldo / pg_index_cache_hit_rate.sql
Last active March 15, 2022 18:26
Postgres Index Hit Rate and Cache Hit Rate
View pg_index_cache_hit_rate.sql
-- Index hit rate
WITH idx_hit_rate as (
relname as table_name,
round(100.0 * idx_scan / (seq_scan + idx_scan),2) as idx_hit_rate
FROM pg_stat_user_tables
ORDER BY n_live_tup DESC
View gist:3208179
require 'travis/support'
def as(user, &block)
Travis::Github.authenticated(User.find_by_login(user), &block)
def test_pr(owner, repo_name, id)
repo = Repository.find_by_owner_name_and_name(owner, repo_name)
user = repo.users.first
View .gitignore
paulmillr /
Last active February 19, 2024 11:33
Most active GitHub users (by contributions).

Most active GitHub users (

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

 .filter(user => user.followers > 1000)