Skip to content

Instantly share code, notes, and snippets.

View jtdowney's full-sized avatar

John Downey jtdowney

View GitHub Profile
# i3 config file (v4)
set $mod Mod4
font pango:Hack 10
floating_modifier $mod
focus_follows_mouse no
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Shift+q kill
bindsym $mod+d exec dmenu_run
@jtdowney
jtdowney / Dockerfile
Created January 10, 2019 15:44
Simple dockerfile for OpenJDK 11
FROM debian:stretch-slim
ENV OPENJDK_MAJOR=11
ENV OPENJDK_VERSION=11.0.1
ENV JAVA_HOME=/opt/jdk-${OPENJDK_VERSION}
ENV PATH=$JAVA_HOME/bin:$PATH
ADD https://download.java.net/java/GA/jdk${OPENJDK_MAJOR}/13/GPL/openjdk-${OPENJDK_VERSION}_linux-x64_bin.tar.gz /tmp/
RUN tar -C /opt -xf /tmp/openjdk-${OPENJDK_VERSION}_linux-x64_bin.tar.gz
#[macro_use]
extern crate error_chain;
extern crate regex;
mod errors {
error_chain! {
foreign_links {
Io(::std::io::Error);
Regex(::regex::Error);
ParseChar(::std::char::ParseCharError);
#[macro_use]
extern crate error_chain;
mod errors {
error_chain! {
foreign_links {
Io(::std::io::Error);
ParseInt(::std::num::ParseIntError);
}
}
#[macro_use]
extern crate error_chain;
mod errors {
error_chain! {
foreign_links {
Io(::std::io::Error);
ParseInt(::std::num::ParseIntError);
}
}
@jtdowney
jtdowney / day22.rs
Last active December 22, 2017 15:20
#[macro_use]
extern crate itertools;
use std::collections::HashMap;
use std::env;
use std::fs::File;
use std::io::{BufRead, BufReader};
#[derive(Clone, Copy, Debug, Eq, Hash, PartialEq)]
struct Point(isize, isize);
#[macro_use]
extern crate error_chain;
mod errors {
error_chain! {
foreign_links {
Io(::std::io::Error);
}
}
}
#[macro_use]
extern crate error_chain;
mod errors {
error_chain! {
foreign_links {
Io(::std::io::Error);
ParseInt(::std::num::ParseIntError);
}
}
@jtdowney
jtdowney / day19.rs
Last active December 19, 2017 18:50
use std::env;
use std::fs::File;
use std::io::{BufRead, BufReader};
#[derive(Copy, Clone, Debug)]
enum Direction {
Up,
Down,
Left,
Right,
#[macro_use]
extern crate error_chain;
mod errors {
error_chain! {
foreign_links {
Io(::std::io::Error);
ParseInt(::std::num::ParseIntError);
}
}