text:
# Lab 02:
# basic-express-server

Basic express server created with focus on modularized code and use of route and app level middleware.

## Links & Resources
[Pull Requests](https://github.com/thornrae/basic-express-server/pull/2)

[ci/cd](https://github.com/thornrae/basic-express-server/actions)

[Heroku Deployment](https://basic-express-server-401.heroku.app)

## Set Up
PORT=3000

## Initialize
npm i express jest supertest

### Needed
Node.js, JavaScript, Express, Jest

### Change Log
2-24-2021 --> server built, app level middleware, passing route tests
2-25-2021 -->  functional route level middleware

### UML
![UML](basicexpressserveruml.png)

repository: thornrae/basic-express-server

repo_name: thornrae/basic-express-server


text:
# BOOTSTRAPPER

Bootstrapper is an in-progress replacement for Chef's `knife bootstrap`.
It's capable of bootstrapping a host using omnibus packages and running
chef-client on it, however, input validation and error messaging are
minimal. This means that when things go wrong, you may need to read the
code to understand why. If you're uncomfortable with this, you should
probably avoid using it for now.

## Using It

`bootstrapper` is only available via git for now. To install it:

1. git clone
2. bundle install

`bootstrapper` currently does not read any bootstrap definitions by
default (this will change). To see the options available in the default
bootstrap from your git clone:

    bundle exec bin/bootstrap -f lib/bootstrapper/bootstraps/default.rb -h # lists all known boostrap commands
    bundle exec bin/bootstrap -f lib/bootstrapper/bootstraps/default.rb omnibus-unix -h # shows options for omnibus-unix bootstrap

Note that `bootstrapper` is a standalone CLI program. Though it is
intended to be used with Chef, it does not read any standard Chef
configuration files. The only mechanism to set default values is in a
bootstrap definition file. Since this file is pure ruby code, you can
hack in some logic to set the default values if you need to. This
limitation may change in the future.

## Design

### Defining a Bootstrap

The primary interface to _bootstrapper_ is a bootstrap definition file.
This file specifies which components are used to bootstrap a host, and
configures default settings for each component.

A node is bootstrapped by three cooperating components:

#### Transport

Transport is an implementation of some remote command protocol. For Unix
systems, this typically means SSH.

#### Config Generator

The config generator is responsible for generating any credentials and
configuration needed to run Chef on the remote machine.

The default `chef_client` config generator communicates with your Chef
server to create a client identity and node object before the bootstrap
runs, so use of the validator client is avoided.

#### Installer

The installer gets Chef installed on the remote box. The default
installer uses the `install.sh` script to install an Omnibus package.
This may change in the future.

### Command Line

Each bootstrap definition is compiled into a subcommand of the
`bootstrap` command. For example, the default bootstrap definition in
this source tree is named "omnibus_unix", so it is invoked by running
(caveat: all bootstrap files must be loaded explicitly for now, see
above):

    bootstrapper omnibus-unix [options]

Each component declares a set of options that it supports. When a
bootstrap is compiled into a subcommand, support for each option is
added to the CLI, so that any option can be set on a per-invocation
basis.

## Goals

`knife bootstrap` exists and works, so why this?

* Bootstrap nodes without using the validator: By moving client and node
creation up front (before SSH-ing in and running the installer),
authentication issues and naming conflicts are found quickly and can be
resolved ahead of time, automatically. In addition, server-side auditing
is on the roadmap for Chef server, so it's better to use everyone's real
identity than rely on the more-or-less anonymous validator.
* Use SCP to install configuration: The current bootstrap passes all
data in via a single bash command, which means sensitive data is visible
in the argv of the bootstrap process. Bootstrapper, by, contrast, uses
SCP to copy credentials to the remote node.
* Modular design: The current boostrap relies on templated shell scripts
for customization. This results in a ton of copy-pasta'd code, since the
entire bootstrap process must be performed by the resulting script, even
though most users simply wish to customize the install process. By
separating config generation, installation, and SSH session handling,
each piece of functionality can be re-used or customized in isolation.

## License:
Apache 2 License.

repository: fujin/bootstrapper

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: fujin/bootstrapper


text:
---
layout: post
title: "Wednesday 06.27.18 -  CrossFit"
teaser: "A.  Power Snatch 6 x 3
 B.  10 Rounds For Time of Burpees, Strict Muscle-Ups, and Alternating One-Arm Dumbbell Snatches"
date: 2018-06-27 00:00:00
categories: wodup
tags: wods wednesday
header: no
---

A.  Power Snatch 6 x 3

Every 2 minutes, for 12 minutes (6 sets):
3 Power Snatches

B.  10 Rounds For Time of Burpees, Strict Muscle-Ups, and Alternating One-Arm Dumbbell Snatches

10 Rounds for Time:
– 10 Burpees
– 1 Strict Muscle-Up
– 10 Alternating One-Arm Dumbbell Snatches @ 22.5/15 kg

View on WodUp

#### Compare to other Wednesdays
{: .t60 }

{% include list-posts tag='wednesday' %}

license: MIT

branch_name: refs/heads/gh-pages

gha_language: JavaScript

gha_license_id: MIT


text:
# Type: decimal

A real number with arbitrary precision that conforms to the xsd:decimal specification

URI: [meta:Decimal](https://w3id.org/linkml/Decimal)

|  |  |  |
| --- | --- | --- |
| Root (builtin) type | | **Decimal** |

## Other properties

|  |  |  |
| --- | --- | --- |
| **Broad Mappings:** | | schema:Number |

repository: linkml/linkml

branch_name: refs/heads/main

gha_language: Python

repo_name: linkml/linkml


text:
# Compiles a 32-bit version of Julia

Needed because we want to disable threading. Threading complicates the compiled bitcode.

Based on:

https://github.com/staticfloat/julia-docker/blob/9488b7029828895187ea1939d397e9ce40f107fa/julia/build/v0.6.0-rc2/Dockerfile.x86

Use:

```
docker build -t j32 .
docker run -v $(pwd):/work j32
```


text:
RHEL-AD
=========

This role installs the required packages on a RedHat machine to join a Microsoft Active Directory domain, including using the sshPublicKeys attribute in AD to permit storing SSH public keys in Active Directory

Requirements
------------

easy_install - this role will use easy_install to install Pip. Pip is not installed by default on RHEL7

Role Variables
--------------

|Variable Name|Description|Example|Required|
|---|---|---|---|
|packages|list of software required to join AD|See defaults/|No|
|ad_user|Username to join AD|first.last|Yes|
|ad_pass|Password to join AD|password1|Yes|
|linux_ou|DN of the OU to join|OU=Linux,DC=domain,DC=tld|Yes|
|domain_name|Domain name to join|domain.tld|Yes|

Dependencies
------------

None

Example Playbook
----------------

```
- hosts: ALL
  tasks:
  - name: Join to AD
	import_role:
	  name: Linux-AD-Join
	vars:
	  ad_user: "{{ first.last.admin }}"
	  ad_pass: "{{ hostvars.localhost.ad_pass }}"
	  linux_ou: "{{ OU=Linux,DC=domain,DC=tld }}"
	  domain_name: "{{ domain.tld }}"

```

License
-------

BSD

Author Information
------------------

https://github.com/rikairchy

repository: Rikairchy/rhel-ad

repo_name: Rikairchy/rhel-ad


text:
# Rainbow table hash reverse report

Name: Clemence Goh (1002075)

---
- For 5 letter plaintext passwords and 6 letter salted passwords:

| Length of plaintext passwords | Number of rainbow tables used | Total time taken |
| --- | --- | --- |
| 5 | 3 | 8.61 s |
| 6 | 6 | 16.48 s |

The time taken for salted hashes are significantly longer,
since the is a need to look through permutations of 6 letters instead of 5.


text:
# Daily Standup

## Oscar K

### Planning to do until next Standup:

[CityRepository.cs](https://sebastianjones.atlassian.net/browse/FGC-46)
[ICityRepository.cs  ](https://sebastianjones.atlassian.net/browse/FGC-47)

### Do you need any extra resources?:

None that he can think of.

## Oskar M

### Planning to do until next Standup:

[Revamp controllers to work with repos  ](https://sebastianjones.atlassian.net/browse/FGC-93)

### Do you need any extra resources?:

None that he can think of.

## Sebastian J

### Planning to do until next Standup:

[Repository.cs](https://sebastianjones.atlassian.net/browse/FGC-99)
[IRepository.cs  ](https://sebastianjones.atlassian.net/browse/FGC-100)
[Revamp UserRepository and IUserRepository  ](https://sebastianjones.atlassian.net/browse/FGC-92)

### Do you need any extra resources?:

None that he can think of.

## William L

### Planning to do until next Standup:

1. [Add test sln file](https://sebastianjones.atlassian.net/browse/FGC-98)
2. [Set up Test Environment](https://sebastianjones.atlassian.net/browse/FGC-6)

### Do you need any extra resources?:

None that he can think of.

# **<u>Keeper of this sprint review:</u>**

William

repository: PontusGillenang/RestAPIFriendFinder

repo_name: PontusGillenang/RestAPIFriendFinder


text:
[![reffect logo](https://raw.githubusercontent.com/acacode/reffect/master/assets/reffect.png)](https://github.com/acacode/reffect)
[![npm](https://img.shields.io/npm/v/@reffect/core?style=flat-square&color=blue)](https://www.npmjs.com/package/@reffect/core)
[![npm bundle size](https://img.shields.io/bundlephobia/minzip/@reffect/core?style=flat-square&color=blue)](https://bundlephobia.com/result?p=@reffect/core)
[![license](https://img.shields.io/github/license/acacode/reffect?style=flat-square&color=blue)](https://github.com/acacode/reffect)

Reffect — is a declarative and reactive multi-store state manager for JavaScript/TypeScript applications inspired by [Reatom](https://github.com/artalar/reatom) and [Effector](https://github.com/zerobias/effector)

## Packages

- [`@reffect/core`](https://github.com/acacode/reffect/tree/master/packages/core) - main features (creating stores and effects)
  [![npm](https://img.shields.io/npm/v/@reffect/core?style=flat-square&color=blue)](https://www.npmjs.com/package/@reffect/core) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/@reffect/core?style=flat-square&color=blue)](https://bundlephobia.com/result?p=@reffect/core)
- [`@reffect/react`](https://github.com/acacode/reffect/tree/master/packages/react) - bindings for [React](https://github.com/facebook/react)
  [![npm](https://img.shields.io/npm/v/@reffect/react?style=flat-square&color=blue)](https://www.npmjs.com/package/@reffect/react) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/@reffect/react?style=flat-square&color=blue)](https://bundlephobia.com/result?p=@reffect/react)
- [`@reffect/logger`](https://github.com/acacode/reffect/tree/master/packages/logger) - store middleware to log each store update
  [![npm](https://img.shields.io/npm/v/@reffect/logger?style=flat-square&color=blue)](https://www.npmjs.com/package/@reffect/logger) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/@reffect/logger?style=flat-square&color=blue)](https://bundlephobia.com/result?p=@reffect/logger)
- [`@reffect/localstore`](https://github.com/acacode/reffect/tree/master/packages/localstore) - store middleware to synchronize store with local storage key
  [![npm](https://img.shields.io/npm/v/@reffect/localstore?style=flat-square&color=blue)](https://www.npmjs.com/package/@reffect/localstore) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/@reffect/localstore?style=flat-square&color=blue)](https://bundlephobia.com/result?p=@reffect/localstore)
- [`@reffect/undoable`](https://github.com/acacode/reffect/tree/master/packages/undoable) - store extension which provides undo/redo effects and store history
  [![npm](https://img.shields.io/npm/v/@reffect/undoable?style=flat-square&color=blue)](https://www.npmjs.com/package/@reffect/undoable) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/@reffect/undoable?style=flat-square&color=blue)](https://bundlephobia.com/result?p=@reffect/undoable)
- [`@reffect/strict`](https://github.com/acacode/reffect/tree/master/packages/strict) - store middleware for making store updates more strict
  [![npm](https://img.shields.io/npm/v/@reffect/strict?style=flat-square&color=blue)](https://www.npmjs.com/package/@reffect/strict) [![npm bundle size](https://img.shields.io/bundlephobia/minzip/@reffect/strict?style=flat-square&color=blue)](https://bundlephobia.com/result?p=@reffect/strict)

## Install

Before at all you need to install the main package:

```bash
$ npm i -S @reffect/core
# or using yarn
$ yarn install @reffect/core
```

If a project is using [React](https://github.com/facebook/react) you need to install [@reffect/react](https://github.com/acacode/reffect/tree/master/packages/react) (pack of React hooks which simplify usage with React application)

```bash
$ npm i -S @reffect/react
```

## Examples

Simple counter

```ts
import { store, effect, manage } from "@reffect/core";

const counter = store({ value: 0 });

const plus = effect(counter, (num: number) => ({ value: counter.value + num }));
const plus10 = effect(counter, () => plus(10));

const unsubscribe = manage(counter).subscribe((update, prevState, currState) =>
  console.log(update, prevState, currState),
);

plus(10);
plus10();

console.log(counter.value); // 20
```

Async effects

```ts
import { store, effect, manage } from "@reffect/core";
import { logger } from "@reffect/logger";

export const usersStore = store("users-store", { list: [] }, [logger]);

export const getUsers = effect(usersStore, async () => {
  const allUsers = await api.getAllUsers();

  return {
    list: allUsers,
  };
});

getUsers(); // Promise<void>
```

React usage

```tsx
import React from "react";
import { usersStore, getUsers } from "./above-example.ts";
import { useStore, useEffectState } from "@reffect/react";

export const UsersList = () => {
  const users = useStore(usersStore);
  const { loading, done, error } = useEffectState(getUsers);

  return (
    <ul>
      {!loading && done && users.list.map(user => <li>{user.name}</li>)}
      {loading && "Loading..."}
      {error && "Error!"}
    </ul>
  );
};
```

## How it works

![Data flow diagram](https://raw.githubusercontent.com/acacode/reffect/master/assets/diagram.png)

repository: acacode/reffect

gha_language: TypeScript

repo_name: acacode/reffect


text:
# Changelog

All notable changes to `proposal-page/sdk-js` will be documented in this file.

## 0.4.0 - 2019-05-14
- added the `acceptProject` method to create a accept intent for a project.
- added the `confirmProjectAcceptance` method to confirm the accept intent for a project.
- added the `revertProjectAcceptance` method to revert the acceptance of a project.

## 0.3.0 - 2019-05-06
- added the optional parameter `title` (default = null) to the listProjects method.
- it's possible to list projects by title.

## 0.2.0 - 2019-04-30
- added the optional parameters `page` (default = 1) and `itemsPerPage` (default = 6) to the listTemplates method.
- it's possible to list project templates with a specific page and with a specific quantity of items per page.
- added the optional parameters `page` (default = 1) and `itemsPerPage` (default = 6) to the listProjects method.
- it's possible to list projects with a specific page and with a specific quantity of items per page.

## 0.1.0 - 2019-04-23

- initial release

repository: proposal-page/sdk-js

repo_name: proposal-page/sdk-js


text:
# Spark Training
Spark Training project is a series of exercises design for intermediary Spark users. It is recommended for students with at least one year practical experience running Spark on Hadoop systems.

## Requisites
Access to a Hadoop system with Spark 1.6 or greater.

## Usage
After cloning Spark Training navigate to its folder, and lis all branches:
```bash
$ git branch
  exercise-01/window-functions
  exercise-02/hash-partitioner
  exercise-03/range-partitioner
  exercise-04/parallelism-level
  exercise-05/sizing-a-session
* master
  solution-01/window-functions
  solution-02/hash-partitioner
  solution-03/range-partitioner
  solution-04/parallelism-level
  solution-05/sizing-a-session
```
There are 5 exercises and the corresponding solutions. To navigate to a selected exercise/solution:
```bash
$ git checkout <branch-name>
```
## Data Generation
Exercises make use of two tables: `products` and `contracts` data.

Data can be generated launching Spark jobs running scripts in scripts folder, respectively for creation and deleting:

```bash
$ bash scripts/spark_submit_create_data.sh
$ bash scripts/spark_submit_delete_data.sh
```

The scripts are parametrized with the json file `app/data/resources/config.json`.

**Note**: for the `contracts` data around 200 M rows are necessary. To parallelize the data from the driver data must be generated in multiple batches.

## Authors
*   [Ricardo Miranda](https://github.com/ricardomiranda)
*   [Raul Ferreira](https://github.com/raufer) - This repository is a fork from Raul Ferreira's [Spark Training](https://github.com/raufer/spark-training)

## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details

repository: raufer/spark-training

repo_name: raufer/spark-training


text:
# fng-select2

Plugin for forms-angular that adds select2 support.

## Usage

    bower install fng-select2

Add the following lines to your index.html (or equivalent) file

    <link rel="stylesheet" href="/bower_components/select2/select2.css">
    <script src="/bower_components/jquery/jquery.js"></script>
    <script src="/bower_components/angular-ui-select2/src/select2.js"></script>
    <script src="/bower_components/select2/select2.js"></script>

In your Mongoose schemas you can set up fields like this:

    colour: {type: String, enum: ['Red', 'Orange', 'Yellow', 'Green', 'Blue', 'Indigo', 'Violet'], form:{select2:true}}
    lookup: { type: Schema.Types.ObjectId, ref: 'anotherModel', form: {select2: {}}},

In this case forms-angular will look up all the values in the anotherModel collection when the form is loaded.  In the
case where the collection is large you should use the fngAjax option

    lookup2: { type: Schema.Types.ObjectId, ref: 'largeModel', form: {select2: {fngAjax:true}}}

which instructs the program to use ajax calls to query the server rather than downloading the table.

license: ISC,MIT

repository: amitbend/CCFORM

detected_licenses: ISC MIT

repo_name: amitbend/CCFORM


text:
Alternative Go JSON parser

# features

Supported types to unmarshal into:

 * int
 * float64
 * string
 * bool
 * RawMessage
 * structs made of all of these
 * slices made of all of these
 * pointers to all of these
 * map[string]{all of these}

Other basic types would be easy to add; I have not needed them yet. Note that the empty interface is not supported.

# vs. encoding/json

 * this works on a string, not a []byte
 * encoding/json has nice error messages
 * encoding/json can decode to the empty interface
 * encoding/json supports the Unmarshaler interface

# performance

For the use case I'm mostly interested in (parsing openRTB requests) I get
twice the performance and half the allocs:

BenchmarkRTB-4       	   50000	     29093 ns/op	    2536 B/op	      39 allocs/op
BenchmarkRTBThem-4   	   20000	     63858 ns/op	    3888 B/op	      87 allocs/op

Similar for parsing large ElasticSearch bulk results:

BenchmarkESbulk-4    	    3000	    473237 ns/op	  177979 B/op	     830 allocs/op
BenchmarkESbulkThem-4	    2000	   1055068 ns/op	  200884 B/op	    2283 allocs/op

# status

Works fine for us.

[![Build Status](https://travis-ci.org/alicebob/json.svg?branch=master)](https://travis-ci.org/alicebob/json)

[![GoDoc](https://godoc.org/github.com/alicebob/json?status.svg)](https://godoc.org/github.com/alicebob/json)

repository: realzeitmedia/legos

gha_language: Go

repo_name: realzeitmedia/legos


text:
# PipelineConfig

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Source** | **string** | The source configuration for the pipeline, before any config compilation has been performed. If there is no config, then this field will be empty. | [default to null]
**Compiled** | **string** | The compiled configuration for the pipeline, after all orb expansion has been performed. If there were errors processing the pipeline's configuration, then this field may be empty. | [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


text:
# Crossplane-Runtime

## Overview

Crossplane-Runtime is a set of go libraries used to build Kubernetes controllers in Crossplane and its related stacks.

## Getting Started and Documentation

For getting started guides, installation, deployment, and administration, see our [Documentation](https://crossplane.io/docs/latest).

## Contributing

Crossplane-Runtime is a community driven project and we welcome contributions. See the Crossplane [Contributing](https://github.com/crossplaneio/crossplane/blob/master/CONTRIBUTING.md) guidelines to get started.

## Report a Bug

For filing bugs, suggesting improvements, or requesting new features, please open an [issue](https://github.com/crossplaneio/crossplane-runtime/issues).

## Contact

Please use the following to reach members of the community:

- Slack: Join our [slack channel](https://slack.crossplane.io)
- Forums: [crossplane-dev](https://groups.google.com/forum/#!forum/crossplane-dev)
- Twitter: [@crossplane_io](https://twitter.com/crossplane_io)
- Email: [info<EMAIL_ADDRESS>
## Roadmap

Crossplane-Runtime goals and milestones are currently tracked in the Crossplane repository. More information can be found in [ROADMAP.md](https://github.com/crossplaneio/crossplane/blob/master/ROADMAP.md).

## Governance and Owners

Crossplane-Runtime is run according to the same [Governance](https://github.com/crossplaneio/crossplane/blob/master/GOVERNANCE.md) and [Ownership](https://github.com/crossplaneio/crossplane/blob/master/OWNERS.md) structure as the core Crossplane project.

## Code of Conduct

Crossplane-Runtime adheres to the same [Code of Conduct](https://github.com/crossplaneio/crossplane/blob/master/CODE_OF_CONDUCT.md) as the core Crossplane project.

## Licensing

Crossplane-Runtime is under the Apache 2.0 license.

[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fcrossplaneio%2Fcrossplane-runtime.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fcrossplaneio%2Fcrossplane-runtime?ref=badge_large)

repository: hasheddan/crossplane-runtime-temp

repo_name: hasheddan/crossplane-runtime-temp


text:
# Supported Bindings

Currently we support three kinds of bindings:
  1. `oneWay` -> handle changes from `ViewModel` to `View`
  2. `twoWay` -> handles changes in both directions between `ViewModel` <-> `View`
  3. `oneWayToSource` -> handles changes from `View` to `ViewModel`

## One Way Bindings

`oneWay` bindings handle changes from a `Observable` or functional expression on a specific `View`.

The changes from an `ObservableField` come directly from the instance, while changes
from an expression need explicit wiring to determine for which property it came from.

### Flow
expression or `ObservableField.value` -> `Output` -> `View` -> `View` property set from `Output`

The expression or `ObservableField.value` is considered the `Input` which can get transformed in the `Output` phase,
which then applies to the `View` via Setter methods.  This library provides a few default out-of-the-box methods as conveniences. These are fully extensible and customizable.

The expression syntax is required to register to changes on a specific `KProperty` or `MyViewModelClass::someField`. Then whenever we want that expression to get reevaluated, we need to `notifyChange(MyViewModelClass::someField)` on the registered parent object, or `ViewModel`.

```kotlin

textView {
    bindSelf(MyViewModelClass::someField)
    { viewModel.someField }
      .toText(this)
}

```

Just by specifying this alone is not enough to get changes from that expression. We also need to, whenever that property is `set`, notify to our parent `viewModel` that a change occurred:

```kotlin

class MyViewModelClass : BaseObservable() {

  var someField = ""
  set(value) {
    field = value
    notifyChange(this::someField)
  }
}

```

When we call `notifyChange` that expression `{ viewModel.someField }` runs again
and the `textView` (in this example) updates its `text` with the result of that expression.

The expression syntax is very useful when we want to update UI based on our field's value.
Take, in an e-commerce app we want to display the number of items in the cart. The value is an `Int` but we want to update the UI whenever that count of items changes.  We define an `ObservableField<Int>` and bind it to the view:

```kotlin

textView {
    bind { viewModel.count }
      .on { string(R.string.someFormattedString, plural(R.plural.somePlural, it)) } // helper methods for `View.context`
      .toText(this)
}

```

So now whenever we call `viewModel.count.value = newValue`, the expression reruns and the UI updates!

To specify this example on a custom text setter:
```kotlin

textView {
    bind { viewModel.count }
      .on { string(R.string.someFormattedString, plural(R.plural.somePlural, it)) } // helper methods for `View.context`
      .toView(this, { view, value ->
          text = value
        })
}

```

## One Way To Source Bindings

`oneWayToSource` is the reverse of `oneWay`. It specifies that we want changes from the UI to send back data to our `ViewModel` via an `ObservableField` or expression.

Since Views will send back results to the expression or `ObservableField`, registering is a little different. We must first bind a `View` via a `ViewRegister`. `ViewRegister` are an abstract class that handle registering and unregistering specific listeners on `View`. For example, a `OnTextChangedRegister()` adds a `TextWatcher` on a `TextView` and receives callbacks when text changes. That result is then passed along to the expression or `ObservableField`.

### Flow
`View` -> `Output` -> `Input` -> expression or `ObservableField.value`

The `ViewRegister` knows how to convert the view's data to an `Output`, then the `on` clause specifies a potential conversion into another type `Input`.
Then the `Input` gets sent to the expression or `ObservableField.value` for updating.
For example:

```kotlin

textView {
    bind(this)
      .onSelf() // String updates from `text`
      .toObservable  { it.name }

    // or custom update method
    bindSelf(this).to { vm, input, view ->
      // viewmodel might be null
      vm?.let { vm ->
        // assign data to the viewmodel
        vm.name = input
      }
    }
}

```

For convenience, we provide a set of default `bind()` and `ViewRegister` that you can use out of the box. These are completely extensible and customizable.

Without convenience methods, we must create a `ViewRegister`:

```kotlin
class MyOnTextChangedRegister : ViewRegister<TextView, String>(), TextWatcher {

    override fun registerView(view: TextView) = view.addTextChangedListener(this)

    override fun deregisterFromView(view: TextView) = view.removeTextChangedListener(this)

    override fun afterTextChanged(s: Editable?) = Unit

    override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) = Unit

    override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {
        notifyChange(s?.toString()) // pass changes to to listeners so data can update.
    }

    override fun getValue(view: TextView) = view.text.toString() // specifies how to convert view data out
}

```

Then pass it into the call to `bind`:

```kotlin
textView {
    bind(this, MyOnTextChangedRegister())
      .onSelf() // String updates from `text`
      .to { viewModel.count }
}
```

## Two Way Bindings

`twoWay` bindings are slightly more complex and complicated. It specifies that an expression or `ObservableField` and `View`'s data are synchronized. We only allow one such binding per `KProperty` or `ObservableField` to prevent a cycle of updates occurring in the UI.

We start off the binding the same way as a `oneWay` (`twoWay` extends off of `oneWay`) and then specify we want it `twoWay` and complete the reverse assignment. Any default, out-of-the-box `oneWay` binding on a `View` will only update `View` when the value is different than the current value. This prevents update cycles that could occur in a `twoWay`.

### Flow
expression or `ObservableField.value` -> `Output` -> `View` -> `View` property set -> `Output` -> expression or `ObservableField.value` is set if changed.

When a `View` changes, it notifies the expression or `ObservableField`. When the expression or `ObservableField` changes, they notify the `View`. Both the `View` and `ObservableField` have mechanisms in place to only change and notify when their value changes so that a cycle in this flow doesn't happen.

To register a `twoWay` binding on an `ObservableField` that relates to a user inputting data for an address:

```kotlin
editText {
  bindSelf { viewModel.address }.toText(this)
          .twoWay().toFieldFromText()
}
```

This means that any changes from user input get populated into the `address` property, and any changes (say from API call) are passed along to the `editText` as well.

The `toFieldFromText()` is a convenience method that assigns an `ObservableField` the value from the `editText` in reverse. There are more convenience methods.

To use expressions without conveniences:

```kotlin
editText {
  bindSelf(MyViewModelClass::address) { viewModel.address }.toText(this)
          .twoWay().toInput(OnTextChangedRegister()) { viewValue ->
            viewModel.address.value = it ?: viewModel.address.defaultValue // if null, set non-null default if we'd like.
            }
}
```

repository: agrosner/KBinding

gha_language: Kotlin

repo_name: agrosner/KBinding


text:
---
layout: page
title: About
---

This blog uses [Lanyon](http://lanyon.getpoole.com), a [Jekyll](http://jekyllrb.com) theme and is hosted for free on [GitHub Pages](https://pages.github.com). It's made by [@mdo](https://twitter.com/mdo).

Learn more and contribute on [GitHub](https://github.com/poole).

I added average read time and [Disqus comments](https://disqus.com/) thanks to [this helpful article](http://pixelcog.com/blog/2013/jekyll-from-scratch-extending-jekyll/).

♥ Thanks for reading! ♥

[GitHub](https://github.com/Sch3lp) • [Twitter](https://twitter.com/TimSchraepen) • [LinkedIn](https://www.linkedin.com/in/timschraepen)

<img src="{{ site.author.avatar }}}" class="rounded">

gha_language: CSS


text:
---
date: 2022-10-06T14:51:03.655Z
slug: from-overseas-city-of-dawn-misty-memories-en
typeName: Review
title: '"Misty Memories"'
subTitle: New Album by From Overseas & City of Dawn
seoTitle: '"Misty Memories" – From Overseas & City of Dawn'
description: Care for some brilliant ambient/drone sound? Kévin Sery, aka From
  Overseas and City of Dawn just released their album "Misty Memories".
excerpt: Kévin Sery, aka From Overseas, will always be one of my favourite
  artists from the ambient genre. The sound artist from La Réunion has now
  recorded a new album with City of Dawn. "Misty Memories" is the first
  collaboration between the two projects.
image: https://storage.googleapis.com/cardamonchai-media/2022-10-06/from-overseas-city-of-dawn-misty-memories-jpg-imagine-f8f8f8_f5f2e9_1024_768/640.webp
copyrigt: From Overseas & City of Dawn
ogImage: https://storage.googleapis.com/cardamonchai-media/2022-10-06/from-overseas-city-of-dawn-misty-memories-fb-jpeg-imagine-f8f8f8_dedbd4_1200_628/640.webp
labels:
  - From Overseas & City of Dawn
  - From Overseas
  - City of Dawn
  - Past Inside the Present
  - Ambient
  - Drone
  - Review
  - Reviews
  - Band
  - Bands
  - Experimental
  - Instrumental
  - Zaké
  - Cynthia Bernard
focusKeyword: City of Dawn
advertisement: false
affiliate: false
language: en
languageLink: /2022/10/from-overseas-city-of-dawn-misty-memories/
---
**Kévin Sery, aka From Overseas, will always be one of my favourite artists from the ambient genre. The sound artist from La Réunion has now recorded a new album with City of Dawn. "Misty Memories" is the first collaboration between the two projects.**

Kévin and his friend Damien from City of Dawn have created a wonderful collection of melodic songs based on nostalgic tape loops and dreamy guitar sounds. The layers of light and, at the same time, interwoven and playful guitar playing, samples and loops and their play with silence and calm have particularly impressed me.

[Cynthia Bernard (marine eyes & awakened souls)](/2021/10/awakened-souls-en/) enriched two of the eight songs with her vocals. "Weathering" and "Waves Vanished" are my favourites on the record, not just for that reason. The overall atmosphere of the two tracks makes me feel like I'm drifting far away – dreaming of hidden places of untouched nature.

## Nature plays a leading role

![From Overseas & City of Dawn – "Misty Memories"](https://storage.googleapis.com/cardamonchai-media/2022-10-06/from-overseas-city-of-dawn-misty-memories-vinyl-jpg-imagine-f8f8f8_d6d4cf_1024_768/640.webp "From Overseas & City of Dawn – \"Misty Memories\"")

Nature has always played a significant role in From Overseas' overall work. You can also hear this intimate connection in this collaboration with City of Dawn.

The sound of the sea, wind chimes and feet in the sand. Whether it's the samples getting flushed into my ears over the headphones, or whether these pictures are already created by my imagination getting stimulated by the enchanting sounds:  I'll leave this open at this point.

One thing is for sure: songs like "Driftwood" (Track 2), "Fallen Leaves" (Track 3) or "Silent Friends" (Track 7) don't need words to tell their stories. They're starting to unfold as soon as the needle of the record player touches the vinyl.

## Music for the dreamy seasons

For me, "Misty Memories" could become the soundtrack for the cold season – incredible ambient/drone sound made for writing, meditating, dreaming and relaxing. So please give it a listen. It's worth it.

Kévin and Damien released their album on Zakè's label Past Inside the Present. [You can read my interview with Kévin Sery here](/2020/04/from-overseas-interview-en). Moreover, [you can find out more about Zakè's current album here](/2022/05/zake-sound-space-variations-en/).

If you're quick, you can still get your limited 160 g LP edition in Transparent Sepia Iron or Transparent Oxidized Iron (via Juno Records or Bandcamp). "Misty Memories" is, of course, also available on all music streaming platforms (from Friday, October 7, 2022).

Misty Memories by From Overseas & City of Dawn

repository: matthias-reis/carda-gatsby

gha_language: HTML

repo_name: matthias-reis/carda-gatsby


text:
![Seneca](http://senecajs.org/files/assets/seneca-logo.png)
> A [Seneca.js][] data storage plugin.

# seneca-mem-store
[![Build Status][travis-badge]][travis-url]
[![Gitter][gitter-badge]][gitter-url]

[![js-standard-style][standard-badge]][standard-style]

This module is a plugin for the Seneca framework. It provides an
in-memory storage engine that provides a set of data storage action
patterns. *Data does not persist betweens runs*.  This plugin is most
useful for early development and unit testing. It also provides an
example of a document-oriented storage plugin code-base.

The Seneca framework provides an [ActiveRecord-style data storage API][].
Each supported database has a plugin, such as this one, that provides
the underlying Seneca plugin actions required for data persistence.

This plugin is included with the main seneca module.

- __Version:__ 0.3.1
- __Tested on:__ Seneca 0.6.2
- __Node:__ 0.10, 0.11, 0.12, 4

[Annotated Source](http://rjrodger.github.io/seneca-mem-store/doc/mem-store.html)

If you're using this module, and need help, you can:

- Post a [github issue][],
- Tweet to [@senecajs][],
- Ask on the [Gitter][gitter-url].

If you are new to Seneca in general, please take a look at [senecajs.org][]. We have everything from
tutorials to sample apps to help get you up and running quickly.

## Install
This plugin module is included in the main Seneca module.

```sh
npm install seneca
```

### Explicit install
To explicitly install separately,

```sh
npm install seneca-mem-store
```

And in your code:

```js
var seneca = require('seneca')({
  default_plugins: {
    'mem-store': false
  }
})
seneca.use(require('seneca-mem-store'))
```

## Test
To run tests, simply use npm:

```sh
npm run test
```

## Releases
- 0.3.1: 2015-06-16: export action responds with object: {json: "..."}
- 0.3.0: 2015-06-16: cmd:import/export no longer uses filesystem, just accepts/provides JSON string. Prep for Seneca 0.6.2.

## Contributing
The [Senecajs org][] encourages open participation. If you feel you can help in any way, be it with
documentation, examples, extra testing, or new features please get in touch.

## License
Copyright Richard Rodger and other contributors 2015, Licensed under [MIT][].

[MIT]: ./LICENSE
[Senecajs org]: https://github.com/senecajs/
[Seneca.js]: https://www.npmjs.com/package/seneca
[@senecajs]: http://twitter.com/senecajs
[senecajs.org]: http://senecajs.org/
[travis-badge]: https://travis-ci.org/rjrodger/seneca-mem-store.svg
[travis-url]: https://travis-ci.org/rjrodger/seneca-mem-store
[gitter-badge]: https://badges.gitter.im/Join%20Chat.svg
[gitter-url]: https://gitter.im/senecajs/seneca
[standard-badge]: https://raw.githubusercontent.com/feross/standard/master/badge.png
[standard-style]: https://github.com/feross/standard
[github issue]: https://github.com/rjrodger/seneca-mem-store/issues
[ActiveRecord-style data storage API]:http://senecajs.org/data-entities.html

repository: Bogdan-Rotund/seneca-mem-store

repo_name: Bogdan-Rotund/seneca-mem-store


text:
---
layout: post
published: true
title: 'Solidity 0.1.7 Release Announcement'
date: '2015-11-17'
author: Solidity Team
category: Releases
---

**Features:**
- Improved error messages for unexpected tokens.
- Proof-of-concept transcompilation to why3 for formal verification of contracts.

**Bugfixes:**
- Writing to elements of `bytes` or `string` overwrite others.
- Arrays (also strings) as indexed parameters of events.
- "Successor block not found" on Windows.
- Using string literals in tuples.
- Cope with invalid commit hash in version for libraries.
- Some test framework fixes on windows.

A big thank you to all contributors who helped make this release possible!

Download the new version of Solidity [here](https://github.com/ethereum/solidity/releases/tag/v0.1.7).

repository: ethereum/solidity-blog

repo_name: ethereum/solidity-blog


text:
Projects
======
This is the main sub module of the scheduling displaying a list of all your projects at hand. Each project shows how many tasks it consists of,
how many tasks are in progress and the number of tasks already done for the project.

<icon class="image-icon">![Note](note.png)</icon> Just like all tables/lists in Splynx, the data displayed within them can be customized
to your preference by using the breadcrumbs icon at the top right of each list:

![Projects table](projects_list.png)

*********************************************************************************
### Creating a new project

A new or existing project can be added/viewed at `Scheduling → Projects`. To create a new project, press ``Add`` button at the top right corner.

![Projects table](projects_table.png)

A window will pop-up with the following options:

![Projects table](add_project.png)

* **Title** - project name;
* **Description** - brief description of the project;
* **Type** - the project type, this is a custom option that can be created by an administrator. Project types can be created at `Config → Scheduling → Project types`:

![Projects config](project_types.png)

* **Partners** - select a partner to associate the project with;
* **Project lead** - the lead admin of the project;
* **Category** - select a project category. This is a custom option that can be created by administrator. The categories can be created at `Config → Scheduling → Project categories`:

![Projects config](project_category.png)

* **Workflow** - the workflow for project tasks. This is a custom option that can be created/customized by an administrator for different purposes. The workflow can be created at `Config → Scheduling → Workflows`:

![Projects config](project_workflows.png)
***************************************
Once the project is created, you can edit it <icon class="image-icon">![Edit](edit.png)</icon>, view related tasks <icon class="image-icon">![View](view.png)</icon> or [archive](scheduling/archive/archive.md) the project <icon class="image-icon">![Archive](archive.png)</icon>:

![Actions](actions.png)

repository: splynx/docs

repo_name: splynx/docs


text:
# sklearn-homework

Author: hakim TAMGALT
Date: November 13th, 2019
Version: 1.0

### Homework
* Don't forget to fill up the Weekly Journal! https://forms.gle/QAe9Dm54xNwUxZqZA
##### Basic
1. "refactor" your plotting code to work on the dataset as loaded by from sklearn.datasets import load_{yourdatasetname}
2. perform classification/regression on your dataset using Linear regression/Logistic regression, as applicable, and print performance
##### Advanced
1. perform classification/regression (for the question you asked in the first week) on your dataset using KNeighborsClassifier or KNeighborsRegressor, as applicable, and print the performance. This can be done through the instructions in [scipy lectures for scikit-learn](http://scipy-lectures.org/packages/scikit-learn/index.html#introduction-problem-settings)
2. test the perfomance of your model using different values for the parameter n_neighbors
##### Reach
1. use 1+ other types of classifier/regressors in scikit-learn for answering your question. (check the section About choosing the best algorithms https://cce-bigdataintro-1160.github.io/CEBD-1160-fall-2019-site/8-ml.html for ideas)
2. using comments, describe the classifiers/regressors you're using (that'd be to do a very short research on how the algorithms you're using works) (edited)

repository: hakimny/sklearn-homework

repo_name: hakimny/sklearn-homework


text:
---
layout:     post
title:      "Hello world"
subtitle:   "Hello World, Hello Blog"
date:       2020-04-10
author:     "lwb"
header-img: "img/post-bg-desk.jpg"
tags:
    - Life
---

This is the first post of my blog.
Due to the Wuhan pneumonia pandemic, I'm told to stay home and can't go anywhere.
Staying at home is boring so I decided to open a blog and write some thing.
Another important reason for me to open this blog is to record the process of writing an compiler, required by my
Compilation Principal class.
So basically, I will post some tutorials (the first may be about how to write a compiler) on this blog.
Random thoughts and technical problems I met may also be posted on this blog.

In 2020/5/24, I decided to re-write the blog in English due to some reasons.


text:
---
layout: post
title: Awk Tutorial, part 2
category: posts
---

I [already mentioned](https://blog.jpalardy.com/posts/why-learn-awk/) why you should learn AWK.
In [part 1](https://blog.jpalardy.com/posts/awk-tutorial-part-1/), we laid a _solid_ foundation.
Let's build on top of that.

_NOTE: certain command outputs have been pretty-printed. Pipe through `column -t` to obtain similar results._

## Matching with Regular Expressions

So far, I've shown you ways to match lines based on column values. In practice,
you usually want to match lines with regular expressions. For example, you can
extract data from 2015:

{% highlight txt %}
$ cat netflix.tsv | awk '/^2015-/'
2015-12-31  116.209999  117.459999  114.279999  114.379997  9245000  114.379997
2015-12-30  118.949997  119.019997  116.43      116.709999  8116200  116.709999
2015-12-29  118.190002  119.599998  116.919998  119.120003  8159200  119.120003
2015-12-28  117.260002  117.349998  113.849998  117.110001  8406300  117.110001
2015-12-24  118.220001  118.800003  117.300003  117.330002  3531300  117.330002
# snip
{% endhighlight %}

(_achievement unlocked: you have re-created grep..._)

A regular expression, by itself, is a shorthand for the condition: `$0 ~ /regex/`

{% highlight bash %}
awk '/^2015-/'
# means:
awk '$0 ~ /^2015-/'
{% endhighlight %}

This means you can match regular expressions on _specific_ columns. You can
extract the data for the 1st of every month:

{% highlight txt %}
$ cat netflix.tsv | awk '$1 ~ /-01$/'
2016-03-01  94.580002   99.160004   93.610001   98.300003   16997700  98.300003
2016-02-01  91.790001   97.18       91.300003   94.089996   19618000  94.089996
2015-12-01  124.470001  125.57      122.419998  125.370003  12528800  125.370003
2015-10-01  102.910004  106.110001  101.120003  105.980003  17426900  105.980003
2015-09-01  109.349998  111.239998  103.82      105.790001  35977100  105.790001
# snip
{% endhighlight %}

That's already way better than grep.

## Comparisons and Logic

I glossed over that in [part 1](https://blog.jpalardy.com/posts/awk-tutorial-part-1/),
but AWK has all the usual comparison operators:

{% highlight bash %}
$2 == 124.47   # equality
$2 != 124.47   # inequality

$2 > 124.47    # greater than
$2 >= 124.47   # greater than or equal
$2 < 124.47    # smaller than
$2 <= 124.47   # smaller than or equal

$2 ~ /^10.$/   # regex match
$2 !~ /^10.$/  # regex negated match  -- this one might be new
{% endhighlight %}

and logical operators:

{% highlight bash %}
$1 ~ /^2015/ && $6 > 20000000  # and -- high volume in 2015
$6 < 1000000 || $6 > 20000000  # or  -- low or high volume
! /^2015/                      # not -- not in 2015
{% endhighlight %}

You can _almost_ create arbitrarily complex conditions. You are missing variables...

## Built-in Variables

Some variables just "exist"; they already contain values and are automatically
updated. These variables are easy to recognize because they are named
in CAPITAL letters. Exception: column variables (starting with a $)
are also built-in variables.

There are a [bunch](https://www.math.utah.edu/docs/info/gawk_11.html)
of built-in variables, but you'll mostly use 2:

* NR : the number of records (lines) processed since AWK started
* NF : the number of fields (columns) on the current line

And 2 more if you're dealing with multiple files:

* FNR : like NR, but resets to 1 when it begins processing a new file
* FILENAME: the name of the file being currently processed

## User-Defined Variables

There is no need to "declare" the variable or initialize it. A variable "comes
to life" when you use it. You can count (and print) how many lines happened in December
2015:

{% highlight txt %}
$ cat netflix.tsv | awk '/^2015-12/ {count++; print count, $0}'
1   2015-12-31  116.209999  117.459999  114.279999  114.379997  9245000   114.379997
2   2015-12-30  118.949997  119.019997  116.43      116.709999  8116200   116.709999
3   2015-12-29  118.190002  119.599998  116.919998  119.120003  8159200   119.120003
4   2015-12-28  117.260002  117.349998  113.849998  117.110001  8406300   117.110001
5   2015-12-24  118.220001  118.800003  117.300003  117.330002  3531300   117.330002
# snip
22  2015-12-01  124.470001  125.57      122.419998  125.370003  12528800  125.370003
{% endhighlight %}

Not having to declare variables is _convenient_, but it's also error-prone. If
you misspell a variable, there won't be any warning, and it might take you a
while to discover your mistake. You've been warned. **Remember:** this is a
language that optimizes for one-liners.

What are variables initialized to?

{% highlight txt %}
$ awk 'BEGIN {print x + 2}'          # => 2
$ awk 'BEGIN {x = x + 2; print x}'   # => 2
$ awk 'BEGIN {print x}'              # => <blank> -- empty string, really
# BEGIN will be discussed next...
{% endhighlight %}

An undefined `x` contains the empty string. The first time you access
it, that's what you get. Strings are converted to numbers for numerical
operations:

{% highlight txt %}
x + 2
# expands:
"" + 2
# expands:
0 + 2
# expands:
2
{% endhighlight %}

## Special Patterns: BEGIN and END

`BEGIN` and `END` are special conditions that only get triggered once per run.

* `BEGIN` gets triggered _before_ processing any line
* `END` gets triggered _after_ all lines have been processed

These conditions get triggered _even if_ there are no input lines.

`BEGIN` is usually used to initialize variables -- though now you know that's not
necessary for zeroes or empty strings. It can also be used to print a header.

`END` is usually used to crunch a result and print a summary or report:

{% highlight txt %}
$ cat netflix.tsv | awk 'END {print NR}'
{% endhighlight %}

(_achievement unlocked: you have re-created wc -l..._)

## Blocks and Control

You can have multiple condition-block pairs. Each line in the input files gets
presented to each block you write:

{% highlight txt %}
$ cat netflix.tsv | awk '/^2016-03-24/ {print} $4 == 96.43 {print}'
2016-03-24  98.639999  98.849998  97.07  98.360001  10646900  98.360001
2016-03-15  97.870003  98.510002  96.43  97.860001  9678000   97.860001

# could be written as:
#
# $ cat netflix.tsv | awk '/^2016-03-24/; $4 == 96.43'
#
# because we both know what a missing block means...
# but for this example, it's a bit opaque.
{% endhighlight %}

That works great until you have a line that matches both conditions:

{% highlight txt %}
$ cat netflix.tsv | awk '/^2016-03-24/ {print} $4 == 97.07 {print}'
2016-03-24  98.639999  98.849998  97.07  98.360001  10646900  98.360001
2016-03-24  98.639999  98.849998  97.07  98.360001  10646900  98.360001
{% endhighlight %}

The same line was printed twice! There are two solutions to this problem:

* making your conditions mutually exclusive
  (which *could* be easy, but is often tedious and redundant)
* using the `next` statement:

{% highlight txt %}
$ cat netflix.tsv | awk '/^2016-03-24/ {print; next} $4 == 97.07 {print}'
2016-03-24  98.639999  98.849998  97.07  98.360001  10646900  98.360001
{% endhighlight %}

If you hit a `next`, your script will stop matching blocks and go to the
_next_ line from the input file. Using `next` means you have to think about the
order of your blocks.
That's not necessarily a bad thing.

There's also an `exit` statement to stop processing any more input and _exit_ your script.
The `END` block will still be executed, if you have one.

## Taking inventory: what can you do?

At this point, a better question would be: what _can't_ you do?

In review, you can:

* match a line with regular expressions
* match a line with any operator
* use built-in variables, both in conditions or in blocks
* use your own variables, for all other needs
* control what happens at the beginning and the end of your script
* skip lines or exit early

## Exercises

Try to:

* only print lines between February 29, 2016 and March 4, 2016
* sum the volumes for all days of January 2016
* average the closing price over all days of March 2015
* check that _all_ lines have 7 columns
* only print every other line (say, even lines)
* remove empty lines in a file

Answers are [here](/assets/awk-tutorials/answers-part2.txt).

## What's next?

[Part 3](https://blog.jpalardy.com/posts/awk-tutorial-part-3/)

extension: markdown


text:
The googlecode-tags directory contains complete copies of Concurrent-Locks source code for each of the Concurrent-Locks
releases which were made while Concurrent-Locks was hosted in Subversion on Google Code: versions <=1.0.0, released
prior to September 2015.

Concurrent-Locks versions >1.0.0 (since September 2015), will be released from GitHub, and tags for those versions can
be found directly in the GitHub repository.

This project was previously hosted at: https://code.google.com/p/concurrent-locks/


text:
---
layout: default
---

# 1998-02-08 - Re: Washington on the verge of being nuked?

## Header Data

From: John Young<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: d1840d1f3991dd927b530e2c2ad5c88f44f5740f038af8035005b6a46bbcf892

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1998-02-08 00:40:08 UTC

Raw Date: Sun, 8 Feb 1998 08:40:08 +0800

## Raw message

```
{% raw  %}From: John Young<EMAIL_ADDRESS>Date: Sun, 8 Feb 1998 08:40:08 +0800
To<EMAIL_ADDRESS>Subject: Re: Washington on the verge of being nuked?
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Manhattan would be easily blown, remotely. Place a time-charge
beneath a car at the head each principal subway line (which
commence in other boroughs), set to blow at the main stations.

For the West Side, supplement with a charge in the PATH train
from Jersey.

For the East Side, supplement with another in the LI Railroad
from the Island.

Forget anything above 86th Street, they'll applaud; like the
WVA and VA hillfolks will hooray the destruction of see-navel
DC and its high-pitch babbling wonks.

As will anyone of any capital (or high-tech vale), globally, not
drunk with power or mad to get it.

That's what horrifies the powerful about of terrorists: they're both
spitting images of their opponents. Both willing to kill indiscriminately
for vainglory of blind faith and ambition. Both willing to betray
their kind for a step up.

Probably the stealth bombers will led by a highly trained ex-,
or covert member, or Top Gun grad, of a duly authorized
terrorist, wing, sub, cell set up to kill for a culture's honor and
commerce -- for blood-drenched national security. USG
and IraqG, any G, joined at birth, never separated, working
in concert.

{% endraw %}
```

## Thread

+ Return to [February 1998](/archive/1998/02)

+ Return to<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)](/authors/dlv_at_bwalk_dm_com_dr_dimitri_vulis_kotm_)"
+ Return to "[John Young <jya@pipeline.com>](/authors/john_young_jya_at_pipeline_com_)"

+ 1998-02-08 (Sun, 8 Feb 1998 08:40:08 +0800) - Re: Washington on the verge of being nuked? - _John Young<EMAIL_ADDRESS>  + 1998-02-08 (Sat, 7 Feb 1998 17:31:02 -0800 (PST)) - [Re: Washington on the verge of being nuked?](/archive/1998/02/492dcc9eef01059278596c022ca420d8f9160570582728a1506fd0ed3b36608e) -<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)_


text:
This
========
**This** is a simple and minimalist css grid file based on flexbox. Feel free to customize it.
Enjoy!

## How to use it ?
Just download or clone the repo: `git clone https://github.com/linkhousni/This.git`
or install it with [npm](https://www.npmjs.com/): `npm install this-css-km`

repository: linkhousni/This

repo_name: linkhousni/This


text:
# React CodeIgniter

React CodeIgniter is an appstarter bundle for fullstack programing javascript and PHP in one place.

## Installation

### Requirement

- Backend
    - PHP 7.4 with basic extensions (such as intl , dom , mbstring and curl)
    - we are recomended to use php from ondrej/php for using our appstarter
- Frontend
    - NodeJS v14 with **Yarn** Package Manager

### Via Composer

1. run `composer create-project baharsah/reactigniter <project-directory>` to install it in your system
2. go to your project directory and run :
    1. `yarn` for downloading node packages
    2. `composer i` for downloading backend components
    3. `yarn run build` for building frontend
    4. `php spark serve` for serving as backend
    5. `yarn run serve` for serving as frontend

## Todo

[] Make Static Routing
[] Create command for managing reactigniter
[] Create command to creating new component
[] Make HTTP Request Debugbar Handler
[] Make Debugbar Handler

repository: baharsah/reactigniter

gha_language: PHP

repo_name: baharsah/reactigniter


text:
---
title: Sweet Meat
img: sweet-meat.jpg
webm: sweet-meat.webm
mp4: sweet-meat.mp4
video-poster: sweet-meat-blur.jpg
play-store: com.oneeyeant.sweetmeat
app-store:<PHONE_NUMBER>
youtube: 6NNG2ILJfWE
order: 1
---
Multiplatform mobile free-to-play endless runner game integrated with Twitter. Users can use tweets to play God by sending threats and changing gameplay rules to all active players in real-time using tweets. The game was featured by Google and nominated for Best Latin American Game in the [BIG Festival](http://bigfestival.com.br).


text:
---
title: 'MongoDB: Setting TTL on Documents'
permalink: mongodb-setting-ttl-on-documents
date: 2014-10-13 14:08:05
categories:
  - Development
summary: Lorem
---

On some recent work I was doing with Winsitter, I needed an approach that would systematically remove documents after a specified period of time within MongoDB.

Previously, I would have written cron jobs or helpers to clean up the old data.  No longer!

Come to discover, this feature [already exists](https://docs.mongodb.com/manual/tutorial/expire-data/) inside of MongoDB.  It is called setting the TTL or Time to Live of a document.

The process involves creating an index on the date object you'd like to watch.  In the example below, I am providing a property on my document called `auditDate`.  I want the document associated with that property to automatically remove itself after 5 days or *432000000* miliseconds.

```javascript
dbConnection
.collection("audit")
.ensureIndex({
	"auditDate": 1
}, {
	expireAfterSeconds: 432000000 // 5 days
}, function(indexErr) {
	if (indexErr) {
		console.log("error creating index");
		console.log(indexErr);
	}
});
```

In the example, I'm using the MongoDB node.js library to ensure an index exists.  If the index doesn't exist, MongoDB will create it.

The `expireAfterSeconds` options tells MongoDB that after a specified amount of time, the document should automatically remove itself.

This quick fix has saved me a ton of time, and I am hoping it saves a ton for you too!

gha_language: Vue


text:
# MvcCore - Extension - Debug - Nette Tracy - Panel Authentication

[![Latest Stable Version](https://img.shields.io/badge/Stable-v5.0.3-brightgreen.svg?style=plastic)](https://github.com/mvccore/ext-debug-tracy-auth/releases)
[![License](https://img.shields.io/badge/License-BSD%203-brightgreen.svg?style=plastic)](https://mvccore.github.io/docs/mvccore/5.0.0/LICENSE.md)
![PHP Version](https://img.shields.io/badge/PHP->=5.4-brightgreen.svg?style=plastic)

MvcCore Debug Tracy Extension to render and add into tracy debug panel currently authenticated user by `\MvcCore\Ext\Auth` service singleton instance, printed by `\Tracy\Dumper::toHtml(\MvcCore\Ext\Auth::GetInstance()->GetUser());`.

## Installation
```shell
composer require mvccore/ext-debug-tracy-auth
```

repository: mvccore/ext-debug-tracy-auth

repo_name: mvccore/ext-debug-tracy-auth


text:
# Lobby

## Lobby: Client API

#### ***`lobby/login(username, [password])`***
* Success - available deck names, opened game rooms, player's score (only saved if a password is set)
* Failure: reason (account exists and has a password / wrong password)

#### ***`lobby/joinGameRoom(gameRoomId, [password])`***
* Success: target game room info
* Failure: reason (closed / wrong password / room full).

#### ***`lobby/createGameRoom(gameRoomInfo)`***
* Returns the ID of the created room

## Lobby: Server updates

#### ***`lobby/gameRoomUpdated`***
* ID, new info
* If the ID is new, this is a creation update

#### ***`lobby/gameRoomClosed`***
* ID

# Game room

## Game room: Client API

#### ***`gameRoom/changeSettings(newInfo)`***
* Change the name, settings, password, decks, room host ...
* Some changes are only possible if the game is not active

#### ***`gameRoom/startGame()`***

#### ***`gameRoom/pause()`***
* The game will be paused at the start of next round

#### ***`gameRoom/resume()`***

#### ***`gameRoom/kick(id)`***

#### ***`gameRoom/leave()`***

#### ***`gameRoom/sendMessage(message)`***

## Game room: Server updates

#### ***`gameRoom/playerJoined`***
* Player info

#### ***`gameRoom/playerLeft`***
* Player info, left/disconnected

#### ***`gameRoom/settingsChanged`***
* New game room info

#### ***`gameRoom/pausePending`***
* Number of the round that will be paused

#### ***`gameRoom/messageReceived`***

# Game

## Game: Client API

#### ***`game/useEmptyCard(text)`***
* Returns a unique ID of the created card

#### ***`game/selectCards(cardIds)`***
* May be submitted multiple times in the same round - last one counts

#### ***`game/deselectCards()`***

#### ***`game/vote(combinationId)`***

#### ***`game/resetHand()`***
* Hand will be reset on the next round

## Game: Server updates

#### ***`game/readyListChanged`***
* Fired whenever a user calls select/deselect

#### ***`game/roundStarted`***
* Round number, participating players, black card, available cards in hand

#### ***`game/roundEnded`***
* Round number, winner (or winners - each of the winners gets half a point), updated scoreboard

#### ***`game/votingStage`***
* Played combinations in random order

repository: MihaZupan/CAH

repo_name: MihaZupan/CAH


text:
README
======

When do I need this?
-------------------

If you are developing a composer package, and you want to know the location of
the project root and/or the vendor directory.

Can I do without?
-------------------

Sometimes you will work on your package stand alone, for instance on the unit
tests. In that case your vendor directory can be determined relatively to a
file.

You of course want your package to function when included via composer. Usually
you can determine the vendor directory by going up a couple of directories. But
don't forget to take the [vendor-dir]
(https://getcomposer.org/doc/06-config.md#vendor-dir) config option into account.

This package takes care of that. Even better: it calculates the directory
during composer install. So it's faster.

How do I use it?
----------------
```php
<?php
namespace MyVendor\MyApp;

use Hostnet\Component\Path\Path;

class ClassInNeed
{
    public function doSomethingWithPaths()
    {
        $vendor_dir = Path::VENDOR_DIR
        $base_dir   = Path::BASE_DIR
        // ...
    }
}
```

Installation
------------
Install using composer by using the command line interface
or adding the package name `hostnet/path-composer-plugin-lib`
to `composer.json`

```json
{
    "require": {
        "hostnet/path-composer-plugin-lib": "^1.0.0"
    }
}
```

repository: nutama/path-composer-plugin-lib

repo_name: nutama/path-composer-plugin-lib


text:
# neko-rooms

Simple room management system for [n.eko](https://github.com/m1k1o/neko). Self hosted rabb.it alternative.

## Zero-knowledge installation

If you don't have any clue about docker and stuff but only want to have fun with friends in a shared browser, we got you covered!

- Rent a VPS with public IP and OS Ubuntu.
- Get a domain name pointing to your IP (you can even get some for free).
- Run install script and follow instructions.

```bash
curl https://raw.githubusercontent.com/m1k1o/neko-rooms/master/install | sudo bash
```

## How to start

You need to have installed `Docker` and `docker-compose`. You need to have a custom domain pointing to your server's IP.

You can watch installation video provided by *Dr R1ck*:

https://www.youtube.com/watch?v=cCmnw-pq0gA

### Installation guide

You only need `.env.example`, `docker-compose.yml` and `traefik/`.

#### Do I need to use traefik?

- Traefik needs to be used to forward traffic to the rooms. You can put nginx in front of it, but not replace it.
- See example configuration for [nginx](docs/nginx).

You can use `docker-compose.http.yml` that will expose this service to `8080` or any port. Authentication is optional.

### Step 1

Copy `.env.example` to `.env` and customize.

```bash
cp .env.example .env
```

### Step 2

Create `usersfile` with your users:

```bash
touch traefik/usersfile
```

And add as many users as you like:

```bash
echo $(htpasswd -nb user password) >> traefik/usersfile
```

### Step 3 (HTTPS only)

Create `acme.json`

```bash
touch traefik/acme.json
chmod 600 traefik/acme.json
```

Update your email in `traefik/traefik.yml`.

 Otherwise, you might get this error: `Error response from daemon: No such image:` (see issue #1).

```sh
docker pull m1k1o/neko:firefox
docker pull m1k1o/neko:chromium
# etc...
```

If you want to update neko image, you need to pull new image and recreate all rooms, that use old image. To update neko rooms, simply run:

```sh
docker-compose pull
docker-compose up -d
```

### Enable storage

You might have encountered this error:

> Mounts cannot be specified because storage is disabled or unavailable.

If you didn't specify storage yet, you can do it using [this tutorial](./docs/storage.md).

### Roadmap:
 - [x] add GUI
 - [x] add HTTPS support
 - [x] add authentication provider for traefik
 - [x] allow specifying custom ENV variables
 - [x] allow mounting directories for persistent data
 - [ ] add upgrade button
 - [ ] auto pull images, that do not exist
 - [ ] add bearer token to for API
 - [ ] add docker SSH / TCP support
 - [ ] add docker swarm support
 - [ ] add k8s support

repository: TopsDesk/neko-rooms

repo_name: TopsDesk/neko-rooms


text:
# Next.js app with Kyma eventing & Go backend connected to SAP HANA Cloud database

## Solution Architecture

![Solution Architecture](docs/assets/conference-registration-app-architecture.png)

## Sequence Diagram

![Sequence Diagram](docs/assets/conference-registration-app-sequence.png)

## Build and deployment steps

- [**Pre-requisites**](docs/setup/pre-requisites.md)
- [**Step 1** - Pre-requisite SendGrid setup steps](docs/setup/step-1.md)
- [**Step 2** - Build & deploy the **Conference Registration app** (Next.js app)](docs/setup/step-2.md)
- [**Step 3** - Deploy the **Event Consumer function**](docs/setup/step-3.md)
- [**Step 4** - Apply the **Event Registration Subscription**](docs/setup/step-4.md)
- [**Step 5** - Create an instance of **SAP HANA Cloud**](docs/setup/step-5.md)
- [**Step 6** - Deploy the **Registrations REST API Server**](docs/setup/step-6.md)
- [**Step 7** - Connect your web app running on **Kyma Runtime** to a domain via **Cloudflare**](docs/setup/step-7.md)

## Verification steps

- [**Step 1** - Verify that all the resources of the app are running](docs/verification/step-1.md)
- [**Step 2** - View the environment variables in the config map](docs/verification/step-2.md)
- [**Step 3** - View the environment variables in the secret](docs/verification/step-3.md)
- [**Step 4** - View the API Rule](docs/verification/step-4.md)
- :balloon: :tada: [**Step 5** - Launch the app and **Register to attend the Tech Conference** via the app](docs/verification/step-5.md)

![Tech Conference 2022 app](docs/assets/tech-conference-2022-app-screenshot.png)

### [Troubleshooting steps](docs/verification/troubleshooting-steps.md)

repository: remi-sap/kyma-runtime-extension-samples

repo_name: remi-sap/kyma-runtime-extension-samples


text:
# Distribution

## Bundle to HTML

When you're ready to distribute your game, you can bundle it into a standalone HTML file with `w4 bundle`:

```shell
w4 bundle cart.wasm --html my-awesome-game.html
```

The bundled HTML contains no external dependencies, works offline, and can be easily shared on sites like [itch.io](https://itch.io/).

## Bundle to Windows/Mac/Linux executable

Coming soon!

## Publish on wasm4.org

Send a PR on Github to feature your game on the site!

1. Fork the repository.
2. Edit
   [`/site/carts.js`](https://github.com/aduros/wasm4/blob/main/site/carts.js)
   and add an entry for your game. It should have a unique slug for the URL.
3. Add your `<slug>.wasm` (cart) and `<slug>.png` (160x160 screenshot) to
   [`/site/static/carts`](https://github.com/aduros/wasm4/tree/main/site/static/carts).
4. Open a pull request!

:::tip
You can take a 160x160 screenshot of your game by pressing F9 in the emulator.
:::

license: ISC

gha_license_id: ISC


text:
# prometheus_exporters

Cookbook to install and configure various Prometheus exporters on systems to be monitored by Prometheus.

Currently supported exporters are node, postgres, redis, mysqld, haproxy, process, apache, blackbox, snmp, statsd, and wmi. More may be added in the future. Please contact the author if you have specific requests.

All of the exporters are available as chef custom resources that can be instantiated from other cookbooks.

# Supports

* Ubuntu 16.04
* Ubuntu 18.04
* Fedora 31
* Fedora 30
* Debian 4
* Debian 9
* CentOS 7
* Amazon Linux

And probably other RHEL or Debian based distributions.

* Windows Server 2012 & 2016 (wmi\_exporter recipe only)

Tests are made using last available Chef 15 along with latest Chef 14.

# Resource List

- [apache_exporter](https://github.com/evilmartians/chef-prometheus-exporters#apache_exporter)
- [blackbox_exporter](https://github.com/evilmartians/chef-prometheus-exporters#blackbox_exporter)
- [consul_exporter](https://github.com/evilmartians/chef-prometheus-exporters#consul_exporter)
- [elasticsearch_exporter](https://github.com/evilmartians/chef-prometheus-exporters#elasticsearch_exporter)
- [haproxy_exporter](https://github.com/evilmartians/chef-prometheus-exporters#haproxy_exporter)
- [mongodb_exporter](https://github.com/evilmartians/chef-prometheus-exporters#mongodb_exporter)
- [mysqld_exporter](https://github.com/evilmartians/chef-prometheus-exporters#mysqld_exporter)
- [node_exporter](https://github.com/evilmartians/chef-prometheus-exporters#node_exporter)
- [postgres_exporter](https://github.com/evilmartians/chef-prometheus-exporters#postgres_exporter)
- [process_exporter](https://github.com/evilmartians/chef-prometheus-exporters#process_exporter)
- [rabbitmq_exporter](https://github.com/evilmartians/chef-prometheus-exporters#rabbitmq_exporter)
- [redis_exporter](https://github.com/evilmartians/chef-prometheus-exporters#redis_exporter)
- [snmp_exporter](https://github.com/evilmartians/chef-prometheus-exporters#snmp_exporter)
- [statsd_exporter](https://github.com/evilmartians/chef-prometheus-exporters#statsd_exporter)
- [varnish_exporter](https://github.com/evilmartians/chef-prometheus-exporters#varnish_exporter)
- [wmi_exporter](https://github.com/evilmartians/chef-prometheus-exporters#wmi_exporter)
- [nginx_exporter](https://github.com/evilmartians/chef-prometheus-exporters#nginx_exporter)
# Resources

## apache_exporter

* `insecure` Ignore server certificate if using https. (default false)
* `log_format` Output format of log messages. e.g. "logger:syslog?appname=bob&local=7" or "logger:stdout?json=true" (default: "logger:stdout")
* `log_level` The logging level. (default: "info")
* `scrape_uri` URI to apache stub status page. (default "http://localhost/server-status/?auto")
* `telemetry_address` Address on which to expose metrics. (default ":9117")
* `telemetry_endpoint` Path under which to expose metrics. (default "/metrics")
* `user` User under whom to start apache exporter. (default: "root")

```ruby
apache_exporter 'main' do
  scrape_uri "http://localhost:8090/server-status/?auto"
  telemetry_address ":9118"
  telemetry_endpoint "/_metrics"
end
```

## blackbox_exporter

This exporter requires a config file. Read more [here](https://github.com/prometheus/blackbox_exporter/blob/master/CONFIGURATION.md). For basic usage the default `blackbox.yml` should be sufficient.

* `config_file` default: `/opt/blackbox_exporter-#{node['prometheus_exporters']['blackbox']['version']}.linux-amd64/blackbox.yml`
* `log_level` Only log messages with the given severity or above. Valid levels: [debug, info, warn, error]
* `timeout_offset` default: 0.5 Offset to subtract from timeout in seconds.
* `user` User under whom to start blackbox exporter. (default: "root")
* `web_listen_address` Address to listen on for web interface and telemetry. (default: ":9115")

```ruby
blackbox_exporter 'main'
```

## consul_exporter

* `consul_allow_stale` Allows any Consul server (non-leader) to service a read. (default: false)
* `consul_ca_file` File path to a PEM-encoded certificate authority used to validate the authenticity of a server certificate.
* `consul_cert_file` File path to a PEM-encoded certificate used with the private key to verify the exporter's authenticity.
* `consul_health_summary` Collects and exports information about each registered service. (default: false)
* `consul_insecure` Disable TLS host verification. (default: false)
* `consul_key_file` File path to a PEM-encoded private key used with the certificate to verify the exporter's authenticity.
* `consul_require_consistent` Enforce fully consistency on Consul reads. (default: false)
* `consul_server_name` Override the hostname for the TLS certificate. It can be used to ensure that the certificate name matches the decalred hostname.
* `consul_server` Address of the Consul instance to connect to. (default: "http://localhost:8500")
* `consul_timeout` Timeout on HTTP requests to consul. (default: "500ms")
* `kv_prefix` Prefix from which to expose key/value pairs.
* `kv_filter` Regex that determines which keys to expose. (default: ".*")
* `log_format` Output format of log messages. One of: [logfmt, json]. (default: "logfmt")
* `log_level` The logging level. (default: "info")
* `user` User under whom to start elasticsearch exporter. (default: "root")
* `web_listen_address` Address to listen on for web interface and telemetry. (default: ":9107")
* `web_telemetry_path` Path under which to expose metrics. (default: "/metrics")

```ruby
consul_exporter 'main' do
  action %i[install enable start]
end
```

## elasticsearch_exporter

* `es_all` If true, query stats for all nodes in the cluster, rather than just the node we connect to. (default: false)
* `es_ca` Path to PEM file that contains trusted Certificate Authorities for the Elasticsearch connection.
* `es_client_cert` Path to PEM file that contains the corresponding cert for the private key to connect to Elasticsearch.
* `es_client_private_key	` Path to PEM file that contains the private key for client auth when connecting to Elasticsearch.
* `es_cluster_settings` If true, query stats for cluster settings. (default: false)
* `es_clusterinfo_interval` Cluster info update interval for the cluster label. (default: 5m)
* `es_indices_settings` If true, query settings stats for all indices in the cluster. (default: false)
* `es_indices` If true, query stats for all indices in the cluster. (default: false)
* `es_shards` If true, query stats for all indices in the cluster, including shard-level stats (implies es.indices=true). (default: false)
* `es_snapshots` If true, query stats for the cluster snapshots. (default: false)
* `es_ssl_skip_verify` Skip SSL verification when connecting to Elasticsearch. (default: false)
* `es_timeout` Timeout for trying to get stats from Elasticsearch. (ex: 20s) (default: 5s)
* `es_uri` Address (host and port) of the Elasticsearch node we should connect to. (default: "http://localhost:9200")
* `log_format` Set the log target and format. Valid values are: [json, logfmt]
* `log_level` Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal]
* `user` User under whom to start elasticsearch exporter. (default: "root")
* `web_listen_address` Address to listen on for web interface and telemetry. (default: ":9114")
* `web_telemetry_path` Path under which to expose metrics. (default: "/metrics")

```ruby
elasticsearch_exporter 'main' do
  action %i[install enable start]
end
```

## haproxy_exporter

Monitor HAProxy metrics and stats. Read more [here](https://github.com/prometheus/haproxy_exporter).

* `haproxy_pid_file` Path to HAProxy pid file.
* `haproxy_scrape_uri` URI on which to scrape HAProxy.
* `haproxy_server_metric_fields` Comma-separated list of exported server metrics.
* `haproxy_ssl_verify` Flag that enables SSL certificate verification for the scrape URI.
* `haproxy_timeout` Timeout for trying to get stats from HAProxy.
* `log_format` Where to send log files. (default: "logger:stdout")
* `log_level` Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal]. (default: "info")
* `user` User under whom to start haproxy exporter. (default: "root")
* `web_listen_address` Address to listen on for web interface and telemetry. (default: "<IP_ADDRESS>:9116")
* `web_telemetry_path` Path under which to expose metrics. (default: "/metrics")

```ruby
haproxy_exporter 'main' do
  haproxy_scrape_uri 'http://user:pass@haproxy.example.com/haproxy?stats;csv'
end

haproxy_exporter 'main' do
  haproxy_scrape_uri 'unix:/run/haproxy/admin.sock'
  user 'haproxy'
end
```

Use the given defaults or set the attributes...

* `node['prometheus_exporters']['listen_interface']`
* `node['prometheus_exporters']['haproxy']['port']`
* `node['prometheus_exporters']['haproxy']['scrape_uri']`
* `node['prometheus_exporters']['haproxy']['ssl_verify']`
* `node['prometheus_exporters']['haproxy']['user']`

and add `recipe['prometheus_exporters::haproxy]` to your run_list.

## mongodb_exporter

* `collect_collection` Enable collection of Collection metrics
* `collect_connpoolstats` Collect MongoDB connpoolstats
* `collect_database` Enable collection of Database metrics
* `collect_indexusage` Enable collection of per index usage stats
* `collect_topmetrics` Enable collection of table top metrics
* `log_format` Set the log target and format. Example: "logger:syslog?appname=bob&local=7" or "logger:stdout?json=true"
* `log_level` Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal]
* `mongodb_authentication_database` Specifies the database in which the user is created
* `mongodb_max_connections` Max number of pooled connections to the database. (default: 1)
* `mongodb_socket_timeout` Amount of time to wait for a non-responding socket to the database before it is forcefully closed. Valid time units are 'ns', 'us' (or 'µs'), 'ms', 's', 'm', 'h'. (default: 3s)
* `mongodb_sync_timeout` Amount of time an operation with this session will wait before returning an error in case a connection to a usable server can't be established. (default: 1m)
* `mongodb_uri` MongoDB URI, format ([mongodb://][user:pass@]host1[:port1][,host2[:port2],...][/database][?options])
* `user` User under whom to start mongodb exporter. (default: "root")
* `web_auth_file` Path to YAML file with server_user, server_password keys for HTTP Basic authentication (overrides HTTP_AUTH environment variable).
* `web_listen_address` Address to listen on for web interface and telemetry. (default: ":9216")
* `web_ssl_cert_file` Path to SSL certificate file.
* `web_ssl_key_file` Path to SSL key file.
* `web_telemetry_path` Path under which to expose metrics. (default: "/metrics")

```ruby
mongodb_exporter 'main' do
  action %i[install enable start]
end
```

## mysqld_exporter

The mysqld_exporter resource supports running multiple copies of the MySQL exporter on the same system.

* `collector_flags` Specify which collector flags you wish to use. default: see belo
* `config_my_cnf` Path to .my.cnf file to read MySQL credentials from. (default: ~/.my.cnf)
* `data_source_name` MySQL connection string
* `instance_name` name of MySQL exporter instance. (**name attribute**)
* `log_format` If set use a syslog logger or JSON logging. Example: logger:syslog?appname=bob&local=7 or logger:stdout?json=true. Defaults to stderr.
* `log_level` Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal].
* `user` System user to run exporter as. (default "mysql")
* `web_listen_address` Address to listen on for web interface and telemetry. (default "<IP_ADDRESS>:9104")
* `web_telemetry_path` Path under which to expose metrics. (default "/metrics")

(default collector flags)

```
'\
-collect.global_status \
-collect.engine_innodb_status \
-collect.global_variables \
-collect.info_schema.clientstats \
-collect.info_schema.innodb_metrics \
-collect.info_schema.processlist \
-collect.info_schema.tables.databases \
-collect.info_schema.tablestats \
-collect.slave_status \
-collect.binlog_size \
-collect.perf_schema.tableiowaits \
-collect.perf_schema.indexiowaits \
-collect.perf_schema.tablelocks'
```

```ruby
mysqld_exporter 'main' do
  data_source_name '/'
  config_my_cnf '~/.my/cnf'
  user 'mysql'
end
```

## node_exporter

* `collector_diskstats_ignored_devices` Regexp of devices to ignore for diskstats. (default: "^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$")
* `collector_filesystem_ignored_fs_types` Regexp of filesystem types to ignore for filesystem collector. (default: "^(sys|proc|auto)fs$")
* `collector_filesystem_ignored_mount_points` Regexp of mount points to ignore for filesystem collector. (default: "^/(sys|proc|dev)($|/)")
* `collector_netclass_ignored_devices` Regexp of net devices to blacklist (mutually exclusive to device-whitelist) (default: "^$")
* `collector_netdev_device_blacklist` Regexp of net devices to ignore for netdev collector. (default: "^$")
* `collector_netdev_device_whitelist` Regexp of net devices to whitelist (mutually exclusive to device-blacklist) (default: "^$")
* `collector_ntp_ip_ttl` IP TTL to use while sending NTP query. (default: "1")
* `collector_ntp_local_offset_tolerance` Offset between local clock and local ntpd time to tolerate. (default: "1ms")
* `collector_ntp_max_distance` Max accumulated distance to the root. (default: "3.46608s")
* `collector_ntp_protocol_version` NTP protocol version. (default: "4")
* `collector_ntp_server_is_local` Certify that collector.ntp.server address is the same local host as this collector.
* `collector_ntp_server` NTP server to use for ntp collector. (default: "<IP_ADDRESS>")
* `collector_qdisc_fixtures` Test fixtures to use for qdisc collector end-to-end testing.
* `collector_perf_cpus` specify a list of alternate CPUs.
* `collector_runit_servicedir` Path to runit service directory.
* `collector_supervisord_url` XML RPC endpoint. (default: "http://localhost:9001/RPC2")
* `collector_systemd_enable_restarts_metrics` Enables service unit metric service\_restart\_total
* `collector_systemd_enable_start_time_metrics` Enables service unit metric unit\_start\_time\_seconds
* `collector_systemd_enable_task_metrics` Enables service unit tasks metrics unit\_tasks\_current and unit\_tasks\_max
* `collector_systemd_private` Establish a private, direct connection to systemd without dbus.
* `collector_systemd_unit_blacklist` Regexp of systemd units to blacklist. Units must both match whitelist and not match blacklist to be included. (default: ".+\\.(automount|device|mount|scope|slice)")
* `collector_systemd_unit_whitelist` Regexp of systemd units to whitelist. Units must both match whitelist and not match blacklist to be included. (defaut: ".+")
* `collector_textfile_directory` Directory to read text files with metrics from. (default: "")
* `collector_vmstat_fields` Regexp of fields to return for vmstat collector. (default: "^(oom\_kill|pgpg|pswp|pg.*fault).*")
* `collector_wifi_fixtures` Test fixtures to use for wifi collector metrics.
* `collectors_disabled` An array of explicitly disabled collectors.
* `collectors_enabled` An array of explicitly enabled collectors.
* `custom_options` Use for your configuration if defined proterties are not satisfying your needs.
* `log_format` Where to send log files. (default: "logger:stdout")
* `log_level` Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal]
* `path_procfs` procfs mountpoint. (default: "/proc")
* `path_rootfs` rootfs mountpoint. (default: "/")
* `path_sysfs` sysfs mountpoint. (default: "/sys")
* `user` System user to run node exporter as. (default "root") **change this to a non-root user if possible**
* `web_disable_exporter_metrics` Exclude metrics about the exporter itself. (promhttp_*, process_*, go_*)
* `web_listen_address` Address to listen on for web interface and telemetry. (default: ":9100")
* `web_max_requests` Maximum number of parallel scrape requests. Use 0 to disable. (default: "40")
* `web_telemetry_path` Path under which to expose metrics. (default: "/metrics")

```ruby

listen_ip = '<IP_ADDRESS>'

node_exporter 'main' do
  web_listen_address "#{listen_ip}:9100"
  action [:enable, :start]
end
```

or just set

* `node['prometheus_exporters']['listen_interface']`
* `node['prometheus_exporters']['node']['collectors']`
* `node['prometheus_exporters']['node']['textfile_directory']`
* `node['prometheus_exporters']['node']['ignored_net_devs']`
* `node['prometheus_exporters']['node']['user']`

and add `recipe['prometheus_exporters::node]` to your run_list.

## postgres_exporter

The postgres_exporter resource supports running multiple copies of PostgreSQL exporter the same system. This is useful if you have multiple copies of PostgreSQL running on the same system
(eg. different versions) or you are connecting to multiple remote PostgreSQL servers across the network.

* `constant_labels` A list of label=value separated by comma(,).
* `data_source_name` PostgreSQL connection string. E.g. `postgresql://login:password@hostname:port/dbname`
* `data_source_pass_file` The same as above but reads the password from a file.
* `data_source_pass` When using `data_source_uri`, this option is used to specify the password to connect with.
* `data_source_uri` An alternative to `data_source_name` which exclusively accepts the raw URI without a username and password component.
* `data_source_user_file` The same, but reads the username from a file.
* `data_source_user` When using `data_source_uri`, this option is used to specify the username.
* `disable_default_metrics` Use only metrics supplied from `queries.yaml` via `--extend.query-path`.
* `extend_query_path` Path to a YAML file containing custom queries to run.
* `instance_name` name of PostgreSQL exporter instance. (**name attribute**)
* `log_format` If set use a syslog logger or JSON logging. Example: logger:syslog?appname=bob&local=7 or logger:stdout?json=true. Defaults to stderr.
* `log_level` Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal].
* `user` System user to run exporter as. (default "postgres")
* `web_listen_address` Address to listen on for web interface and telemetry. (default "<IP_ADDRESS>:9187")
* `web_telemetry_path` Path under which to expose metrics. (default "/metrics")

```ruby

postgres_exporter '9.5_main' do
  data_source_name 'postgresql://localhost:5432/example'
  user 'postgres'
end
```

## process_exporter

Monitor resource usage of processes or process groups. Read more [here](https://github.com/ncabatoff/process-exporter).

* `children` If a proc is tracked, track with it any children that aren't part of their own group (default: true)
* `config_path` Optional config file for configuring which processes to monitor. The example below monitors all processes on the system. Alternately specific process names and groups may be specified using the `proc_names` and `name_mapping` properties
* `custom_options` Use for your configuration if defined properties are not satisfying your needs.
* `debug` Print debug information to the log. default: false
* `namemapping` Comma-separated list of alternating `name,regexp` values. It allows assigning a name to a process based on a combination of the process name and command line
* `procfs` procfs mountpoint. Default: "/proc"
* `procnames` Comma separated list of process names to monitor
* `recheck` On each scrape the process names are re-evaluated. This is disabled by default as an optimization, but since processes can choose to change their names, this may result in a process falling into the wrong group if we happen to see it for the first time before it's assumed its proper name. Default: false
* `threads` report on per-threadname metrics as well
* `user` User under whom to start process exporter. (default: "root")
* `web_listen_address` Address to listen on for web interface and telemetry. Default: ":9256"
* `web_telemetry_path` Path for the metrics endpoint. Default: '/metrics'

```ruby
process_exporter 'main' do
  config_path "/opt/process-exporter-#{node['prometheus_exporters']['process']['version']}.linux-amd64/all.yml"

  action %i[install enable]
end

file "/opt/process-exporter-#{node['prometheus_exporters']['process']['version']}.linux-amd64/all.yml" do
  content <<HERE
    process_names:
    - name: "{{.comm}}"
      cmdline:
      - '.+'
here
  notifies :start, 'process_exporter[main]'
end
```

## rabbitmq_exporter

* `cafile` Path to root certificate for access management plugin. Just needed if self signed certificate is used. Will be ignored if the file does not exist
* `certfile` Path to client certificate used to verify the exporter's authenticity. Will be ignored if the file does not exist
* `exclude_metrics` Metric names to exclude from export. Comma-seperated string or an array. e.g. "recv_oct,recv_cnt". See exporter_*.go for names
* `include_queues` Regex queue filter. Just matching names are exported
* `include_vhost` Regex vhost filter. Only queues in matching vhosts are exported
* `keyfile` Path to private key used with certificate to verify the exporter's authenticity. Will be ignored if the file does not exist
* `log_level` Log level. Possible values: "debug", "info", "warning", "error", "fatal", or "panic"
* `max_queues` Max number of queues before we drop metrics (disabled if set to 0)
* `output_format` Log ouput format. TTY and JSON are suported
* `publish_addr` Listening host/IP for the exporter
* `publish_port` Listening port for the exporter
* `rabbit_capabilities` Comma-separated list or an array of extended scraping capabilities supported by the target RabbitMQ server
* `rabbit_exporters` List of enabled modules. "connections" and shovel are disabled by default
* `rabbit_password` Password for rabbitMQ management plugin
* `rabbit_timeout` Timeout in seconds for retrieving data from management plugin
* `rabbit_url` Url to rabbitMQ management plugin (must start with http(s)://)
* `rabbit_user` Username for rabbitMQ management plugin. User needs monitoring tag!
* `skip_queues` Regex, matching queue names are not exported (useful for short-lived rpc queues). First performed INCLUDE, after SKIP
* `skip_vhost` Regex, matching vhost names are not exported. First performs INCLUDE_VHOST, then SKIP_VHOST
* `skiverify` Will ignore certificate errors of the management plugin if true (default: "false")
* `user` User under whom to start rabbitmq exporter. (default: "root")

```ruby

rabbitmq_exporter 'main' do
  rabbit_user 'Roger'
  rabbit_exporters %w[exchange node]
end
```

## redis_exporter

*Important:* For redis exporter version equal or lower than `0.34.1` use version `0.13.1` of this cookbook.

* `check_keys` Comma separated list of keys to export value and length/size, eg: `db3=user_count` will export key `user_count` from db `3`. db defaults to `0` if omitted. (default: "")
* `check_single_keys` Comma separated list of single keys to export value and length/size.
* `config_command` What to use for the CONFIG command (default: "CONFIG")
* `connection_timeout` Timeout for connection to Redis instance (default: "15s")
* `debug` Enable or disable debug output. (default: false)
* `include_system_metrics` Whether to include system metrics like e.g. redis\_total\_system\_memory\_bytes
* `is_tile38` Whether to scrape Tile38 specific metrics.
* `log_format` In what format should logs be shown. (default: "txt")
* `namespace` Namespace for the metrics. (default: "redis")
* `redis_addr` Address of one or more redis nodes, comma separated. (default: "redis://localhost:6379")
* `redis_only_metrics` Whether to export go runtime metrics also.
* `redis_password` Password to use when authenticating to Redis. (default: "")
* `script` Path to Lua Redis script for collecting extra metrics.
* `skip_tls_versification` Whether to to skip TLS verification.
* `user` User under whom to start redis exporter. (default: "root")
* `web_listen_address` address to listen on for web interface and telemetry. (default: "<IP_ADDRESS>:9121")
* `web_telemetry_path` Path under which to expose metrics. (default: "/metrics")

```ruby
redis_exporter 'main' do
  redis_addr 'redis://db01.example.com:6379,redis://<IP_ADDRESS>:6379'
  redis_password 'password_one,password_two'
  redis_alias 'example_production,example_staging'
end
```

## snmp_exporter

This exporter needs a custom generated config file. Read more [here](https://github.com/prometheus/snmp_exporter#configuration) and [here](https://github.com/prometheus/snmp_exporter/tree/master/generator). For test purposes and the most basic usage you can grab a default `snmp.yml` which is located here: `/opt/snmp_exporter-PASTE_CURRENT_VERSION.linux-amd64/snmp.yml`

* `config_file` default: '/etc/snmp_exporter/snmp.yaml'
* `custom_options` Any other raw options for your configuration if defined proterties are not satisfying your needs.
* `log_format` Where to send log files. (default: "logger:stdout")
* `log_level` Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal]
* `snmp_wrap_large_counters` Wrap 64-bit counters to avoid floating point rounding.
* `user` User under whom to start snmp exporter. (default: "root")
* `web_listen_address` Address to listen on for web interface and telemetry. (default: ":9116")

```ruby
snmp_exporter 'main' do
  config_file "/opt/snmp_exporter-#{node['prometheus_exporters']['snmp']['version']}.linux-amd64/snmp.yml"
end
```

## statsd_exporter

Monitor statsd metrics and stats. Read more [here](https://github.com/prometheus/statsd_exporter).

* `log_format` Where to send log files. (default: "logger:stdout")
* `log_level` Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal]. (default: "info")
* `statsd_listen_mapping_config` Metric mapping configuration file name
* `statsd_listen_read_buffer` Size (in bytes) of the operating system's transmit read buffer associated with the UDP or Unixgram connection
* `statsd_listen_tcp` TCP address on which to receive statsd metric lines
* `statsd_listen_udp` UDP address on which to receive statsd metric lines
* `statsd_listen_unixgram_mode` Unixgram socket permission mode
* `statsd_listen_unixgram` Unixgram socket path on which to receive statsd metric lines
* `user` User under whom to start the exporter. (default: "root")
* `web_listen_address` Address to listen on for web interface and telemetry. (default: "<IP_ADDRESS>:9102")
* `web_telemetry_path` Path under which to expose metrics. (default: "/metrics")

```ruby
statsd_exporter 'main' do
  statsd_listen_udp "9125"
  user 'statsd'
end
```

Use the given defaults or set the attributes...

* `node['prometheus_exporters']['listen_interface']`
* `node['prometheus_exporters']['statsd']['port']`
* `node['prometheus_exporters']['statsd']['listen_udp']`
* `node['prometheus_exporters']['statsd']['listen_tcp']`
* `node['prometheus_exporters']['statsd']['listen_unixgram']`
* `node['prometheus_exporters']['statsd']['listen_unixgram_mode']`
* `node['prometheus_exporters']['statsd']['mapping_config']`
* `node['prometheus_exporters']['statsd']['read_buffer']`
* `node['prometheus_exporters']['statsd']['user']`

and add `recipe['prometheus_exporters::statsd]` to your run_list.

## varnish_exporter

* `docker_container_name` Docker container name to exec varnishstat in.
* `exit_on_errors` Exit process on scrape errors. (default: "false")
* `n` varnishstat -n value.
* `N` varnishstat -N value.
* `user` User under whom to start varnish exporter. (default: "root")
* `varnishstat_path` Path to varnishstat. (default: "varnishstat")
* `verbose` Verbose logging. (default: "false")
* `web_listen_address` Address on which to expose metrics. (default: ":9131")
* `web_telemetry_path` Path under which to expose metrics. (default: "/metrics")
* `with_go_metrics` Export go runtime and http handler metrics. (default: "false")

```ruby
varnish_exporter 'main' do
  varnishstat_path "/my/own/varnishstat"
  web_listen_address "<IP_ADDRESS>:9132"
  web_telemetry_path "/_metrics"
  user "my_user"
end
```

Use the given defaults or set the attributes...

* `node['prometheus_exporters']['listen_interface']`
* `node['prometheus_exporters']['varnish']['varnishstat_path']`
* `node['prometheus_exporters']['varnish']['telemetry_path']`
* `node['prometheus_exporters']['varnish']['N']`
* `node['prometheus_exporters']['varnish']['docker_container_name']`
* `node['prometheus_exporters']['varnish']['exit_on_errors']`
* `node['prometheus_exporters']['varnish']['n']`
* `node['prometheus_exporters']['varnish']['verbose']`
* `node['prometheus_exporters']['varnish']['with_go_metrics']`
* `node['prometheus_exporters']['varnish']['user']`

and add `recipe['prometheus_exporters::varnish]` to your run_list.

## wmi_exporter

Expects the Chocolatey package manager to already be installed.  This is up to individuals to provide by including the [Chocolatey cookbook](https://github.com/chocolatey/chocolatey-cookbook) in their own wrapper cookbooks.

* `enabled_collectors`, String, default: 'cpu,cs,logical\_disk,net,os,service,system'
* `listen_address`, String, default: '<IP_ADDRESS>'
* `listen_port`, String, default: '9182'
* `metrics_path`, Strin, default: '/metrics'
* `version`, String, default: '0.2.7'

Use the given defaults or set the attributes...

* `node['prometheus_exporters']['wmi']['version']['listen_interface']`
* `node['prometheus_exporters']['wmi']['listen_address']`
* `node['prometheus_exporters']['wmi']['listen_port']`
* `node['prometheus_exporters']['wmi']['metrics_path']`

and add `recipe['prometheus_exporters::wmi]` to your run_list.

## nginx_exporter

* `nginx_retries`, String, default: 5
* `nginx_retry_interval`, String, default: 5s
* `nginx_scrape_uri`, String, default: 'http://<IP_ADDRESS>:83/nginx_status'
* `nginx_ssl_ca_cert`, String
* `nginx_ssl_client_cert`, String
* `nginx_ssl_client_key`, String
* `nginx_ssl_verify`, [true, false], default: false
* `nginx_timeout`, String, default: 5s
* `prometheus_const_labels`, String, default: ""
* `web_listen_address`, String, default: ':9113'
* `web_telemetry_path`, String, default: '/metrics'

```ruby
  nginx_exporter 'main' do
    action %i(install enable start)
  end
```
# Discovery

Each exporter will set an attribute when it's enabled, in the form of `node['prometheus_exporters'][exporter_name]['enabled']`. This makes it possible to search for
exporters within your environment using knife search or from within other cookbooks using a query such as:

```knife search node 'prometheus_exporters_node_enabled:true'```

This query will return all nodes with configured node exporters which can be used for automatically configuring Prometheus servers.

# Known Issues

* The snmp_exporter requires a configuration file that is usually created by a config generator. Currently this functionality must be provided by a wrapper cookbook.

repository: evilmartians/chef-prometheus-exporters

gha_language: Ruby

gha_license_id: NOASSERTION

repo_name: evilmartians/chef-prometheus-exporters