Skip to content

Instantly share code, notes, and snippets.

View atog's full-sized avatar

Koen Van der Auwera atog

View GitHub Profile
atog /
Created November 7, 2018 12:14
Simple Java Android JSON API call to get Current DateTime
public Calendar getWorldClockCurrentDateTime() {
URLConnection connection = new URL("").openConnection();
BufferedReader bfr = new BufferedReader(new InputStreamReader(connection.getInputStream()));
JSONObject dateTimeJson = new JSONObject(bfr.readLine());
Date date = dateParser.parse(dateTimeJson.getString("currentDateTime"));
Calendar rvalue = Calendar.getInstance();
return rvalue;

Keybase proof

I hereby claim:

  • I am atog on github.
  • I am atog ( on keybase.
  • I have a public key whose fingerprint is 2B3B 8F7A 9009 11F7 3E67 03F5 7B29 9633 E6C5 A1D4

To claim this, I am signing this object:

require 'psych'
class MemoryPicker
STORAGE_NAME = "picked.yml"
def initialize(path)
@path = path
@storage = read_or_initialize_storage
set -g default-command fish
# Easy config reload
bind-key R source-file ~/.tmux.conf \; display-message "tmux.conf reloaded."
# vi is good
setw -g mode-keys vi
set-option -g default-terminal screen-256color
bind-key : command-prompt
atog / ghost_migrate.rb
Created March 21, 2018 14:44
Migrate Ghost json export to Markdown files for static generation
require 'json'
require 'open-uri'
class GhostMigrate
attr_accessor :archive, :posts, :tags, :posts_tags, :template, :base_url
def run(filename, url)
@archive = JSON.parse(
@posts = archive["db"][0]["data"]["posts"]
atog /
Created February 15, 2018 13:45
Install Ruby 1.9.3 with rbenv
curl -fsSL | env PKG_CONFIG_PATH=/usr/
lib/openssl-1.0/pkgconfig:/usr/lib/pkgconfig rbenv install --patch 1.9.3-p551
atog / alacritty_seagull.txt
Created February 1, 2018 10:39
Alacritty Seagull Color Scheme
# Colors (Seagull)
# Default colors
background: '0xffffff'
foreground: '0x61707a'
# Normal colors
<?xml version="1.0"?>
<opml version="1.1">
<title>Castro 2 Podcast Feeds</title>
<outline xmlUrl="" text="Ctrl-Walt-Delete" title="Ctrl-Walt-Delete" type="rss" version="RSS"/>
<outline xmlUrl="" text="Upgrade" title="Upgrade" type="rss" version="RSS"/>
<outline xmlUrl="" text="Tech45" title="Tech45" type="rss" version="RSS"/>
<outline xmlUrl="" text="De Correspondent" title="De Correspondent" type="rss" version="RSS"/>
# install the 't' gem: httjp://
# set the path to the executable
t_cmd = '~/.rbenv/shims/t'
followings = `#{t_cmd} followings`.split /\s/
whois_cmd = "#{t_cmd} whois "
activity = {}
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
index 8c04cb5..132d803 100644
--- a/ext/openssl/extconf.rb
+++ b/ext/openssl/extconf.rb
@@ -104,6 +104,9 @@