text:
# isis-wicket-wizard #

*THIS COMPONENT IS STILL WORK-IN-PROGRESS, HAS NOT YET BEEN RELEASED*

[![Build Status](https://travis-ci.org/isisaddons/isis-wicket-wizard.png?branch=master)](https://travis-ci.org/isisaddons/isis-wicket-wizard)

This component, intended for use with [Apache Isis](http://isis.apache.org)'s Wicket viewer, provides a simple wizard
with next, previous, finish and cancel actions.

## Screenshots

The following screenshots show an example app's usage of the component.

![](https://raw.github.com/isisaddons/isis-wicket-wizard/master/images/page1.png)

![](https://raw.github.com/isisaddons/isis-wicket-wizard/master/images/page2.png)

![](https://raw.github.com/isisaddons/isis-wicket-wizard/master/images/page3.png)

![](https://raw.github.com/isisaddons/isis-wicket-wizard/master/images/page4.png)

Or, the "update category" action can be used to create a slightly different flow:

![](https://raw.github.com/isisaddons/isis-wicket-wizard/master/images/page5.png)

![](https://raw.github.com/isisaddons/isis-wicket-wizard/master/images/page6.png)

![](https://raw.github.com/isisaddons/isis-wicket-wizard/master/images/page7.png)

## API & Usage ##

The wizard implements an `Wizard` interface that is itself extends from `ViewModel.Cloneable` interface:

    public interface Wizard<W> extends ViewModel.Cloneable {

        public W next();
        public String disableNext();

        public W previous();
        public String disablePrevious();

        public Object finish();
        public String disableFinish();

    }

In the demo app, the `ToDoItemWizard` implements `Wizard` (by way of the `AbstractWizard` convenience abstract class).  It has eight properties (four of them for the summary page) and uses a `State` class to determine which should be shown or hidden:

    public class ToDoItemWizard
            extends AbstractWizard<ToDoItemWizard, ToDoItemWizard.State>
            implements Categorized {

        public ToDoItemWizard() { setState(State.DESCRIPTION); }

        public String title() {
            return !Strings.isNullOrEmpty(getDescription()) ? getDescription() : "New item";
        }

        //region > viewModel implementation
        @Override
        public String viewModelMemento() {
            return toDoItemWizardSupport.mementoFor(this);
        }

        @Override
        public void viewModelInit(String memento) {
            toDoItemWizardSupport.initOf(memento, this);
        }

        @Override
        public ToDoItemWizard clone() {
            return cloneThis();
        }
        @Override
        protected ToDoItemWizard cloneThis() {
            return toDoItemWizardSupport.clone(this);
        }

        public enum State implements AbstractWizard.State<ToDoItemWizard> {
            DESCRIPTION,
            CATEGORIES,
            DUE_BY,
            SUMMARY_PAGE;
            public boolean hideDescription() { return this != DESCRIPTION; }
            public boolean hideCategories() { return this != CATEGORIES; }
            public boolean hideDueBy() { return this != DUE_BY; }
            public boolean hideSummary() { return this != SUMMARY_PAGE; }
            @Override
            public State next() {
                switch (this) {
                    case DESCRIPTION: return CATEGORIES;
                    case CATEGORIES: return DUE_BY;
                    case DUE_BY: return SUMMARY_PAGE;
                    default: return null;
                }
            }
            @Override
            public String disableNext(ToDoItemWizard w) { return w.getState().next() == null? "No more pages": null; }

            @Override
            public State previous() {
                switch (this) {
                    case SUMMARY_PAGE: return DUE_BY;
                    case DUE_BY: return CATEGORIES;
                    case CATEGORIES: return DESCRIPTION;
                    default: return null;
                }
            }
            @Override
            public String disablePrevious(ToDoItemWizard w) { return w.getState().previous() == null? "No more pages": null; }
        }

        private String description;
        @MaxLength(100)
        @RegEx(validation = "\\w[@&:\\-\\,\\.\\+ \\w]*")
        @TypicalLength(50)
        public String getDescription() { return description; }
        public void setDescription(final String description) { this.description = description; }
        public boolean hideDescription() { return getState().hideDescription(); }

        private Category category;
        public Category getCategory() { return category; }
        public void setCategory(final Category category) { this.category = category; }
        public boolean hideCategory() { return getState().hideCategories(); }
        public String disableCategory() { return subcategory != null? "Use the update action to change both category and subcategory": null; }

        private ToDoItem.Subcategory subcategory;
        @Disabled(reason = "Use the update action to change both category and subcategory")
        @Optional
        public ToDoItem.Subcategory getSubcategory() { return subcategory; }
        public void setSubcategory(final ToDoItem.Subcategory subcategory) { this.subcategory = subcategory; }
        public boolean hideSubcategory() { return subcategory == null || getState().hideCategories(); }

        private LocalDate dueBy;
        @Optional
        public LocalDate getDueBy() { return dueBy; }
        public void setDueBy(final LocalDate dueBy) { this.dueBy = dueBy; }
        public String validateDueBy(final LocalDate dueBy) {
            if (dueBy == null) {
                return null;
            }
            return toDoItems.validateDueBy(dueBy);
        }
        public boolean hideDueBy() { return getState().hideDueBy(); }
        //endregion

        public String getDescriptionOnSummary() { return getDescription(); }
        public boolean hideDescriptionOnSummary() { return getState().hideSummary(); }

        public Category getCategoryOnSummary() { return getCategory(); }
        public boolean hideCategoryOnSummary() { return getState().hideSummary(); }

        public ToDoItem.Subcategory getSubcategoryOnSummary() { return getSubcategory(); }
        public boolean hideSubcategoryOnSummary() { return getState().hideSummary() || getSubcategory() == null; }

        public LocalDate getDueByOnSummary() { return getDueBy(); }
        public boolean hideDueByOnSummary() { return getState().hideSummary(); }

        @MemberOrder(sequence = "1")
        public ToDoItem finish() {
            return toDoItems.newToDo(getDescription(), getCategory(), getSubcategory(), getDueBy(), null);
        }
        @Override
        public String disableFinish() { return null; }

        @javax.inject.Inject
        private ToDoItemWizardSupport toDoItemWizardSupport;

        @javax.inject.Inject
        private ToDoItems toDoItems;
    }

The `ToDoItemWizard.layout.json` file is also worth reviewing; it shows how the wizard's properties are organized into pages:

    {
      "columns": [
        {
          "span": 12,
          "memberGroups": {
            "What task do you need to do?": {
              "members": {
                "description": {
                  "typicalLength": {
                    "value": 50
                  }
                }
              }
            },
            "Is it similar to other todo items?": {
              "members": {
                "category": { },
                "subcategory": { }
              }
            },
            "Does it need to be done by a particular date?": {
              "members": {
                "dueBy": {
                  "typicalLength": {
                    "value": 12
                  }
                }
              }
            },
            "Confirm details are correct": {
              "members": {
                "descriptionOnSummary": {
                  "named": {
                    "value": "Description"
                  },
                  "typicalLength": {
                    "value": 50
                  }
                },
                "categoryOnSummary": {
                  "named": {
                    "value": "Category"
                  }
                },
                "subcategoryOnSummary": {
                  "named": {
                    "value": "Subcategory"
                  }
                },
                "dueByOnSummary": {
                  "named": {
                    "value": "Due by"
                  }
                }
              }
            }
          }
        },
        {
          "span": 0,
          "memberGroups": {}
        },
        {
          "span": 0,
          "memberGroups": {}
        },
        {
          "span": 12,
          "collections": {}
        }
      ],
      "actions": {
        "previous": {
          "named": {
            "value": "Previous"
          }
        },
        "next": {
          "named": {
            "value": "Next"
          }
        },
        "finish": {
          "named": {
            "value": "Finish"
          }
        }
      }
    }

## How to run the Demo App ##

The prerequisite software is:

* Java JDK 8 (>= 1.9.0) or Java JDK 7 (<= 1.8.0)
* [maven 3](http://maven.apache.org) (3.2.x is recommended).

To build the demo app:

    git clone https://github.com/isisaddons/isis-wicket-wizard.git
    mvn clean install

To run the demo app:

    mvn antrun:run -P self-host

Then log on using user: `sven`, password: `pass`

## How to configure/use ##

You can either use this component "out-of-the-box", or you can fork this repo and extend to your own requirements.

#### "Out-of-the-box" ####

To use "out-of-the-box", add this component to your project's `dom` module's `pom.xml`:

        <dependency>
            <groupId>org.isisaddons.wicket.wizard</groupId>
            <artifactId>isis-wicket-wizard-cpt</artifactId>
            <version>1.6.0</version>
        </dependency>

Check for later releases by searching [Maven Central Repo](http://search.maven.org/#search|ga|1|isis-wicket-wizard-cpt).

In `WEB-INF\isis.properties`, register the `WizardInterfaceFacetFactory` facet factory:

    isis.reflector.facets.include=...,\
            org.isisaddons.wicket.wizard.metamodel.WizardInterfaceFacetFactory

There is no requirement to explicitly register the Wicket UI component (`WizardPropertiesPanelFactory`); it will be automatically discovered from the classpath.

#### "Out-of-the-box" (-SNAPSHOT) ####

If you want to use the current `-SNAPSHOT`, then the steps are the same as above, except:

* when updating the classpath, specify the appropriate -SNAPSHOT version:

    <version>1.8.0-SNAPSHOT</version>

* add the repository definition to pick up the most recent snapshot (we use the Cloudbees continuous integration service).  We suggest defining the repository in a `<profile>`:

    <profile>
        <id>cloudbees-snapshots</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <repositories>
            <repository>
                <id>snapshots-repo</id>
                <url>http://repository-estatio.forge.cloudbees.com/snapshot/</url>
                <releases>
                    <enabled>false</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories>
    </profile>

#### Forking the repo ####

If instead you want to extend this component's functionality, then we recommend that you fork this repo.  The repo is
structured as follows:

* `pom.xml      ` - parent pom
* `cpt          ` - the component' own parent pom
* `fixture      ` - fixtures, holding a sample domain objects and fixture scripts
* `webapp       ` - demo webapp (see above screenshots); depends on `ext` and `fixture`

Only the `cpt` project (and its submodules) is released to Maven central.  The versions of the other modules
are purposely left at `0.0.1-SNAPSHOT` because they are not intended to be released.

## Change Log ##

* `x.x.x` - ... not yet released ...

## Legal Stuff ##

#### License  ####

    Copyright 2014 Dan Haywood

    Licensed under the Apache License, Version 2.0 (the
    "License"); you may not use this file except in compliance
    with the License.  You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing,
    software distributed under the License is distributed on an
    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    KIND, either express or implied.  See the License for the
    specific language governing permissions and limitations
    under the License.

#### Dependencies ####

Other than Apache Isis, this component has no third-party dependencies.

##  Maven deploy notes ##

Only the `dom` module is deployed, and is done so using Sonatype's OSS support (see
[user guide](http://central.sonatype.org/pages/apache-maven.html)).

#### Release to Sonatype's Snapshot Repo ####

To deploy a snapshot, use:

    pushd cpt
    mvn clean deploy
    popd

The artifacts should be available in Sonatype's
[Snapshot Repo](https://oss.sonatype.org/content/repositories/snapshots).

#### Release to Maven Central ####

The `release.sh` script automates the release process.  It performs the following:

* performs a sanity check (`mvn clean install -o`) that everything builds ok
* bumps the `pom.xml` to a specified release version, and tag
* performs a double check (`mvn clean install -o`) that everything still builds ok
* releases the code using `mvn clean deploy`
* bumps the `pom.xml` to a specified release version

For example:

    sh release.sh 1.13.0 \
                  1.14.0-SNAPSHOT \
<EMAIL_ADDRESS>\
                  "this is not really my passphrase"

where
* `$1` is the release version
* `$2` is the snapshot version
* `$3` is the email of the secret key (`~/.gnupg/secring.gpg`) to use for signing
* `$4` is the corresponding passphrase for that secret key.

Other ways of specifying the key and passphrase are available, see the `pgp-maven-plugin`'s
[documentation](http://kohsuke.org/pgp-maven-plugin/secretkey.html)).

If the script completes successfully, then push changes:

    git push origin master
    git push origin 1.13.0

If the script fails to complete, then identify the cause, perform a `git reset --hard` to start over and fix the issue
before trying again.  Note that in the `cpt`'s `pom.xml` the `nexus-staging-maven-plugin` has the
`autoReleaseAfterClose` setting set to `true` (to automatically stage, close and the release the repo).  You may want
to set this to `false` if debugging an issue.

According to Sonatype's guide, it takes about 10 minutes to sync, but up to 2 hours to update [search](http://search.maven.org).

repository: isisaddons-legacy/isis-wicket-wizard

repo_name: isisaddons-legacy/isis-wicket-wizard


text:
# pkguninstall

pkguninstall will use the information stored in the "receipts db" to allow you to remove files and folders created by .pkg installers.

It handles custom locations/volumes and will remove the receipt once done.

CAUTION: check with `-n` first and make sure you know what you are doing. This is not a "intended" feature of most installers.

```
Usage: pkguninstall [-vnh] pkgid

Options:
  -n   Simulate only
  -v   Verbose
  -h   Print this help
```

For the list of installed .pkg use `pkgutil --pkgs`.

license: ISC

repository: FiloSottile/mostly-harmless

branch_name: refs/heads/main

extension: md

gha_language: JavaScript

license_type: permissive

repo_name: FiloSottile/mostly-harmless


text:
# [posix-expand](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/expand.html)

A POSIX-like `expand` in JavaScript.

[![NPM](https://nodei.co/npm/posix-expand.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/posix-expand/)

[![build status](https://secure.travis-ci.org/shama/posix-expand.svg)](https://travis-ci.org/shama/posix-expand)
[![Build status](https://ci.appveyor.com/api/projects/status/9237tat1hx6dxfy2)](https://ci.appveyor.com/project/shama/posix-expand)
[![NPM version](https://badge.fury.io/js/posix-expand.svg)](https://badge.fury.io/js/posix-expand)

<!-- [![browser support][https://ci.testling.com/shama/posix-expand.png]][https://ci.testling.com/shama/posix-expand] -->
[![Sauce Test Status](https://saucelabs.com/browser-matrix/shama.svg)](https://saucelabs.com/u/shama)

## CLI

```shell
expand tabs.file > spaces.file
```

## API

```js
var Expand = require('posix-expand')
```

### `var expand = new Expand(argv)`
Returns a transform stream. `argv` can be:

* `_`: An array of arguments, file inputs; such as `expand one.js two.js three.js`
* `fs`: Override the file system with a node/io compatible fs.
* `t`: Number of tab stops. Default is 8.

# license
(c) 2015 Kyle Robinson Young. MIT License

license: MIT

repository: shama/posix-expand

branch_name: refs/heads/master

repo_name: shama/posix-expand


text:
Playbook to demonstrate the features of XSOAR-Web-Server. It sends an html email to a set of users up to 2 times. The email can contain multiple html links, that the users can click and the response will be available in the context

## Dependencies
This playbook uses the following sub-playbooks, integrations, and scripts.

### Sub-playbooks
* xsoar-data-collection-response-tracking

### Integrations
* XSOARWebServer

### Scripts
This playbook does not use any scripts.

### Commands
* stopTimer
* xsoar-ws-setup-form-submission
* setIncident

## Playbook Inputs
---

| **Name** | **Description** | **Default Value** | **Required** |
| --- | --- | --- | --- |
| useremails | Comma separated email addresses for sending the emails | Replace with user emails | Optional |
| htmltemplate | The template for the data collection task supports a form with action marked as "$action1". The program as of now only supports one form with method post. | Paste the template here or select a list which contains the template | Optional |

## Playbook Outputs
---
There are no outputs for this playbook.

## Playbook Image
---
![xsoar-email-data-collection](../doc_files/xsoarwebserver-email-data-collection.png)

repository: demisto/content

gha_language: Python

gha_license_id: MIT

repo_name: demisto/content


text:
# MAIOproject
MAIO Ocean Turbulence project with Giovanni Negro

To study ocean turbulence with drifters we are going to make, analyse and interpret observations.
To facilitate the collaborative process, we will use this repository to structure the different tasks.

The repository consists of a project description folder with background information, a data folder in which all intermediate data is stored, a figures folder in which results are stored and the code files used for the analysis.

The code consists of a number of files which perform different tasks performed by functions.
1. selectmedsea: code to select trajectories in the Mediterrenean and discard all other data
    - OpenDrifterdata(filelocation): function to open NOAA netcdf file with drifter trajectories
    - selectMedsea(ID,lat,lon,time): function to select trajectories between 30N and 45N and 5W and 36E
    - Conversion(D): function to convert drifter locations from lon-lat to x-y in km.

2. findpairs: code to find and save the chance pairs in the Mediterrenean
    - SelectPair(D): function that takes the Mediterrenean trajectories and computes pairs of IDs that come within 10 km in a 6 hour window
    - Unpair: remove the double pairs

3. computedistance: code to compute distance timeseries for the chance pairs
    - ComputeDistance(ID1,ID2,Data_Mediterrenean): function to compute the distance between the pairs, find the minimum and return forward and backward timeseries from that minimum.

4. plottraj: code that plots chance pair trajectories and the dispersion distance.

repository: reint-fischer/MAIOproject

repo_name: reint-fischer/MAIOproject


text:
# Circulations

The circulations section contains all the information regarding your check-outs, check-ins, reservation requests, overdue items etc.

As a generic term, we also call this as "Media bookings" section.

## List Check-outs

You can access the list of all circulations related entries in this section under different status filters such as Pending, Reserved, Issued, Overdue, Cancelled, Returned etc.

* Please go to the `Dashboard -> Circulations -> Circulations` page.
* Circulation records will be displayed as shown below:

	![Circulations form](img/circulations-form.png)

* Now you can view all the different status filters in the `All` dropdown menu.

	![Circulations all dropdown menu](img/circulations-all-dropdown-menu.png)

## Check-out Item

To check-out or loan an item to a member of your library, please follow the below steps:

* Please go to the `Dashboard -> Circulations -> Circulations` section.
* Click on the `Circulate Item` button.

	![Quick circulation form](img/circulations-quick-circulation-form.png)

* First enter member number or member name. An auto-select list will appear, please select the member from the list.

	![Quick circulation form](img/circulations-quick-circulation-form-1.png)

* Then enter accession number or isbn or book title. An auto-select list will appear with green / red indicator, please select the item with green indicator. Red indicator means, the item is not available for check-out.

	![Quick circulation form](img/circulations-quick-circulation-form-2.png)

* Change the return date if you wish to.

	![Quick circulation form](img/circulations-quick-circulation-form-3.png)

* Click on the `Submit` button when you are done.

## Check-in Item

To check-in or receive an item from a member, please follow the below steps:

* Please go to the `Dashboard -> Circulations -> Circulations` section.
* Click on the `Quick Return` button.
* Enter the accession number or isbn or title of the item you want to check-in. An auto-select list will appear with green / red indicators. Your item should have red indicator.

	![Quick circulation form](img/circulations-check-in-form1.png)

* Select the item from the list.

	![Quick circulation form](img/circulations-check-in-form2.png)

* Enter any remark note in the remark input box, if you want to.
* Click on the `Submit` button when you are done.

## Reserve Item

To reserve an item on behalf of a member, please follow the below steps:

* Please go to the `Dashboard -> Circulations -> Circulations` section.
* Click on the `Reserve Item` button.
* The Reserve Item form will be displayed as shown below.

	![Reserve item form](img/circulations-reserve-item-form.png)

* Enter member number or name for whom you want to reserve.
* Then enter the accession number or isbn or title of the item that you want to reserve.
* Next enter the booking date and return date.
* Select status as "Reserved".
* Click on the `Submit` button when you are done.

## Change Return Date

You can update / extend return date of any circulation record specially that has already been issued but not yet returned.

To update or extend an item from a member, please follow the below steps:

* Please go to the `Dashboard -> Circulations -> Circulations` section.
* Click on the `Quick Extend` button.
* Enter the accession number or isbn or title of the item you want to extend. An auto-select list will appear with red indicators.

	![Quick circulation form](img/circulations-quick-extend-form1.png)

* Select the item from the list.

	![Quick circulation form](img/circulations-quick-extend-form2.png)

* Enter any remark note in the remark input box, if you want to.
* Click on the `Submit` button when you are done.

## Edit Check-out

You can edit any existing circulation entry, change return date, status etc from the circulations page.

To edit a circulation, please follow the below steps:

* Please go to the `Dashboard -> Circulations -> Circulations` section.
* Locate the item you want to edit from your circulation records and click on the `Edit` button next to that item.

	![Circulation form](img/circulations-form.png)

* An edit circulation form will be appeared as shown below.

	![Circulation edit form](img/circulations-edit-form.png)

* Edit or update necessary information regarding the circulation.
* Click on the `Submit` button when you are done.

## Extra Fuctionality

If you have larger amount of circulation entries then you can use our filtering option so that you can easily find any entry and perform all the circulation related activities.

To use this functionality, please follow the below steps:

* Please go to the `Dashboard -> Circulations -> Circulations` section.
* In the top corner of circulations page you can see a `Filter by ASN or ISBN or Member No` input box. Enter accession number or isbn or member no of the item in that box.

	![Circulations form filter box](img/circulations-form-filter-box.png)

* An auto-select list will appear, select the item from the list. All related circulations of the selected item will appear as shown below.

	![Circulations form filter result](img/circulations-form-filter-result.png)

* Now you can perform any action regarding your needs for circulations.

## Circulation Issue

Keep in mind that whenever checking out books you can not able to scroll past the 10th book even though you have several more copies of the same book in your library. Because **there is a cap limit of 10 items in auto complete dialogue box**.

repository: Librarika/manual

gha_license_id: NOASSERTION

repo_name: Librarika/manual


text:
# Key
- `<C-x>` means "`CTRL` + x"
- `<C-X>` means "`CTRL` + Shift + x"
- `<M-x>` means "`Meta` + x"
    - In Windows, the `Meta` key is the `ALT` Key
    - In OSX, you need to make the `Option/ALT` key to be the `Meta` Key in your
      terminal
        - Goto Terminal->`Preferences->`Profiles->`Keyboard
        - Select "Use Option as Meta Key"

# Bash Commandline Shortcuts
- `<C-e>`: Move to end of command line
- `<C-a>`: Move to beginning of command line
- `<C-x>`: Toggle between the beggining and end of line
- `<M-f>`: Move forward a word
- `<M-b>`: Move backward a word

- `<C-w>`: Delete word before the cursor
- `<C-k>`: Delete from cursor to end of line
- `<C-u>`: Delete from start of line to cursor
- `<C-y>`: Paste text that was cut using delete shortcuts

- `<TAB>`: Auto-completion
- Up/Down: Cycle through previously entered commands
- !!: Run the last command
- !`<pattern>`: Run the last command that starts with `<pattern>`
- `<C-r>`: Open _reverse-i-serach_ to search through your bash history
    - `<C-o>`: Run the searched command
    - If you have a long command that you use frequently, a good idea would be
      to add a tag string that you can search for by using '#' after your
      command

- `<C-c>`: Terminate running [foreground] process (SIGINT Interrupt)
- `<C-z>`: Stop running [foreground] process (SIGTSTP Interrupt)

(The above two interrupts are similar in that both stop the running process, but
do it in different ways. [Here] is a brief explanation of the difference)

[Here]:(https://askubuntu.com/questions/510811/what-is-the-difference-between-ctrl-z-and-ctrl-c-in-the-terminal)

- `<C-l>`: Clear screen
- `<C-s>`: Stop process output to the screen
    - `<C-q>`: Resume process output to the screen


text:
# Changelog

## [v1.0-r1](https://github.com/DSOlab/StrainTool/tree/v1.0-r1) (2021-09-11)

[Full Changelog](https://github.com/DSOlab/StrainTool/compare/v1.0...v1.0-r1)

**Fixed bugs:**

- input file duplicate lines stop processing [\#66](https://github.com/DSOlab/StrainTool/issues/66)
- sVn sVe must not be zero! [\#65](https://github.com/DSOlab/StrainTool/issues/65)
- Bugs \#65 \#66 fixed [\#67](https://github.com/DSOlab/StrainTool/pull/67) ([demanasta](https://github.com/demanasta))

**Closed issues:**

- Invalid UTM Zone [\#69](https://github.com/DSOlab/StrainTool/issues/69)
- generate-statistics flag [\#64](https://github.com/DSOlab/StrainTool/issues/64)

**Merged pull requests:**

- Bug68 [\#70](https://github.com/DSOlab/StrainTool/pull/70) ([demanasta](https://github.com/demanasta))

## [v1.0](https://github.com/DSOlab/StrainTool/tree/v1.0) (2019-07-02)

[Full Changelog](https://github.com/DSOlab/StrainTool/compare/v1.0-rc5.0...v1.0)

**Implemented enhancements:**

- strain.py: calculate sd of second invariant [\#55](https://github.com/DSOlab/StrainTool/issues/55)
- method Veis: check and readme [\#49](https://github.com/DSOlab/StrainTool/issues/49)
- code commenting [\#40](https://github.com/DSOlab/StrainTool/issues/40)
- rotational units [\#33](https://github.com/DSOlab/StrainTool/issues/33)
- gmtplots: plot statistics [\#31](https://github.com/DSOlab/StrainTool/issues/31)
- Output files [\#6](https://github.com/DSOlab/StrainTool/issues/6)
- README file [\#3](https://github.com/DSOlab/StrainTool/issues/3)
- remove tmp data [\#62](https://github.com/DSOlab/StrainTool/pull/62) ([demanasta](https://github.com/demanasta))
- Dev danast [\#61](https://github.com/DSOlab/StrainTool/pull/61) ([demanasta](https://github.com/demanasta))
- multithreading  [\#58](https://github.com/DSOlab/StrainTool/pull/58) ([demanasta](https://github.com/demanasta))
- Dev danast, optim. of sd estimations [\#57](https://github.com/DSOlab/StrainTool/pull/57) ([demanasta](https://github.com/demanasta))
- Dev danast [\#51](https://github.com/DSOlab/StrainTool/pull/51) ([demanasta](https://github.com/demanasta))
- Issue33 [\#45](https://github.com/DSOlab/StrainTool/pull/45) ([demanasta](https://github.com/demanasta))
- Issue38 [\#39](https://github.com/DSOlab/StrainTool/pull/39) ([demanasta](https://github.com/demanasta))
- Dev danast go for rc2.0 [\#36](https://github.com/DSOlab/StrainTool/pull/36) ([demanasta](https://github.com/demanasta))
- Gmt patch [\#35](https://github.com/DSOlab/StrainTool/pull/35) ([demanasta](https://github.com/demanasta))

**Fixed bugs:**

- Multithreading is different between Linux and Windows [\#59](https://github.com/DSOlab/StrainTool/issues/59)
- magnitude of sd [\#56](https://github.com/DSOlab/StrainTool/issues/56)
- \[gmtplots...\] bc not woring for windows [\#53](https://github.com/DSOlab/StrainTool/issues/53)
- One tensor \(barycenter\) not working? [\#52](https://github.com/DSOlab/StrainTool/issues/52)
- gmtplots: scale of gridded data not plotted correctly [\#47](https://github.com/DSOlab/StrainTool/issues/47)
- -r / --region switch fails if not set [\#44](https://github.com/DSOlab/StrainTool/issues/44)
- gmtstrainplot python verion error [\#38](https://github.com/DSOlab/StrainTool/issues/38)
- gmtplots: gtotalaxes [\#37](https://github.com/DSOlab/StrainTool/issues/37)
- Issue53 [\#54](https://github.com/DSOlab/StrainTool/pull/54) ([demanasta](https://github.com/demanasta))
- Issue47  [\#50](https://github.com/DSOlab/StrainTool/pull/50) ([demanasta](https://github.com/demanasta))
- Issue33 [\#48](https://github.com/DSOlab/StrainTool/pull/48) ([demanasta](https://github.com/demanasta))
- Dev [\#46](https://github.com/DSOlab/StrainTool/pull/46) ([demanasta](https://github.com/demanasta))

## [v1.0-rc5.0](https://github.com/DSOlab/StrainTool/tree/v1.0-rc5.0) (2019-06-05)

[Full Changelog](https://github.com/DSOlab/StrainTool/compare/v1.0-rc4.0...v1.0-rc5.0)

## [v1.0-rc4.0](https://github.com/DSOlab/StrainTool/tree/v1.0-rc4.0) (2018-12-14)

[Full Changelog](https://github.com/DSOlab/StrainTool/compare/v1.0-rc3.0...v1.0-rc4.0)

**Merged pull requests:**

- sync issue33 wth dev-danast [\#43](https://github.com/DSOlab/StrainTool/pull/43) ([demanasta](https://github.com/demanasta))
- sync dev-danast with master [\#41](https://github.com/DSOlab/StrainTool/pull/41) ([demanasta](https://github.com/demanasta))

## [v1.0-rc3.0](https://github.com/DSOlab/StrainTool/tree/v1.0-rc3.0) (2018-11-30)

[Full Changelog](https://github.com/DSOlab/StrainTool/compare/v1.0-rc2.0...v1.0-rc3.0)

## [v1.0-rc2.0](https://github.com/DSOlab/StrainTool/tree/v1.0-rc2.0) (2018-11-27)

[Full Changelog](https://github.com/DSOlab/StrainTool/compare/v1.0-rc1.0...v1.0-rc2.0)

**Closed issues:**

- calc of second invariant [\#34](https://github.com/DSOlab/StrainTool/issues/34)

## [v1.0-rc1.0](https://github.com/DSOlab/StrainTool/tree/v1.0-rc1.0) (2018-07-18)

[Full Changelog](https://github.com/DSOlab/StrainTool/compare/v1.0-beta4.0...v1.0-rc1.0)

**Implemented enhancements:**

- gmt:add stamp that StrainTool used [\#28](https://github.com/DSOlab/StrainTool/issues/28)
- gmt\_script: plot stations and velocities alone [\#20](https://github.com/DSOlab/StrainTool/issues/20)
- get DOI and add metadata set [\#16](https://github.com/DSOlab/StrainTool/issues/16)
- reformat project folders [\#15](https://github.com/DSOlab/StrainTool/issues/15)
- gmt\_script: add delaunay triangles [\#8](https://github.com/DSOlab/StrainTool/issues/8)
- License managements [\#4](https://github.com/DSOlab/StrainTool/issues/4)
- project name [\#2](https://github.com/DSOlab/StrainTool/issues/2)
- Opt [\#32](https://github.com/DSOlab/StrainTool/pull/32) ([demanasta](https://github.com/demanasta))
- Dev danast [\#30](https://github.com/DSOlab/StrainTool/pull/30) ([demanasta](https://github.com/demanasta))
- Gmt patch [\#29](https://github.com/DSOlab/StrainTool/pull/29) ([demanasta](https://github.com/demanasta))
- Dev danast [\#27](https://github.com/DSOlab/StrainTool/pull/27) ([demanasta](https://github.com/demanasta))
- Gmt patch [\#26](https://github.com/DSOlab/StrainTool/pull/26) ([demanasta](https://github.com/demanasta))
- Travis patch [\#24](https://github.com/DSOlab/StrainTool/pull/24) ([demanasta](https://github.com/demanasta))
- Gmt patch [\#21](https://github.com/DSOlab/StrainTool/pull/21) ([demanasta](https://github.com/demanasta))
- Docs patch [\#19](https://github.com/DSOlab/StrainTool/pull/19) ([demanasta](https://github.com/demanasta))
- Pretty code [\#18](https://github.com/DSOlab/StrainTool/pull/18) ([demanasta](https://github.com/demanasta))

**Fixed bugs:**

- grid.py step conflict [\#22](https://github.com/DSOlab/StrainTool/issues/22)
- Gmt patch [\#25](https://github.com/DSOlab/StrainTool/pull/25) ([demanasta](https://github.com/demanasta))
- Issue22 [\#23](https://github.com/DSOlab/StrainTool/pull/23) ([demanasta](https://github.com/demanasta))

## [v1.0-beta4.0](https://github.com/DSOlab/StrainTool/tree/v1.0-beta4.0) (2018-06-29)

[Full Changelog](https://github.com/DSOlab/StrainTool/compare/v1.0-beta2.1...v1.0-beta4.0)

## [v1.0-beta2.1](https://github.com/DSOlab/StrainTool/tree/v1.0-beta2.1) (2018-06-26)

[Full Changelog](https://github.com/DSOlab/StrainTool/compare/v1.0-beta2.0.1...v1.0-beta2.1)

## [v1.0-beta2.0.1](https://github.com/DSOlab/StrainTool/tree/v1.0-beta2.0.1) (2018-06-25)

[Full Changelog](https://github.com/DSOlab/StrainTool/compare/v1.0-beta2.0...v1.0-beta2.0.1)

## [v1.0-beta2.0](https://github.com/DSOlab/StrainTool/tree/v1.0-beta2.0) (2018-06-25)

[Full Changelog](https://github.com/DSOlab/StrainTool/compare/v1.0-beta1.0...v1.0-beta2.0)

**Merged pull requests:**

- Create LICENSE [\#17](https://github.com/DSOlab/StrainTool/pull/17) ([xanthospap](https://github.com/xanthospap))

## [v1.0-beta1.0](https://github.com/DSOlab/StrainTool/tree/v1.0-beta1.0) (2018-06-21)

[Full Changelog](https://github.com/DSOlab/StrainTool/compare/20ee2d532515bc3f9f9f537c99d2ed26b95d046f...v1.0-beta1.0)

**Implemented enhancements:**

- gmt\_script: 2nd Inv maps [\#12](https://github.com/DSOlab/StrainTool/issues/12)
- gmt\_script: dilatation maps [\#11](https://github.com/DSOlab/StrainTool/issues/11)
- gmt\_script: finalize principal axis plots [\#10](https://github.com/DSOlab/StrainTool/issues/10)
- gmt\_script: station names plot [\#9](https://github.com/DSOlab/StrainTool/issues/9)
- gmt\_script: plot velocities [\#7](https://github.com/DSOlab/StrainTool/issues/7)
- mergre forimpl to dev [\#14](https://github.com/DSOlab/StrainTool/pull/14) ([demanasta](https://github.com/demanasta))
- Gmt patch merge [\#13](https://github.com/DSOlab/StrainTool/pull/13) ([demanasta](https://github.com/demanasta))

**Closed issues:**

- from ellipsoidal to utm and back [\#1](https://github.com/DSOlab/StrainTool/issues/1)

\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

repository: SungshilChrisKim/StrainTool

repo_name: SungshilChrisKim/StrainTool


text:
---
layout: post
title: "Error Message: You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable"
subtitle: "Error Message: You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable"
type: "Year in Review"
blog: true
text: true
author: "Taehyun"
post-header: true
order: 9
---

# ❎ 에러 발생

react-native에서 react-native-maps 패키지를 이용해 지도 기능을 구현하다가 다음과 같은 에러 메시지를 받았다.

> Error Message: You must enable Billing on the Google Cloud Project at https://console.cloud.google.com/project/_/billing/enable

![](img/2020-10-10-12-50-24.png)

# 🌟 해결

에러 메시지대로 [https://console.cloud.google.com/project/\_/billing/enable](https://console.cloud.google.com/project/_/billing/enable) 에 접속해서 프로젝트 결제정보를 등록하니 문제가 해결되었다.


text:
# NavigationTabView

[![CI Status](https://img.shields.io/travis/winann/NavigationTabView.svg?style=flat)](https://travis-ci.org/winann/NavigationTabView)
[![Version](https://img.shields.io/cocoapods/v/NavigationTabView.svg?style=flat)](https://cocoapods.org/pods/NavigationTabView)
[![License](https://img.shields.io/cocoapods/l/NavigationTabView.svg?style=flat)](https://cocoapods.org/pods/NavigationTabView)
[![Platform](https://img.shields.io/cocoapods/p/NavigationTabView.svg?style=flat)](https://cocoapods.org/pods/NavigationTabView)

## Example

To run the example project, clone the repo, and run `pod install` from the Example directory first.

## Requirements

## Installation

NavigationTabView is available through [CocoaPods](https://cocoapods.org). To install
it, simply add the following line to your Podfile:

```ruby
pod 'NavigationTabView'
```

## Author

<EMAIL_ADDRESS>
## License

NavigationTabView is available under the MIT license. See the LICENSE file for more info.

repository: winann/NavigationTabView

repo_name: winann/NavigationTabView


text:
[![David Dependency Badge](https://david-dm.org/radum/webapp-boilerplate/status.svg)](https://david-dm.org/radum/webapp-boilerplate) [![David Dev Dependency Badge](https://david-dm.org/radum/webapp-boilerplate/dev-status.svg)](https://david-dm.org/radum/webapp-boilerplate?type=dev)

# ES6 Web app boilerplate using Gulp 4 + Browserify

> Scaffold out a front-end web app using [gulp](http://gulpjs.com/) for the build process.

## Features

* Enable [ES2015 features](https://babeljs.io/docs/learn-es2015/) using [Babel](https://babeljs.io)
* CSS Autoprefixing
* Built-in preview server with [BrowserSync](https://www.browsersync.io/)
* Automagically compile Sass with [libsass](http://libsass.org)
* Transform styles with [PostCSS](http://postcss.org/) & PostCSS plugins (see gulpfile)
* Automagically lint your scripts using [Eslint](http://eslint.org/) (with the Airbnb config) and [Stylelint](http://stylelint.io/)
* Automagically compiles your ES6 modules using Browserify
* Map compiled CSS/JS to source stylesheets/js with source maps
* Awesome image optimization via [imagemin](https://github.com/imagemin/imagemin)
* Development using Docker if needed
* CSS architecture and CSS structure inspired and mostly copied from [inuitcss](https://github.com/inuitcss/inuitcss), [BEM](http://getbem.com/), [SuitCSS](https://github.com/suitcss)

*For more information on what this can do for you, take a look at the [gulp plugins](package.json) used in our `package.json`.* or read the docs

## Getting Started

**Step 1.** Make sure that you have Node.js installed on your machine.

**Step 2.** Clone this repository or use [Yeoman generator](https://github.com/radum/webapp-boilerplate/tree/generator-webapp-boilerplate) to bootstrap your project:

```
$ git clone -o webapp-boilerplate -b master --single-branch \
      https://github.com/radum/webapp-boilerplate.git MyApp
$ cd MyApp
$ npm install                   # Install project dependencies listed in package.json
$ bower install                 # Install project dependencies listed in bower.json
```

——— or ———

```
$ npm install -g yo
$ npm install -g generator-webapp-boilerplate
$ mkdir MyApp
$ cd MyApp
$ yo webapp-boilerplate
```

**Step 3.** Compile and launch your app by running:

```
$ npm start                      # Same as `gulp serve`
```

This will fire up a local web server, open http://localhost:9000 in your default browser and watch files for changes, reloading the browser automatically via [BrowserSync](https://www.browsersync.io/).

## How to test

The unit tests are powered by chai and mocha.

```
$ gulp lint                     # Lint script files
$ gulp lint-css                 # Lint styles
$ npm run lint                  # Runs the previous lint task

$ gulp serve:test               # Run unit tests
```

## Linting

ESLint is used for linting JavaScript code. A `.eslintrc.json` file is already provided but you can define rules in your `package.json` under the `"eslint"` field also.

### The `no-undef` rule and tests

The ESLint rule [`no-undef`] will warn about usage of explicitly undeclared variables and functions. Because our tests use global functions like `describe` and `it` (defined by the testing framework), ESLint will consider those as warnings.

Luckily, the fix is easy—add an `.eslintrc.json` file to the `test/spec` directory and let ESLint know about your testing framework. For example, if you're using Mocha, add this to `.eslintrc.json`:

```json
{
  "env": {
    "mocha": true
  }
}
```

Configuration from this `.eslintrc.json` will merge with your project-wide configuration.

## How to build a distribution

To make a production-ready build of the app, run:

```
$ gulp
$ gulp serve:dist               # To preview the production build
```

## Docs

For more information see the [docs](docs) folder.

### Run with Docker

If you don't want to install Node, npm and all its friends you can run this using [Docker](https://www.docker.com/).

Build the docker image using `docker-compose`

```
$ docker-compose -f docker-compose-development.yml build
```

Then run a container based on the previously created image

```
$ docker-compose -f docker-compose-development.yml up
```

This will start a docker container with the previously built image and it will run `npm run start`.

### Tasks

To get the list of available Gulp tasks, run:

```
$ gulp --tasks
```

## How to Contribute

Anyone and everyone is welcome to [contribute](CONTRIBUTING.md) to this project. The best way to start is by checking current [open issues](https://github.com/radum/webapp-boilerplate/issues), submit a new issues or feature request, participate in discussions, upvote or downvote the issues you like or dislike, send pull requests.

## Credits

This is heavily inspired by the [Yeoman generator-webapp](https://github.com/yeoman/generator-webapp) so most credit will go to the Yeoman team and by [inuitcss](https://github.com/inuitcss/inuitcss). Thank you all for the great work you have done so far.

Also thanks to Joe Zim for his [migration tutorial](https://www.joezimjs.com/javascript/complete-guide-upgrading-gulp-4/) to Gulp 4

## License

Copyright © 2015-present Radu Micu. This source code is licensed under the [MIT license](https://opensource.org/licenses/MIT) © Radu Micu

---
Made with ♥ by RaduM ([@radumicu](http://twitter.com/radumicu))

repository: itsjw/webapp-boilerplate

repo_name: itsjw/webapp-boilerplate


text:
# Rust Project Template
> Starter template for a new Rust project - including docs and GH Actions CI

[![Rust CI](https://github.com/MichaelCurrin/rust-project-template/workflows/Rust%20CI/badge.svg)](https://github.com/MichaelCurrin/rust-project-template/actions/workflows/main.yml?query=workflow:"Rust+CI")
[![GitHub tag](https://img.shields.io/github/tag/MichaelCurrin/rust-project-template?include_prereleases=&sort=semver)](https://github.com/MichaelCurrin/rust-project-template/releases/)
[![License](https://img.shields.io/badge/License-MIT-blue)](#license)

[![Made with Rust](https://img.shields.io/badge/Rust-1-blue?logo=rust&logoColor=white)](https://www.rust-lang.org/)

[![Use this template](https://img.shields.io/badge/Generate-Use_this_template-2ea44f?style=for-the-badge&logo=github)](https://github.com/MichaelCurrin/rust-project-template/generate)

## Sample usage

_TODO: Add just a few lines to show how to use your application._

```sh
$ make run
```
```
134
Heads!
x is: 0.8058828276021345
Hello, World!
```

## Documentation

[![View - Online docs](https://img.shields.io/badge/View-Online_docs-blue?style=for-the-badge)](https://michaelcurrin.github.io/rust-project-template/)

## Resources

- [Rust](https://michaelcurrin.github.io/dev-cheatsheets/cheatsheets/rust/) section of my Dev Cheatsheets - for a guide to CLI commands.
- [Rust](https://michaelcurrin.github.io/dev-resources/resources/rust/) section of my Dev Resources.

## License

Released under [MIT](/LICENSE) by [@MichaelCurrin](https://github.com/MichaelCurrin).

repository: Floxter/rust-project-template

repo_name: Floxter/rust-project-template


text:
# Strata

A UI Component System for isomorphic rendering in ASP.Net.

---

## Project Strata's Goals

0. Organize markup, styles, and scripts together in a single directory, per user interface component.
0. Share rendering code between browser and server.
0. Provide tools for progressively loading scripts and styles.
0. Allow components to nest and depend on each other.
0. Bundle and cache intelligently.
0. Convention over configuration.
0. Be flexible enough for implementing other template syntax and JS frameworks in the future. (Backbone+Mustache is the reference implementation, though.)

## Purpose

To organize related code files together in a 'components' directory for discrete sections of user interface functionality. This will make code organization easier across a large javascript drive application. Additionally I want to include (render) these components in a web page with all necessary dependencies resolved and compiled. And to enable progressive enhancement as well as faster performance we have usable HTML delivered to the client without needing to run client-side templating logic before any usable UI is rendered.

There is no public package repository. This is primarily aimed at users who have an internal collection of UI components. Or have built a UI Component API of thier own but want an easy way to handle dependencies and rendering.

## Isomorphic

In this case it means that the data templating in the UI components happens first on the server and then in JS on the client. So that all usable markup is delivered first, without waiting for an AJAX service call and JS templating engine.

## Templating

Currently Strata uses the Mustache template language because of it's wide adoption and many cross platform implementations.

Also, it's convenient for me because my default use case for Strata is with Backbone and Underscore components using the mustache data templating syntax.

## Definition of A Stratum

It's my name for a user interface component.

A stratum consists of

- Markup
- JS Code
- JS Dependencies
- Stylesheets
- View Initialization Logic

### Component.json file example

```
{

	"name": "banner",
	"version": "1.0.0",
	"components": [ ],
	"scripts": [
		"/bower_components/underscore/underscore.js",
		"/bower_components/backbone/backbone.js"
	],
	"styles": [

	]
}
```

## TODO:

- Unit Tests
- Create a Nuget package.
- Create Nuget package for MVC helper for rendering
- Create Nuget package for WebForms usercontrols.
- finish implementing component dependencies

repository: sirtimbly/Strata

repo_name: sirtimbly/Strata


text:
### [CVE-2020-5766](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-5766)
![](https://img.shields.io/static/v1?label=Product&message=SRS%20Simple%20Hits%20Counter%20Plugin%20for%20WordPress&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=SQL%20Injection&color=brighgreen)

### Description

Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection') in SRS Simple Hits Counter Plugin for WordPress 1.0.3 and 1.0.4 allows a remote, unauthenticated attacker to determine the value of database fields.

### POC

#### Reference
- https://www.tenable.com/security/research/tra-2020-42

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[searchPlanetApsis](search-planet-apsis.md)

# searchPlanetApsis

fun [searchPlanetApsis](search-planet-apsis.md)(body: [Body](-body/index.md), startTime: [Time](-time/index.md)): [ApsisInfo](-apsis-info/index.md)

Finds the first aphelion or perihelion for a planet after a given time.

Given a date and time to start the search in startTime, this function finds the next date and time that the center of the specified planet reaches the closest or farthest point in its orbit with respect to the center of the Sun, whichever comes first, after startTime.

The closest point is called *perihelion* and the farthest point is called *aphelion*. The word *apsis* refers to either event.

To iterate through consecutive alternating perihelion and aphelion events, call searchPlanetApsis once, then use the return value to call [nextPlanetApsis](next-planet-apsis.md). After that, keep feeding the previous return value from nextPlanetApsis into another call of nextPlanetApsis as many times as desired.

See [planetApsidesAfter](planet-apsides-after.md) for convenient iteration of consecutive apsides.

## Parameters

| | |
|---|---|
| body | The planet for which to find the next perihelion/aphelion event. Not allowed to be [Body.Sun](-body/-sun/index.md) or [Body.Moon](-body/-moon/index.md). |
| startTime | The date and time at which to start searching for the next perihelion or aphelion. |

repository: cosinekitty/astronomy

gha_language: C

repo_name: cosinekitty/astronomy


text:
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
# Note Taking App
Table of Contents:
* [Contributors:](#Contributtors)
* [Technology-Used](#Technology-Used)
* [Description](#Description)
* [Usage](#Usage)
* [License-Info](#License-Info)
* [Questions](#Questions)

## Contributors:
Benjamin Harris

## Description:
Users can take notes and have them stored on a server.

## Technology-Used

* javaScript
* node.js
* express.js

## Usage:
User can enter a note title and underneath enter a the text of that note. One those two fields are populated a save icon will appear and the user can save that note. The title will appear in the side bar on the left hand side of the screen. If the user clicks on the title their note will reappear in the input fields but in a readonly format. The user can then click the write icon and the fields will be cleared and ready for the next entry. The user can delete the notes from storage by clicking on the trashcan icon next to the notes title in the lefthand side bar.

## License-Info:
MIT License

## Questions:
* Email: [harben31<EMAIL_ADDRESS>* GitHub: [harben31](https://www.github.com/harben31)


text:
# Elastic on Docker

This is a small example of how to use [Elastic](https://github.com/olivere/elastic),
the Elasticsearch client for Go, with [Docker](https://docs.docker.com/) and
[Docker Compose](https://docs.docker.com/compose/).

Docker Compose orchestrates two containers. It requires Docker Compose 1.6.0+
and Docker 1.10+, as the docker-compose.yml configuration uses version 2.

First, there is the
[Elasticsearch container](https://hub.docker.com/_/elasticsearch/). We use
the default configuration, but we mount the data directory on `/tmp/esdata`.
[See here](https://github.com/docker-library/elasticsearch/issues/74)
why we do this.

Second, we host a simple app in a container that will connect to the
Elasticsearch container and will periodically call the Nodes Info API.

To start everything up, run `docker-compose up`, then watch `docker-compose logs`
in another shell.

## LICENSE

MIT

repository: lonso/elastic-with-docker

repo_name: lonso/elastic-with-docker


text:
# terraform-notes

[Terraform](https://www.terraform.io) is a tool to manage infrasrtucture as code from [Hashicorp](https://www.hashicorp.com/).

## Installation and Version Management

### tfenv
[tfenv](https://github.com/tfutils/tfenv) is a terraform version manager inspired by [rbenv](https://github.com/rbenv/rbenv). It makes it easy to operate on different terraform projects and modules of different version compatibility.

### terragrunt
[terragrunt](https://github.com/gruntwork-io/terragrunt) is a thin wrapper for terraform that provides extra tools for working with multiple Terraform modules. [terragrunt](https://github.com/gruntwork-io/terragrunt) comes from by Yevgeniy Brikman and team at [gruntwork](https://gruntwork.io/). He wrote [Terraform up and Running](http://shop.oreilly.com/product/0636920225010.do).
Gruntwork also created [terratest](https://github.com/gruntwork-io/terratest). With terratest you can write automated tests against your infrastructure code.

### tgenv
[tgenv](https://github.com/cunymatthieu/tgenv) [terragrunt](https://github.com/gruntwork-io/terragrunt) version manager inspried by and using code from tfenv.

## CI Tools

### Atlantis

[Atlantis](https://www.runatlantis.io/) provides Terraform Pull Request Automation. They maintain an [official container](https://hub.docker.com/r/runatlantis/atlantis) on dockerhub.

### Custom CI Workflow Example

An example of an automated CI workflow for contributing code to a terraform inventory.

1. Open a Pull Request
1. Automatically run:
   1. `terraform plan`
   1. [tflint](https://github.com/wata727/tflint)
   1. [terratest](https://github.com/gruntwork-io/terratest)
1. Comment the results of checks back to the pull request.
1. Team member reviews and approves.
1. A `terraform apply` occurs and the output is commented on the pull request.
1. Merge Pull Request (assuming successful apply)

If you were creating a workflow for developing a terraform module in a non production environment, you could modify this workflow to both create and then destory the resources.

Terraform testing creates real resources on a cloud provider. It is common for terraform non-production environments to be on-demand and destoryed after the test is completed to save money.

Terraform commands are limiated to the speed of the provider's API. Resources of different types are created at different speeds. For example an AWS Cloudfront distribution takes ~30-35 minutes to create. An AWS S3 bucket only seconds.

repository: burtino/terraform-notes

repo_name: burtino/terraform-notes


text:
# json-store-client
A Python client for [jsonstore.io](https://www.jsonstore.io/)

## Installation
```bash
pip install json-store-client
```
#### An optional installation of [ujson](https://pypi.org/project/ujson/) is recommended for faster json processing.
##### Also installing [cchardet](https://pypi.org/project/cchardet/) and [aiodns](https://pypi.org/project/aiodns/) are recommended by aiohttp for faster performance.

## Usage

#### Demo of storing a Python json-friendly object with json-store-client in async on [repl.it](https://repl.it/@leon332157/json-store-client-demo).

```python
from json_store_client import *

jsonStoreToken = '...' # Insert your token here in place of the three periods(...).
client = AsyncClient(jsonStoreToken)

async def demo_function():

 # Save data to the 'foo' key.
 await client.store('foo', {'alfa': 'bravo', 'charlie': 'delta'})

 # Save data with dict mapping
 await client.save_multiple({'foo':{'alfa': 'bravo', 'charlie': 'delta'}})

 # Get the data from the 'foo' key.
 data = await client.retrieve('foo')

 print(data) # => {'alfa': 'bravo', 'charlie': 'delta'}
 print(data['alfa']) # => 'bravo'

 # Deletes the data after printing parts of it.
 await client.delete('foo')
```

## Importing

Before starting to use the API, you will need to import the client classes into your program. The following line of code will simply import everything from the package: -
```python
from json_store_client import *
```

## json-store-client API

### Client
 **The synchronous Client.**
 This client handles the API features synchronously using normal functions.
 #### Constructor
  ```python
  my_client = Client(token)
  ```

### AsyncClient
 **The asynchronous Client.**
 This client handles the API features asynchronously using coroutines.
 #### Constructor
 ```python
 my_async_client = AsyncClient(token)
 ```

Both return the client to use for data operations.

###### token (str): The API token from [jsonstore.io](https://www.jsonstore.io)

## Storing data

- `client.store(key, data[, timeout]) # Synchronously`
- `await client.store(key, data[, timeout]) # Asynchronously`

Storing data in jsonstore with a key.

###### key (str): The key to be stored on jsonstore
###### data (any): The data to be stored under the key. It can be any Python objects.
###### timeout (int): The timeout for the http request. Default 5 seconds

- `client.store_multiple(data[, timeout])`
- `await client.store_multiple(data[, timeout])`

Storing data in jsonstore with a dictionary mapping.

###### data (dict):  A dict of {key(s):value(s)} to be updated.
###### timeout (int): The timeout for the http request. Default 5 seconds

> **Note:** If there is already some data stored under the key, it will be overwritten.

## Fetching stored data

- `client.retrieve(key[, timeout])`
- `await clent.retrieve(key[, timeout])`

Retrieve data in jsonstore with a key.

##### If nothing is saved under the key, it will return `None`.

###### key (str): The key to get on jsonstore
###### timeout (int): The timeout for the http request. Default 5 seconds

## Deleting stored data

- `client.delete(key[, timeout])`
- `await client.delete(key[, timeout])`

Delete data in jsonstore with a key

###### key (str): The key to get on jsonstore
###### timeout (int): The timeout for the http request. Default 5 seconds


text:
+++
title = "Insecurity in HTTP Headers"
date = "2023-04-04T17:26:17+08:00"
author = "zd"
authorTwitter = "" #do not include @
cover = ""
categories = [ "GH" ]
tags = ["async", "cli", "essentialsecurity", "http", "python"]
keywords = ["", ""]
description = "Based on essential security, here is how to protect users by securing HTTP headers for a website."
showFullContent = false
readingTime = true
hideComments = true
color = "" #color from the theme settings
+++

***Take the essential steps to secure your users via HTTP headers configuration at a website.***

Securing website is different than security web application. *Securing website*, is referring to configuration at the web server level.

> And *securing web application*, is referring to secure programming practices to prevent the following attacks at the web application level:
> - SQL-injection
> - XSS
> - SSRF
> - XSRF
> - XML external ntity attack
> - insecure direct object references
> - directory traversal
>
> Most of the time, it requires the developer to make the changes, at the web application or source code, for remediation.

***Securing website***, is usualy performed by system engineer, and should always be implemented as company policy. Its' purpose is to protect the ***users*** from the following attacks:
 - Eavedropping with HTTP connection.
 - Cross-Site Scripting (XSS)
 - Clickjacking
 - MIME type sniffing attacks
 - User privacy information disclosure via referrer header
 - Mis-use of resources (camera or microphone) to access user privacy

It is easy and straight forward to be configured, and can be easily detected by security scanner.  Below is a list of HTTP headers configuration to secure your web servers.

## Essential HTTP Headers (server)

Here are the essential HTTP headers configuration for securing website. These includes my configuration tht you may follow.

| HTTP Header  | My configurtion  | Type  |
| ------------ | ------------ | ----- |
| [`Strict-Transport-Security`](#essential-http-headers-server) | `max-age=31536000; includeSubDomains; preload` | essential |
| [`Content-Security-Policy`](#content-security-policy)   | `default-src 'self'; script-src 'self' ; img-src *` | essential |
| [`X-Frame-Options`](#x-frame-options) | `SAMEORIGIN` |  essential|
| [`X-Content-Type-Options`](#x-content-type-options) | `nosniff` | essential |
| [`Referrer-Policy`](#referrer-policy) | `strict-origin-when-cross-origin` | essential |
| [`Permissions-Policy`](#permissions-policy) | `accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=()` | essential |
| [`X-XSS`](#x-xss) | `1; mode=block` | optional |

### HTTP Strict-Transport-Security (HSTS)
**HTTP Strict Transport Security (HSTS)** is a security feature that is implemented at the web server level and is designed to enhance the security of websites by forcing the use of HTTPS for all connections. HSTS works by instructing web browsers to only access a website over an encrypted HTTPS connection, even if the user types in the HTTP version of the website's URL.

When a website sets an HSTS header, it includes the `max-age` directive, which specifies the number of seconds that the browser should remember to access the website only over HTTPS. During this time, any attempts to access the website over HTTP will be automatically redirected to HTTPS. The HSTS header also includes the `includeSubDomains` directive, which tells the browser to apply the same HSTS policy to all subdomains of the website.

The recommended value for the max-age directive is `31536000` seconds (one year), as this provides a good balance between security and flexibility. However, the specific value may vary depending on the needs of the website.

To configure HSTS, the web server needs to include the HSTS header in the HTTP response to requests made to the website. For example, in Apache, the following code can be added to the website's .htaccess file to set the HSTS header:

```css
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
```

The `preload` parameter is optional but recommended as it allows the website to be included in the HSTS preload list maintained by web browsers, which can improve the security and performance of the website.

*Although a max-age of 1 year is acceptable for a domain, two years is the recommended value as explained on https://hstspreload.org*

### Content Security Policy
**Content Security Policy (CSP)** is a security feature implemented at the web server level that helps protect websites against cross-site scripting (XSS) attacks and other types of content injection attacks. CSP allows website administrators to specify which sources of content are allowed to be loaded and executed on a page, which can help prevent malicious code from being injected into the page by an attacker.

When a website sets a CSP header, it includes a set of directives that specify the sources of content that are allowed to be loaded on the page. These sources can include trusted servers, such as the website's own server, as well as external content delivery networks (CDNs) and other trusted sources.

The recommended value and configuration of the CSP header can vary depending on the needs of the website. Generally, the CSP header should be set to a restrictive policy that only allows content from trusted sources to be loaded on the page. This can help prevent attackers from injecting malicious code into the page and can also help prevent data exfiltration attacks by preventing the loading of external resources.

A basic CSP header might look like this:

```css
Content-Security-Policy: default-src 'self';
```

This policy only allows content to be loaded from the same origin as the page itself, and will block any external content from being loaded. More complex CSP headers can include additional directives that allow specific types of content to be loaded from external sources, while still preventing malicious content from being injected into the page.

The specific configuration of the CSP header will depend on the needs of the website, and it is recommended that website administrators consult the CSP documentation and testing tools to ensure that their policy is configured correctly and is effective in preventing attacks.

### X-Frame-Options
The **X-Frame-Options header (XFO)** is a security feature implemented at the web server level that helps protect websites against clickjacking attacks. Clickjacking is a type of attack where an attacker tries to trick a user into clicking on a malicious link by hiding the link behind a legitimate-looking button or image.

When a website sets an XFO header, it includes a directive that specifies whether or not the page can be displayed inside an HTML frame or iframe on another website. This can help prevent clickjacking attacks by ensuring that the website's content is only displayed in the intended context.

The recommended value for the XFO header is to set it to `SAMEORIGIN`. This directive allows the page to be displayed inside a frame or iframe on another page, but only if the other page has the same origin as the original page. This means that the website's content can still be embedded in pages on the same domain, but prevents it from being embedded in malicious websites that could be used for clickjacking attacks.

To configure the XFO header, the web server needs to include the header in the HTTP response to requests made to the website. For example, in Apache, the following code can be added to the website's .htaccess file to set the X-Frame-Options header:

```css
Header always append X-Frame-Options SAMEORIGIN
```

This code will append the "SAMEORIGIN" directive to the XFO header for all HTTP responses from the website, ensuring that the website's content can only be embedded in pages on the same domain.

It is recommended that website administrators configure the XFO header to help prevent clickjacking attacks and improve the security of their website.

### X-Content-Type-Options
The **X-Content-Type-Options header** is a security feature implemented at the web server level that helps protect websites against MIME type sniffing attacks. MIME type sniffing is a type of attack where an attacker tries to execute malicious code by tricking the browser into interpreting a file as a different type than it actually is.

When a website sets an **X-Content-Type-Options** header, it includes a directive that specifies whether or not the browser should be allowed to sniff the MIME type of a file. This can help prevent MIME type sniffing attacks by ensuring that the browser only interprets files based on their actual MIME type.

The recommended value for the `X-Content-Type-Options` header is to set it to `nosniff`. This directive instructs the browser to not sniff the MIME type of a file, and to only interpret the file based on its actual MIME type. This helps prevent attackers from tricking the browser into interpreting a file as a different type than it actually is, which can be used to execute malicious code.

For example, in Apache, the following code can be added to the website's .htaccess file to set the `X-Content-Type-Options` header:

```css
Header set X-Content-Type-Options nosniff
```

This code will set the `nosniff` directive for the X-Content-Type-Options header for all HTTP responses from the website, ensuring that the browser only interprets files based on their actual MIME type.

It is recommended that website administrators configure the X-Content-Type-Options header to help prevent MIME type sniffing attacks and improve the security of their website.

### Referrer-Policy

The **Referrer-Policy header** is a security feature implemented at the web server level that helps protect website user privacy by controlling the information passed in the HTTP Referrer header. The HTTP Referrer header is sent by the browser when a user clicks a link or submits a form, and it contains the URL of the page that the user came from.

When a website sets a **Referrer-Policy** header, it includes a directive that specifies how much information should be passed in the Referrer header. This can help protect user privacy by limiting the amount of information that is passed to third-party websites.

The recommended value for the Referrer-Policy header is to set it to `strict-origin-when-cross-origin`. This directive instructs the browser to send the full URL in the Referrer header when navigating within the same origin, but only send the origin part of the URL when navigating to a different origin. This helps prevent third-party websites from accessing sensitive information about the user's browsing history.

To configure the **Referrer-Policy** header, the web server needs to include the header in the HTTP response to requests made to the website. For example, in Apache, the following code can be added to the website's .htaccess file to set the Referrer-Policy header:

```css
Header always set Referrer-Policy "strict-origin-when-cross-origin"
```

This code will set the `strict-origin-when-cross-origin` directive for the Referrer-Policy header for all HTTP responses from the website, ensuring that the Referrer header only contains the origin information when navigating to a different origin.

It is recommended that website administrators configure the Referrer-Policy header to help protect user privacy and improve the security of their website.

### Permissions-Policy
The **Permissions-Policy header** is a security feature implemented at the web server level that allows website administrators to control which features and APIs are available to a web page, based on the origin of the page. This can help prevent malicious web pages from accessing sensitive user information or executing unauthorized actions.

When a website sets a **Permissions-Policy** header, it includes a directive that specifies which features and APIs are available to a web page. For example, the Permissions-Policy header can be used to control access to features such as camera, microphone, geolocation, and more.

The recommended value for the **Permissions-Policy** header is to set it to a restrictive value that only allows the features that are necessary for the website to function properly. This helps prevent malicious web pages from accessing sensitive user information or executing unauthorized actions.

To configure the Permissions-Policy header, the web server needs to include the header in the HTTP response to requests made to the website. For example, in Apache, the following code can be added to the website's .htaccess file to set the Permissions-Policy header:

```css
Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()"
```

This code will set the Permissions-Policy header to allow access to the camera, microphone, and geolocation APIs, but only if the website has explicit permission from the user.

It is recommended that website administrators configure the **Permissions-Policy** header to help prevent malicious web pages from accessing sensitive user information or executing unauthorized actions, and improve the security of their website.

### X-XSS
The **X-XSS-Protection header** is a security feature implemented at the web server level that helps protect websites against cross-site scripting (XSS) attacks. XSS attacks are a type of attack where an attacker injects malicious code into a web page, which is then executed by the victim's browser.

When a website sets an **X-XSS-Protection** header, it includes a directive that specifies whether or not the browser should enable its built-in XSS protection. The browser's XSS protection can help prevent certain types of XSS attacks by blocking the execution of malicious scripts.

The recommended value for the **X-XSS-Protection** header is to set it to `1; mode=block`. This directive instructs the browser to enable its built-in XSS protection and to block the execution of any detected malicious scripts.

To configure the X-XSS-Protection header, the web server needs to include the header in the HTTP response to requests made to the website. For example, in Apache, the following code can be added to the website's .htaccess file to set the X-XSS-Protection header:

```css
Header set X-XSS-Protection "1; mode=block"
```

This code will set the `1; mode=block` directive for the X-XSS-Protection header for all HTTP responses from the website, ensuring that the browser's built-in XSS protection is enabled and that malicious scripts are blocked.

It is recommended that website administrators configure the X-XSS-Protection header to help protect their website against XSS attacks and improve the security of their website.

## Tool at MySeq: httphdr_scan
I have created a cli tool, to perform quick scan on HTTP header. It is called [httphdr_scan](https://github.com/myseq/http_scanner/).

```shell
$ ./main.py -h
usage: main.py [-h] [-u <url> [<url> ...]] [-f <sites.url>] [-r] [-v]

options:
  -h, --help            show this help message and exit
  -u <url> [<url> ...]  Specifying URL
  -f <sites.url>        Specifying input site file
  -r                    Follow HTTP 301 redirection.
  -v                    verbose output
```

Below is the sample output:

![http_scanner](https://raw.githubusercontent.com/myseq/http_scanner/main/output.png)

## Similar Ideas
 - Online [Security Headers](https://securityheaders.com/)
 - Security Header Check - [shcheck](https://github.com/santoru/shcheck)

## Links
 * moz://a [Web Security Cheat Sheet](https://infosec.mozilla.org/guidelines/web_security.html)
 * [HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers)