Skip to content

Instantly share code, notes, and snippets.

/**
* LazySingleton#getInstance instatiate a singleton on the first request.
*
* Due to the loading behavior of static fields, this aproach is guaranteed to be thread safe.
*/
public final class LazySingleton {
private static class InstanceHolder {
public static final LazySingleton INSTANCE = new LazySingleton();
}
// http://www.codewars.com/kata/540afbe2dc9f615d5e000425/train/javascript
var Sudoku = function(data)
{
// Private methods
// -------------------------
var n = data.length;
var rows = data;
var collumns = calcCollumns(data);
var blocks = calcBlocks(data);

ansible all -i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory -u vagrant --private-key .vagrant/machines/default/virtualbox/private_key -m ping

mount
# apply /etc/fstab changes
sudo mount -a
# get disk information and UUIDs
bklid
sudo fdisk -l
diskutil verifyVolume /dev/disk2
# fill disk with zeros
sudo dd if=/dev/zero of=/dev/diskX