Skip to content

Instantly share code, notes, and snippets.

@yousefamar
yousefamar / WebLogin.java
Created September 21, 2014 17:30
An example of command-line login into a web server using Java
import java.io.*;
import java.net.*;
public class WebLogin {
public static String login(String username, String password) {
//TODO: Add version parameter.
String parameters = "username="+username+"&password="+password;
HttpURLConnection connection = null;
try {
@yousefamar
yousefamar / spawn.sh
Last active August 29, 2015 14:06
Runs a command multiple times in new terminals with different arguments
#!/usr/bin/sh
#
# Runs a command multiple times in new terminals with different arguments
#
# Authors:
# Yousef Amar <yousef@amar.io>
#