what | where |
---|---|
how to attach to a running container | http://stackoverflow.com/questions/20932357/docker-enter-running-container-with-new-tty |
enable docker rest api | http://stackoverflow.com/questions/18038985/how-to-connect-to-docker-api-from-another-machine |
sshd considered harmful | http://jpetazzo.github.io/2014/06/23/docker-ssh-considered-evil/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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(); | |
} |
##get arguments
as array
var args = Array.prototype.slice.call(arguments);
see: http://devdocs.io/javascript/functions_and_function_scope/arguments
##find a regexps groups
var matches = /(hello \S+)/.exec('This is a hello world!');
alert(matches[1]);
Blogs
- http://lkrnac.net/blog/2014/05/multi-module-javascript-project/
- http://thanpol.as/grunt/Managing-large-scale-projects-with-Grunt/
- https://oncletom.io/2013/live-development-bower-component/#more
- http://briantford.com/blog/angular-bower
- http://www.thomasboyt.com/2013/09/01/maintainable-grunt.html
Tools
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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); |
- EcmaScript support: http://kangax.github.io/compat-table/
- HTML5/CSS3/ES5 support: http://caniuse.com/
ansible all -i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory -u vagrant --private-key .vagrant/machines/default/virtualbox/private_key -m ping
- find all commits introduced
<string>
and show diff - http://stackoverflow.com/questions/5816134/finding-a-git-commit-that-introduced-a-string-in-any-branch
git log -S <string> --source --all -p
- find all commits changing
<filename>
and show diff
git log --follow --all -p -- '*<filename>'
- remove remote and show side effects
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
OlderNewer