As easy as 1, 2, 3!
Updated:
- Aug, 08, 2022 update
configdocs for npm 8+ - Jul 27, 2021 add private scopes
- Jul 22, 2021 add dist tags
- Jun 20, 2021 update for
--access=public - Sep 07, 2020 update docs for
npm version
| %% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*- | |
| %% ex: ts=4 sw=4 et | |
| %% @author Kevin Smith <[email protected]> | |
| %% @copyright 2011 Opscode, Inc. | |
| -module(example). | |
| -behaviour(gen_server). | |
| -export([start_link/0]). |
| %% See LICENSE for licensing information. | |
| -module(cowboy_debug). | |
| -export([onrequest_hook/1]). | |
| -export([onresponse_hook/4]). | |
| onrequest_hook(Req) -> | |
| Method = to_string(extract(cowboy_req:method(Req))), | |
| Path = to_string(extract(cowboy_req:path(Req))), | |
| Params = params_to_string(extract(cowboy_req:qs_vals(Req))), |
| ################################################################## | |
| # /etc/elasticsearch/elasticsearch.yml | |
| # | |
| # Base configuration for a write heavy cluster | |
| # | |
| # Cluster / Node Basics | |
| cluster.name: logng | |
| # Node can have abritrary attributes we can use for routing |
Work in progress, I'll write this up properly when I'm done.
Almost all credit goes to @maxogden for putting me on to this and pointing me in the right direction for each of these items.
Prerequisites:
| ## Name of the riak node | |
| -name [email protected] | |
| ## Cookie for distributed erlang. All nodes in the same cluster | |
| ## should use the same cookie or they will not be able to communicate. | |
| -setcookie riak | |
| ## Heartbeat management; auto-restarts VM if it dies or becomes unresponsive | |
| ## (Disabled by default..use with caution!) | |
| ##-heart |
| function(iter, k) { | |
| var array = []; | |
| var count = 0; | |
| for (var val = iter(); val !== undefined; val = iter()) { | |
| count ++; | |
| if (array.length < k) | |
| array.push_back(val); | |
| else { | |
| var luck = rand() % count; | |
| if (luck < k) { |
Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.
Prerequisites (for Homebrew at a minimum, lots of other tools need these too):
xcode-select --install will prompt up a dialog)Install Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
This page collects common comments made during reviews of Go code, so that a single detailed explanation can be referred to by shorthands. This is a laundry list of common mistakes, not a style guide.
You can view this as a supplement to http://golang.org/doc/effective_go.html.
Please discuss changes before editing this page, even minor ones. Many people have opinions and this is not the place for edit wars.