I hereby claim:
- I am jtdowney on github.
- I am jtdowney (https://keybase.io/jtdowney) on keybase.
- I have a public key whose fingerprint is 64A1 17F1 DED3 DD44 E9A2 57C9 D297 3F2A F0FB D951
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
require 'openssl' | |
key = OpenSSL::PKey::DSA.generate 1024 | |
puts key.to_pem | |
cert = OpenSSL::X509::Certificate.new | |
cert.version = 2 | |
cert.serial = 1 | |
cert.subject = OpenSSL::X509::Name.new [['CN', 'Test CA']] | |
cert.issuer = cert.subject |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
) |
#![feature(slice_patterns)] | |
fn main() { | |
let foo: Vec<i32> = (1..10).collect(); | |
match foo.as_slice() { | |
[first, rest..] => println!("{:?} :: {:?}", first, rest), | |
[] => println!("empty"), | |
} | |
} |
package com.jtdowney; | |
import javax.net.ServerSocketFactory; | |
import javax.net.ssl.KeyManagerFactory; | |
import javax.net.ssl.SSLContext; | |
import javax.net.ssl.TrustManagerFactory; | |
import java.io.*; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
import java.security.KeyStore; |
#[macro_use] | |
extern crate error_chain; | |
mod errors { | |
error_chain! { | |
foreign_links { | |
Io(::std::io::Error); | |
} | |
} | |
} |
use std::env; | |
#[derive(Debug)] | |
enum Direction { | |
Left, | |
Right, | |
Up, | |
Down, | |
} |
extern crate itertools; | |
use itertools::Itertools; | |
use std::env; | |
use std::fs::File; | |
use std::io::{BufRead, BufReader}; | |
use std::result; | |
use std::str; | |
fn part1(input: &[Vec<String>]) { |
use std::collections::HashMap; | |
use std::env; | |
use std::fs::File; | |
use std::io::{Read, BufReader}; | |
use std::str; | |
fn solve(mut input: Vec<u32>) { | |
let length = input.len(); | |
let mut count = 0; | |
let mut history = HashMap::new(); |
#[macro_use] | |
extern crate error_chain; | |
mod errors { | |
error_chain!{ | |
foreign_links { | |
Io(::std::io::Error); | |
ParseInt(::std::num::ParseIntError); | |
} | |
} |