Skip to content

Instantly share code, notes, and snippets.

View cmdln's full-sized avatar

Thomas Gideon cmdln

View GitHub Profile
@cmdln
cmdln / gist:7b5ea3ee1ca1dc0da5a739877942f91d
Last active November 12, 2018 17:32
Debug display of openssl error
DEBUG - Failure(
MidHandshakeSslStream {
stream: SslStream {
stream: TcpStream {
addr: V4(
10.67.61.79:55726
),
peer: V4(
10.81.171.162:8085
),
@cmdln
cmdln / http.rs
Created November 12, 2018 16:49
Using self-signed client, server certificates with hyper, hypper-openssl, and openssl
use hyper::{client::HttpConnector, Body, Client};
use hyper_openssl::HttpsConnector;
use openssl::{
pkcs12::Pkcs12,
ssl::{SslConnector, SslMethod, SslVerifyMode},
x509::X509,
};
use error::*;
use resource;
### Keybase proof
I hereby claim:
* I am cmdln on github.
* I am cmdln (https://keybase.io/cmdln) on keybase.
* I have a public key ASBNDABuG4YEeaFHAhboMN35p0kPcRc-UZin904HLwSSvgo
To claim this, I am signing this object:
@cmdln
cmdln / gist:aba52ce5ad85a74848b35150f033e251
Created August 18, 2017 16:31
Trying to deserialize and borrow
#[derive(Debug, Serialize, Deserialize)]
pub struct EnvVar<'a> {
name: &'a str,
default: &'a str,
optional: bool,
}:
#[derive(Debug, Serialize, Deserialize)]
pub struct Config<'a> {
#[serde(borrow)]

Keybase proof

I hereby claim:

  • I am commandline on github.
  • I am cmdln (https://keybase.io/cmdln) on keybase.
  • I have a public key ASC0rw9NUHO457hSfnCko7GcWxbMyMmC8NjaBhJlYCq_jAo

To claim this, I am signing this object:

function initUbiquiStatus() {
/** Home page URL for this command set. */
const _HOME_PAGE = "http://bitbucketlabs.net/ubiqui-status/";
/** Icon from the StatusNet home page. */
const _ICON = "http://status.net/sites/default/files/favicon.ico";
/** Maximum character length for StatusNet updates. */
const _MAX_MSG_LEN = 140;
/** Styling for all commands and previews. */
const _STYLESHEET = "<style> " +
".container {" +