Skip to content

Instantly share code, notes, and snippets.

View William-Lake's full-sized avatar

William Lake William-Lake

  • State of Montana
View GitHub Profile
@William-Lake
William-Lake / GetCurrentWorkingDirectory.java
Created September 1, 2017 20:03
Java - Get current working directory
public static String workingDir = Paths.get(".").toAbsolutePath().normalize().toString();
@William-Lake
William-Lake / main.java
Last active September 18, 2017 18:45
How to create a BufferedImage from a bunch of smaller BufferedImages.
package main;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;
import javax.swing.JOptionPane;
@William-Lake
William-Lake / HowToSendEmailFromTerminal.md
Last active February 27, 2018 13:57
How to send email from terminal.

How to send email from Terminal

Instructions 3, 5 from here

Instruction 6 from here

  1. Install mutt
sudo apt-get install mutt
@William-Lake
William-Lake / MeasureElapsedTime.sh
Created June 28, 2017 21:41
Bash - Example of measuring elapsed time
#!/bin/bash
#############################################
# Determines how much time has elapsed.
#
# Takes advantage of the 'SECONDS' variable which is global environment variable in shell.
# 'SECONDS' is usually used by the environment to record how long it has been
# since a script was first executed.
#
# It's taken advantage of here to measure a length of time.