text:
# Re-indexing Existing Data

This section covers reindexing data that are already stored in databases configured for WSO2 API-M Analytics.

Data indexed and stored in databases may need to be reindexed due to the following reasons:

-   If the index data is corrupted.
-   If you change the database to another database, the data in the new database needs to be re-indexed.

To reindex existing data, follow the steps below:

1.
2.  Remove all the index data stored in the `<API-M_ANALYTICS_HOME>/repository/data` directory.
3.  In the `<API-M_ANALYTICS_HOME>/repository/conf/analytics/local-shard-allocation-config.conf` file, change the mode for all the shards from `NORMAL` to `INIT` .
4.  Restart API-M Analytics.

repository: ajanthan/docs-apim

repo_name: ajanthan/docs-apim


text:
This code was taken out of fortylines main repo and generalized into
an opensource Django SaaS framework.

Development
===========

After cloning the repository, create a virtualenv environment, install
the prerequisites, create and load initial data into the database, then
run the testsite webapp.

    $ virtualenv-2.7 _installTop_
    $ source _installTop_/bin/activate
    $ pip install -r requirements.txt
    $ python manage.py syncdb
    $ python manage.py loaddata testsite/fixtures/test_data.json
    $ python manage.py runserver

    # Browse http://localhost:8000/
    # Login with username: john and password: yoyo

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
layout: post
title: Window installation
permalink: window
date: 2017-04-12
---

