Skip to content

Instantly share code, notes, and snippets.

View mviitanen's full-sized avatar

Marko Viitanen mviitanen

  • Salt Lake City, UT
View GitHub Profile
@mviitanen
mviitanen / gist:5102461
Last active December 14, 2015 14:39
Hello Clojure
(javax.swing.JOptionPane/showMessageDialog nil "Hello World")
@mviitanen
mviitanen / create-jekyll-post.sh
Last active February 24, 2018 16:00
A shell script to create a new jekyll post. Maybe there is an easier way, but this script generates a basic markdown post for jekyll. It has head matter, samples of some common formatting, and a link to a more complete documentation of the format.
#!/bin/bash
if [ "$#" -ne 1 ] ; then
echo "Usage: $0 <title>" >&2
exit 1
fi
title=`echo "$1" |sed 's/ /-/g'`
fileName="_posts/`date +%Y-%m-%d-$title.markdown`"
@mviitanen
mviitanen / BufferTest.java
Created January 9, 2014 06:32
Java ByteBuffer demo
import java.nio.ByteBuffer;
public class BufferTest {
private ByteBuffer buffer;
public BufferTest(){
buffer = ByteBuffer.allocate(20);
}
public void runTest(){