text:
# jMISB

![Build Status](https://travis-ci.com/WestRidgeSystems/jmisb.svg?branch=develop)
[![Coverage Status](https://coveralls.io/repos/github/WestRidgeSystems/jmisb/badge.svg?branch=develop)](https://coveralls.io/github/WestRidgeSystems/jmisb?branch=develop)
[![Maven Central](https://maven-badges-generator.herokuapp.com/maven-central/org.jmisb/jmisb/badge.svg)](https://maven-badges-generator.herokuapp.com/maven-central/org.jmisb/jmisb)
[![Gitter](https://badges.gitter.im/jmisb/community.svg)](https://gitter.im/jmisb/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

## About

jMISB is an open source Java library implementing various
[MISB](http://www.gwg.nga.mil/misb/ "MISB home page") standards. The
project was begun in March 2017, and version 1.0.0 was released on
May 23, 2018. It leverages the excellent work by
[bytedeco](https://github.com/bytedeco) on bringing video support to Java.
Stay tuned here for updates, and please join us on [gitter](https://gitter.im/jmisb/community) if you need help
or would like to participate!

## Why jMISB?

The Motion Imagery Standards Board, or MISB's mission is to develop and
maintain standards for interoperability between motion imagery systems in use
within the Department of Defense (DoD) and Intelligence Community (IC).

The goal of the jMISB project is to provide an open implementation of
these standards and allow government and industry to leverage them more easily
and effectively. The jMISB project is not affiliated with, nor endorsed by
MISB in any way.

## Scope

The MISB has been quite prolific in creation of new standards since its
inception in 2000. As of March 2017, over three dozen standards are listed
on its web site. While the scope of the jMISB project is to support as many of
these standards as possible, the initial focus will be on those
in most widespread use. Usage is not easy to quantify, so we anticipate
making course corrections based on feedback from the community. The initial
set of standards to be supported are:

| Identifier | Name                                                                            | Implementation Status                                                                                | Known Issues                                                                                |
| ---------- | ----                                                                            | ---------------------                                                                                | ------------                                                                                |
| ST 0102    | Security Metadata Universal and Local Sets for Digital Motion Imagery           | Implemented as of ST 0102.12. There is read-only support for some tags (not UMID) that were removed in ST 0102.12. |                                                                                |
| EG 0104    | Predator UAV Basic Universal Metadata Set                                       | Read only support for EG 0104.5. Writing is not planned, since this is deprecated.                                 |                                                                                |
| ST 0601    | UAS Datalink Local Set                                                          | Mostly implemented as of ST 0102.16a.                                                                              | [140](https://github.com/WestRidgeSystems/jmisb/issues/140)                                                              |
| ST 0603    | MISP Time System and Timestamps                                                 | Partly implemented as of ST 0603.5.                                                                                | [97](https://github.com/WestRidgeSystems/jmisb/issues/97)                                                                |
| ST 0604    | Timestamps for Class 1 / Class 2 Motion Imagery                                 | Partly implemented as of ST 0604.6.                                                                                | [102](https://github.com/WestRidgeSystems/jmisb/issues/102)                                                              |
| ST 0805    | KLV to Cursor-on-Target (CoT) Conversions                                       | Partly implemented. Limited testing.                                                                               |                                                                                |
| ST 0806    | Remote Video Terminal Metadata Set                                              | Implemented as of ST 0806.5. Unit tests only, no interoperability testing.                                         |                                                                                |
| ST 0808    | Ancillary Text Metadata Sets                                                    | Implemented as of ST 0808.2. Local Set support only, no universal set support.                                     |                                                                                |
| ST 0903    | Video Moving Target Indicator and Track Metadata                                | VMTI and VTrack Local Sets implemented as of ST 0903.5. We also support pre-ST0903.4 files.                        |                                                                                |
| ST 1201    | Floating Point to Integer Mapping                                               | Fully implemented per ST1201.4.                                                                                |                                                                                |
| ST 1204    | Motion Imagery Identification System (MIIS) Core Identifier                     | Implemented as of ST 1204.3.                                                                                |                                                                                |
| ST 1206    | Synthetic Aperture Radar (SAR) Motion Imagery Metadata                          | Implemented as of ST 1206.1. Unit tests only, no interoperability testing.                                         |                                                                                |
| ST 1402    | MPEG-2 Transport Stream for Class 1/Class 2 Motion Imagery, Audio, and Metadata | Mostly implemented, support for Sync and Asynchronous multiplexing.                                                |                                                                                |
| ST 1909    | Metadata Overlay for Visualization                                              | Mostly implemented. No support for Frame Time, next zoom or the reticle.                                           | [97](https://github.com/WestRidgeSystems/jmisb/issues/97)                                                                |

jMISB aims to be cross-platform to run on any modern operating system. However,
some OSes are more widely used than others, and we will prioritize those to
reach the widest audience possible. The OSes we are initially targeting are:

1. Windows
2. Linux
3. Android
4. MacOS

## Building

To build the library from the command line, simply run the Maven command:

```sh
mvn install
```

This will compile the source code, run unit tests, and install the JARs to your local Maven repository.

To get started, you may want to run `jmisb-viewer` and experiment
with some test data. This is a sample application intended mainly to aid in
development. To run it from the command line, issue:

```sh
cd viewer
mvn exec:exec
```

## Including in Your Project

If you are using a dependency management tool such as Maven with access to the
[Central Repository](https://search.maven.org/), you can configure it to use
jMISB as a dependency. For Maven, add the following to your `pom.xml`:

```xml
    <dependency>
        <groupId>org.jmisb</groupId>
        <artifactId>jmisb-api</artifactId>
        <version>1.10.0</version>
    </dependency>
```

For Gradle, include the following:

```groovy
dependencies {
    compile group: 'org.jmisb', name: 'jmisb-api', version: '1.10.0'
}
```

## API Usage

See the [javadocs](https://westridgesystems.github.io/jmisb) for a complete API
reference.

A primary objective of jMISB is to provide an easy-to-use API allowing
non-domain experts to create applications leveraging MISB standards.
Below is a simple example of reading a network stream containing video
and (optionally) metadata.

```java
try (IVideoStreamInput stream = new VideoStreamInput())
{
    stream.open("udp://<IP_ADDRESS>:35800");
    stream.addFrameListener(exampleProcessor);
    stream.addMetadataListener(exampleProcessor);
}
catch (IOException e)
{
    System.out.println("Could not open the stream");
}
```

The `ExampleProcessor` class simply needs to implement the
`IVideoListener` and `IMetadataListener` interfaces
to receive video and metadata asynchronously as the data arrives.

```java
class ExampleProcessor implements IVideoListener, IMetadataListener
{
    @Override
    private void onVideoReceived(VideoFrame frame)
    {
        BufferedImage image = frame.getImage();
        System.out.println("Center pixel RGB: " +
            image.getRGB(image.getWidth()/2, image.getHeight()/2));
    }

    @Override
    private void onMetadataReceived(MetadataFrame frame)
    {
        IMisbMessage metadata = frame.getMisbMessage();
        if (metadata instanceof UasDatalinkMessage)
        {
            UasDatalinkMessage msg = (UasDatalinkMessage)metadata;
            System.out.println("Sensor position: " +
                msg.getField(UasDatalinkTag.SensorLatitude).getDisplayableValue() +
                ", " +
                msg.getField(UasDatalinkTag.SensorLongitude).getDisplayableValue());
        }
        else if (metadata instanceof SecurityMetadataMessage)
        {
            // ...
        }
    }
}
```

The result of `msg.getField(UasDatalinkTag.SensorLatitude)` will be an instance
of the `SensorLatitude` class (`IUasDatalinkValue` is a superclass), and this
relationship holds in general.

More complete examples of usage may be found in the `viewer` demo
application and in unit tests. Additional sample applications are a work in
progress.

## Versioning

jMISB adheres to *semantic versioning* to communicate to client
developers about the scope of changes in any new release. Version numbers
are formatted as `major.minor.patch`, where:

1. The major number is incremented to indicate incompatible API changes.
2. The minor number is incremented to indicate new functionality has been
added, but in a backward-compatible manner.
3. The patch number is incremented to indicate a backwards-compatible bug
fix.

In other words, users of the library should feel comfortable updating to use
a new version unless the major number has changed. In general, users should
keep up to date with the latest patch release for a given
`major.minor` release branch.

Use of -SNAPSHOT within the version number indicates that the version is
for internal development only, i.e., the artifact is not to be used in a
production environment.

## Examples

We provide samples (of variable level of complexity and completeness). See [examples/README.md](examples/README.md) for more information.


text:
# AWS Spot Instance cloud pool

The [elastisys](http://elastisys.com/) AWS Spot Instance
[cloud pool](http://cloudpoolrestapi.readthedocs.org/en/latest/)
manages a pool of AWS spot  instances. Pool members are identified by a
configurable tag and instances are continuously provisioned/decommissioned to
keep the pool's actual size in sync with the desired size that the cloud
pool has been instructed to maintain.

The cloud pool publishes a REST API that follows the general contract of an
[elastisys](http://elastisys.com/) cloud pool, through which
a client (for example, an autoscaler) can manage the pool. For the complete API
reference, the reader is referred to the
[cloud pool API documentation](http://cloudpoolrestapi.readthedocs.org/en/latest/).

*Note that if you plan on using a large number of spot instances for your service, you
may need to contact Amazon to have them raise the [spot request usage limit](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-spot-limits.html) for your account. Although the documentation states a maximum
of 20 ongoing spot requests per region, tests have shown that 50 requests were
possible (in the us-east-1 region). To submit a limit increase request, go to
[AWS Support Center](https://console.aws.amazon.com/support/home#/case/create?issueType=service-limit-increase&limitType=service-code-ec2-instances) and complete the request form. In the Use Case Description field,
indicate that you are requesting an increase to the request limit for Spot instances.*

## Configuration
The `spotpool` is configured with a JSON document which follows the general
structure described in the [root-level README.md](../README.md).

For the cloud-specific parts of the configuration (`cloudApiSettings`
and `provisioningTemplate`), the `spotpool` requires input similar
to the following:

```javascript
    ...
    "cloudApiSettings": {
        "awsAccessKeyId": "ABC...123",
        "awsSecretAccessKey": "DEF...456",
        "region": "eu-west-1",
        "connectionTimeout": 10000,
        "socketTimeout": 10000
    },

    "provisioningTemplate": {
        "size": "m1.small",
        "image": "ami-018c9568",
        "keyPair": "instancekey",
        "securityGroups": ["webserver"],
        "encodedUserData": "<base-64 encoded data>"
    },
	...
```

The configuration keys have the following meaning:

- `cloudApiSettings`: API access credentials and settings.
    - `awsAccessKeyId`: Your [AWS Access Key ID](https://aws-portal.amazon.com/gp/aws/securityCredentials).
    - `awsSecretAccessKey`: Your [AWS Secret Access Key](https://aws-portal.amazon.com/gp/aws/securityCredentials).
    - `region`: The [AWS region](http://docs.aws.amazon.com/general/latest/gr/rande.html) to connect to.
    - `bidPrice`: The bid price (maximum price to pay for an instance hour in dollars) to use when
      requesting spot instances.
    - `bidReplacementPeriod`: The delay (in seconds) between two successive runs of
      replacing spot requests with an out-dated bid price.
    - `danglingInstanceCleanupPeriod`:  The delay (in seconds) between two successive runs of terminating instances that are running, but whose spot requests were canceled.
    - `connectionTimeout`: The timeout in milliseconds until a connection is established.
    - `socketTimeout`: The socket timeout (`SO_TIMEOUT`) in milliseconds, which is the
	  timeout for waiting for data or, put differently, a maximum period inactivity
	  between two consecutive data packets.

- `provisioningTemplate`: Describes how to provision additional servers (on scale-up).
    - `size`: The [instance type](http://aws.amazon.com/ec2/instance-types/instance-details/) to use for new machine instances.
    - `image`: The [AMI](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html) id to use for new machine instances.
    - `keyPair`: The AWS EC2 [key pair](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html) used to launch new machine instances.
    - `securityGroups`: The list of [security groups](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html)
      to apply to a new instance.
    - `encodedUserData`: A [base64-encoded](http://tools.ietf.org/html/rfc4648)
      blob of data used to pass custom data to started machines typically in
      the form of a boot-up shell script or cloud-init parameters. Can, for
      instance, be produced via `cat bootscript.sh | base64 -w 0`.
      Refer to the [Amazon documentation](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) for details.

## Usage
This module produces an executable jar file for the cloud pool server.
The simplest way of starting the server is to run

    java -jar <jar-file> --http-port=8080

which will start a server listening on HTTP port `8080`.

*Note: for production settings, it is recommended to run the server with an HTTPS port.*

For a complete list of options, including the available security options,
run the server with the ``--help`` flag:

    java -jar <jar-file> --help

## Running the cloud pool in a Docker container
The cloud pool can be executed inside a
[Docker](https://www.docker.com/) container. First, however, a docker image
needs to be built that includes the cloud pool. The steps for building
the image and running a container from the image are outlined below.

Before proceeding, make sure that your user is a member of the `docker` user group.
Without being a member of that user group, you won't be able to use docker without
 sudo/root privileges.

See the [docker documentation](https://docs.docker.com/installation/ubuntulinux/#giving-non-root-access)
for more details.

### Building the docker image
The module's build file contains a build goal that can be used to produce a
Docker image, once the project binary has been built in the `target`
directory (for example, via `mvn package`). Whenever `mvn install` is
executed the Docker image gets built locally on the machine. When
`mvn deploy` is run, such as during a release, the image also gets
pushed to our private docker registry.

*Note: make sure that you have issued `docker login` against the docker registry before trying to push an image.*

### Running a container from the image
Once the docker image is built for the server, it can be run by either
specfying a HTTP port or an HTTPS port. For example, running with an HTTP port:

    docker run -d -p 8080:80 -e HTTP_PORT=80 <image>

This will start publish the container's HTTP port on host port `8080`.

*Note: for production settings, it is recommended to run the server with an HTTPS port.*

The following environment variables can be passed to the Docker container (`-e`)
to control its behavior. At least one of `${HTTP_PORT}` and `${HTTPS_PORT}`
_must_ be specified.

Singleton/multipool mode:

  - `MULTIPOOL`: Set to `true` to start the server in [multipool](../../multipool/README.md)-mode,
    in which it will publish a dynamic collection of *cloudpool instances*.
    The default is to run the server as a singleton cloudpool.

HTTP/HTTPS configuration:

  - `HTTP_PORT`: Enables a HTTP port on the server.

  - `HTTPS_PORT`: Enables a HTTPS port on the server.
    *Note: when specified, a `${SSL_KEYSTORE}` must be specified to identify to clients.*

  - `SSL_KEYSTORE`: The location of the server's SSL key store (PKCS12 format).
     You typically combine this with mounting a volume that holds the key store.
	 *Note: when specified, an `${SSL_KEYSTORE_PASSWORD}` must is required.*

  - `SSL_KEYSTORE_PASSWORD`: The password that protects the key store.

Runtime configuration:

  - `STORAGE_DIR`: destination folder for runtime state.
    *Note: to persist across container recreation, this directory should be
	mapped via a volume to a directory on the host.*
    Default: `/var/lib/elastisys/spotpool`.

Debug-related:

  - `LOG_CONFIG`: [logback](http://logback.qos.ch/manual/configuration.html)
    logging configuration file (`logback.xml`).
    Default: `/etc/elastisys/spotpool/logback.xml`.
  - `JUL_CONFIG`: `java.util.logging` `logging.properties` configuration.
    Default: `/etc/elastisys/spotpool/logging.properties`.
  - `LOG_DIR`: destination folder for log files (when using default
    `${LOG_CONFIG}` setup).
    Default: `/var/log/elastisys/spotpool`.
  - `STDOUT_LOG_LEVEL`: output level for logging to stdout (note: log output
    that is written to file includes `DEBUG` level).
    Default: `INFO`.

Client authentication:

  - `REQUIRE_BASIC_AUTH`: If `true`, require clients to provide username/password
    credentials according to the HTTP BASIC authentication scheme.
    *Note: when specified, `${BASIC_AUTH_REALM_FILE}` and `${BASIC_AUTH_ROLE}` must be specified to identify trusted clients.*
	Default: `false`.
  - `BASIC_AUTH_ROLE`: The role that an authenticated user must be assigned to be granted access to the server.
  - `BASIC_AUTH_REALM_FILE`: A credentials store with users, passwords, and
    roles according to the format prescribed by the [Jetty HashLoginService](http://www.eclipse.org/jetty/documentation/9.2.6.v20141205/configuring-security-authentication.html#configuring-login-service).
  - `REQUIRE_CERT_AUTH`: Require SSL clients to authenticate with a certificate,
    which must be included in the server's trust store.
    *Note: when specified, `${CERT_AUTH_TRUSTSTORE}` and `${CERT_AUTH_TRUSTSTORE_PASSWORD}` must be specified to identify trusted clients.*
  - `CERT_AUTH_TRUSTSTORE`. The location of a SSL trust store (JKS format), containing trusted client certificates.
  - `CERT_AUTH_TRUSTSTORE_PASSWORD`: The password that protects the SSL trust store.

JVM-related:

  - `JVM_OPTS`: JVM settings such as heap size. Default: `-Xmx128m`.

### Debugging a running container
The simplest way to debug a running container is to get a shell session via

    docker exec -it <container-id/name> /bin/bash

and check out the log files under `/var/log/elastisys`. Configurations are
located under `/etc/elastisys` and binaries under `/opt/elastisys`.

## Interacting with the cloud pool over its REST API
The following examples, all using the [curl](http://en.wikipedia.org/wiki/CURL)
command-line tool, shows how to interact with the cloud pool over its
[REST API](http://cloudpoolrestapi.readthedocs.org/en/latest/).

The exact command-line arguments to pass to curl depends on the security
settings that the server was launched with. For example, if client-certificate
authentication is enforced (`--require-cert`), one needs to pass client
certificate credentials via `curl`:

    --key-type pem --key key.pem --cert-type pem --cert cert.pem

Here are some examples illustrating basic interactions with the cloud pool
(these assume that the server was started on a HTTP port):

1. Retrieve the currently set configuration document:

        curl -X GET http://localhost:8080/config

2. Set configuration:

        curl --header "Content-Type:application/json" \
                    -X POST -d @myconfig.json http://localhost:8080/config

3. Start:

        curl -X POST http://localhost:8080/start

4. Retrieve the current machine pool:

        curl -X POST http://localhost:8080/pool

5. Request the machine pool to be resized to size ``4``:

        curl --header "Content-Type:application/json" \
                    -X POST -d '{"desiredCapacity": 4}' http://localhost:8080/config

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
Original-UI

A totally **original** component library built for [React.js](http://reactjs.org/).

[![NPM](https://img.shields.io/npm/v/original-ui.svg)](https://www.npmjs.com/package/original-ui)
[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
[![Build Status](https://travis-ci.org/JakeAdmire/original-ui.svg?branch=master)](https://travis-ci.org/JakeAdmire/original-ui)
[![Coverage Status](https://coveralls.io/repos/github/JakeAdmire/Original-UI/badge.svg?branch=master)](https://coveralls.io/github/JakeAdmire/Original-UI?branch=master)

## Why?
Why did I build **Original-UI?** Several reasons really:
- I thought it'd be fun (and it is!)
- I wanted to stay sharp with React & JavaScript while searching for a Front End Engineering role ([hire me!](https://www.linkedin.com/in/jakeadmire/))
- I thoroughly enjoy UI & UX design and this seemed like a great opportunity to practice it

## Want to learn more?

[Check out the Wiki](https://github.com/JakeAdmire/Original-UI/wiki#what-is-original-ui)! It's an amazing compilation of all the information available to you about everything **Original-UI**.

## Credits & Dependencies

[create-react-library](https://www.npmjs.com/package/create-react-library) *- React library bootstrap CLI*

[React.js](https://reactjs.org/) *- JavaScript UI library*

[Jest](https://jestjs.io/) *- JavaScript testing framework*

[TravisCI](https://travis-ci.org/) *- Continuous integration*

[Coveralls.io](https://coveralls.io/) *- Code coverage testing*

## License

MIT © [JakeAdmire](https://github.com/JakeAdmire)

license: MIT

repository: JakeAdmire/Original-UI

gha_language: JavaScript

repo_name: JakeAdmire/Original-UI


text:
![CrowdStrike Falcon](https://raw.githubusercontent.com/CrowdStrike/falconpy/main/docs/asset/cs-logo.png) [![Twitter URL](https://img.shields.io/twitter/url?label=Follow%20%40CrowdStrike&style=social&url=https%3A%2F%2Ftwitter.com%2FCrowdStrike)](https://twitter.com/CrowdStrike)<br/>

# Overview

![PowerShell Gallery](https://img.shields.io/powershellgallery/dt/psfalcon)
![PowerShell Gallery Version](https://img.shields.io/powershellgallery/v/psfalcon)
![GitHub commits since latest release (by date)](https://img.shields.io/github/commits-since/crowdstrike/psfalcon/latest)
![OSS Lifecycle](https://img.shields.io/osslifecycle/crowdstrike/psfalcon)

[PSFalcon](https://github.com/crowdstrike/psfalcon) is a [PowerShell Module](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_modules?view=powershell-7) that helps CrowdStrike
Falcon users interact with the CrowdStrike Falcon [OAuth2 APIs](https://assets.falcon.crowdstrike.com/support/api/swagger.html#/) without
having extensive knowledge of APIs or PowerShell. PSFalcon helps you automate tasks and perform actions outside of the
Falcon UI. For example, you could create scripts that:

* Modify large numbers of detections, incidents, policies or rules
* Utilize Real-time Response to perform an action on many devices at the same time
* Upload or download malware samples or Real-time Response files
* Create/modify configurations for MSSP parent and child environments

# Requirements
![PowerShell Gallery](https://img.shields.io/powershellgallery/p/psfalcon?logo=powershell)

* An active Falcon subscription for the appropriate modules
* PowerShell 5.1+ (Windows), PowerShell 6+ (Linux/MacOS)
* A Falcon [OAuth2 API Client](https://falcon.crowdstrike.com/support/api-clients-and-keys) with appropriate roles

### Visit the **[PSFalcon Wiki](https://github.com/CrowdStrike/psfalcon/wiki)** for more information.

license: Unlicense

repository: CrowdStrike/psfalcon

gha_language: PowerShell

gha_license_id: Unlicense

repo_name: CrowdStrike/psfalcon


text:
<!-- START doctoc generated TOC please keep comment here to allow auto update -->

<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->

**Table of Contents**  _generated with [DocToc](https://github.com/thlorenz/doctoc)_

-   [ansible-k8s](#ansible-k8s)
    -   [Requirements](#requirements)
    -   [Role Variables](#role-variables)
    -   [Dependencies](#dependencies)
    -   [Example Playbook](#example-playbook)
    -   [Vagrant](#vagrant)
    -   [Additional Info](#additional-info)
        -   [Reset `K8s` cluster](#reset-k8s-cluster)
        -   [Get a list of pods and information on them](#get-a-list-of-pods-and-information-on-them)
        -   [Kubernetes-Dashboard](#kubernetes-dashboard)
        -   [Find the port to connect to](#find-the-port-to-connect-to)
        -   [Inspect the service](#inspect-the-service)
    -   [License](#license)
    -   [Author Information](#author-information)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

# ansible-k8s

An [Ansible](https://www.ansible.com) role to deploy a
[Kubernetes](https://kubernetes.io) - K8s Cluster

-   [Weave-Net](https://www.weave.works/docs/net/latest/kube-addon/) is used for
    the network overlay currently

## Requirements

Install additional required [Ansible](https://www.ansible.com) roles:

```bash
sudo ansible-galaxy install -r requirements.yml
```

## Role Variables

[defaults/main.yml](defaults/main.yml)

## Dependencies

None

## Example Playbook

```yaml
---
- hosts: k8s
  # become: true
  vars:
    # Define Docker version to install
    docker_version: '1.12.6'
    # Defines if all nodes in play should be added to each hosts /etc/hosts
    etc_hosts_add_all_hosts: true
    etc_hosts_pri_dns_name: '{{ pri_domain_name }}'
    # Defines if node has static IP.
    etc_hosts_static_ip: true
    # Defines if ansible_default_ipv4.address is used for defining hosts
    etc_hosts_use_default_ip_address: false
    # Defines if ansible_ssh_host is used for defining hosts
    etc_hosts_use_ansible_ssh_host: true
    pri_domain_name: 'test.vagrant.local'
  roles:
    - role: ansible-etc-hosts
    - role: ansible-change-hostname
    - role: ansible-docker
    - role: ansible-k8s
  tasks:
```

## Vagrant

-   Requirements
    -   [Ansible](https://www.ansible.com)
    -   [Vagrant](https://www.vagrantup.com/)
    -   [Virtualbox](https://www.virtualbox.org/)

Included in the `Vagrant` folder is a testing environment with `3` nodes.

-   `node0` - K8s Cluster Master (`<IP_ADDRESS>`)
-   `node1` - K8s Cluster Member (`<IP_ADDRESS>`)
-   `node2` - K8s Cluster Member (`<IP_ADDRESS>`)

You can easily spin this up for learning purposes:

```bash
cd Vagrant/
vagrant up
```

Once the environment spins up you will see the following:

```bash
TASK [ansible-k8s : cluster_summary | Displaying Cluster Nodes] ****************
skipping: [node1]
ok: [node0] => {
    "_k8s_cluster_nodes['stdout_lines']": [
        "NAME      STATUS     AGE       VERSION",
        "node0     Ready      1m        v1.6.1",
        "node1     NotReady   4s        v1.6.1",
        "node2     NotReady   6s        v1.6.1"
    ],
    "changed": false
}
skipping: [node2]
```

Do not worry about the above as the additional nodes did not completely join
the cluster before the provisioning completed. You can quickly validate that
the additional nodes are up and `Ready` by running:

```bash
ansible-playbook -i hosts playbook.yml --tags k8s_cluster_nodes
```

The above `NotReady` should no longer be an issue as we now wait for all nodes
in the cluster to become `Ready`. However, there may be an instance where this
may not work as expected.

```bash
TASK [ansible-k8s : cluster_summary | Displaying Cluster Nodes] ******************************************************************************************************************
skipping: [node1]
skipping: [node2]
ok: [node0] => {
    "_k8s_cluster_nodes['stdout_lines']": [
        "NAME      STATUS    ROLES     AGE       VERSION",
        "node0     Ready     master    3m        v1.9.0",
        "node1     Ready     <none>    2m        v1.9.0",
        "node2     Ready     <none>    2m        v1.9.0"
    ]
}
```

Once the cluster is up `ssh` to `node0` and begin playing:

```bash
vagrant ssh node0
```

When you are all done using the environment easily tear it down:

```bash
./cleanup.sh

==> node2: Forcing shutdown of VM...
==> node2: Destroying VM and associated drives...
==> node1: Forcing shutdown of VM...
==> node1: Destroying VM and associated drives...
==> node0: Forcing shutdown of VM...
==> node0: Destroying VM and associated drives...
```

## Additional Info

### Reset `K8s` cluster

```bash
ansible-playbook -i hosts playbook.yml --tags k8s_reset -e "k8s_reset_cluster=true"
```

### Get a list of pods and information on them

```bash
ansible-playbook -i hosts playbook.yml --tags k8s_pods
```

```json
{
        "containers": [
            {
                "hostIP": "<IP_ADDRESS>",
                "image": "gcr.io/google_containers/etcd-amd64:3.1.10",
                "name": "etcd",
                "nodeName": "node0",
                "phase": "Running",
                "podIP": "<IP_ADDRESS>",
                "resources": {}
            },
            {
                "hostIP": "<IP_ADDRESS>",
                "image": "gcr.io/google_containers/kube-apiserver-amd64:v1.9.0",
                "name": "kube-apiserver",
                "nodeName": "node0",
                "phase": "Running",
                "podIP": "<IP_ADDRESS>",
                "resources": {
                    "requests": {
                        "cpu": "250m"
                    }
                }
            },
            {
                "hostIP": "<IP_ADDRESS>",
                "image": "gcr.io/google_containers/kube-controller-manager-amd64:v1.9.0",
                "name": "kube-controller-manager",
                "nodeName": "node0",
                "phase": "Running",
                "podIP": "<IP_ADDRESS>",
                "resources": {
                    "requests": {
                        "cpu": "200m"
                    }
                }
            },
            {
                "hostIP": "<IP_ADDRESS>",
                "image": "gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.7",
                "name": "kubedns",
                "nodeName": "node0",
                "phase": "Running",
                "podIP": "<IP_ADDRESS>",
                "resources": {
                    "limits": {
                        "memory": "170Mi"
                    },
                    "requests": {
                        "cpu": "100m",
                        "memory": "70Mi"
                    }
                }
            },
            {
                "hostIP": "<IP_ADDRESS>",
                "image": "gcr.io/google_containers/kube-proxy-amd64:v1.9.0",
                "name": "kube-proxy",
                "nodeName": "node2",
                "phase": "Running",
                "podIP": "<IP_ADDRESS>",
                "resources": {}
            },
            {
                "hostIP": "<IP_ADDRESS>",
                "image": "gcr.io/google_containers/kube-proxy-amd64:v1.9.0",
                "name": "kube-proxy",
                "nodeName": "node1",
                "phase": "Running",
                "podIP": "<IP_ADDRESS>",
                "resources": {}
            },
            {
                "hostIP": "<IP_ADDRESS>",
                "image": "gcr.io/google_containers/kube-proxy-amd64:v1.9.0",
                "name": "kube-proxy",
                "nodeName": "node0",
                "phase": "Running",
                "podIP": "<IP_ADDRESS>",
                "resources": {}
            },
            {
                "hostIP": "<IP_ADDRESS>",
                "image": "gcr.io/google_containers/kube-scheduler-amd64:v1.9.0",
                "name": "kube-scheduler",
                "nodeName": "node0",
                "phase": "Running",
                "podIP": "<IP_ADDRESS>",
                "resources": {
                    "requests": {
                        "cpu": "100m"
                    }
                }
            },
            {
                "hostIP": "<IP_ADDRESS>",
                "image": "k8s.gcr.io/kubernetes-dashboard-amd64:v1.8.1",
                "name": "kubernetes-dashboard",
                "nodeName": "node2",
                "phase": "Running",
                "podIP": "<IP_ADDRESS>",
                "resources": {}
            },
            {
                "hostIP": "<IP_ADDRESS>",
                "image": "weaveworks/weave-kube:2.1.3",
                "name": "weave",
                "nodeName": "node0",
                "phase": "Running",
                "podIP": "<IP_ADDRESS>",
                "resources": {
                    "requests": {
                        "cpu": "10m"
                    }
                }
            },
            {
                "hostIP": "<IP_ADDRESS>",
                "image": "weaveworks/weave-kube:2.1.3",
                "name": "weave",
                "nodeName": "node1",
                "phase": "Running",
                "podIP": "<IP_ADDRESS>",
                "resources": {
                    "requests": {
                        "cpu": "10m"
                    }
                }
            },
            {
                "hostIP": "<IP_ADDRESS>",
                "image": "weaveworks/weave-kube:2.1.3",
                "name": "weave",
                "nodeName": "node2",
                "phase": "Running",
                "podIP": "<IP_ADDRESS>",
                "resources": {
                    "requests": {
                        "cpu": "10m"
                    }
                }
            }
        ]
    }
}
```

### [Kubernetes-Dashboard](https://github.com/kubernetes/dashboard)

The [Kubernetes-Dashboard](https://github.com/kubernetes/dashboard) is installed
during the install and available for usage. In order to find out where/how to
connect to the dashboard seems to involve the following.

### Find the port to connect to

```bash
vagrant ssh node0

kubectl get services --all-namespaces
...
NAMESPACE     NAME                   TYPE        CLUSTER-IP    EXTERNAL-IP   PORT(S)         AGE
default       kubernetes             ClusterIP   <IP_ADDRESS>     <none>        443/TCP         6m
kube-system   kube-dns               ClusterIP   <IP_ADDRESS>    <none>        53/UDP,53/TCP   6m
kube-system   kubernetes-dashboard   ClusterIP   <IP_ADDRESS>   <none>        443/TCP         4m
```

We can see the port is `80:32285` from above.

> NOTE: The above only works for later versions of the dashboard. Reference the
> [Accessing-Dashboard#nodeport](https://github.com/kubernetes/dashboard/wiki/Accessing-Dashboard---1.7.X-and-above#nodeport) for more info on doing this as of later versions.
>
> INFO: This way of accessing Dashboard is only recommended for development environments in a single node setup.

### Inspect the service

```bash
kubectl describe services kubernetes-dashboard --namespace=kube-system
...
Name:              kubernetes-dashboard
Namespace:         kube-system
Labels:            k8s-app=kubernetes-dashboard
Annotations:       kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"labels":{"k8s-app":"kubernetes-dashboard"},"name":"kubernetes-dashboard","namespace":...
Selector:          k8s-app=kubernetes-dashboard
Type:              ClusterIP
IP:                <IP_ADDRESS>
Port:              <unset>  443/TCP
TargetPort:        8443/TCP
Endpoints:         <IP_ADDRESS>:8443
Session Affinity:  None
Events:            <none>
```

You can then connect to [Dashboard](https://<IP_ADDRESS>:32285) for this example.

> NOTE: In order to login using a token reference the following [link](https://github.com/kubernetes/dashboard/wiki/Access-control#bearer-token)
>
> NOTE: To login with admin privileges reference the following [link](https://github.com/kubernetes/dashboard/wiki/Access-control#admin-privileges)

The `32285` port changes every new deployment of the dashboard so you will
need to discover what that new port is. Or you can run the following to report
on the usable link:

```bash
ansible-playbook -i hosts playbook.yml --tags k8s_get_dashboard
```

Which will result in the following after the play finishes:

```bash
TASK [ansible-k8s : reports | Dashboard] ***************************************
skipping: [node1]
skipping: [node2]
ok: [node0] => {
    "msg": "Kubernetes Dashboard Can be reached at: http://<IP_ADDRESS>:30467\n"
}
```

## License

MIT

## Author Information

Larry Smith Jr.

-   [EverythingShouldBeVirtual](http://everythingshouldbevirtual.com)
-   [@mrlesmithjr](https://www.twitter.com/mrlesmithjr)
-<EMAIL_ADDRESS>

gha_language: Ruby

gha_license_id: MIT


text:
# Runtime files for Micro

This directory will be embedded in the Go binary for portability, but it may just as well be put in `ConfigDir`. If you would like to make your own colorschemes
and syntax files, you can put in in `ConfigDir/colorschemes` and `ConfigDir/syntax` respectively.

repository: JonathanRosado/micro

repo_name: JonathanRosado/micro


text:
SPA that mimics Reddit functionality using various API endpoints. User should be able to access different collections of posts, search within those posts, access more posts in paginated calls, view comments/images when clicking on a post.

Written in Gatsby/React, hosted on Netlify, uses Lambda functions. Recursively renders comments data.

Hosted here: https://pensive-spence-9c0e1c.netlify.com

To Run Locally
- clone repo
- cd into root of repo
- type npm run start
- two ports will be used: 8000 for client, 9000 for server; if those are in use there will be a prompt
- visit http://localhost:8000/ to view client

repository: sarjford/Reddit-Client

repo_name: sarjford/Reddit-Client


text:
---
authors:
- jesse_szwedko
date: '2018-08-04'
published: true
title: Open Data Science Conference West 2018
image: odsc.png
image_alt: Open Data Science Coneference West Advertisement
description: |
              Partnership post from Open Data Science Conference West 2018
              upcoming Oct. 31 - Nov. 3.  ODSC West will be this Fall's leading
              data science conference providing over 340 hours of trainings,
              talks, and workshops spanning 4 days and 48 tracks.

---

  Cross-promotional post from Open Data Science Conference West 2018, a Code for San Francisco Media Partner.

[ODSC West](https://odsc.com/california) will be this Fall's leading data
science conference providing over 340 hours of trainings, talks, and workshops
spanning 4 days and 48 tracks. More content means more choices and better
learning outcomes.

**Save hundreds on door prices with savings of 60% using the code SE-DE-ODSCWest.**

For West 2018 we are bringing you an incredibly talented lineup of renowned
speakers and instructors including:

* **Virginia Eubanks** \| Author of Automating Inequality
* **Andrej Karpathy** \| Director of AI at Tesla
* **Cassie Kozyrkov** \| Chief Decision Scientist at Google
* **Josh Wills** \| Director of Data Engineering at Slack
* **Andreas Mueller** \| Author, Professor, and Core Contributor of scikit-learn
* **Jim Guszcza** \| Chief Data Scientist at Deloitte

Totaling over **340 hours** of applied talks, workshops, and training session, we
offer the widest choice of the most important topics in data science. Focus
areas include deep learning and machine learning, data visualization and many
more. Fours days with an extra day of training.

Check schedule overview [here](https://odsc.com/california/schedule-2018).

gha_language: HTML


text:
# libquassel
Javascript library to connect and interact with Quassel IRC server.

## Install
```sh
npm install --production libquassel
```

## Use in browser
You just need to import `dist/libquassel.js` in your HTML page.

## Development
```sh
npm install libquassel
```

In order to create a browser compatible file, run the following commands
```sh
# use browserify to build on change
npm run watch
# before commit, make the dev version + minified version + the doc
npm run build
```

### 3.0 breaking changes
Version `3.0` introduces the following breaking changes:

- `message.Type` has been superseded by `message.Types`, and all its constants are now UPPERCASE
- `channel.active` has been superseded by `channel.isActive`
- `channel.isChannel()` has been superseded by `channel.isChannel`
- `channel.isHighlighted()` has been superseded by `channel.isHighlighted`
- `message.isHighlighted()` has been superseded by `message.isHighlighted`
- `message.isSelf()` has been superseded by `message.isSelf`
- `network.getBufferCollection()` and `network.getBufferMap()` have been merged into `networks.buffers`
- `networkCollection.findBuffer(...)` and `networkCollection.get(...)` have been merged into `network.getBuffer(...)`
- The majority of setter methods has been replaced by direct affectation to the target property
  - e.g. `network.setName(name)` as been superseded by `network.name = name`
- The majority of getter methods has been replaced by direct access to the target property
  - e.g. `network.getStatusBuffer()` as been superseded by `network.statusBuffer`

#### node specific
- `Client(...).connect` method expects a `Socket` or any other `Duplex` as parameter.

#### browser specific
- `libquassel` is available as a global object.
- `Client(...).connect` method expects a `libquassel.WebSocketStream` or any other `Duplex` as parameter.

### Getting Started
#### node
```javascript
const { Client } = require('libquassel');
const net = require('net');

const socket = net.createConnection({
  host: "localhost",
  port: 4242
});

const quassel = new Client((next) => next("user", "password"));

quassel.on('network.init', (networkId) => {
    network = quassel.networks.get(networkId);
    // ...
});

// ...

quassel.connect(socket);
```

#### browser
```html
<!-- In your HTML -->
<script src="/path/to/libquassel.js"></script>
```
```javascript
// libquassel in available as a global in browser
const socket = new libquassel.WebSocketStream('wss://domain.tld:12345', ['binary', 'base64']);
const quassel = new libquassel.Client((next) => next("user", "password"));

quassel.on('network.init', (networkId) => {
    network = quassel.networks.get(networkId);
    // ...
});

// ...

quassel.connect(socket);
```

### Documentation
[3.1.0](https://magne4000.github.com/libquassel/3.1.0 "libquassel 3.1.0 documentation")

### Examples
See [test](test) folder for examples.

### Changelog

#### 3.1.0
- Add support for core highlight rules

#### 3.1.1
- Update dependencies

## License
Copyright (c) 2019 Joël Charles
Licensed under the MIT license.

repository: jdolitsky/node-libquassel

repo_name: jdolitsky/node-libquassel


text:
[<<< Previous question <<<](0624.md)  Question ID#0625.md  [>>> Next question >>>](0626.md)

What is the best approach for converting this string:

```php
$string = "a=10&b[]=20&c=30&d=40+50";

// Into this array?

array(- [ ] {
      ["a"]=>
      string(- [ ] "10"
      ["b"]=>
      array(- [ ] {
        [0]=>
        string(- [ ] "20"
      }
      ["c"]=>
      string(- [ ] "30"
      ["d"]=>
      string(- [ ] "40 50"
}
```

- [x] Use the parse_str() function to translate it to an array()
- [ ] Write a parser completely by hand, it's the only way to make sure it's 100% accurate
- [ ] Pass the variable to another PHP script via an HTTP GET request and return the array as a serialized variable
- [ ] Just call unserialize() to translate it to an array()


text:
# api/posts/write (POST)

## Description

Create a new post

|    Note    |  Value  |
| :--------: | :-----: |
| Need Token | **Yes** |
| Test route |   No    |

## Request example

| Parameter | Description                  |
| :-------: | ---------------------------- |
|   title   | String, title of the article |
|  article  | String, article itself       |
|   image   | String, image's hash sum     |

```js
{
  title: "some-title",
  article: "some-article",
  image: "some-image",
}
```

## Response examples

| Response Status code | Description                     |
| :------------------: | ------------------------------- |
|         201          | Created                         |
|         401          | No token presented              |
|         403          | Token presented, but is invalid |
|         406          | Validation failed               |
|         412          | Request conditions are not met  |

### 201 - Created

```js
{
  status: true,
  message: "Article created"
}
```

### 401 - No Token

```js
{
  status: false,
  message: "No token presented"
}
```

### 403 - Unauthorized

```js
{
  status: false,
  message: "Bad token"
}
```

### 406 - Validation failed

```js
{
  status: false,
  message: "Some-fields have failed the validation"
}
```

### 412 - Request conditions are not met

```js
{
  status: false,
  message: "Request conditions are not met"
}
```


text:
# wiggle

[![NPM Package](https://nodei.co/npm/wiggle.js.png)](https://www.npmjs.com/package/wiggle.js)

Small wrapper around [matchMedia](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia)
to easily react on changes in page layout. Define your own layout breakpoints and attach listeners to them.

```javascript

  /**
  * In order to use wiggle we need to initialize it first.
  * Listeners are attached on wiggle instance.
  **/
  Wiggle.init([{
    name:String // Need to be unique per the instance. It can be any string that is valid object property name.
    minWidth:String|Number // If number wiggle assumes measurement unit is in px. If string any valid CSS measurement unit can be defined instead of px (like em).
    minWidth:String|Number
    mediaQuery:String // Raw media query. item can have ether minWidth, maxWidth combination or rawQuery but not both.
  }])

  // Real world example

  var screen = Wiggle.init([{
      // Screen width >= 992px is defined as a desktop.
      name: 'desktop', // The name is arbitrary and can be anything e.g 'large-screen'
      minWidth: 992 // same as writing '992px' because number default to px unit
    }, {
      name: 'desktop-menu',
      minWidth: '820px'
    }, {
      // Tablet have overlaps with menu-breakpoint.
      name: 'tablet',
      minWidth: 768,
      maxWidth: 991
    }, {
      name: 'mobile',
      maxWidth: '62em' // Any valid CSS measurement unit can be used
    }]);

  // We are subscribing to names defined during initialization of wiggle.
  screen.on('mobile', function() {
    console.log('Called if screen size is mobile and ever time after screen size changes to mobile');
  });

  // Difference between .on and .on.change listener is that .on listener will be triggered
  // immediately when defined if condition is meet while on.change will be triggered only after change happen.
  screen.on.change('mobile', function() {
    console.log('Called every time after screen size changes to mobile');
  });

  screen.off('tablet', function() {
    console.log('Called if screen size is not tablet and ever time after screen size stops being tablet');
  });

  if(screen.is('desktop')) {
    console.log('Current screen size is desktop');
  }

  if(screen.is('tablet') && screen.is('desktop-menu')) {
    console.log('Based on configuration multiple screens can be active.')
  }

  // Multiple instances of wiggle can be created
  var orientation = Wiggle.init([{
    name: 'portrait',
    mediaQuery: 'orientation: portrait' // Raw media query
  }, {
    name: 'landscape',
    mediaQuery: 'orientation: landscape'
  }]);

  orientation.on('portrait', function() {
    console.log('Called if screen is in portrait mode and every time screen changes to portrait mode');
  });

  // Unsubscribe

  // In order to unsubscribe we have to have reference to function used to subscribe to event.
  function landscapeListener() {
    console.log('Listener will be active until we unsubscribe from it');
  }

  orientation.on('landscape', landscapeListener);

  onSomeEvent(function() {
    // Remove landscapeListener subscription.
    orientation.unsubscribe(landscapeListener);
  });
```

### Supported browsers

Wiggle is using [matchMedia](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia) to detect layout changes. matchMedia is not supported in IE9 and below.

repository: snovakovic/wiggle

repo_name: snovakovic/wiggle


text:
# this__vid3
The revival of the objectively best Twitter video downloader bot ever known =^)

Before Starting:
You have to use bash (or terminal) in something like Ubuntu or something nerdy like that.
What you will need first is npm. So go and enter

```shell
sudo apt install npm
```

Now you want pm2 because this is going to crash time to time without any warning.
You also have more info on the process with this is you're into that.

```shell
npm install pm2 -g
```
Now that that's done, you should get to know about pm2 when handling the bot when you're finished with this guid of sorts here!
https://www.npmjs.com/package/pm2

## How to get Started!
This bad boy requires Node.js, FFmpeg, and frei0r-plugins:

```shell
sudo apt install nodejs ffmpeg frei0r-plugins
```
Next you gotta make sure everything is extracted neatly in a folder, yeah?
And then you make sure that the terminal is in the folder you extraced everything
into with cd then the directory...
```shell
cd /Downloaded/using/this__vid3/
```
Just replace the /Downloaded/using/this__vid3/ with the actual directory though.

Finally, put your consumer key/secret and access token/secret obtained from the [Twitter apps page](https://developer.twitter.com/apps) inside `config.json` and run `pm2 start app.js` or without pm2, `node app.js`.

## Disclaimer
This is a parody of video downloader bots and does not actually send users download links. If you need an actual Twitter video downloader, I highly recommend [youtube-dl](http://ytdl-org.github.io/youtube-dl/).

Original @this_vid by [shalvah](https://twitter.com/theshalvah).

Original @this_vid2 by [TheEssem](https://twitter.com/TheEssem).


text:
**[Here](http://crookedss.bplaced.net/) you can find a demo of the code in this repo.**

# Crooked Style Sheets

Proof of concept for website tracking/analytics using only CSS and without Javascript.

## What can we do with this method?
We can gather some basic information about the user, like the screen resolution (when the browser is maximized) and which browser (or engine) is used.
Further we can detect if a user opens a link or hovers with the mouse over an element. This can be used to track which (external) links a user visits and using the hover method. It should be even possible to track how the user moved their mouse (using an invisible table of fields in the page background). However, using my method it's only possible to track when a user visits a link the first time or hovers over a field the first time. Maybe it's possible to modify the method so that it is possible to track every click.

Furthermore it is possible to detect if a user has installed a specific font. Based on this information it should be possible to detect, which OS a user uses (because different operating systems ship different fonts, e.g. "Calibri" on Windows).

## How does it work?

### General idea

In CSS you can add an image from an external resource using the url("foo.bar"); property. Interesting thing is, this resource is only loaded when it is needed (for example when a link is clicked).

So we can create a selector in CSS that calls a particular URL when the user clicks a link:

```CSS
#link2:active::after {
    content: url("track.php?action=link2_clicked");
}
```

On the server side a PHP script saves the timestamp when the URL is called.

### Browser detection

Browser detection is based on `@supports Media-Query`, and we check for some browser specific CSS property like `-webkit-appearance`:

```CSS
@supports (-webkit-appearance:none) {
    #chrome_detect::after {
        content: url("track.php?action=browser_chrome");
    }
}
```

### Font detection

For font detection a new font family is defined. Then style is applied to text to confirm the font's existence. When the browser does not find the font on the user's system the defined font is used as a fallback. When this happens the browser tries to load the font and calls the tracking script on the server.

```CSS
/** Font detection **/
@font-face {
    font-family: Font1;
    src: url("track.php?action=font1");
}

#font_detection1 {
    font-family: Calibri, Font1;
}
```

### Measurement of hover duration

For hover duration method (based on an idea by jeyroik), we define new animation keyframes, that will request a url, every time a new keyframe is requested:

```CSS
@keyframes pulsate {
    0% {background-image: url("track.php?duration=00")}
    20% {background-image: url("track.php?duration=20")}
    40% {background-image: url("track.php?duration=40")}
    60% {background-image: url("track.php?duration=60")}
    80% {background-image: url("track.php?duration=80")}
    100% {background-image: url("track.php?duration=100")}
}
```

Then we define that the keyframes should be used as animation for the div. There we can choose the duration of the animation, which is the maximum time we can measure:

```CSS
#duration:hover::after {
    -moz-animation: pulsate 5s infinite;
    -webkit-animation: pulsate 5s infinite;
    /*animation: pulsate 5s infinite;*/
    animation-name: pulsate;
    animation-duration: 10s;
    content: url("track.php?duration=-1");
}
```

The resoultion of the duration measurement can be increased by inserting more steps into the keyframe's set.

### Input detection
To detect if a user checks a checkbox we use the :selected Selector provided by CSS:

```CSS
#checkbox:checked {
    content: url("track.php?action=checkbox");
}
```

For detection of the string "test" we combine the HTML pattern attribute, that can be used to build some basic input validation. In combination with the :valid selector, the browser will request our tracking site, when the pattern regex is matched by input:

```HTML
<input type="text" id="text_input" pattern="^test$" required>
```

``` CSS
#text_input:valid {
    background: green;
    background-image: url("track.php?action=text_input");
}
```

## Demo
[Here](http://crookedss.bplaced.net/) you can find a demo of the files in this repository. The `index.html` is the file that is being tracked using this method. Visit the `results.php` for the results of the tracking.

If nothing, or a PHP warning appears after a property, that means that the value of this property is false, or that the user has not visited the page or link yet (Yeah, it's a bit dirty, but you can see the principle of the method).

Also, resolution detection doesn't work so well yet because I only have detection for the most used screen widths. Further, it is a bit tricky to detect the real screen height of the user because CSS uses the height of the browser window and other elements such as the Windows' task bar makes the browser area smaller than the monitor.

## What can you do to prevent tracking via this method?
The only way that is known to me currently is to disable CSS for a webpage completly (you can do this with a plugin like uMatrix). The problem is that almost every modern webpage looks very ugly without CSS and is sometimes even completly unusable. So disabling CSS is not a real option except when you are very worried about your privacy (for example, when you are using Tor browser you may want to disable CSS).

A better solution would be for browsers not to load the external content (referenced in CSS), when it is needed, until the site is loaded. It would then be impossible to detect single actions. This modification to content loading could be implemented by the browsers itself or by a plugin (similar to NoScript or uMatrix).

This solution maybe have a performance impact, which may pose a problem, because the browser has to load a lot of content on a site's initial loading (and the browser may not use the content at all).

repository: scoggs/CrookedStyleSheets

gha_language: CSS

repo_name: scoggs/CrookedStyleSheets


text:
# Event Button Link

## Description

This component renders a Button, that does two things when pressed. First, it sends a Vertex message to the backend, and second, navigates to a route in the application.

## Props

### All Platforms

```
children: any,
buttonCode: string.isRequired,
value: string.isRequired,
onPress: func,
disabled: bool,
useAppNavigator: bool,
navigation: object,
params: object,
to: string,
```

### Web Only

```
decoration: string,
```


text:
---
name: Get an organization membership for the authenticated user
example: octokit.rest.orgs.getMembershipForAuthenticatedUser({ org })
route: GET /user/memberships/orgs/{org}
scope: orgs
type: API method
---

# Get an organization membership for the authenticated user

If the authenticated user is an active or pending member of the organization, this endpoint will return the user's membership. If the authenticated user is not affiliated with the organization, a `404` is returned. This endpoint will return a `403` if the request is made by a GitHub App that is blocked by the organization.

```js
octokit.rest.orgs.getMembershipForAuthenticatedUser({
  org,
});
```

## Parameters

      name
      required
      description

org	yes

The organization name. The name is not case sensitive.

See also: [GitHub Developer Guide documentation](https://docs.github.com/rest/reference/orgs#get-an-organization-membership-for-the-authenticated-user).

branch_name: refs/heads/main

gha_language: TypeScript


text:
##OPT3001 Demo
This example demonstrates how measure intensity of visible light from OPT3001 with CC1350 + Sensors Boosterpack

###Sensor reading

In order the read the values from the sensor you have to use this function

```
int opt_3001_sensor.value(0);
```

The function returns the intensity of light.


text:
# BizMatch - A Utility to Match Business Names

_Copyright (c) 20120 by Kenneth A. Younge._

Access to this code is provided subject to the [MIT License](https://opensource.org/licenses/MIT).

## Overview

`bizmatch` provides an interactive approach to matching business names between two lists.

Researchers often have to match business names between a focal list of company names that they care about, and an "alter list" of potential matches (perhaps one-to-one, or perhaps one-to-many). Sometimes that match is straight-forward (e.g., the match is perfect), but often the match requires a judgment call (i.e., the match is not perfect, the match depends on the year in consideration, or other factors), and managing that process across lists of tens-of-thousands of companies is inefficient and prone to mistakes or researcher bias.

`bizmatch` provides a rigorous and consistent approach to the matching propblem. Users can run `bizmatch` in an iterative manner to find direct matches, AND users can also run `bizmatch` to find candidate matches to examine in greater detail. After inspection of candidate matches, users can then move matches that they find acceptable from the candidate list to the matched list, and/or tweak the configuration files (which define synonyms, abbreviations, brand names, special cases, etc.) to refine the matching process for their context.

**PLEASE NOTE:** The default configuration for `bizmatch` may not be appropriate for your context. The default configuration was used to match pharmaceutical companies from EDGAR and the SEC, but you will need to reconfigure the configuration files (files starting with a + sign) to meet your own matching problem. Instructions for configuring `bizmatch` appear below.

## Installation

Clone the module from GitHub into the working directory for your Python project.

    git clone https://github.com/KenYounge/bizmatch.git

Install all of bizy's requirements from the requirements.txt file:

    pip install -r bizmatch/requirements.txt

Customize the path to configuration files (optional). If you use PIP to install `bizmatch`, then the configuration files will be located in the library installation path. `bizmatch` will attempt to find and use files in that path, but you can override that decision by changing the following line in the `settings.py` file.

    PATH_CONFIG_FILES  = path.dirname(path.realpath(__file__)) + '/'

Review other settings in the `settings.py` file based on the business domain and the matching sensitivity that you need for your project.

## Usage

### Input Files

The code matches business names on one "focal" list to one-or-many other business names
on an "alter" list. These lists may (optionally) also specify a date, so as to reject
matches that are not date appropriate. Each of the lists should be setup as follows:

    FOCAL.csv       set the FOCAL list below in the global constant

        purpose:    focal (left) side of match     (must be a unique list)

        format:     [raw_name], [date]             (optional)

    ALTER.csv       set the ALTER list below in the global constant)

        purpose:    alter (right) side of match    (there may be multiples)

        format:     [raw_name], [date]             (optional)

The repository comes with two lists of business names that you can already use for testing:

  * `_edgar_biznames.csv` :  a focal list of business names from the SEC EDGAR database

  * `_sdc_biznames.cav`   : an alter list of business names from the SDC database.

### Configuration Files for Cleaning Business Names

The code works through a set of word replacements, brandname replacements, known
name changes, name stemming, etc. to perform a better match. Each of those steps
is driven by a particular configuration file. Using the following configuration
files is optional. If a file does not exist in current directory, then code will
run without them by assuming and empty list for that configuration item.

#####  +brands.txt

    purpose:    brand names to roll-up if it appears anywhere in name

    format:     one branded term (NO SPACES) per line

    examples:   ibm
                microsoft
                google

#####  +corp.txt

    purpose:    drop corp suffixes related to incorp or organization

    format:     one suffix per line

    examples:   inc
                co
                ltd
                company

#####  +rename.csv

    purpose:    rename companies entirely to handle FKAs
                works BY ENTIRE NAME & names should be precleaned

    format:     [oldname], [newname]

    examples:   Midland Electric, Inc., midwest electric
                southwest power, sunbelt electricity

#####  +replace.csv

    purpose:    harmonize abbreviations, synonyms, mis-spellings, etc.
                works BY PHRASE (not term-by-term or by entire name)
                phrases can include spacing or just be single terms
                this works differently than +rename.csv which is by line

    format:     [phrase-to-change], [phrase-to-become]

    examples:   bio tech, biotech
                hi tech, hitech
                general electric, ge
                intl, international
                transporte, transport
                biotechnology, biotech

#####  +skip.txt

    purpose:    ignore these business names
                build list from manual inspection
                works BY ENTIRE NAME
                name can be raw or cleaned, but best to use cleaned

    format:     one complete biz name per line

    examples:   ken's hi-tech laboratories
                kens hitech labs

#####  +stem.txt

    purpose:    stem certain terms with many alternatives

    format:     one stem per line  (just starting portion of the stem)

    examples:   pharma  (stems pharmaceutical, pharmaceuticals, etc.)
                sci     (stems science, scientific, etc...)
                chem    (stems chemical, chemistry, etc...)

## Temporary Files

The batching process creates intermediate temp files for each batch:

    ~candidates.###    these get rolled up into ~candidates.csv

    ~matched.###       these get rolled up into ~matched.csv

    ~status-###.txt    the current processing status of a batch (no LF)

You can delete temporary files after processing with this wildcard command:

    rm ~*

## Output Files

On each run of bizmatch.py

    ~candidates.csv

        purpose:    alter (right) side of match    (there may be multiples)

        format:     [focalname], [altername]

        There can be multiple potential candidate matches for each
        focal business name. Candidates are sorted first on focal name
        (alphabetically) and then sorted on alter name by match distance.
        Simply delete invalid lines from the candidates file (leaving
        desired manual matches) and otherwise leave data alone.

    ~matched.csv

        purpose:    The final result of the matching routine.

        format:     [focalname], [altername]

## Execution

#### To run everything in one pass...

Run `run_match.py` to match one list of business names to another list.

For example:

    python run_match.py _edgar_biznames.csv _sdc_biznames.csv

#### To run everything in parallel batches...

Run `run_batch.py` to match one list of biz names to another list,
but to do so by dividing the problem in separate batches.

For example, to parallelize across 4 cores:

    python run_batches.py _edgar_biznames.csv _sdc_biznames.csv 4

#### To run a particular batch...

To run the 4th batch (zero-based index of 3) out of 4 batches:

    python run_match.py _edgar_biznames.csv _sdc_biznames.csv 4 3

## To import the module and use it directly...

See the `example.ipynb` notebook.

You can also import one of the two main modules and call key functions directly.

    import match

    # Output is written directly to file
    match.match_lists(fname_focal, fname_alter, num_batches, batch_no)

or

    import compare

    # Output is a boolean
    result = compare.compare_biznames(name1, name2, debug=DEBUG)

# Disclaimer

_USE THIS CODE AT YOUR OWN RISK._ I provide no guarantee about it's security, safety, reliability, or any other potential risk or harm.

repository: KenYounge/bizmatch

repo_name: KenYounge/bizmatch


text:
---
title:  Restrict statement
description: Learn how to use the restrict statement to limit tabular views that are visible to subsequent query statements.
ms.reviewer: alexans
ms.topic: reference
ms.date: 03/12/2023
zone_pivot_group_filename: data-explorer/zone-pivot-groups.json
zone_pivot_groups: kql-flavors-all
---
# Restrict statement

::: zone pivot="azuredataexplorer, fabric"

The restrict statement limits the set of table/view entities which are visible to query statements that follow it. For example, in a database that includes two tables (`A`, `B`), the application can prevent the rest of the query from accessing `B` and only "see" a limited form of table `A` by using a view.

The restrict statement's main scenario is for middle-tier applications that accept queries from users and want to
apply a row-level security mechanism over those queries.
The middle-tier application can prefix the user's query with a **logical model**, a set of let statements defining views that restrict the user's access to data, for example ( `T | where UserId == "..."`). As the last statement being added, it restricts the user's access to the logical model only.

> [!NOTE]
> The restrict statement can be used to restrict access to entities in another database or cluster (wildcards are not supported in cluster names).

## Syntax

`restrict` `access` `to` `(`*EntitySpecifiers*`)`

## Parameters

|Name|Type|Required|Description|
|--|--|--|--|
|*EntitySpecifiers*|string|✓|One or more comma-separated entity specifiers. The possible values are:
- An identifier defined by a let statement as a tabular view
- A table or function reference, similar to one used by a union statement
- A pattern defined by a pattern declaration
|

> [!NOTE]
>
> * All tables, tabular views, or patterns that aren't specified by the restrict statement become "invisible" to the rest of the query.
> * Let, set, and tabular statements are strung together/separated by a semicolon, otherwise they won't be considered part of the same query.

## Examples

### Let statement

The following example uses a [let statement](./letstatement.md) appearing before `restrict` statement.

```kusto
// Limit access to 'Test' let statement only
let Test = () { print x=1 };
restrict access to (Test);
```

### Tables or functions

The following example uses references to [tables](../management/tables.md) or [functions](../management/functions.md) that are defined in the database metadata.

```kusto
// Assuming the database that the query uses has table Table1 and Func1 defined in the metadata,
// and other database 'DB2' has Table2 defined in the metadata

restrict access to (database().Table1, database().Func1, database('DB2').Table2);
```

### Patterns

The following example uses wildcard patterns that can match multiples of [let statements](./letstatement.md) or tables/functions.

```kusto
let Test1 = () { print x=1 };
let Test2 = () { print y=1 };
restrict access to (*);
// Now access is restricted to Test1, Test2 and no tables/functions are accessible.

// Assuming the database that the query uses has table Table1 and Func1 defined in the metadata.
// Assuming that database 'DB2' has table Table2 and Func2 defined in the metadata
restrict access to (database().*);
// Now access is restricted to all tables/functions of the current database ('DB2' is not accessible).

// Assuming the database that the query uses has table Table1 and Func1 defined in the metadata.
// Assuming that database 'DB2' has table Table2 and Func2 defined in the metadata
restrict access to (database('DB2').*);
// Now access is restricted to all tables/functions of the database 'DB2'
```

### Prevent user from querying other user data

The following example shows how a middle-tier application can prepend a user's query
with a logical model that prevents the user from querying any other user's data.

```kusto
// Assume the database has a single table, UserData,
// with a column called UserID and other columns that hold
// per-user private information.
//
// The middle-tier application generates the following statements.
// Note that<EMAIL_ADDRESS>is something the middle-tier application
// derives per-user as it authenticates the user.
let RestrictedData = view () { Data | where UserID ==<EMAIL_ADDRESS>};
restrict access to (RestrictedData);
// The rest of the query is something that the user types.
// This part can only reference RestrictedData; attempting to reference Data
// will fail.
RestrictedData | summarize MonthlySalary=sum(Salary) by Year, Month
```

```kusto
// Restricting access to Table1 in the current database (database() called without parameters)
restrict access to (database().Table1);
Table1 | count

// Restricting access to Table1 in the current database and Table2 in database 'DB2'
restrict access to (database().Table1, database('DB2').Table2);
union
    (Table1),
    (database('DB2').Table2))
| count

// Restricting access to Test statement only
let Test = () { range x from 1 to 10 step 1 };
restrict access to (Test);
Test

// Assume that there is a table called Table1, Table2 in the database
let View1 = view () { Table1 | project Column1 };
let View2 = view () { Table2 | project Column1, Column2 };
restrict access to (View1, View2);

// When those statements appear before the command - the next works
let View1 = view () { Table1 | project Column1 };
let View2 = view () { Table2 | project Column1, Column2 };
restrict access to (View1, View2);
View1 |  count

// When those statements appear before the command - the next access is not allowed
let View1 = view () { Table1 | project Column1 };
let View2 = view () { Table2 | project Column1, Column2 };
restrict access to (View1, View2);
Table1 |  count
```

::: zone-end

::: zone pivot="azuremonitor"

This capability isn't supported in Azure Monitor

::: zone-end

repository: microsoft/Kusto-Query-Language

gha_language: C#

repo_name: microsoft/Kusto-Query-Language


text:
# Asteroid Blaster

An arcade style, highly addictive game made using HTML5 canvas and p5js.The game is a survival based game where you have to dodge the asteroids falling from above while destroying them.

### Leave a star to show your support!

# How to Run

1. Easy method:
* Find the online demo at: https://asteroid-blaster.herokuapp.com/

2. Developer method:
* Download this repository
* Install Nodejs
* Download the packages in package.json
* Pass your database credentials in `highscore.js` to sequelize
* Start the node server using `node server.js` or `npm run dev` if using nodemon
* Go to `localhost:3000`

# How to Play (Controls)

* On PCs, move the cannon with your mouse
* On touch-screens slide the cannon with your finger
* Your goal is to save your cannon while destroying as many asteroids as you can

# Screenshots

* Welcome screen

![welcome_page](https://github.com/CromulentCoder/Asteroid-Blaster/blob/master/screenshots/welcome_page.PNG)

* Gameplay screen

![gameplay](https://github.com/CromulentCoder/Asteroid-Blaster/blob/master/screenshots/game.PNG)

* Gameplay gif

![gif](https://github.com/CromulentCoder/Asteroid-Blaster/blob/master/screenshots/gameplay.gif)

# Features To Add:

- [x] ~Basic Gameplay~
- [x] ~Scoring mechanism~
- [x] ~Graphics~
- [x] ~Mobile support/ Responsive~
- [x] ~Global Leaderboard~
- [x] ~Anti-Cheat mechanism~

If you have any suggestions for a feature or would like to help me add some features feel free to contact me.

# Credits

Programming & Design by CromulentCoder (author of this repo)

repository: CromulentCoder/Asteroid-Blaster

repo_name: CromulentCoder/Asteroid-Blaster


text:
# Manual migration instructions

This directory contains relevant information for cdc-sink internal schema
migrations (i.e. tables in the `_cdc_sink` schema). These files serve as a
convenient summary of migration instructions that should also be present in the
commit which introduced a breaking change.

repository: cockroachdb/cdc-sink

gha_language: Go

repo_name: cockroachdb/cdc-sink


text:
# Mount NTFS USB Portable Drive in Linux Ubuntu

Log onto console as root and install ntfs-3g so that you can read and write to ntfs using ubuntu without much hassle.

`apt-get install ntfs-3g`

list drives 1st with your new USB portable drive disconnected,

`ls /dev/sd*`

list again, with your new USB portable drive connected, and note the new drive entry.

`ls /dev/sd*`

Whenever I did this in the past, my USB drive always showed as /dev/sda1, but for you it may be different.

Open WinSCP as root in windows and navigate to /etc/ and open fstab.
add this line to the end of the file

`/dev/sda1  /mnt  ntfs-3g  users,defaults  0  0`

Save it and reboot.

Your USB drive is now visible and usable under the /mnt/ folder.

It also auto mounts upon reboot, and allows read/write access for all users.

repository: Sean-Bradley/seanwasere

repo_name: Sean-Bradley/seanwasere


text:
### Contributor
Name:  Jason Floyd, Isaac Leventon, Morgan Bruns

Institution:  FSRI,NIST,St. Mary's University (San Antonio),

Country: USA

------------------

### Test case
Gassification tests: R3-R5 - 50 kW/m2 mas loss
------------------

### CFD package
Code: FDS

Version: 6.8

------------------

### Resolution

### Initial conditions
Comments: Simulations T1-T5 (50 kW/m2) and 25R1-R3 (25 kW/m2) used the experimentally measured temperature at t=0 for the initial condition. All other simulations used 20.9 C.

------------------

### Boundary conditions
Comments:
SOLID_PHASE_ONLY = T
Based on sensitivity analysis performed using https://github.com/MaCFP/matl-db/blob/master/PMMA/Material_Properties/2021/MaCFP_PMMA_NIST.json, simulations used a single, constant flux (i.e., no accounting for time dependence due to shutter or spatial dependence across the sample)
Epoxy mass was treated as PMMA. Output processed to tare initial mass to the reported PMMA sample mass)

------------------

### Pyrolysis Models (include parameters)
Solver: FDS

Radiation absorption model:FDS two-flux model

Material property set:
https://github.com/MaCFP/matl-db/blob/master/PMMA/Material_Properties/2023/MaCFP_PMMA_NIST-StMU.json

Comments:
json file density was used in simulation. Sample thickness was set to preserve the reported sample mass using the json density and the reported sample diameter.
------------------

### Discretization methods
Time: 0.01 s time steps

------------------

### Computational Cost (hh:mm:ss)
Wall clock time:  7 - 10 s for 25 kW/m2, 4-7 s for 50 kW/m2

Simulation time: 500 s for 50 kW/m2, 800 s for 25 kW/m2

Number of CPUs (MPI Processes): 1

CPU cost (Number of CPUs * Wall clock time / Simulation time / Total cells):

------------------

repository: MaCFP/matl-db

gha_language: MATLAB

repo_name: MaCFP/matl-db


text:
# Vagrant LAMP config with Docker

Vagrant/Docker files for a LAMP Virtual Machine like setup. In approach to give the speed of the bare metal but the security of a VM using Linux Container (LXC). This configuration gives you a fast, reproducible development environment.

This configuration is designed for Magento and Magento 2 development, but can be also used for any PHP application. Tested with Drupal as well.

## Provides

  * Ubuntu 14.04 LTS
  * Apache 2.4.7
  * MySQL 5.5.37
  * PHP 5.5.9
  * SSH
  * supervisord for keeping ssh, apache, mysql running (no init scripts).
  * shutdown script
  * Pre configured Apache virtualhost and a database ready to use
  * XDebug and Webgrind
  * n98-magerun
  * Just drop this config into your project and start using

## Preparation

Install Vagrant (>= 1.6.2): http://www.vagrantup.com/downloads.html

Install Docker (>= 1.0.0) https://docs.docker.com/installation/ubuntulinux/

Copy the dev folder and Vagrantfile from this repository to your project folder

    vagrant up

It will take a few minutes for the first time.

## Start using

Add this line to your `/etc/hosts` (or windows equivalent)

    <IP_ADDRESS> www.dev-site.com dev-site.com dev.dev-site-static.com

Your project folder will be served on this url: http://www.dev-site.com:8080

Webgrind is available on this url: http://www.dev-site.com:8080/webgrind

For best use of XDebug and Webgrind features in Chromium, I suggest the [Xdebug helper extension](https://chrome.google.com/webstore/detail/xdebug-helper/eadndfjplgieldjbigjakmdgkmoaaaoc)

You can SSH to the box:

    vagrant ssh

A mysql database has been set up and ready to use immediately. Username: `myadmin`. Password: `myadmin`. Database name: `database`

## XDebug with Sublime Text

Install this plugin via Package Control: https://github.com/martomo/SublimeTextXdebug

### Keyboard Shortcuts

Shift+f8: Open XDebug quick panel

f8: Open XDebug control quick panel when debugger is connected

Ctrl+f8: Toggle breakpoint

Ctrl+Shift+f5: Run to next breakpoint

Ctrl+Shift+f6: Step over

Ctrl+Shift+f7: Step into

Ctrl+Shift+f8: Step out

### Project configuration

*.sublime-project:

    {
        "folders":
        [
            {
                "path": "..."
            }
        ],
        "settings":
        {
            "xdebug": {
                "path_mapping": {
                    "/vagrant" : "/absolute/path/to/project/on/computer",
                },
                "ide_key": "sublime.xdebug",
                "url": "http://www.dev-site.com:8080",
                "port": 9000,
                "close_on_stop": true,
                "debug": true
            }
        }
    }

## Disable XDebug

edit /etc/php5/apache2/conf.d/20-xdebug.ini and comment out the line:

```
;zend_extension=xdebug.so
```

## Coming Soon

(pull requests are welcome)

1. phpmyadmin

repository: ProcessManagement/DevOPSLAMP

repo_name: ProcessManagement/DevOPSLAMP


text:
# AST 2.0

### `npm run dev`

Runs the app in the development mode.

Open [http://localhost:5326](http://localhost:5326) to view it in the browser.

The page will reload if you make edits.

### `graphQl`

Explore dato graphQl endpoint:

[https://cda-explorer.datocms.com/](https://cda-explorer.datocms.com/)

token can be found in the cms > .../admin/access_tokens

### `staging`

for each pull request a staging environment is created via netlify

url to environment can be found in the git > pull requests

example: `netlify/staging-ast-2-0/deploy-preview — Deploy preview ready!  Details`

Happy coding!

branch_name: refs/heads/development

gha_language: Vue


text:
# JSONIC

[![GoDoc](https://godoc.org/github.com/sinhashubham95/jsonic?status.svg)](https://pkg.go.dev/github.com/sinhashubham95/jsonic)
[![Release](https://img.shields.io/github/v/release/sinhashubham95/jsonic?sort=semver)](https://github.com/sinhashubham95/jsonic/releases)
[![Report](https://goreportcard.com/badge/github.com/sinhashubham95/jsonic)](https://goreportcard.com/report/github.com/sinhashubham95/jsonic)
[![Coverage Status](https://coveralls.io/repos/github/sinhashubham95/jsonic/badge.svg?branch=master)](https://coveralls.io/github/sinhashubham95/jsonic?branch=master)
[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go#json)

`Jsonic` is the complete set of utilities to handle json data. There's no need to define structs anymore. It's completely safe to perform nested queries in the JSON. The strong typed methods part of this library will help you have the desired result without writing any extra code.

## Installation

```shell
go get github.com/sinhashubham95/jsonic
```

## Understanding the query path

`Jsonic` uses a unique and simple way to query the elements in a json. It's easy but unique, so you need to understand the same for using `Jsonic`.

Consider the following json.

```json
{
  "a": {
    "x": "p",
    "arr": [
      {
        "a": "b",
        "c.d": {
          "e": "f"
        }
      }
    ]
  },
  "c": "d",
  "a.x": {
    "y": "q"
  },
  "a.x.y": {
    "z": "r"
  }
}
```

Though, practically such a JSON won't exist, but still `Jsonic` is intelligent enough to handle even this. Go through the below table carefully and it will help you understand the path schema.

|      Path      |                         Result                         | Comments                                                                  |
| :------------: | :----------------------------------------------------: | ------------------------------------------------------------------------- |
| {EMPTY_STRING} |                      entire json                       | empty string returns the entire json if no empty string exists in the key |
|       .        |                      entire json                       | dot returns the entire json if no dot exists in the key                   |
|       a        | {"x": "p", "arr": [{ "a": "b", "c.d": { "e": "f" } }]} | it returns the entire json tree of a                                      |
|      a.x       |                           p                            | multiple options here, but the first preference goes to the tree of a     |
|     a.x.y      |                           q                            | multiple options here, the first preference will be given to a.x          |
|    a.x.y.z     |                           r                            | there is only a single possibility here                                   |
|     a.arr      |          [{ "a": "b", "c.d": { "e": "f" } }]           | it returns the entire array denoting the json tree of a.arr               |
|    a.arr[0]    |           { "a": "b", "c.d": { "e": "f" } }            | it returns the first element of the array                                 |
|   a.arr[0].a   |                           b                            | it returns the element for key a of the first element of array            |
| a.arr[0].c.d.e |                           f                            |                                                                           |

As you would have understood, if there are multiple JSON trees satisfying the path, and the path looks something like this `a.b.c.d`, then the preferences will be in the following order - `a` > `a.b` > `a.b.c` > `a.b.c.d`.

Consider another json.

```json
{
  "": "a",
  ".": "b"
}
```
Here the paths resolve in a different manner.

|      Path      | Result | Comments                                                                  |
| :------------: | :----: | ------------------------------------------------------------------------- |
| {EMPTY_STRING} |   a    | empty string returns the entire json if no empty string exists in the key |
|       .        |   b    | empty string returns the entire json if no empty string exists in the key |

## How to Use?

`Jsonic` allows you to process the JSON bytes. You can create a new instance of `Jsonic` for every JSON you have and you can get the child JSON trees using the set of utilities it provides.

### Create a New Instance

This will create a new instance using the JSON bytes provided as it's data to be used on.

```go
import (
  "github.com/sinhashubham95/jsonic"
)

func New() {
  json := "{\"naruto\": \"rocks\"}"
  j, err := jsonic.New([]byte(json))
  // perform any sort of operations on the json using the instance created
}
```

### Create a child instance

On the `Jsonic` created, you can provide a child path and get a new instance with the child JSON tree satisfying the path provided as it's data.

```go
import (
  "github.com/sinhashubham95/jsonic"
)

func Child() {
  json := "{\"naruto\": \"rocks\"}"
  j, err := jsonic.New([]byte(json))
  if err != nil {
    return
  }

  // create a child
  child, err := jsonic.Child("naruto")
  // now if you want to query on the child then use this child instance
}
```

### Get the data at the path

On the `Jsonic` created, you can get the data at the path specified.

```go
import (
  "github.com/sinhashubham95/jsonic"
)

func Get() {
  json := "{\"naruto\": \"rocks\"}"
  j, err := jsonic.New([]byte(json))
  if err != nil {
    return
  }

  // get the data
  data, err := jsonic.Get("naruto")
  // this data will have type interface{} with value "rocks"
}
```

### Get typed data at the path

Though using structs is not required with the wonderful set of utilities `Jsonic` provides, but even if you like to use that, it is very simple to get your result cast into the struct you want.

```go
import (
  "github.com/sinhashubham95/jsonic"
)

type Detail struct {
  Name string `json:"name"`
}

func GetTyped() {
  json := "{\"characters\": [{\"name\": \"naruto\"}, {\"name\": \"boruto\"}]}"
  j, err := jsonic.New([]byte(json))
  if err != nil {
    return
  }

  // get the data
  var data []Detail
  err := jsonic.GetTyped("characters", &data)
  // this data will contain 2 elements with names as naruto and boruto
}
```

### Other Typed Utilities

Apart from the generic query methods mentioned above, `Jsonic` contains a bunch of others.

```go
import (
  "github.com/sinhashubham95/jsonic"
)

func OtherGetters(j *Jsonic, path string) {
  // primitives
  i, err := j.GetInt(path)                    // int
  i64, err := j.GetInt64(path)                // int64
  f, err := j.GetFloat(path)                  // float32
  f64, err := j.GetFloat64(path)              // float64
  b, err := j.GetBool(path)                   // bool
  s, err := j.GetString(path)                 // string

  // arrays
  a, err := j.GetArray(path)                  // []interface{}
  iArr, err := j.GetIntArray(path)            // []int
  i64Arr, err := j.GetInt64Array(path)        // []int64
  fArr, err := j.GetFloatArray(path)          // []float32
  f64Arr, err := j.GetFloat64Array(path)      // []float64
  bArr, err := j.GetBoolArray(path)           // []bool
  sArr, err := j.GetStringArray(path)         // []string

  // maps
  m, err := j.GetMap(path)                    // map[string]interface{}
  iMap, err := j.GetIntMap(path)              // map[string]int
  i64Map, err := j.GetInt64Map(path)          // map[string]int64
  fMap, err := j.GetFloatMap(path)            // map[string]float32
  f64Map, err := j.GetFloat64Map(path)        // map[string]float64
  bMap, err := j.GetBoolMap(path)             // map[string]bool
  sMap, err := j.GetStringMap(path)           // map[string]string
}
```

repository: ajunlonglive/jsonic

repo_name: ajunlonglive/jsonic


text:
# Ya-disk-browser-app

This is just a simple test app made to demonstrate my skils as a front-end developer.
This app connects to yandex disk rest api and shows its contents, so in order to use it, you should be registered on one of yandex services.

This app is made with React.js and Redux, bootstrap was used for styling.

### Installation and running

This app requires [Node.js](https://nodejs.org/) v4+ to be installed.

1. Clone repository.
2. Navigate to root of a local clone and open command line tool.
3. In command line run:

```sh
npm i
npm run build
```
This will start a local webpack-dev-server

 4. Open localhost:3000 in your browser.
 5. Have fun! :)

License
----

MIT

repository: mUnicorn/ya-disk-browser-app

repo_name: mUnicorn/ya-disk-browser-app


text:
---
layout: page
title: "Register"
permalink: /events/2019/register.html
---

Registration is open! This year we're trying Square for registrations. Lots of event management sites have pricing schemes that don't work well for events our size.

 We're happy to have you regardless of what you can pay. If your employer reimburses you for your conference fees, we recommend the 'Patron' tier which covers the full cost of the event.

Once again, T-shirts are a separate item. They will be available for pickup at the event until noon on Saturday, when remaining shirts will be given away first-come-first-served.

We will cut off free registration and t-shirt sales on October 1st.

branch_name: refs/heads/gh-pages

gha_language: SCSS


text:
# What is timeline-component-lwc?
This post will cover some technical, functional aspects of the component. There are some limitations as well as planned enhancements mentioned below.

# How to configure and use?
The component can be added to Lightning Record pages to show history for the record in context or record related to it. There is some configuration required in app builder when it is added to the page. Here is the video that explains how to do it, https://youtu.be/xWJqyk0Yu3k.

# Technical Aspects
1. It is built with combination of Apex and Lightning Web Components.
2. Apex Code takes care of fetching the history data, defining & building wrapper structure to show on UI.
3. Object and Field level access control is handled in the apex code. If the logged in user does not have access to object or field, the component won't show it.
4. Search functionality is handled completely on client side through JavaScript. There are Search tag arrays built into wrapper to filter records based on User input in text field.
5. The Apex Code is using few reusable methods from SystemUtilities apex class. These can be used outside the scope of this component.
6. Writing Test Class for classes centered around OOB history objects is difficult. In order to cover the apex class written with this component, the test classes will need to have 'SeeAllData' set to True. Hence, for your specific org, you can create a test record and fetch that in the test class which is provided in the repository.

# Limitations
1. Percent, Currency fields are shown without Percent or Currency signs.
2. For Encrypted fields, only the "change" event is shown, not the actual or masked value.
3. The data does not auto-refresh if the component is open and data changes. The refresh button is available for force manual refresh.

# Planned Enhancements
1. Improve Search Mechanism; move away from linear search, more towards dictionary like approach.
2. Move the configuration to Custom metadata.
3. Add additional filters with an option for configuring default filters

# How to install
You can use this package link to install the component, https://login.salesforce.com/packaging/installPackage.apexp?p0=04t3l000000KoJW.

repository: JB-Walker/timeline-component-lwc

repo_name: JB-Walker/timeline-component-lwc


text:
# ba21_loma_2_moba
An android app that provides real-time dsp mutation options on music

## Testing
Use the test bench in src/test/java/ch.zhaw.ch/ generate transformed output for comparison.
Additional test files can be added in src/test/res/audio/in/.
The generated output files can be found in src/test/res/audio/out/.

## Output Files on App
Any audio file that is streamed on the app is written to /Android/data/ch.zhaw.ch/files with the same name as the original file.
The app releases the file only after the song has ended or another song has been selected.
The written file contains the exact data that has been streamed to the phones speakers.

## Algorithms
| Name  | Description | Status | Source|
| ------------- | ------------- | ------------- | ------------ |
| Basic Phase Shifter  | Simple phase vocoder limited to horizontal phase propagation  | Complete  | Based on DAFX Chapter 7.4.4 Block by block approach http://dafx.de/DAFX_Book_Page/index.html |
| Scaled Phase Locked Shifter  | Advanced phase vocoder with connected peak detection and phase locking | Complete  | Based on Improved Phase Vocoder Time-Scale Modification of Audio Scaled Phase locking https://ieeexplore.ieee.org/document/759041 |
| Dynamic Phase Locked Shifter  | Advanced phase vocoder with peak detection and dynamic vertical phase propagation | In Progress  | Based on Phase Vocoder Done Right pseudo code https://www.researchgate.net/publication/319503719_Phase_Vocoder_Done_Right |
| Rubberband | The rubberband audio library from breakfastquay integrated with default settings (-c 5) optimized for percussion | Integrated | Made available by breakfastquay  https://breakfastquay.com/rubberband/ |


text:
# @esx-rs/client

Client proxy generation for ESX-RS endpoints, where method calls:

- are mapped to HTTP requests
- have the corresponding HTTP response payload mapped to the returned value
- errors are mapped to exceptions

repository: rraziel/esx-rs

repo_name: rraziel/esx-rs


text:
# IoArgoprojWorkflowV1alpha1Memoize

Memoization enables caching for the Outputs of the template

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**cache** | [**IoArgoprojWorkflowV1alpha1Cache**](IoArgoprojWorkflowV1alpha1Cache.md) |  |
**key** | **str** | Key is the key to use as the caching key |
**max_age** | **str** | MaxAge is the maximum age (e.g. \"180s\", \"24h\") of an entry that is still considered valid. If an entry is older than the MaxAge, it will be ignored. |
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

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

repository: nHurD/argo

repo_name: nHurD/argo