- Install a base server with open ssh server enabled.
- Update the OS.
sudo apt-get update
sudo apt-get upgrade
- Install developement tools.
| # with a space, this doesn't work... | |
| $ ANSIBLE_ARGS='-t elasticsearch' vagrant provision | |
| ==> default: Running provisioner: ansible... | |
| ERROR: tag(s) not found in playbook: elasticsearch. possible values: apache,common,elasticsearch,java,passenger,postgresql,ruby | |
| Ansible failed to complete successfully. Any error output should be visible above. Please fix these errors and try again. | |
| # without the space, it now works... | |
| $ ANSIBLE_ARGS='-telasticsearch' vagrant provision |
sudo apt-get update
sudo apt-get upgrade
| #!/bin/sh | |
| # see https://bbs.archlinux.org/viewtopic.php?id=69589 | |
| usage="$0 Version $version Help\nDependencies: libnotify, alsa-utils\nusage:\n\t $0 [OPTIONS] -c COMMAND \nCOMMAND:\n-c\t up \n\t\t(increase volume by increment)\n\tdown \n\t\t(decrease volume by increment)\n\tmute \n\t\t(mute volume) \n\nOPTIONS:\n-i\t increment \n\t\t(the amount of db to increase/decrease)[default:2500] \n-m\t mixer \n\t\t(the device to change)[default:Master]" | |
| command= | |
| increment=2500 | |
| mixer="Master" |
I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.
From Require.js - Why AMD:
The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"
I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.
| /** | |
| * Mark and Sweep Garbage Collection technique. | |
| * MIT Style License | |
| * by Dmitry Soshnikov | |
| */ | |
| // This diff describes the simplest version of mark and sweep | |
| // GC in order to understand the basic idea. In real practice the | |
| // implementation can be much tricker and optimized. |
Authored by Peter Rybin , Chrome DevTools team
In this short guide we'll review some new Chrome DevTools features for "function scope" and "internal properties" by exploring some base JavaScript language concepts.
Let's start with closures – one of the most famous things in JS. A closure is a function, that uses variables from outside. See an example:
| // y-combinator | |
| macro $y { | |
| case ( $var ) => { | |
| function(){ | |
| return function(f){ | |
| return f(f) | |
| }(function(f){ | |
| return $var(function(x){ | |
| return f(f)(x); | |
| }) |
| /* | |
| Grep.js | |
| Author : Nic da Costa ( @nic_daCosta ) | |
| Created : 2012/11/14 | |
| Version : 0.2 | |
| (c) Nic da Costa | |
| License : MIT, GPL licenses | |
| Overview: | |
| Basic function that searches / filters any object or function and returns matched properties. |