Skip to content

Instantly share code, notes, and snippets.

View Benjamin1021523's full-sized avatar

Benjamin Chang Benjamin1021523

View GitHub Profile
#!/bin/bash
# Logout current GitHub credentials and remove global user.name, user.email
echo -e "host=github.com\nprotocol=https\n" | git credential-osxkeychain erase
git config --unset-all --global user.name
git config --unset-all --global user.email
@lanimall
lanimall / gist:cb808a11a058f7fb620a
Last active December 7, 2023 09:49
SSL Protocol Tests - TLSv1.2
public class SSLProtocolTests {
public static void main(String[] args) throws Exception {
SSLContext context = SSLContext.getInstance("TLSv1.2");
context.init(null,null,null);
SSLSocketFactory factory = (SSLSocketFactory)context.getSocketFactory();
SSLSocket socket = (SSLSocket)factory.createSocket();
String[] protocols = socket.getSupportedProtocols();
@mschoebel
mschoebel / main.go
Created March 6, 2014 20:02
Snippet: login/logout (Golang)
package main
import (
"fmt"
"github.com/gorilla/mux"
"github.com/gorilla/securecookie"
"net/http"
)
// cookie handling