Skip to content

Instantly share code, notes, and snippets.

@krisleech
krisleech / renew-gpgkey.md
Last active April 17, 2024 23:41
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:

@tgray
tgray / hdcd-decode.md
Created July 5, 2020 18:50
HDCD decoding

HDCD decoding

The following used [ffmpeg][] to detect and decode files, and [sox][] to adjust gain.

Detection

The following shell script will detect HDCD files that were ripped bit-perfect (EAC/XLD).

#!/bin/sh -
@jordansissel
jordansissel / Why JRuby.md
Created May 18, 2011 16:38
logstash, why jruby?

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

Related issue: http://code.google.com/p/logstash/issues/detail?id=37

Summary:

  • 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)
@danielmitterdorfer
danielmitterdorfer / DnsDemo.java
Created February 15, 2016 13:20
DNS Cache Sample
import java.net.InetAddress;
import java.net.UnknownHostException;
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());
printAddressInfo(addressOf("www.google.com"));
require 'em-http'
EM.run do
def dispatch(uri, retries = 0)
h = EM::HttpRequest.new(uri).get
h.callback { |rep| [:success, rep.response]; EM.stop }
h.errback do |rep|
p [:fail, rep]