Skip to content

Instantly share code, notes, and snippets.

krisleech /
Last active June 1, 2023 07:27
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

danielmitterdorfer /
Created February 15, 2016 13:20
DNS Cache Sample
import java.util.Calendar;
import java.util.Optional;
public class DnsDemo {
public static void main(String[] args) throws Exception {
while (true) {
System.out.printf("%1$tH:%1$tM:%1$tS%n", Calendar.getInstance());
View em-http-retry.rb
require 'em-http' do
def dispatch(uri, retries = 0)
h =
h.callback { |rep| [:success, rep.response]; EM.stop }
h.errback do |rep|
p [:fail, rep]
jordansissel / Why
Created May 18, 2011 16:38
logstash, why jruby?
View Why

Long story, short: I'm totally open to supporting more rubies if possible. Details follow.

Related issue:


  • core and stdlib ruby changes violently and without notice and without backwards compatibility. I want nothing of that.
  • need a cross-ruby date library that isn't part of stdlib (see previous point) and is also good.
  • need an easy way to use multiple cpus that is cross-ruby (threads are not it)