View hierarchies in iOS applications have only gotten more complex over the years, particularly as view controller containment has gained traction as a nice way to compose parts of your application together without succumbing to inheritance (and as such, [tighter coupling than you probably want](https://en.wikipedia.org/wiki/Composition_over_inheritance)). One downside of this is that displaying something _on top_ of the currently displayed view can potentially involve quite a bit of hierarchy traversal and understanding of how your UI’s pieces all fit together.

When attempting to overlay something on top of your entire view hierarchy – common examples include a notification banner or a heads-up display – it’s helpful to move up a level beyond regular views or even view controllers, and start thinking in the context of _windows_. While one could reach for `UIApplication.shared.keyWindow`, or employ some private API to find e.g. the window that’s currently hosting the status bar or an alert dialog, a far simpler and cleaner approach is to simply create a new window of your own. This is far from a new technique, but I only recently learned how easy it actually is in practice.

`UIWindow` inherits from `UIView`, meaning you can simply create a new instance by providing it with a frame: `let window = UIWindow(frame: frame)`. Magically, _you don’t actually have to explicitly add your new window to the view hierarchy_. Simply initializing it and setting its `isHidden` property to `false`[^1] will cause it to be shown on screen, with its stack order dictated by its `windowLevel` property. `UIWindowLevelStatusBar` allows your window to sit atop everything else.

Keep a strong reference to your newly created window and add whatever subviews you want to it. When finished, simply removing the reference will cause the window (and as such, its subviews) to be removed from the view hierarchy (and subsequently, from memory).

There’s a little bit of work involved in making sure that your new window doesn’t unintentionally impact the status bar style, so I’ve provided some sample code below that shows how to specify exactly how you want it to behave (if you’re not using view controller-based status bar appearance, you can ignore this and continue driving the style however you do currently).

```swift
extension UIWindow
  final class StatusBarPreferringViewController: UIViewController
    // MARK: - Inputs

    private let statusBarStyle: UIStatusBarStyle

    // MARK: - Initialization

    init(statusBarStyle: UIStatusBarStyle)
      self.statusBarStyle = statusBarStyle

      super.init(nibName: nil, bundle: nil)
    }

    required init?(coder aDecoder: NSCoder)
      fatalError("init(coder:) has not been implemented")
    }

    // MARK: - UIViewController

    override var prefersStatusBarHidden: Bool
      return false
    }

    override var preferredStatusBarStyle: UIStatusBarStyle
      return statusBarStyle
    }
  }

  static func newWindow(level: UIWindowLevel = UIWindowLevelStatusBar, statusBarStyle: UIStatusBarStyle) -> UIWindow
    guard let keyWindow = UIApplication.shared.keyWindow else fatalError("Must have a key window")

    let window = UIWindow(frame: keyWindow.bounds)
    window.windowLevel = level
    window.isHidden = false
    window.rootViewController = StatusBarPreferringViewController(statusBarStyle: statusBarStyle)
    return window
  }
}
```

Thanks to [Joe Fabisevich](https://twitter.com/mergesort) and [Krzysztof Zabłocki](https://twitter.com/merowing_) for opening the blinds and showing me the light.

[^1]:	Unlike other `UIView` subclasses, `UIWindow` seems to be hidden by default.

license: MIT

gha_language: JavaScript


text:
# multiplayer-game
Dummy test project with an objective of creating a JavaScript canvas 2d engine for games and other projects.

## Warning
Script uses latest version of JavaScript that might not be available on all the devices.

Please **do not use this library** in production.

## Install
Clone the repository and then do
```
npm install
```
That will install the dependencies for nodejs app that runs the website, in case you need it

If you only need to install engine library include /views/assets/js/lib/index.js in your html. Lib folder must be available in path /js/lib for browser to recognize the library.

## Example
Example code creates few entities and tests various features of the library using basic animation.
```JAVASCRIPT
let canvas;
let renderer;
let entity_manager;

let entity;
let entity1;
let entity2;
let entity3;

let i = 0;

window.onload = () => {
  canvas = document.getElementById('ctx');
  renderer = new Renderer(canvas, 600, 600, 60);

  entity = new Entity(50, 50, 100, 50, 0, '/img/texture.jpg', renderer);
  entity1 = new Entity(50, 50, 100, 50, 45, '/img/texture.jpg', renderer);
  entity2 = new Entity(50, 50, 100, 50, 90, '/img/texture.jpg', renderer);
  entity3 = new Entity(50, 50, 100, 50, 135, '/img/texture.jpg', renderer);

  setInterval(animate, 1000/60);
};

function animate(){
  i += 2;

  let value = i / 180 * Math.PI;

  entity.x = 100 + Math.sin(value)*50;
  entity.y = 100 + Math.cos(value)*50;
  entity.rotation = i % 360;

  entity1.x = 175 - Math.sin(value)*50;
  entity1.y = 175 - Math.cos(value)*50;

  entity2.x = 175 + Math.sin(value)*50;
  entity2.y = 175 + Math.cos(value)*50;

  entity3.x = 175 - Math.sin(value)*50;
  entity3.y = 175 - Math.cos(value)*50;
}
```

Following outputs (if all resources used are from this repo):

![GIF](https://i.gyazo.com/694d347d54921a3fea1de2d3d719a194.gif)


text:
# Dynamic Table - jQuery Plug-in

## Introduction

The *Dynamic Table* is a table that displays data in a similar way to a spreadsheet
but allows the data to be loaded from you backend and control over what can be
edited and how it is being saved.

It allows advanced filtering and sorting as well as interaction with your
application.

## Features

 * Spreadsheet feel
 * Load data via AJAX
 * Paged scrolling (handles easily tens of thousands of lines)
 * Filters and Sorting
 * Editable fields
 * Events on select
 * jQuery UI based

## Prerequisites

 * jQuery
 * jQuery UI
 * moment.js (if you are planning on displaying dates)

If you are using Bootstrap the JQuery-Bootstrap project is recommended to make
the components look more like Bootstrap.

## Getting Started

[Working sample](sample/index.html)
that goes with this introduction.

### 0) Import

First import the `dynamic-table.jquery.js` and any dependencies.

### 1) Initialize Plug-in

To initialize the component select an empty element, preferably a `<div>`
and apply the jQuery plug-in:

```javascript
    $("#sample-grid").dynamicTable({
        fillParent : false,
        showCounter: true
    });
```

Available options are:

 * `fillParent` (default: `true`): Automatically keeps the grid the same size as
   the parent object this is usefull for any sort of full screen applications.
 * `showCounter` (default: `false`): Displays a counter column as the first
   column, which gives the row number.
 * `showCheck` (default: `false`): Displays a checkmark at the beginning of the
   row, that allows the selection of multiple rows. Only works when the counter
   column is also visible.
 * `rowHeight` (default: `35`): The height of rows in pixels.

### 2) Define Columns

Next you define the columns as an array of column definitions

```javascript
var myColumns = [{
                    name       : "Name",
                    type       : "string",
                    visible    : true,
                    filterType : "search",
                    width      : 200
                },
                [...]
                ]
```

Available options are:

 * `name`: The name of the column.
 * `type` (default: `"string"`) : The datatype of the columns. Options are: `string`, `date`, 'number'
   and `boolean`.
 * `visible` (default: `false`): Whether or not the column is visible or not. This allows for
   hiddend data columns, such as ID fields etc.
 * `filterType` (default: `list`): The type of filter to display for the column.
   Options are: `list`, `search` and `dateRange`.
 * `width` (default: `100`): The width of the column in pixels.
 * `format`: The format used for columns, such as date an number columns. The
   format is based on the moment.js format.
 * `editor`: Instance of the editor used to allow this cell to be edited.

### 3) Getting the data

You can get the data using an AJAX call (`$.getJSON()`) or generate it in your
JavaScript.

The format expected is an Array, that contains an array for every row. The
grid will map every element in the row array to the column at the same index.

To hide items in the array, add invisible columns to the column list.

Sample data:

```javascript
var myData = [
                [10001, "Bill Smith", new Date(1956, 3, 12), "United States", "Texas", "English"],
                [10002, "Michael Jones", new Date(1975, 7, 23), "United States", "Florida", "English"],
                [10003, "Heinz Mayer", new Date(1972, 8, 2), "Germany", "Bayern", "German"],
                [10004, "Mary Miller", new Date(1981, 1, 6), "United States", "California", "English"],
                [10005, "Jose Gonzalez", new Date(1959, 1, 6), "Mexico", null, "Spanish"],
             ];
```

### 4) Putting it all together

Now that we have our element on the page, our columns and our data we just need
to load it all into the table:

```
$("#sample-grid").dynamicTable("data", myData, myColumns);
```

## Interacting with the table

To allow your application to interact with the table, it dispatches two events:

 * `rowSelect`: Dispatched when the row gets selected either by keyboard
   interaction or single click.
 * `rowDoubleClick`: Dispached when the row gets double-clicked.

The `event` parameter gets a `row` property attached, which contains the original
data of the affected row.

```javascript
$("#sample-grid").on("rowSelect", function(aEvent) {
    $("#selected-data").html("You selected <strong>" + aEvent.row[1] + "</strong>");
});
```

## Editing content

So far we have only dealt with content loaded from the database that the user
cannot interact with.

This is done by *editors*. These are not natively part of the plugin and come as
separate plug-in: `dynamic-table-editor.jquery.js`

So first you have to import this file.

To instanciate an editor call the following:

```javascript
var myEditor = $("<div/>").dynamicTableEditor({
    type : "text",
    editHandler: function(aData) {
        // Save here:
        //$.post(
        //    ...
        //);
    }
});
```

The following options are available:

 * `type` (default: `text`): The type of editor. Available types are:
    * `text`: Simple text field.
    * `list`: Select list
    * `date`: Datepicker
 * `editHandler`: The function that gets called when an edit is complete. This
   is the point where you save the data back to the server or wherever.
   This function gets called with two arguments:
    * `value`: The value of the editor
    * `context`: Object that contains data on the current column and row.

For `list` editors only:

 * `values`: A list of values to be rendered into the list.
 * `firstBlank` (default: `true`): Whether to render the first item of the list as blank item.
 * `idProperty`: If the values are a complex object, this defines which property
   is the ID that gets returned when selected.
 * `nameProperty`: If the values are a complex object, this defines which property
   is the name that gets shown

repository: ericfarrow/dynamic-table

repo_name: ericfarrow/dynamic-table


text:
The Documentation Compendium

  [![Tweet](https://img.shields.io/twitter/url/https/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=%F0%9F%93%A2%20Various%20README%20templates%20and%20tips%20on%20writing%20high-quality%20documentation%20that%20people%20want%20to%20read.&url=https://github.com/kylelobo/The-Documentation-Compendium)
  [![Status](https://img.shields.io/badge/status-active-success.svg)]()
  [![GitHub Issues](https://img.shields.io/github/issues/kylelobo/The-Documentation-Compendium.svg)](https://github.com/kylelobo/The-Documentation-Compendium/issues)
  [![GitHub Pull Requests](https://img.shields.io/github/issues-pr/kylelobo/The-Documentation-Compendium.svg)](https://github.com/kylelobo/The-Documentation-Compendium/pulls)
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)

---

💡 Various templates & tips on writing high-quality documentation that people want to read.

## 📝 Table of Contents

- [Why must you document your project](#why_document)
- [Best Practices](#best_practices)
- [Templates](#templates)
- The Art of Technical Writing
  - [Novice Technical Writers](https://www.writethedocs.org/guide/#new-to-caring-about-documentation)
  - [Experienced Technical Writers](https://www.writethedocs.org/guide/#experienced-documentarian)
  - [API Documentation](https://www.writethedocs.org/guide/#api-documentation)
  - [Adding badges](https://github.com/badges/shields/blob/master/README.md#examples)
  - [Tools](https://www.writethedocs.org/guide/#tools-of-the-trade)
- [Technical Writer Programs](#programs)
- [Awesome Technical Writing Sources](#sources)
- [Get Feedback](#feedback)
- [Acknowledgements](#acknowledgements)

## 🤔 Why must you document your project?

- It doesn’t matter how good your software is, because if the documentation is not good enough, people will not use it.
Even if for some reason they have to use it because they have no choice, without good documentation, they won’t use it effectively or the way you’d like them to
- THE MAJORITY OF PEOPLE GLANCE AND LEAVE. Make it pretty so that it's easier for them to star before they leave. The more stars you have, the likelier it is that serious developers will use your repo
- You will be using your code in 6 months. Code that you wrote 6 months ago is often indistinguishable from code that someone else has written
- You want people to use your code because you think that others might find it useful. However, people need to understand why your code might be useful for them, before they decide to use it
- You want people to help out. If you don’t have documentation, you will miss out on a whole class of contributors
- You want to be a better writer

## 📢 Best Practices

**✔ Things to remember:**

- Keep a lighthearted friendly tone. Treat the reader as someone who doesn't have a lot of knowledge about the topic but is very interested
- Keep things brief
- Use headings frequently. This breaks things up when reading and often it is good for linking to specific information
- Link to other places in the documentation often but only for additional information. Readers should not have to navigate through several pages to find the information that they need about one specific thing. Just inline the immediately relevant information and link off if they want to know more
- Use as many code snippets, CLI, etc. examples as possible. Show the reader what you mean
- Gently introduce a guide before diving into technical details. This gives context and readers are more likely to stay engaged longer
- It is always good to describe the functionality of the various files in your project
- Always use gender-neutral pronouns. A gender-neutral pronoun is a pronoun which does not associate a gender with the individual who is being discussed. For eg. - using 'they' instead of 'he / she'

**❌ Things you should avoid:**

- Don't assume prior knowledge about the topic. If you want to appeal to a large audience, then you are going to have people with very diverse backgrounds
- Don't use idioms. Write using more formal terms that are well defined. This makes it easier for non-native English speakers and for translations to be written
- Don't clutter explanations with overly detailed examples
- Don't use terms that are offensive to any group. There will never be a good reason to

## 📜 Templates

- [README](/README%20Templates)
- [Pull Request](/PULL_REQUEST_TEMPLATE.md)
- [Issues](/.github/ISSUE_TEMPLATE)
- [Contributing](/CONTRIBUTING.md)
- [Code of Conduct](/CODE_OF_CONDUCT.md)
- [Coding Guidelines](/CODING_GUIDELINES.md)
- [Codebase Structure](/CODEBASE_STRUCTURE.md)
- [TODO](/TODO.md)

**📦 CGX CLI - a template generator:**

[CGX](https://github.com/jeroenouw/cgx) - Generate all the recommended documentation / files (pre-filled) for the GitHub and GitLab community standards. (Issue templates, code of conduct, etc.)

##  👨💻 Technical Writing Programs

1. [A List of Open Source Projects with Volunteer Documentation Opportunities](https://www.reddit.com/r/technicalwriting/comments/800a9a/a_list_of_open_source_projects_with_volunteer/)

## 🎉 Awesome Technical Writing Sources

1. [r/technicalwriting](https://www.reddit.com/r/technicalwriting/)
2. [My Tech Writing Process](https://amrutaranade.com/2018/03/07/my-writing-process/) - _Amruta Ranade_
3. [Developer to Technical Writer](https://www.reddit.com/r/technicalwriting/comments/a1x6c8/) - _r/technicalwriting_
4. [awesome-github-templates](https://github.com/devspace/awesome-github-templates) - _devspace_
5. [makeareadme](https://www.makeareadme.com/) - _dguo_
6. [What nobody tells you about documentation](https://www.divio.com/blog/documentation/) - _Daniele Procida_
7. [What I learned from an old GitHub project that won 3,000 Stars in a Week](https://www.freecodecamp.org/news/what-i-learned-from-an-old-github-project-that-won-3-000-stars-in-a-week-628349a5ee14/) - _TOAST UI_
8. [3 Essential Components of Great Documentation](https://dev.to/eli/3-essential-components-of-great-documentation-2cih) - _Eli B_
9. [Inspiring techies to become great writers](http://cameronshorter.blogspot.com/2019/02/inspiring-techies-to-become-great.html) - _Cameron Shorter_
10. [Technical Documentation Writing Principles](http://cameronshorter.blogspot.com/2018/06/technical-documentation-writing.html) - _Cameron Shorter_
11. [Building Our Documentation Site on platformOS — Part 2: Content Production and Layouts](https://www.platformos.com/blog/post/blog/building-our-documentation-site-on-platformos-part-2-content-production-and-layouts) - _Diana Lakatos_
12. [Twitter thread on words to avoid when writing documentation](https://twitter.com/JessTelford/status/992756386160234497) - _Jess Telford_

## 🗒 Get Feedback

- [feedmereadmes](https://github.com/LappleApple/feedmereadmes) - Free README editing + feedback to make your open-source projects grow. See the README maturity model to help you keep going
- [maintainer.io](https://maintainer.io/) - Free README standardization and feedback if you click on 'Book an audit'

## 🎊 Acknowledgements

1. [Documenting your projects on GitHub](https://guides.github.com/features/wikis/) - _GitHub Guides_
2. [documentation-handbook](https://github.com/jamiebuilds/documentation-handbook) - _jamiebuilds_
3. [Documentation Guide](https://www.writethedocs.org/guide/) - _Write the Docs_

## ✋ P.S.

- This repo is under active development. If you have any improvements / suggestions please file an [issue](https://github.com/kylelobo/The-Documentation-Compendium/issues/new/choose) or send in a [Pull Request](/CONTRIBUTING.md)
- The [TODO.md](/TODO.md) file or the [issues](https://github.com/kylelobo/The-Documentation-Compendium/issues) page are a good place to visit if you want to pick up some task. They have a list of things are to be implemented in the near future

repository: Salakar/The-Documentation-Compendium

repo_name: Salakar/The-Documentation-Compendium


text:
---
title: Provide version information for use and discovery
layout: bestpractice_cover
tags:
  - assure
  - documentation
  - metadata
  - provenance
  - quality
step:
  - assure
  - preserve
related:
  - develop-quality-assurance
  - identify-and-use
  - plan-data-management
update:
  - January 12, 2014
author:
  - DataONE Best Practices Working Group
organization: DataONE
org_url: http://www.dataone.org
org_logo: DataONE.png
resource: true
categories: ["Best Practice"]
---

Provide versions of data products with defined identifiers to enable discovery and use.

Items to consider when versioning data products:
- Develop definition of what constitutes a new version of the data, for example:
  - New processing algorithms
  - Additions or removal of data points
  - Time or date range
  - Included parameters
  - Data format
  - Immutability of versions
- Develop standard naming convention for versions with associated descriptive information
- Associate metadata with each version including the description of what differentiates this version from another version

## Description Rationale

Data products potentially change through time as they are developed using new or improved algorithms or based upon different source data. Providing versions with defined identifiers will enable users to determine the appropriate version of the data to use for their particular application and allow them to properly cite the data used in an analysis allowing others to replicate their work.

## Additional Information

NASA Modis versioning using processing levels and collections:
- [https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table](https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table)
- [https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table/myd13a1_v006](https://lpdaac.usgs.gov/dataset_discovery/modis/modis_products_table/myd13a1_v006)
- [http://landweb.nascom.nasa.gov/QA_WWW/forPage/MOD13_VI_C5_Changes_Docume...](http://landweb.nascom.nasa.gov/QA_WWW/forPage/MOD13_VI_C5_Changes_Document_06_28_06.pdf)

gha_language: HTML


text:
# React PDF Selection

This library provides text and rectangular area selections for PDF documents. It is built on top of PDF.js by Mozilla.
Selection position data is independent of the current viewport, to make it suitable for resizing documents and permanent
storage. PDF pages are virtualized to prevent too many page renders and make rendering of large documents more smoothly.

Installation is simply done with `npm` or `yarn`:

```
npm install react-pdf-selection
// or
yarn install react-pdf-selection
```

After this, the `PdfViewer` component can be used to create a PDF viewer on which selections can be made.
There are options to provide selections to the viewer, components to overwrite how these selections are rendered
and options to listen for new selections made by users. Default components, as well as a PdfLoader are provided in this
 package as well and can optionally be used. See the example and API reference for all the details.

### Examples

An online example can be found at https://mathiasmeuleman.github.io/react-pdf-selection

To run the example locally however, from the `packages/examples` folder you can run:

```
npm install
npm start
```

### API Reference

#### `PdfViewer`

General notes:
- All function props that are passed to `PdfViewer` (such as `enableAreaSelection`, `onTextSelection`, etc) should be memoized to avoid performance hits.
- Selections can receive objects as generic types. This allows for additional data to be passed to the Selections by the user.
This data will also be provided when accessing the props in e.g. `textSelectionComponent`, the generics make sure this is properly typed.
If you don't use typings, or don't use additional data for the Selections, don't worry about it, everything will work fine without them.

Property | Type | Required | Notes
:---|:---|:---|:---
url | `string` | yes | The URL from which the PDF file will be retrieved. Note that CORS headers might be needed if the file resides on a remote server.
selections | `SelectionType<D>[]` | no | See the `SelectionType` definitions below. Note that the bounding rectangles should be normalized by the page dimensions (so should be between 0 and 1).
enableAreaSelection | `(event: React.MouseEvent) => boolean` | no | Indicates whether the area selection mode should be enabled. On default the text selection mode is active.
onLoad | `(originalPageDimensions: PageDimensionData) => void` | no | Is called on document load. The original page dimensions are passed with it.
onPageDimensions | `(pageDimensionData: PageDimensionData) => void` | no | Is called whenever the page dimensions are recalculatd.
onTextSelection | `(selection?: NormalizedTextSelection) => void` | no | Is called with the `NormalizedTextSelection` when a new text selection is made, or with `undefined` when the text selection is cancelled/removed.
onAreaSelection | `(selection?: NormalizedAreaSelection) => void` | no | Is called with the `NormalizedAreaSelection` when a new area selection is made, or with `undefined` when the area selection is cancelled/removed.
textSelectionColor | `CSSProperties["color"]` | no | The color for selected text in the rendered PDF document. Defaults to `"blue"`.
areaSelectionComponent | `(props: AreaSelectionProps<D>) => JSX.Element` | no | Override for the default `AreaSelection` component.1
textSelectionComponent | `(props: TextSelectionProps<D> => JSX.Element` | no | Override for the default `TextSelection` component.1
newAreaSelectionComponent | `(props: NewAreaSelectionProps) => JSX.Element` | no | Override for the default `NewAreaSelection` component.1
children | `(props: {document: ReactElement}) => ReactElement | no | Override for the default Document renderer. The `document` prop contains the `ReactElement` in which the entire PDF viewer is rendered. When not provided, the `document` is rendered as is.

1 See the [custom component specification](#custom-component-specification)

#### `SelectionType`

Property | Type | Required | Notes
:---|:---|:---|:---
position | `NormalizedPosition` | yes | The normalized position of the selection on the document.
text | `string` | no | The text contained in the selection. This property is required when the selection is a `TextSelectionType`, and is ignored when the selection is an `AreaSelectionType`.
image | `string` | no | The Base64 encoded PNG image of an area selection. This property is required when the selection is an `AreaSelectionType`, and is ignored when the selection is a `TextSelectionType`.

#### `Position`

Property | Type | Required | Notes
:---|:---|:---|:---
boundingRect | `BoundingRect` | yes | The bounding rectangle of the entire selection.
rects | `BoundingRect[]` | yes | The bounding rectangle of each of the selections rectangles. In case of an area selection, this is equal to `boundingRect`, in case of a text selection there is one `BoundingRect` for each line of selected text.
pageNumber | number | yes | 1-based page number on which the selection is made.
pageOffset | number | yes | The total offset in height, caused by all the `pageNumber - 1` pages before this one.

#### `NormalizedPosition`

Property | Type | Required | Notes
:---|:---|:---|:---
absolute | `{boundingRect: BoundingRect; rects: BoundingRect[]}` | yes | The absolute bounding rectangles of the selection, with coordinates corresponding to the current page dimensions. The `rects` are the individual bounding rectangles for each line of text (if text selection), the `boundingRect` is the larger encompassing bounding rectangle.
normalized | `{boundingRect: BoundingRect; rects: BoundingRect[]}` | yes | The normalized bounding rectangles of the selection, with coordinates normalized to the current page dimensions. The `rects` are the individual bounding rectangles for each line of text (if text selection), the `boundingRect` is the larger encompassing bounding rectangle.
pageNumber | number | yes | 1-based page number on which the selection is made.
pageOffset | number | yes | The total offset in height, caused by all the `pageNumber - 1` pages before this one.

#### `BoundingRect`

Property | Type | Required
:---|:---|:---
left | number | yes
top | number | yes
right | number | yes
bottom | number | yes

#### `PageDimensionData`

Property | Type | Notes
:---|:---|:---
pageDimensions | `Map<number, { width: number; height: number }>` | A map of page dimensions, where the keys are page numbers (1-based, as in the `Position` objects) and values are `{ width: number; height: number }` objects.
pageYOffsets | `number[]` | An array of page height offsets, indicating at what height the top of the page is. Takes the gap between pages and the border / margin at the top of the document into account.

### Custom component specification

#### Shared typings
##### `BoundingRectWithCSSProperties` properties
- `left`: `CSSProperties["left"]`
- `top`: `CSSProperties["top"]`
- `width`: `CSSProperties["width"]`
- `height`: `CSSProperties["height"]`

##### `PositionWithCSSProperties` properties
- `pageNumber`: `number`
- `boundingRect`: `BoundingRectWithCSSProperties`
- `rects`: `BoundingRectWithCSSProperties[]`

#### Shared components
##### AreaSelectionComponent
Can be provided to override the default `AreaSelection` component. Should be a React class component or function component
that receives the following props:
- `areaSelection`: `{image: string; position: PositionWithCSSProperties}`

##### TextSelectionComponent
Can be provided to override the default `TextSelection` component. Should be a React class component or function component
that receives the following props:
- `textSelection`: `{text: string; position: PositionWithCSSProperties}`

##### NewAreaSelectionComponent
Can be provided to override the default `NewAreaSelection` component. Should be a React class component or function component
that receives the following props:
- `boundingRect`: `BoundingRectWithCSSProperties`

New text selections are shown through default text selections. The color of these selections can be customized,
see the `PdfViewer` props definitions for that.

### Prior art

 - [`react-pdf`](https://github.com/wojtekmaj/react-pdf) and [`react-pdfjs`](https://github.com/erikras/react-pdfjs) provide React
wrappers for PDF.js.
 - [`pdfjs-annotate`](https://github.com/instructure/pdf-annotate.js/) does not
provide text highlights out of the box.
 - [`react-pdf-highlighter`](https://github.com/agentcooper/react-pdf-highlighter) provides highlights, but however misses
type definitions and does not provide the freedom for many applications.

### Contributing

The library can be compiled by running `npm run build` (alternatively use `npm run dev` to enable TypeScript `--watch` option).
Use `npm link` to link the `dist` folder to your `node_modules`, so changes are automatically updated.

Feel free to submit a pull request!

repository: cyogian/react-pdf-selection

repo_name: cyogian/react-pdf-selection


text:
# Honeycomb Agentless Integrations for AWS

AWS Agentless integration to send data to [Honeycomb](https://www.honeycomb.io), a service for debugging your software in production.

This is a collection of AWS Lambda-based integrations packaged in AWS Cloudformation, designed to help you get data from AWS services without the need to run a server-based agent. We currently accept Cloudwatch Logs and S3.

We hope to support more AWS services in the future - your feedback will help us know which services to add support for first. This is a BETA - there may still be some bugs, and behavior may change in the future. We're also working to refine the installation process to get you going even faster!

If you aren't serverless, you may be looking for [`honeyaws`](https://github.com/honeycombio/honeyaws).

## Current Features

- Generic JSON integration for Cloudwatch Logs
- Generic RegEx integration for Cloudwatch Logs
- VPC Flow Log integration for Cloudwatch Logs
- Generic JSON integration for S3 Logs
- AWS ELB integration for S3 Logs
- AWS ALB integration for S3 Logs
- S3 Bucket Log integration for S3 Logs
- MySQL RDS Integration for Cloudwatch Logs

## Installation

### Generic JSON integration for Cloudwatch

[Click here](https://console.aws.amazon.com/cloudformation/home#/stacks/new?stackName=honeycomb-cloudwatch-integration&templateURL=https://s3.amazonaws.com/honeycomb-builds/honeycombio/integrations-for-aws/LATEST/templates/cloudwatch-logs-json.yml) to launch the AWS Cloudformation Console to create the integration stack. You will need one stack per Cloudwatch Log Group. The integration is configured using Cloudformation parameters, and for this template you will need to supply the following parameters:

- Stack Name
- Cloudwatch Log Group Name
- Your honeycomb write key (optionally encrypted)
- Target honeycomb dataset

Optional inputs include:

- Sample rate
- The ID of the AWS Key Management Service key used to encrypt your write key. If your write key is not encrypted, do not set a value here

### Generic JSON integration for S3

[Click here](https://console.aws.amazon.com/cloudformation/home#/stacks/new?stackName=honeycomb-s3-integration&templateURL=https://s3.amazonaws.com/honeycomb-builds/honeycombio/integrations-for-aws/LATEST/templates/s3-logs-json.yml) to launch the AWS Cloudformation Console to create the integration stack. You will need one stack per S3 bucket that you want to subscribe to. The integration is configured using Cloudformation parameters, and for this template you will need to supply the following parameters:

- Stack Name
- Cloudwatch Log Group Name
- Your honeycomb write key (optionally encrypted)
- Target honeycomb dataset

Optional inputs include:

- Sample rate
- The ID of the AWS Key Management Service key used to encrypt your write key. If your write key is not encrypted, do not set a value here
- Match and filter patterns, if you want to selectively process files in the bucket. For example, `production` or a simple regex like `^.+\.log$`

#### Sending S3 events to Lambda

After your stack is created, you will need to manually configure your bucket to send PutObject and Upload events to Lambda.

From the AWS console, select the bucket that you want to subscribe to and select __Properties__:

![alt text](docs/s3_step1.png)

Find __Advanced Settings__ and click __Events__:

![alt text](docs/s3_step2.png)

Enable events __Put__ and __Complete Multipart Upload__ and select the lambda belonging to the honeycomb s3 integration. If you have multiple integrations, remember to select the integration belonging to the stack that has permissions to access your bucket. You can optionally set a prefix and suffix, if you only want a subset of objects to be processed by your lambda. This is recommended if the bucket has multiple uses.

![alt text](docs/s3_step3.png)

### Generic JSON integration for SNS

[Click here](https://console.aws.amazon.com/cloudformation/home#/stacks/new?stackName=honeycomb-sns-integration&templateURL=https://s3.amazonaws.com/honeycomb-builds/honeycombio/integrations-for-aws/LATEST/templates/sns-json.yml) to launch the AWS Cloudformation Console to create the integration stack. You will need one stack per SNS topic that you want to subscribe to.

### Other integrations

#### VPC Flow Log Integration

The VPC flow log integration uses the regex integration with predefined inputs that work for VPC flow logs.

[Click here to install the VPC Flow Log Integration](https://console.aws.amazon.com/cloudformation/home#/stacks/new?stackName=honeycomb-vpc-flow-logs&templateURL=https://s3.amazonaws.com/honeycomb-builds/honeycombio/integrations-for-aws/LATEST/templates/vpc-flow-logs.yml)

#### Generic RegEx Integration for Cloudwatch

The generic regex integration accepts arbitrary regex ([re2](https://github.com/google/re2/wiki/Syntax)) to use to parse each line. Honeycomb columns are generated by defining named capture groups. For example, `(?P<name>re)` would create a column called "name" if successfully parsed.

[Click here to install the Generic Regex Integration](https://console.aws.amazon.com/cloudformation/home#/stacks/new?stackName=honeycomb-cloudwatch-integration&templateURL=https://s3.amazonaws.com/honeycomb-builds/honeycombio/integrations-for-aws/LATEST/templates/cloudwatch-logs-regex.yml)

#### AWS ELB Integration for S3 Logs

Used to parse ELB logs, which are saved to S3 periodically by the ELB service. You can use the __MatchPatterns__ and __FilterPatterns__ parameters to selectively target specific ELBs.

[Click here to install the AWS ELB Integration](https://console.aws.amazon.com/cloudformation/home#/stacks/new?stackName=honeycomb-elb-log-integration&templateURL=https://s3.amazonaws.com/honeycomb-builds/honeycombio/integrations-for-aws/LATEST/templates/aws-elb-logs.yml)

After this is installed, you will need to manually configure your ELB log bucket to send events to the lambda function. See instructions above for __Sending S3 events to Lambda__.

#### AWS ALB Integration for S3 Logs

Used to parse ALB logs, which are saved to S3 periodically by the ALB service. You can use the __MatchPatterns__ and __FilterPatterns__ parameters to selectively target specific ALBs.

[Click here to install the AWS EAB Integration](https://console.aws.amazon.com/cloudformation/home#/stacks/new?stackName=honeycomb-alb-log-integration&templateURL=https://s3.amazonaws.com/honeycomb-builds/honeycombio/integrations-for-aws/LATEST/templates/aws-alb-logs.yml)

After this is installed, you will need to manually configure your ALB log bucket to send events to the lambda function. See instructions above for __Sending S3 events to Lambda__.

#### AWS S3 Bucket Logs Integration

This is used to parse S3 server access logs, which, if configured, are written to another bucket periodically by the S3 service.

[Click here to install the AWS S3 Bucket Log Integration](https://console.aws.amazon.com/cloudformation/home#/stacks/new?stackName=honeycomb-s3-bucket-log-integration&templateURL=https://s3.amazonaws.com/honeycomb-builds/honeycombio/integrations-for-aws/LATEST/templates/s3-bucket-logs.yml)

#### MySQL RDS Integration for Cloudwatch Logs

You can configure MySQL on RDS to publish its slow query and audit logs to Cloudwatch Logs. For more information, click [here](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.Concepts.MySQL.html#USER_LogAccess.MySQLDB.PublishtoCloudWatchLogs).

After configuring RDS to write to Cloudwatch Logs, you can install the MySQL RDS Integration below and get rich MySQL event data into Honeycomb in a matter of minutes. Simply supply one or more RDS Cloudwatch Log groups to monitor, provide your Honeycomb write key, and go!

[Click here to install the Mysql RDS Integration](https://console.aws.amazon.com/cloudformation/home#/stacks/new?stackName=honeycomb-rds-mysql-log-integration&templateURL=https://s3.amazonaws.com/honeycomb-builds/honeycombio/integrations-for-aws/LATEST/templates/cloudwatch-rds-mysql.yml)

## How it works

### Cloudwatch

The Cloudformation template creates the following resources:

- An AWS Lambda Function
- An IAM role and policy used by the Lambda function. This role grants the Lambda function the ability to write to Cloudwatch (for its own logging) and to decrypt your write key using the provided KMS key (if applicable)
- A Lambda Permission granting Cloudwatch the ability to invoke this function
- A Cloudwatch Subscription Filter, which invokes this function when new Cloudwatch log events are received

When an event is written to the subscribed Cloudwatch Log Group, it is forwarded to the Honeycomb Lambda function, which parses the log line and forwards it to Honeycomb.

### S3

The Cloudformation template creates the following resources:

- An AWS Lambda Function
- An IAM role and policy used by the Lambda function. This role grants the Lambda function the ability to write to Cloudwatch (for its own logging), retrieve objects from the specified bucket, and decrypt your write key using the provided KMS key (if applicable).
- A Lambda Permission granting S3 the ability to invoke this function

When an object is uploaded to your bucket, an S3 event object is passed to the lambda function. The lambda function invokes `S3:GetObject` on the object, retrieves its contents, and parses them line by line.

#### CAVEATS

Lambda's execution time is capped at 5 minutes. If you upload sufficiently large logs (in the 100s of megabytes or more), the function may not process all events before Lambda times out. It's best to submit your logs in smaller chunks - Lambda can scale to process more logs better than it can scale to process larger logs.

Increasing the MemorySize of the Lambda also increases its CPU allocation. If you are unable to break up your logs into smaller objects, and you find that the logs aren't being processed in the allowed 5 minutes, increasing MemorySize can lead to faster processing of events.

## Encrypting your Write Key

When installing the integration, you must supply your honeycomb write key via Cloudformation parameter. Cloudformation parameters are not encrypted, and are plainly viewable to anyone with access to your Cloudformation stacks. For this reason, we strongly recommend that your Honeycomb write key be encrypted. To encrypt your key, use AWS's KMS service.

First, you'll need to create a KMS key if you don't have one already. The default account keys are not suitable for this use case.

```
$ aws kms create-key --description "used to encrypt secrets"
{
    "KeyMetadata": {
        "AWSAccountId": "123455678910",
        "KeyId": "a38f80cc-19b5-486a-a163-a4502b7a52cc",
        "Arn": "arn:aws:kms:us-east-1:123455678910:key/a38f80cc-19b5-486a-a163-a4502b7a52cc",
        "CreationDate":<PHONE_NUMBER>.097,
        "Enabled": true,
        "Description": "used to encrypt honeycomb secrets",
        "KeyUsage": "ENCRYPT_DECRYPT",
        "KeyState": "Enabled",
        "Origin": "AWS_KMS",
        "KeyManager": "CUSTOMER"
    }
}
$ aws kms create-alias --alias-name alias/secrets_key --target-key-id=a38f80cc-19b5-486a-a163-a4502b7a52cc
```

Now you're ready to encrypt your Honeycomb write key:

```
$ aws kms encrypt --key-id=a38f80cc-19b5-486a-a163-a4502b7a52cc --plaintext "thisismyhoneycombkey"
{
    "CiphertextBlob": "AQICAHge4+BhZ1sURk1UGUjTZxmcegPXyRqG8NCK8/schk381gGToGRb8n3PCjITQPDKjxuJAAAAcjBwBgkqhkiG9w0BBwagYzBhAgEAMFwGCSqGSIb3DQEHATAeBglghkgBZQMEAS4wEQQM0GLK36ChLOlHQiiiAgEQgC9lYlR3qvsQEhgILHhT0eD4atgdB7UAMW6TIAJw9vYsPpnbHhqhO7V8/mEa9Iej+g==",
    "KeyId": "arn:aws:kms:us-east-1:702835727665:key/a38f80cc-19b5-486a-a163-a4502b7a52cc"
}
```

Record the `CiphertextBlob` and the last part of the Key ID (example: `a38f80cc-19b5-486a-a163-a4502b7a52cc`) - this is what you'll pass to the Cloudformation templates.

# Advanced Installation Steps

## Terraform

See the [`terraform`](terraform) directory in this repo for examples of Terraform configs.

### Building the stack with the AWS CLI

If you need to turn up several stacks, or just don't like the Cloudformation UI, use the [AWS CLI](https://aws.amazon.com/cli/) and the script below. You'll also find this script under `examples/deploy-generic-json.sh`. You'll need to update values for `STACK_NAME`, `LOG_GROUP_NAME`, `HONEYCOMB_WRITE_KEY`, `KMS_KEY_ID`.

```bash
#!/bin/bash
ENVIRONMENT=production
STACK_NAME=CHANGEME
# change this to the log group name used by your application
LOG_GROUP_NAME=/change/me
# this is the base64-encoded KMS encrypted CiphertextBlob containing your write key
# To encrypt your key, run `aws kms encrypt --key-id $MY_KMS_KEY_ID --plaintext "$MY_HONEYCOMB_KEY"`
# paste the CyphertextBlob here
HONEYCOMB_WRITE_KEY=changeme
# this is the KMS Key ID used to encrypt the write key above
# try running `aws kms list-keys` - you want the UID after ":key/" in the ARN
KMS_KEY_ID=changeme
DATASET="cloudwatch-logs"
HONEYCOMB_SAMPLE_RATE="1"
TEMPLATE="file://./templates/cloudwatch-logs-json.yml"

JSON=$(cat << END
{
    "StackName": "${STACK_NAME}",
    "Parameters": [
        {
            "ParameterKey": "Environment",
            "ParameterValue": "${ENVIRONMENT}"
        },
        {
            "ParameterKey": "HoneycombWriteKey",
            "ParameterValue": "${HONEYCOMB_WRITE_KEY}"
        },
        {
            "ParameterKey": "KMSKeyId",
            "ParameterValue": "${KMS_KEY_ID}"
        },
        {
            "ParameterKey": "HoneycombDataset",
            "ParameterValue": "${DATASET}"
        },
        {
            "ParameterKey": "HoneycombSampleRate",
            "ParameterValue": "${HONEYCOMB_SAMPLE_RATE}"
        },
        {
            "ParameterKey": "LogGroupName",
            "ParameterValue": "${LOG_GROUP_NAME}"
        },
        {
            "ParameterKey": "TimeFieldName",
            "ParameterValue": ""
        },
        {
            "ParameterKey": "TimeFieldFormat",
            "ParameterValue": ""
        }
    ],
    "Capabilities": [
        "CAPABILITY_IAM"
    ],
    "OnFailure": "ROLLBACK",
    "Tags": [
        {
            "Key": "Environment",
            "Value": "${ENVIRONMENT}"
        }
    ]
}
END
)

aws cloudformation create-stack --cli-input-json "${JSON}" --template-body=${TEMPLATE}
```

If successful, you should see an output like this:

```json
{
    "StackId": "arn:aws:cloudformation:us-east-1:12345678910:stack/my-stack-name/19b46840-4348-11e8-9090-500c28b4e461"
}
```


text:
For all issues please specify
 * Phone brand & model
 * Android version
 * Jarvis release

There is no specific error handling for now, nevertheless debug options are enabled in the apk so:
- If you have ADB (Android Debug Bridge) it is easy thanks to `adb -d logcat "net.iopush.jarvis:*" *:S`
- If not but you are root, you need to
  - Install [this application](https://play.google.com/store/apps/details?id=com.tortel.syslog&hl=fr)
  - Start Jarvis (wait for the crash)
  - Start Syslog, then `Take log`
  - It will allow you to send an email, inside the zip please send me the file named logcat.txt.
  - Data should be anonymous if the thickbox is checked (I did not verified) so, if you fear about it before `Take log` you can select `grep the following log:`->`All logs` and in `Grep string` field put `jarvis` (all lower case) and have should have enough info...
- Otherwise try to give as much details as possible inside the issue

To anonymize the log, please consider to use regex below:
- ` \b(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(?1)){3}\b ` # Find valid IPv4 addresses
- ` ^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$ ` # Find valid MAC addresses

repository: nicoirm/jarvis-android-app

repo_name: nicoirm/jarvis-android-app


text:
# Requirements for installing and running Velero

## Supported Kubernetes Versions

- In general, Velero works on Kubernetes version 1.7 or later (when Custom Resource Definitions were introduced).
- Restic support requires Kubernetes version 1.10 or later, or an earlier version with the mount propagation feature enabled. See [restic integration][1].

## Velero resource requirements

By default, the Velero deployment requests 500m CPU, 128Mi memory and sets a limit of 1000m CPU, 256Mi.
Default requests and limits are not set for the restic pods as CPU/Memory usage can depend heavily on the size of volumes being backed up.

If you need to customize these resource requests and limits, you can set the following flags in your `velero install` command:

```bash
velero install \
    --provider <YOUR_PROVIDER> \
    --bucket <YOUR_BUCKET> \
    --secret-file <PATH_TO_FILE> \
    --velero-pod-cpu-request <CPU_REQUEST> \
    --velero-pod-mem-request <MEMORY_REQUEST> \
    --velero-pod-cpu-limit <CPU_LIMIT> \
    --velero-pod-mem-limit <MEMORY_LIMIT> \
    [--use-restic] \
    [--restic-pod-cpu-request <CPU_REQUEST>] \
    [--restic-pod-mem-request <MEMORY_REQUEST>] \
    [--restic-pod-cpu-limit <CPU_LIMIT>] \
    [--restic-pod-mem-limit <MEMORY_LIMIT>]
```

Values for these flags follow the same format as [Kubernetes resource requirements][2].

[1]: restic.md
[2]: https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/#meaning-of-cpu

repository: dcherman/velero

repo_name: dcherman/velero


text:
# WPO Test with Sitespeed.io

## Intro
> Sitespeed.io is an open source tool (Apache License Version 2.0) that helps you analyze your website speed and performance based on performance best practices and timing metrics. It collects data from multiple pages on your website, analyze them using the rules and output the result as HTML or send the metrics to Graphite.

> via https://www.sitespeed.io/

## Dependecies
 - NodeJs
 - Gulp

## How to
- Run in the console
  * sudo npm install

- Configure yours urls to test and the budget rules in config/testsConfig.js
  * testTitle: 'Your test Title',
  * url: 'http://yoursiteurl.com',
  * score: 80

- Run test in the console
  * gulp wpo

- View results in /test-results/wpo

## Other tests
- Google Page Speed Insight
  * In te terminal run: gulp gspi --url yourUrl

- Web Page Test
  * In te terminal run: gulp webpagetest --url yourUrl

## Posts
[Gulp integration](https://www.npmjs.com/package/gulp-sitespeedio)
(Ankit Singhal - Aug, 2011)

[Test rules](https://www.sitespeed.io/documentation/rules-and-best-practices/)
(Peter Hedenskog - Aug 2015)

[Critical Rendering path](http://calendar.perfplanet.com/2012/deciphering-the-critical-rendering-path/)
(Ilya Grigorik - Dec 2012)

[Css and de Critical Path](http://www.phpied.com/css-and-the-critical-path/)
(Stoyan Stefanov - Jun 2012)

[14 Rules for Faster-Loading Web Sites](http://stevesouders.com/hpws/rules.php)
(Steve Souders - May 2012)

[High Performance Web Sites Blog](http://www.stevesouders.com/)
(Steve Souders)

[Load 3rd party JS asyncrhonously](http://www.phpied.com/3PO/#async)
(Stoyan Stefanov - Jun 2012)

[How to make a performance budget](http://danielmall.com/articles/how-to-make-a-performance-budget/)
(Daniel Mall - Jan 2015)

[Setting a performance budget](http://timkadlec.com/2013/01/setting-a-performance-budget/)
(Tim Kadlec - Jan 2013)

##Follow, up to date
If you’re interested in performance, here are some people and organizations you should be following:
- [Tim Kadlec - @tkadlec](http://twitter.com/tkadlec)
- [Paul Irish - @paul_irish](http://twitter.com/paul_irish)
- [Yesica Perez-Cruz - @yeseniaa](http://twitter.com/yeseniaa)
- [Scott Jehl - @scottjehl](http://twitter.com/scottjehl)
- [Katie Kowalcin - @katiekovalcin](http://twitter.com/katiekovalcin)
- [Ilya Grigorik - @igrigorik](http://twitter.com/igrigorik)

##Collaborators
- [Ignacio Barbieri](https://github.com/ibarbieri)

repository: ibarbieri/wpo-automatic-test

repo_name: ibarbieri/wpo-automatic-test


text:
# node-auth

Authentication boilerplate in Node.js with security and scalability in mind.

## Features

- [x] login/logout/register + session expiry
- [x] email verification (`"Confirm your email"`)
- [x] password reset (`"Forgot password"`)
- [ ] password confirmation (`"Re-enter your password"`)
- [ ] persistent login (`"Remember me"`)
- [ ] account lockout (`"Too many failed login attempts"`)
- [ ] rate limiting (`"Too many requests"`)

## Prerequisites

- `node` and `npm` (e.g. using `nvm`)
- `docker` and `docker-compose`
  - could also use a local `mongodb-org` and `redis-server`
  - otherwise, a remote service e.g. Atlas/mLab and Redis Labs

## Setup

```sh
# (Linux) Must export UID to have the right permissions
export UID

# Boot MongoDB & Redis containers, and launch a local Express server
npm run up
```

## API

Method    | URI               | Middleware
:-------- | :---------------- | :---------
POST      | /register         | guest
POST      | /login            | guest
POST      | /logout           | auth
GET\|HEAD | /home             | auth
POST      | /email/verify     |
POST      | /email/resend     |
POST      | /password/email   |
POST      | /password/reset   |
POST      | /password/confirm | auth

## curl

```sh
curl localhost:3000/register -H 'Content-Type: application/json' -d \
  '{"email":"alex@gmail.com","name":"Alex","password":"Secret12","passwordConfirmation":"Secret12"}'

curl localhost:3000/login -H 'Content-Type: application/json' -d \
  '{"email":"alex@gmail.com","password":"Secret12"}'

curl -X POST localhost:3000/logout --cookie \
  'sid=s%3Aly4gTFBASuA0T1h0HLls7l6bKv-TUii2.N2GGaZ5GbJnOOdwRjtIYdckmbvoqRw3QvL1d3MOINr8'

curl localhost:3000/home --cookie \
  'sid=s%3Aly4gTFBASuA0T1h0HLls7l6bKv-TUii2.N2GGaZ5GbJnOOdwRjtIYdckmbvoqRw3QvL1d3MOINr8'

curl -X POST 'localhost:3000/email/verify?id=...&token=...&expires=...&signature=...'

curl localhost:3000/email/resend -H 'Content-Type: application/json' -d<EMAIL_ADDRESS>
curl localhost:3000/password/email -H 'Content-Type: application/json' -d<EMAIL_ADDRESS>
curl 'localhost:3000/password/reset?id=...&token=...' \
  -H 'Content-Type: application/json' -d '{"password":"Secret12","passwordConfirmation":"Secret12"}'

curl localhost:3000/password/confirm -H 'Content-Type: application/json' -d '{"password":"Secret12"}' \
  --cookie 'sid=s%3Aly4gTFBASuA0T1h0HLls7l6bKv-TUii2.N2GGaZ5GbJnOOdwRjtIYdckmbvoqRw3QvL1d3MOINr8'
```

## Schema

```ts
interface User {
  _id: ObjectId
  name: string
  email: string
  password: string
  verifiedAt: Date
  createdAt: Date
  updatedAt: Date
}

interface PasswordReset {
  _id: ObjectId
  userId: ObjectId
  token: string
  expiredAt: Date
  createdAt: Date
}

// Same schema as PasswordReset, but conceptually
// a different model with its own methods
interface RememberMe {
  _id: ObjectId
  userId: ObjectId
  token: string
  expiredAt: Date
  createdAt: Date
}
```

## Security

### Email Confirmation

- activation link
  - expires in 12h (_temporary_)
  - signed with HMAC SHA256 (_unforgeable_)
- user email
  - hashed with SHA1 (_unpredictable_)

### Password Reset

- reset token
  - pseudo-random string of 80 hex chars (_unpredictable_)
  - signed with HMAC SHA256 before storing in DB (_doesn't compromise accounts_)
  - expires in 1h (_short-lived_)
- reset link
  - when used, invalidates old tokens (_one-time use_)

### Remember Me

- remember me token
  - pseudo-random string of 80 hex chars (_unpredictable_)
  - signed with HMAC SHA256 before storing in DB (_doesn't compromise accounts_)
  - expires in 1 week (_long-lived_)
- remember me cookie
  - signed with HMAC SHA256 (_unforgeable_)
  - creates a new user session unless already authenticated

## Inspiration

Originally prompted by [Your Node.js authentication tutorial is (probably) wrong](https://medium.com/hackernoon/your-node-js-authentication-tutorial-is-wrong-f1a3bf831a46). Although its critique is on point, the article sadly doesn't offer any concrete solutions. This repo is my attempt to address those remarks in code.

## Contributions

I only know so much, so there are likely things I missed. If you see something that doesn't make sense, poses a vulnerability, or otherwise needs improvement, please feel free to open an issue or submit a PR. All contributions are welcome!

repository: zaksoliman/node-auth

gha_license_id: MIT

repo_name: zaksoliman/node-auth


text:
---
layout: post
title: May 21st - FaithSearch...examining your Faith in the midst of life's
categories: [Verse of the Day]
alias: [/VerseOfTheDay/2011/05/21/]
---

_James 1:12
Blessed is the man that endureth temptation: for when he is tried,
he shall receive the crown of life, which the Lord hath promised to
them that love him._

This is just one of the "crowns" that is promised to the FAITH FULL
believer. It's called the crown of life, and the Lord will bestow it
upon those who have been tested and have overcome, in the area of
temptation. Every day believers are tempted!  Have you been tempted sexually? Have you been tempted to "give
up" serving God? Did you overcome and persevere? Be encouraged
Christian, God has a crown for you!

 --

Jesus Every Day is a ministry of Rodgers Baptist Church in Garland, Texas.

extension: markdown


text:
# FEW 2.4 Class 2 - Redux Review

## Review and Dig into Redux

## Learing Objectives

1. Define Actions, Reducers, and Store
1. Use Redux to manage application state
1. Create container components implement React Redux

## Why learn this?

- Why learn this?
    - [Hiring Trends](https://www.hntrends.com/2018/jun-no-signs-of-slowing-for-react.html?compare1=React&compare2=Redux&compare3=Angular+2&compare4=AngularJS)
    - [NPM Trends](https://npm-stat.com/charts.html?package=react&package=vue&package=angular&package=angular%202&package=redux&from=2016-06-01&to=2018-05-31)

## Implement Redux

- Build the clicker with Redux
    - Hold clicks in store
    - Keep click count in store
    - Create auto clickers in the store

## After Class

- Complete your tutorial from [Lesson 1](Lesson-01.md)

## Additional Resources

- [Incremental (Clicker) Games](https://en.wikipedia.org/wiki/Incremental_game)
- [Universal Paperclips]
- [React](https://reactjs.org)
- [Redux](https://redux.js.org)
- [Password App](https://github.com/MakeSchool-Tutorials/web-7-react-redux-passwords-app)
- [Timers App](https://github.com/MakeSchool-Tutorials/web-7-react-redux-timers-app)
- [Tetris App](https://github.com/MakeSchool-Tutorials/web-7-react-redux-tetris-app)
- [Hiring Trends](https://www.hntrends.com/2018/jun-no-signs-of-slowing-for-react.html?compare1=React&compare2=Redux&compare3=Angular+2&compare4=AngularJS)
- [NPM Trends](https://npm-stat.com/charts.html?package=react&package=vue&package=angular&package=angular%202&package=redux&from=2016-06-01&to=2018-05-31)


text:
## 10 years of professional blogging – what I've learned
[Reference](http://andrewchen.co/professional-blogging/)

- Hard part: finding your voice, figuring out topics that are interesting for other folks to read, and building a long-term habit.
- Titles are 80% of the work. It has to be a compelling opinion or important learning.
- There is always room for high-quality thoughts/opinions.
- Writing is really scalable relative to events.
- Write based on a multi-decade timeframe. This is why you don't write on Medium on Quora, you write on your own thing.
- Calendar reminder: because initially, no one will read your work, the key is to just get started.
- Email subscriber = real channel. Annoying pop-ups are unfortunately effective.
- Publishing ideas/learnings is a great way to give.

## Tips for new bloggers

- Carpet bomb a key area and stake out mindshare
- Stay consistent on your blog format and topic
- Just show up
- Go deep on your topic of expertise
- Come up with new topics with brainstorms, news headlines, and note-to-self

license: Unlicense

repository: daryllxd/lifelong-learning

gha_language: Elixir

gha_license_id: Unlicense

repo_name: daryllxd/lifelong-learning


text:
# Arria 10 Blinking LED Static Update Partial Reconfiguration Tutorial for the Arria 10 GX FPGA Development Kit

This readme file accompanies the Arria 10 Blinking LED Statix Update Partial Reconfiguration (PR) Tutorial for the Arria 10 GX FPGA Development Kit. This directory contains the design files for the Static Update PR (SUPR) tutorial. This version of the design has been verified using Quartus Prime Pro v20.3.

This readme file contains the following information:

*  Arria 10 Blinking LED Partial Reconfiguration Tutorial Contents--lists the contents of this tutorial.
*  Technical Documentation--directs you where to find documentation for Arria 10 Blinking LED Partial Reconfiguration and SUPR walkthrough.
*  System Requirements--lists the system requirements.

## Arria 10 Blinking LED Partial Reconfiguration Tutorial Contents

*  **flat/** - This directory contains the *flat* version of the design.

*  **supr/** - This directory contains the static update PR version of the design.

## Technical Documentation

*  AN-817.pdf Application Note provides information about the static update PR tutorial, and walks you through partially reconfiguring a flat design using SUPR.
   *  This document is available on the GitHub: [here](AN-817.pdf)

## System Requirements

*  Quartus Prime Pro Edition software version 20.3
*  [Arria 10 GX FPGA Development Kit](https://www.altera.com/products/boards_and_kits/dev-kits/altera/kit-a10-gx-fpga.html)

repository: intel/fpga-partial-reconfig

repo_name: intel/fpga-partial-reconfig


text:
Not so clever

Challenge Description:

    Imagine that you have to arrange items in a certain order: pencils from black to white in a color palette,
    photographs by the date taken, banknotes from the highest to the lowest, etc. To do this, you definitely don’t
    need to use the Stupid sort algorithm.

    After each action, you need to come back to the beginning and start all over again. Not so clever, is it? But,
    you need to know about this algorithm, that’s why it is used in this challenge.

Input sample:

    The first argument is a path to a file. Each line includes a test case which contains numbers that you need to
    sort using the Stupid sort algorithm. There is also a number of iterations for an algorithm to carry out. The
    numbers themselves and the number of iterations are separated by a pipeline '|'.

4 3 2 1 | 1
5 4 3 2 1 | 2

Output sample:

    Print sorted numbers after they pass the required number of iterations. One iteration of this sort is a pass to
    the moment of making changes. Once changing the order of the digits, passing starts from the very beginning.
    Hence, this is another iteration.

3 4 2 1
4 3 5 2 1

Constraints:

The number of iterations can be from 1 to 8.

One iteration of this sort is a pass to the moment of making changes.

The number of test cases is 40.


text:
[![Build Status](https://travis-ci.org/telemark/skoleskyss-distance.svg?branch=master)](https://travis-ci.org/telemark/skoleskyss-distance)
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard)
[![Greenkeeper badge](https://badges.greenkeeper.io/telemark/skoleskyss-distance.svg)](https://greenkeeper.io/)

# skoleskyss-distance

Microservice for skoleskyss and distance

## API

All calls must supply a valid jwt

### ```POST /distance```

Calculate walking distance between origin and destination

```JavaScript
{
  origin: '',
  destination: '',
  waypoints: []
}
```

```bash
$ curl -v -H "Authorization: <INSERT TOKEN>" -d '{ "origin": "", "destination": "", "waypoints": [] }' https://distance.service.io/distance
```

## License

[MIT](LICENSE)

![Robohash image of skoleskyss-distance](https://robots.kebabstudios.party/skoleskyss-distance.png "Robohash image of skoleskyss-distance")

repository: telemark-arkiv/skoleskyss-distance

repo_name: telemark-arkiv/skoleskyss-distance


text:
# rustupolis - Tuple Space for Rust [<img src="https://travis-ci.org/Micutio/rustupolis.svg?branch=master">](https://travis-ci.org/Micutio/rustupolis)

An easy to use tuple space library written entirely in Rust.

## Goals

The goal of this project is to implement a comprehensive tuple space library
that fulfills the following criteria:

1. General Use - the implementation should support the use of any kind of data the user wishes.
2. Distributed - the tuple space should be able to run locally and remotely on one more more nodes.
3. Parallelized - the __core__ value, the tuple space should be accessible concurrently

## Development

The tuple space is being implemented iteratively, where each iteration improves
upon the previous by adding or refining features to achieve the next milestone.

### Milestones

1. Local tuple space for storing tuples and retrieving them via pattern matching
2. Local tuple space with multi-threaded and concurrent access
3. Remote tuple space server, accessible via network sockets
4. Distributed tuple space on multiple servers, accessible via network
5. 'Space of spaces', tuples can be tuple spaces themselves

## Current Version

alpha 0.0.1

repository: cmars/sshtup

repo_name: cmars/sshtup


text:
<!---
Group:general
Name:G10 Find parents for a given concept
Author:Patrick Ryan
CDM Version: 5.0
-->

# G10: Find parents for a given concept

## Description
This query accepts a concept ID as the input and returns all concepts that are its immediate parents of that concept. Parents are concepts that have a hierarchical relationship to the given concepts. Hierarchical relationships are defined in the relationship table.
The query returns only the immediate parent concepts that are directly linked to the input concept and not all ancestors.

## Query
```sql
SELECT A.concept_id Parent_concept_id, A.concept_name Parent_concept_name, A.concept_code Parent_concept_code, A.concept_class_id Parent_concept_class_id, A.vocabulary_id Parent_concept_vocab_ID, VA.vocabulary_name Parent_concept_vocab_name
FROM @vocab.concept_ancestor CA, @vocab.concept A, @vocab.concept D, @vocab.vocabulary VA
WHERE CA.descendant_concept_id = 192671
AND CA.min_levels_of_separation = 1
AND CA.ancestor_concept_id = A.concept_id
AND A.vocabulary_id = VA.vocabulary_id
AND CA.descendant_concept_id = D.concept_id
AND GETDATE() BETWEEN A.valid_start_date
AND A.valid_end_date;
```

## Input

|  Parameter |  Example |  Mandatory |  Notes |
| --- | --- | --- | --- |
|  Concept ID |  192671 |  Yes | GI - Gastrointestinal hemorrhage |
|  As of date |  Sysdate |  No | Valid record as of specific date. Current date – sysdate is a default |

## Output

|  Field |  Description |
| --- | --- |
|  Parent_Concept_ID |  Concept ID of parent concept |
|  Parent_Concept_Name |  Name of parent concept |
|  Parent_Concept_Code |  Concept Code of parent concept |
|  Parent_Concept_Class |  Concept Class of parent concept |
|  Parent_Concept_Vocab_ID |  Vocabulary parent concept is derived from as vocabulary code |
|  Parent_Concept_Vocab_Name |  Name of the vocabulary the child concept is derived from |

## Sample output record

|  Field |  Value |
| --- | --- |
|  Parent_Concept_ID |  4000610 |
|  Parent_Concept_Name |  Disease of gastrointestinal tract |
|  Parent_Concept_Code |  119292006 |
|  Parent_Concept_Class |  Clinical finding |
|  Parent_Concept_Vocab_ID |  1 |
|  Parent_Concept_Vocab_Name |  SNOMED-CT |

## Documentation
https://github.com/OHDSI/CommonDataModel/wiki/

repository: mi-erasmusmc/QueryLibrary

repo_name: mi-erasmusmc/QueryLibrary


text:
[1.1]: http://i.imgur.com/tXSoThF.png (twitter icon with padding)

# _Sketch Typography Kit_

#### _Sketch Typography Practice_
_UI - Week 2: Web Design Process, Typography_

#### **Dawn Mott** :sunrise_over_mountains: _May 31st, 2018_

## Description

_This is a sketch mockup_

## Specs
_Simple mockup, hand drawn on paper_

* Below: Mobile View

* Below: Desktop View

## Setup/Installation Requirements

* Clone this repository
* Or just look at the pics in my readme

## Known Bugs

_There are many known :bug: at this time, this is a work in progress_

## Support and contact details

_If you'd like to chat, please contact_ @dawnrparty _on_ ![alt text][1.1]

## Technologies Used

_HTML, CSS, and flattery_

### License

*This page is licensed under the MIT license*

© 2018 **Dawn Mott** :sunrise_over_mountains:

repository: Dawnabelle/typography-sketch

repo_name: Dawnabelle/typography-sketch


text:
# FastPin Library for Arduino

Fast and yet easy-to-use methods for binary GPIO access, using the pin identifiers you're familiar with. The ports are looked up only once at initialization. Reading and writing afterwards work directly on the registers.

## Usage

Set up your FastPin passing the pin's number and I/O mode, as you would for `pinMode()`:
```
FastPin LED(13, OUTPUT);
```
Once initialized, use `read()` or `write()` according to its I/O mode:
```
LED.write(HIGH);
LED.write(LOW);
```
As the lookup is done at runtime, this even works if the pin is not a known constant at compile time. So you can select a pin dynamically using your program logic, initialize it and enjoy fast access afterwards.

## Speed

This implementation is slower than port manipulation with compile time constants,
but is one order of magnitude faster than Arduino's default functions.

Measurements on an ATmega328 running at 16 MHz, setting one pin high and low in an infinite loop:

- digitalWrite: 5.05 µs per write, 10.3 µs per cycle (0.097 MHz)
- FastPin: 0.32 µs per write, 0.76 µs per cycle (1.3 MHz)
- direct: 0.13 µs per write, 0.38 µs per cycle (2.6 MHz)

In this test, the time for a complete cycle includes the loop overhead.

## Caveats

### PWM and Interrupts

The `read()` and `write()` methods skip some steps that `digitalRead()` or `digitalWrite()` would do:

- PWM timers are not stopped. If you want to write to a pin that is currently active as a PWM output, stop it by calling digitalWrite() on it.
- Interrupts are not disabled. If you have interrupt routines writing to the same pin, you might want to disable them yourself.

### I/O Mode

FastPin doesn't remember the pin mode after initialization.
It can't warn you if you use the wrong function for a given pin. As only one register pointer is kept (either for input or output), writing on a pin that was set up as an input has no effect. If you'd like to enable the internal pull-up for an input, do so during initialization.

## Supported Platforms

FastPin has been tested on the ATmega328 (Uno, Nano). As the pin numbers are translated using the same Arduino macros as the default digital I/O functions, FastPin should work on every platform which is supported by the Arduino core library.

repository: bitfasching/FastDigitalPin

repo_name: bitfasching/FastDigitalPin


text:
# Express Checkout Redirect Demo

This Demo shop is to represent the UMD redirect implementation of Express Checkout <https://github.com/optile/express-checkout>

## Steps to run demo

`npm install --save express-checkout@latest --registry https://packagecloud.io/optile/javascript/npm/`

`npm install`

`npm start`

Open <http://localhost:3000/>

Live Demo - <https://optile.github.io/demo-express-checkout-redirect>

---

## Steps to build the component

`npm install`

`npm run onlybuild`

repository: optile/demo-express-checkout-redirect

gha_license_id: NOASSERTION

repo_name: optile/demo-express-checkout-redirect


text:
# Google cloud sdk with kubectl

Docker image with Google Cloud SDK and Kubectl used in [CI runners](https://github.com/gadiener/ci-image-gcp).

It also includes [kube-score](https://github.com/zegl/kube-score) not built from source.

repository: gadiener/ci-image-gcp

gha_language: Dockerfile

repo_name: gadiener/ci-image-gcp


text:
# A child theme of [Baton](https://wordpress.org/themes/baton/)
### For First Baptist Church of Lytle, TX
[https://firstbaptistchurchlytle.com/](https://firstbaptistchurchlytle.com/)
![screenshot](screenshot.png)

Required Plugins:
- [CMB2](https://wordpress.org/plugins/cmb2/)
- [Contact Form 7](https://wordpress.org/plugins/contact-form-7/)
- [Simple Calendar](https://wordpress.org/plugins/google-calendar-events/)

Recommended Plugins:
- [Contact Form 7 Honeypot](https://wordpress.org/plugins/contact-form-7-honeypot/)
- [Contact Form 7 Database Addon – CFDB7](https://wordpress.org/plugins/contact-form-cfdb7/)
- [Disable Comments](https://wordpress.org/plugins/disable-comments/)
- [Display Widgets](https://wordpress.org/plugins/display-widgets/)
- [Yoast SEO](https://wordpress.org/plugins/wordpress-seo/)
- [Google Analytics Dashboard for WP](https://wordpress.org/plugins/google-analytics-dashboard-for-wp/)
- [All in One WP Security](https://wordpress.org/plugins/all-in-one-wp-security-and-firewall/)

repository: pschfr/fbc-lytle

gha_language: PHP

repo_name: pschfr/fbc-lytle


text:
---
title: Related rules
---

The `related_rules` shortcode is used to add one or more related rules to a rule.

## Usage

The shortcode expects an array of rule names.

```html
{ % related_rules ["no-extra-semi", "no-unexpected-multiline", "semi-spacing"] % }
```

## Example

{% related_rules ["no-extra-semi", "no-unexpected-multiline", "semi-spacing"] %}

repository: eslint/eslint

branch_name: refs/heads/main

repo_name: eslint/eslint


text:
# VoiceInHand (Not Finished, Continue Working on)

This is a Repo for FY2021 Hackathon project, Dev team, CSS, Microsoft, and it's mainly for the mobile app version.

You may be able to access this site for more information:
https://garagehackbox.azurewebsites.net/hackathons/2356/projects/103552

## Description
### Overview
VocieInHand is a powerful & handy mobile application, used for two-way translation between voice and sign language, and Text is used as the middle translation format.

With the mission to empower disability who are suffering hearing or speaking impairment to communicate easily with normal ones, VocieInHand also can enable people who want to communicate with disability without distance. We are delighted to achieve more and contribute more to the society with Microsoft's core value "Inclusive ".

### Background
Nowadays, the number of disabled people around the world is more than 1 billion amazingly, among which 85 million is in China. Have you ever imagined how they are able to see the doctor by themselves?
![Background Stat 1](https://github.com/CassieJie/VIHPics/blob/main/Screenshot%202021-10-19%20152804.png?raw=true)

### Technical Architecture

As regards to the technical architecture, a frontend mobile app is developed using Xamarin for UI interface with end user. A backend app service is developed to interact with the core Azure Artificial Intelligence service, cutting video into slices and storing data of sign language movement and its corresponding verbal expression, building up a mathematical model.

In the sign language Artificial Intelligence model, we use images as the training dataset and prediction samples, creating training and prediction endpoint with the help of Azure vision service.
![Technical Architecture](https://github.com/Zikun-Huang/VoiceInHandDev/blob/master/MediaResources/images4ppt/image.png?raw=true)

### Challenges & Overcome
![Challenges & Overcome](https://github.com/CassieJie/VIHPics/blob/main/challenge.png?raw=true)

### Future & Outlook
1. In the future, we hope to integrate our application into Teams, people can open the real-time translation for sign-language to chat/meeting with the hearing-impaired person.
2. If we go further in the technical part, we can support different Sign languages to be interpreted. And we can support more different natural languages for different countries to use.
3. There's room to improve our sign-language interpretation model and make it more human-friendly in the future.
![Future & Outlook](https://github.com/CassieJie/VIHPics/blob/main/future-1.png?raw=true)

## Story & Design
### Inspiration
Recently, there is a heated discussion on WeiBo App about a disabled father who couldn’t help crying when bringing his daughter to the doctor.  As disabled himself, Mr.Wu’s biggest wish to his child is having a healthy body. He was quite concerned about not being able to communicate before seeing the doctor. When seeing Doc. Wang, Mr. Wu tried his best to write down a mixture of Chinese Character & Pinyin to describe his daughter’s status, with tears dropping non-stop.

![Inspiration](https://github.com/CassieJie/VIHPics/blob/main/story.png?raw=true)

### Front-End Mobile App Design
Our VoiceInHand (for Android and iOS) is empowered by Xamarin, which is a powerful cross-platform development platform, especially for mobile apps.
Check out some UI/UX design for our mobile version app.

#### Talk as usual! [Main Features/Logics]
Translate Sign Languages and Languages in bi-direction way, which is powered by Azure Cognitive and Machine Learning. Besides, you can also save frequently used or favourite sets of translation results for quick review.
![Design 1](https://github.com/CassieJie/VIHPics/blob/main/UI%20portable.png?raw=true)

#### Choose your language! [Localization]
Just like us who speak different languages, we are also adding support for different sign languages to empower everyone communicating with each other without obstacles!
![Design 2](https://github.com/CassieJie/VIHPics/blob/main/555.png?raw=true)

### Back-End Design
We developed a Back-End system with a web app to interact with SQL database and wrote a video analysing algorithm, and we preserved channels to interact with our Sign-language interpretation AI model to get sign language recognition results.

![Backend Design 1](https://github.com/CassieJie/VIHPics/blob/main/Back-end.png?raw=true)

### Sign-language interpretation model
We take photos of sign language gestures by ourselves as sampling data and then cut out these photos to training the Sign-language interpretation model with lots of marked labels. After input lots of training data, we put some test examples into the model and output the prediction result to the web app.

![Backend Design 2](https://github.com/CassieJie/VIHPics/blob/main/Model-3.png?raw=true)

repository: Zikun-Huang/VoiceInHandDev

repo_name: Zikun-Huang/VoiceInHandDev


text:
![travis CLI](https://travis-ci.org/Phantas0s/devdash.svg?branch=master&style=for-the-badge) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/ec1e19b08f3b40d19f3acaf93e3e186b)](https://www.codacy.com/app/Phantas0s/devdash?utm_source=github.com&utm_medium=referral&utm_content=Phantas0s/devdash&utm_campaign=Badge_Grade)  [![Go Report Card](https://goreportcard.com/badge/github.com/Phantas0s/devdash)](https://goreportcard.com/report/github.com/Phantas0s/devdash) [![Hits-of-Code](https://hitsofcode.com/github/phantas0s/devdash)](https://hitsofcode.com/view/github/phantas0s/devdash) [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Documentation](https://img.shields.io/website?url=https%3A%2F%2Fthedevdash.com&label=documentation)
![logo of devdash with a gopher](./doc/img/logo.jpg)
[![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=DevDash%20-%20Highly%20Configurable%20Terminal%20Dashboard%20For%20Developers:&url=https%3A%2F%2Fgithub.com%2Fphantas0s%2Fdevdash&hashtags=developers,dashboard,terminal,CLI,golang)

DevDash is a highly configurable terminal dashboard for developers, who want to choose and display the most up-to-date metrics they need, at one place.

[![google analytics example DevDash configuration](./example/img/mix-1.png)](https://raw.githubusercontent.com/Phantas0s/devdash/master/example/img/mix-1.png)

# Why using DevDash?

* Pull the data and display it in cool diagrams (or widgets) using YAML / JSON config, from:
    * Your own computer. From your own scripts / command lines too!
    * A remote computer via SSH
    * Github
    * Travis
    * Google Analytics
    * Google Search Console
    * Feedly
* A huge amount of flexibility compared to other terminal dashboards:
  * Choose the widgets you want.
  * Place your widgets where you want.
  * Choose the data you want to display, the colors you want to use, and a lot of other things for each widget.
  * Don't want to personalize everything? Don't overwrite the defaults, then.
* Unlimited amount of different dashboards with different configurations.
* Data refreshed automatically via time ticks, or via a keyboard shortcut (Ctrl + r by default).

# Menu
* [Installation](#installation)
* [Documentation](#documentation)
* [Acknowledgement](#acknowledgement)
* [Contribute](#contribute)
* [Licence](#licence)
* [Making of](#Making-of)
* [Showcase](#showcase)

# Installation

You can simply grab the [latest released binary file](https://github.com/Phantas0s/devdash/releases/latest) and download the version you need, depending on your OS.

## Linux script

Here's a simple way to download DevDash and move it in `/usr/local/bin`, in order to be able to use DevDash everywhere easily.

```shell
curl -LO https://raw.githubusercontent.com/Phantas0s/devdash/master/install/linux.sh && \
sh ./linux.sh && \
rm linux.sh
```

## Manual installation

You need to clone this repository and build the binary: `go build devdash.go`.

# How Does It Work?

In a nutshell:

* If you run DevDash without giving a dashboard configuration, it will create and display a default dashboard (`default.yml`) located in `$XDG_CONFIG_HOME/devdash` or `$HOME/.config/devdash`.
* To get used to dashboard' configurations, there are many [examples here](https://thedevdash.com/getting-started/examples/). They can help you getting started.
* To run a dashboard created in the two filepaths mentioned above, you just need to execute `dashboard -c my-super-dashboard`, if your configuration file is called `my-super-dashboard.yml`. You can use JSON as well!
* You can as well run any dashboard from anywhere if you give an absolute or relative path.
* I'm thriving to make DevDash easier to configure, yet very flexible and customizable. The next updates will go in that direction.

# Documentation

[The complete DevDash documentation is here.](https://thedevdash.com).

You'll find:

* [Installation / getting started](https://thedevdash.com/getting-started/installation/)
* [Simple examples](https://thedevdash.com/getting-started/examples/) and [real use cases](https://thedevdash.com/getting-started/use-cases/devdash/)
* [Complete reference for configuring whatever you want](https://thedevdash.com/reference/).

# Acknowledgement

Thanks to [MariaLetta](https://github.com/MariaLetta/free-gophers-pack) for the awesome and beautiful Gopher pack she made! I used it for my logo on top.

DevDash was inspired from other open source projects:

* [wtf](https://github.com/wtfutil/wtf)
* [tdash](https://github.com/jessfraz/tdash)

# Bugs and Ideas

I would be happy to read about new ideas and to fix bugs. Opening an issue is the way to go.

# Contribute

First of all, thanks a lot if you want to contribute to DevDash!

If you want to implement a new feature, let's speak about it first and decide if it fits DevDash scope.

# Making Of

For anybody interested how I managed to develop DevDash on side of a full time job, and how I organized my time and kept my motivation, [I wrote an article about that on my blog](https://thevaluable.dev/programming-side-project-example-devdash/).

# Licence

[Apache Licence 2.0](https://choosealicense.com/licenses/apache-2.0/)

# Showcase

![google analytics example DevDash configuration](./example/img/thevaluabledev-2.png)
-------
![google analytics example DevDash configuration](./example/img/thevaluabledev-3.png)
-------
![github example DevDash configuration](./example/img/devdash-1.png)


text:
# Change Log for the Eightshift WordPress Coding Standards

All notable changes to this project will be documented in this file.

This project adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/).

The semantic versioning started from version 0.2.1.

## [Unreleased]

_No documentation available about unreleased changes yet._

## [1.6.0](https://github.com/infinum/eightshift-coding-standards/compare/1.5.1...1.6.0) - 2022-07-05

### Changed
- Add a parameter `$allowedExtendedClasses` in the FunctionComment sniff
  - This way we can add a list of specific extending CLI classes which won't trigger
    phpcs error on the __invoke() method.

## [1.5.1](https://github.com/infinum/eightshift-coding-standards/compare/1.5.0...1.5.1) - 2022-05-10

### Fixed
- CI/CD check fixes

## [1.5.0](https://github.com/infinum/eightshift-coding-standards/compare/1.4.2...1.5.0) - 2022-03-16

### Added
- Add `overriddenClass` parameter for the EightShift ComponentsEscape sniff
  - This parameter will catch the cases where the libs Components class has been overridden.
- Add ignoreComments property for the line length sniff

### Fixed
- Fixed the edge case with overwriting libs classes.

### Changed
- Code cleanup in EightShift ComponentsEscape sniff

## [1.4.2](https://github.com/infinum/eightshift-coding-standards/compare/1.4.1...1.4.2) - 2022-03-10

### Fixed
- Exclude the native `WordPress.Security.EscapeOutput.OutputNotEscaped` sniff, because we are overloading it

## [1.4.1](https://github.com/infinum/eightshift-coding-standards/compare/1.4.0...1.4.1) - 2022-03-10

### Fixed
- Fixed `Eightshift.Security.ComponentsEscape` sniff
  - There was a case where the next string token caused issue because there was no guard clause
    to check if the string is actually a Components class or not.

## [1.4.0](https://github.com/infinum/eightshift-coding-standards/compare/1.3.0...1.4.0) - 2022-03-09

### Added
- EightShift ruleset: add rules for use statements
  - Adds a new dependency on the Slevomat Coding Standard library.
  - Adds four sniffs from this coding standard to the ruleset:
      1. Forbidding unused `use` statements.
      2. Enforcing fully qualified global functions and constants.
      3. Enforcing import `use` statements for everything else.
  - Includes fixing up the EightShift coding standards code base for these new rules.
  - Ref: https://github.com/slevomat/coding-standard
- Add new EightShift FunctionComment sniff
  - This sniff overloads the `Squiz.Commenting.FunctionComment` sniff which normally comes included via the `WordPress-Docs` ruleset and makes an allowance for the `__invoke` method in the CLI classes.
  - Includes:
    - Unit tests.
    - Adjusting the ruleset to maintain the same excludes as WPCS had from the `Squiz` ruleset.
    - Adjusting the ruleset to maintain the previous exclude for parameter alignment.
- Add new EightShift ComponentsEscape sniff
  - This sniff overloads the `WordPress.Security.EscapeOutput.OutputNotEscaped` sniff which comes included with `WordPress-Extra` ruleset and makes an allowance for a certain `EightshiftLibs\Helpers\Components` static methods (`render` and `outputCssVariables`).
- Add @covers tag for all the tests
- Add the documentation for the new sniffs

### Changed
- PHPCS ruleset: tabs not spaces
- PHPCS: simplify ruleset
- Composer
  - Update the PHP Parallel Lint version constraint for improved compatibility with PHP 8.1.
    - Ref: https://github.com/php-parallel-lint/PHP-Parallel-Lint/releases
- Update composer to add the allow-plugins
- Update disallow do_shortcode sniff
  - The sniff is updated so that it extends the WPCS Sniff class. This class has two super useful helpers: is_token_namespaced and is_class_object_call. They allow super quick checks for namespaced functions and static functions named do_shortcode which would otherwise trigger a false positive result.
- Update GitHub Actions Workflow update
  - Update composer install action to v2.
  - Add concurrency check to save resources.
- Update minimum PHP version to 7.4 and tab width in the ruleset to 4

### Removed
- Composer
  - Remove the Composer PHPCS plugin dependency as it already is a dependency of both PHPCSExtra as well as SlevomatCodingStandards, so we'll inherit it anyway.

### Fixed
- Fix the wrong namespace in the ruleset
  - The ruleset namespace was wrongly set. For correct usage refer to this link: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Version-3.0-Upgrade-Guide, and for the full explanation watch the workshop video :).
- PHPCS: improve PHPCompatibility check for this repo
  - Remove the dependency as it is already a dependency of PHPCompatibilityWP and having both may cause version conflicts later.
  - Reset the severity of all PHPCompatibility sniffs to `5` for scanning the EightShiftCS code itself as that code is run outside the context of WordPress.

A huge thanks to Juliette Reinders Folmer (@jrfnl) for amazing help in fixing tons of issues with the ruleset and sniffs.

## [1.3.0](https://github.com/infinum/eightshift-coding-standards/compare/1.2.0...1.3.0) - 2020-05-04

### Removed
- Modified escaping sniff
    - The sniff wasn't working correctly, and we'll wait for the upstream to fix the issue
- Exclude doc comment align sniff

### Fixed
- Improve disallow do shortcode sniff (better regex and tests)
- Fixed the namespace in the ruleset.xml

### Changed
- Update minimum supported WP version to 5.4

## [1.2.0](https://github.com/infinum/eightshift-coding-standards/compare/1.1.0...1.2.0) - 2020-04-15

### Added
- Workflows for GH Actions
- Docs for custom sniffs
- Modified escaping sniff
    - will exclude the custom `Components::render()` method from the eightshift-libs
- Added phpcs extra ruleset for array spacing and array best practices
- Update samples for ruleset

### Changed
- Updated sniffs namespace

### Fixed
- Fix docblocks in the sniffs

## [1.1.0](https://github.com/infinum/eightshift-coding-standards/compare/1.0.1...1.1.0) - 2020-11-30

### Package renaming

We renamed the package from `infinum/coding-standards-wp` to `infinum/eightshift-coding-standards`.

## [1.1.0](https://github.com/infinum/eightshift-coding-standards/compare/1.0.0...1.0.1) - 2020-09-24

### Added
- Added a rule to prevent underscores denoting the private methods/properties

## [1.0.0](https://github.com/infinum/eightshift-coding-standards/compare/0.4.1...1.0.0) - 2020-09-18

### Official release of the Eightshift coding standards for WordPress projects

This is the official release of the Eightshift coding standards for WordPress. It contains breaking changes, mostly in
 regard
 of the naming scheme.
To equate the way we write our PHP and JS we opted to follow a modified PSR standards.
What this means is that we will remove liberal spacing, add some PSR12 modifications regarding arguments placing in closures, change snake_case with CamelCase for classes (for autoload puropses) and some other minor changes that will be documented below.
If you wish to use the old standards, be sure to modify your projects `composer.json` file with the appropriate version.

### Added
- Added PSR-12 standards
- Added more tests
- Updated the WPCS to 2.3.0
- Updated scripts

### Removed
- Removed the Test bootstrap
- Removed PHP 5.6 support and raised the recommended PHP version to 7.2 or higher
- Removed WordPress-Core standards

### Changed
- Replaced WordPress naming standards to modified PSR standards
- Changed the namespace of the WPCS core classes

## [0.4.1](https://github.com/infinum/eightshift-coding-standards/compare/0.3.1...0.4.1) - 2018-11-15

### Added
- Silenced previously excluded sniffs to avoid loading the entire `WordPress` ruleset
- Silenced `WordPress.Arrays.ArrayIndentation` to avoid it clashing with Generic indentation sniff

### Removed
- Fixed multiple alignment sniff issue

### Changed
- Reorganized sniff rules
- Raised the minimum supported PHP version to PHP 7.1

## [0.4.0](https://github.com/infinum/eightshift-coding-standards/compare/0.3.1...0.4.0) - 2018-10-24

### Added
- Unit tests - the basic setup is taken from https://github.com/WPTRT/WPThemeReview/
- Ignore rule about enqueueing scripts in the footer
- .gitattributes file for release purposes
- Added internal ruleset for writing additional sniffs
- Added rule about alignment of assignment operators (see this [customizable property](https://github.com/squizlabs/PHP_CodeSniffer/wiki/Customisable-Sniff-Properties#genericformattingmultiplestatementalignment))
- Added a rule about function parameters and indentation
- Ignore unused parameters in functions on account on hooks
- Added a rule about private methods and properties - they MUST NOT be prefixed with an underscore
- Added PHPCompatibilityWP ruleset for checking a cross-version PHP compatibility (from PHP 7.0 onwards)
- Added detailed CHANGELOG
- Updated readme
- Added autoload for loading the standards
- Updated composer.json
  - added different requirements
  - added unit test packages
  - moved phpcodesniffer-composer-installer to suggested package
  - updated scripts
- Added .travis.yml for automatic checks on new sniff addition

### Removed
- Removed ruleset.xml from the root of the standards
- Removed WordPress.Arrays.MultipleStatementAlignment exclusion rule

### Fixed
- Minor coding standard fix in the DisallowDoShortcode sniff
- Fix the array indentation issue

## [0.3.1](https://github.com/infinum/eightshift-coding-standards/compare/0.3.0...0.3.1) - 2018-07-27

### Changed
- Set the WPCS dependency to >= 1.0.0

## [0.3.0](https://github.com/infinum/eightshift-coding-standards/compare/0.2.8...0.3.0) - 2018-07-26

### Added
- Added minimum_supported_wp_version check - v4.7 is set as the minimum

### Changed
- Added additional rules to ruleset
- Fix the exclude patterns
- Change the VIP ruleset to WP native one since VIP is being deprecated upstream

### Removed
- Removed OnlyClassInFile sniff as it's pulled from the upstream

### Fixed
- Updated the DisallowDoShortcodeSniff to match phpcs 3.0.0 and latest WPCS

## [0.2.8](https://github.com/infinum/eightshift-coding-standards/compare/0.2.6...0.2.8) - 2018-06-21

### Added
- More files to the .gitignore file
- Added WordPress.VIP.PostsPerPage rule with 1000 posts limit
- Added WordPress.WhiteSpace.PrecisionAlignment to the exclude list
- Added WordPress.Arrays.MultipleStatementAlignment to the exclude list
- Added WordPress.Arrays.ArrayIndentation to the ruleset
- License file
- Update WPCS dependency to 0.14.0

### Changed
- Changed from GPLv2 to MIT license
- Updated readme - minor improvements and added credits

### Removed
- Removed PSR1.Classes.ClassDeclaration exclusion

## [0.2.6](https://github.com/infinum/eightshift-coding-standards/compare/0.2.5...0.2.6) - 2017-10-28

### Fixed
- Composer installed paths

## [0.2.5](https://github.com/infinum/eightshift-coding-standards/compare/0.2.4...0.2.5) - 2017-10-28

### Changed
- Updated readme and added more explanations for usage in IDE's
- Updated the WPCS dependency to 0.13.0

### Removed
- Removed default report since it conflicted with VSCode

## [0.2.4](https://github.com/infinum/eightshift-coding-standards/compare/0.2.3...0.2.4) - 2017-10-28

### Fixed
- Composer scripts - fixed installed paths set

## [0.2.3](https://github.com/infinum/eightshift-coding-standards/compare/0.2.2...0.2.3) - 2017-09-19

### Added
- Added `tab-width` rule (2 spaces default)

### Removed
- Removed prefix check, since we started using namespaces and OOP instead of procedural php and global namespace

### Changed
- Corrected the indentation in the ruleset

## [0.2.2](https://github.com/infinum/eightshift-coding-standards/compare/0.2.1...0.2.2) - 2017-07-25

### Changed
- Updated DisallowDoShortcodeSniff regex - from multiline check to just case insensitive check
- Increased dependencu on WPCS 0.12.0

## [0.2.1](https://github.com/infinum/eightshift-coding-standards/compare/0.2.1...main) - 2017-07-18

Initial release

repository: infinum/eightshift-coding-standards

repo_name: infinum/eightshift-coding-standards


text:
# pythonselenium

[![Docker Pulls](https://img.shields.io/docker/pulls/neetjn/pythonselenium.svg)](https://hub.docker.com/r/neetjn/pythonselenium/)

Docker image with Python 2.7, Chrome, Firefox, and their respective webdrivers.

### Versions

* Chrome: 67 stable
* Chromedriver: 2.39.0
* Firefox: 60
* Geckodriver: 0.20.1

### Usage

```
FROM neetjn/pythonselenium:latest
```

---
Copyright (c) 2017 John Nolette Licensed under the MIT license.

repository: neetjn/pythonselenium

repo_name: neetjn/pythonselenium


text:
---
title: tiup env
---

# tiup env

TiUP provides users with flexible and customized interfaces, some of which are implemented using environment variables. The `tiup env` command is used to query the user-defined environment variables that TiUP supports and their values.

## Syntax

```shell
tiup env [name1...N]
```

`[name1...N]` is used to view the specified environment variables. If it is not specified, all supported environment variables are viewed by default.

## Option

None

## Output

- If `[name1...N]` is not specified, a list of "{key}"="{value}" is output.
- If `[name1...N]` is specified, the "{value}" list is output in order.

In the above output, if `value` is empty, it means that the value of the environment variable is not set. In this case, TiUP uses the default value.

[<< Back to the previous page - TiUP Reference command list](/tiup/tiup-reference.md#command-list)

gha_language: Python


text:
# Serve it up

Managing a text file isn't much fun without a webserver to let you share it
with the world. You could write your own resources to manage each package,
service, and configuration file needed to run a server, but there's an easier
way.

We've pre-loaded a community-maintained Nginx module into your modules
directory. This module provides you with a main `nginx` class to install
and configure the server. It also provides a `vhost` resource type you
can use to serve content from the `/var/www/` directory.

    vim hello/manifests/init.pp

Rewrite your `hello` class to configure Nginx and serve your file. (Remember, use
`i` to enter insert mode in Vim, and type `ESC` then `:wq` when you're done.

```puppet
class hello {
  include 'nginx'

  # Use _ as a catch-all vhost name
  nginx::resource::vhost { '_':
    www_root => '/var/www',
  }

  file { '/var/www':
    ensure => directory,
    owner  => 'nginx',
    group  => 'nginx',
  }

  file { '/var/www/hello_puppet.txt':
    ensure  => file,
    content => "Hello from a class I wrote at Puppetconf!\n"
  }
}
```

Now connect to your webserver and trigger a Puppet agent run

    ssh<EMAIL_ADDRESS># The password is puppet
    puppet agent -t

Check out your hosted file!

    curl localhost/hello_puppet.txt


text:
# homebrew-tools

![ci](https://github.com/cyakimov/homebrew-tools/workflows/ci/badge.svg)

A collection of Homebrew formulas for various tools.

## Usage

```
brew tap cyakimov/tools
brew install cflare
```

repository: cyakimov/homebrew-tools

repo_name: cyakimov/homebrew-tools