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

#Some links http://effectif.com/mac-os-x/installing-specific-version-of-homebrew-formula http://stackoverflow.com/questions/3987683/homebrew-install-specific-version-of-formula/4158763#4158763 https://github.com/Homebrew/homebrew-versions

#How to install particular version of a formula

  1. finding the commit of the formula change for the version your looking for:
  • cd $(brew --repository)
  • git log -- Library/Formula/<formula_name>.rb or git log -S '<version>' -- Library/Formula/<formula_name>.rb
  1. unlink previous installed version
@scheffield
scheffield / .gitconfig
Last active June 4, 2019 14:13
Setting up a dev mac
[user]
name = Max Scheffler
email = max@canva.com
[alias]
co = checkout
ci = commit
cia = !git add -A && git commit
ciad = !git add -A && git commit -m "."
st = status
br = branch