Skip to content

Instantly share code, notes, and snippets.

@xowenx
xowenx / uploadImage.java
Created March 15, 2017 05:40
sample java code uploadImage
import java.io.File;
import java.io.IOException;
import org.apache.http.client.fluent.*;
import org.apache.http.HttpEntity;
import org.apache.http.entity.mime.MultipartEntityBuilder;
public class SendRequest
{
public static void main(String[] args) {
sendRequest();
@xowenx
xowenx / gist:e17b741c56f78416aac9
Last active August 29, 2015 14:21
iDRAC auto input
on tapPassword(userName, Passwd)
tell application "System Events"
set theProcesses to application processes
repeat with theProcess from 1 to count theProcesses
set theName to (name of process theProcess)
if theName contains "java" then
tell process theProcess
try
set frontmost to true
repeat with x from 1 to (count windows)
@xowenx
xowenx / keybase.md
Created February 6, 2015 12:12
keybase.md

Keybase proof

I hereby claim:

  • I am xowenx on github.
  • I am astrum (https://keybase.io/astrum) on keybase.
  • I have a public key whose fingerprint is A480 593F A37F 190C 2472 136D 3813 12CA 2851 56F4

To claim this, I am signing this object:

export ENV_AUTHORIZATION_FILE=$HOME/.env_auth
_dotenv_hash_pair() {
env_file=$1
env_shasum=$(shasum $env_file | cut -d' ' -f1)
echo "$env_file:$env_shasum"
}
_dotenv_authorized_env_file() {
env_file=$1