Skip to content

Instantly share code, notes, and snippets.

@leonardossz
leonardossz / SecureHttpServer.py
Created March 22, 2016 16:58
Python SimpleHTTPServer adapted to use Basic HTTP Authentication method.
# -*- coding: utf-8 -*-
import sys
import base64
import BaseHTTPServer
from SimpleHTTPServer import SimpleHTTPRequestHandler
class AuthenticationHandler(SimpleHTTPRequestHandler):

Ultimate SSH setup for EC2 Instances on AWS

My notes on how to nicely ssh into any EC2 instance you have access.

Incomplete probably :)

Tested on Ubuntu

$ lsb_release -a

No LSB modules are available.

Keybase proof

I hereby claim:

  • I am leonardossz on github.
  • I am leonardossz (https://keybase.io/leonardossz) on keybase.
  • I have a public key ASBwTOe1D-cZgiWZXbogK85LToNUs_KgnqufAGwNowG4Gwo

To claim this, I am signing this object:

@leonardossz
leonardossz / JsonTest.java
Last active January 10, 2017 09:16
From JsonArray to List using _only_ the Java portable API.
import org.testng.Assert;
import org.testng.annotations.Test;
import javax.json.Json;
import javax.json.JsonArray;
import javax.json.JsonObject;
import javax.json.JsonReader;
import java.io.StringReader;
import java.util.Arrays;
import java.util.List;