Skip to content

Instantly share code, notes, and snippets.

@vhermecz
vhermecz / bmrgeo.rb
Created January 27, 2021 10:59
Benchmark some RGeo operations
#!/usr/bin/env ruby
require 'benchmark/ips'
require 'rgeo'
Benchmark.ips do |x|
x.time = 5
x.warmup = 2
x.report("blank-1") do |times|
@vhermecz
vhermecz / LICENSE
Created July 6, 2020 22:40
This license applies to all public gists https://gist.github.com/vhermecz
MIT License
Copyright (c) 2020 Vajk Hermecz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@vhermecz
vhermecz / custom_keys_git_ssh
Created June 8, 2020 11:20
Allow configuring multiple ssh deploy keys with git
#!/bin/bash
# Script to use custom ssh keys for various git repositories
# Run without arguments to get usage info.
#
# How it works:
# When used with SSH, git sends the path to the repository in the SSH command.
# @see: https://github.com/git/git/blob/e870325/connect.c#L1268
# We extract this info and search for a key with the name.
# Based on the source, this seems to be used format since v2.0 at least.
# @see: https://github.com/git/git/commit/a2036d7