text:
# Self-learning FAQ Chatbot based on SAP Conversational AI

## Overview

This sample provides a tutorial and the code to set up an FAQ chatbot in SAP Conversational AI (CAI) that learns question and answer pairs from Stack Overflow. The learning process is based on a Kubernetes CronJob. It receives all questions with a specific tag from Stack Overflow, stores the question IDs in a simple SQL database, and adds new questions to the SAP CAI bot. The SQL database is necessary to keep track of which question from Stack Overflow corresponds to which question in the bot knowledge.

![Overview of the Chatbot's Architecture](assets/BotArchitecture.jpg)

The following code is included in this sample:

- Knowledge database: simple [MS SQL database](knowledge-database/database-mssql/app/setup.sql) that stores all IDs of the questions the bot can answer
- Bot observer tool: [node.js server](bot-observer-tool/app/server.js) that displays the current bot knowledge, the Stack Overflow content, and the knowledge database content. This server can also be used to verify that everything was set up correctly.
- Update functionality: [Kubernetes CronJob](update-bot/k8s/cronjob.yaml) and [JS-script](update-bot/app/update-bot.js) to update the bot automatically
- Alert Notification when an error occurs: [Alert Notification](alert-notif/k8s/deployment.yaml)

This sample demonstrates how to:

- Set up an FAQ chatbot in SAP Conversational AI
- Connect the FAQ chatbot to a communication platform, e.g., Slack
- Deploy the SQL knowledge database to the Kyma runtime
- Deploy the bot observer tool to the Kyma runtime and connect everything together
- Deploy the Kubernetes CronJob to the Kyma runtime that updates the bot automatically
- Deploy the Alert Notification that sends notifications when an error occurs
- Deploy the knowledge database, the bot observer tool, the update functionality as well as the alert notification using a helm-chart

## Prerequisites

- SAP BTP, Kyma runtime instance
- Alert Notification Service set up in your SAP BTP Subaccount
- [Docker](https://www.docker.com/)
- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) configured to use the `KUBECONFIG` file downloaded from the Kyma runtime
- [SAP Conversational AI](https://cai.tools.sap/)

## Steps

### 1. Set up an FAQ Chatbot in SAP Conversational AI

1. Create a new FAQ chatbot in SAP CAI by performing Step 3 and Step 4 of the [Conversational AI FAQ chatbot beginner](https://developers.sap.com/tutorials/conversational-ai-faq-chatbot-beginner.html) tutorial:

    - Go to <https://cai.tools.sap/> and sign in.
    - Create a new bot and choose `Retrieve Answers from FAQ documents`.
    - Give the bot a name, e.g., `karl-kyma` or `kyma-faq-bot`.
    - For the data policy choose `non-personal` and `non-vulnerable`.
    - Choose the bot visibility to be `public` and press the `Create` button.

2. On the **Train** tab, click the `Upload Document` button and upload the [kymafaq.csv](kymafaq.csv) that you can find in this Git repository. After the upload you should be able to click on the document and see that there is already one question-answer pair.

3. On the **Build** tab, go to `customer-satisfaction-reply` and scroll down to the section `if user chooses no`. There, delete the two existing actions, click on `Choose Message Type`, then on `Text` and paste the following message:

    ```shell
    Sorry, that I couldn't find an answer to your question. Please post it on Stack Overflow.
    ```

4. On the **Build** tab, go to `faq` and make the following three changes to the actions:
   - Edit the first action and replace the pairs of two asterisks by single asterisks

      ```shell
      *{{qna.faq.answers.0.question}}*
      {{qna.faq.answers.0.answer}}
      ```

   - Edit the second action and also replace the pairs of two asterisks by single asterisks

      ```shell
      *Did you mean to ask?*
      1) {{qna.faq.answers.0.question}}
      2) {{qna.faq.answers.1.question}}
      3) {{qna.faq.answers.2.question}}
      ```

   - Delete the third action. Scroll down to `if ?qna.faq.max_confidence lower-than .05`. There, delete the existing reply `I was not able to find what you were looking for in my document.` by clicking on the trash can with the label `Delete action`.

### 2. Connect the FAQ Chatbot to a Communication Platform

The FAQ chatbot can be connected to multiple communication platforms. In the previously created FAQ chatbot, go to the **Connect** tab and explore the options. In this tutorial, the bot is connected to Slack following the [Deploy an SAP Conversational AI Chatbot on Slack](https://developers.sap.com/tutorials/conversational-ai-deploy-slack.html) tutorial.

1. In the **Connect** tab, click on `Slack`.

2. Click on `Create a Slack app` and follow the instructions there:

    - Click on the link which will bring you to https://api.slack.com/apps.
    - There, choose `Create New App` and select `From scratch`.
    - Give the app a name (e.g., `Karl Kyma`) and select your workspace.
    - Click `Create App`.

3. Click on `Get your credentials` (again at the CAI platform) and follow the instructions there:

    - In the Slack API go to `Settings` and `Basic Information`.
    - In the section `App Credentials` copy the `Client ID` and the `Client Secret`.

4. On the CAI platform, insert the `Client ID` and the `Client Secret`, and click `GET TOKENS`.

5. Copy the `OAuth URL` and the `Event URL` to your clipboard.

6. Click on `Set the OAuth redirect URL` and follow the instructions there:

    - In the Slack API go to `OAuth & Permissions`.
    - Click `Add New Redirect URL` and add the `OAuth URL` you just copied.
    - Click `Save URLs`.

7. Click on `Enable Interactive Components` and follow the instructions there:

    - In the Slack API go to `Interactivity & Shortcuts`.
    - Turn on the `Interactivity`.
    - In the field `Request URL` paste the `Events URL` you just copied.
    - Click `Save Changes`.

8. Click on `Enable OAuth Permissions` and follow the instructions there:

    - In the Slack API go to `OAuth & Permissions`.
    - Via the `Add an OAuth Scope` button add the following `Bot Token Scopes` to the bot:
      - channels:history
      - channels:read
      - chat:write
      - groups:history
      - groups:read
      - groups:write
      - im:history
      - im:read
      - users:read
      - users:write

9. Click on `Fill the Events redirect URL` and follow the instructions there:

    - In the Slack API go to `Event Subcriptions`.
    - Enable Events and fill the `Event URL` you copied earlier into the `Request URL` field.
    - In the section `Subscribe to bot events`, add the following three events:
      - message.im
      - message.groups
      - message.channels
    - Click `Save Changes`.

10. Give the bot a discription, add an app icon, and add it to the Slack workspace:

    - In the Slack API go to `Basic Information`.
    - Scroll down to `Display Information` and add a short discription and an app icon.
    - Click `Save Changes`.
    - Scroll up again and click `Install to Workspace`. Click `Allow` and then you are done in the Slack API.

11. Go back to the CAI platform and click on `Add my bot to Slack`. There is a link, you need to follow. Then, click again on `allow` and you will get the feedback that the bot was successfully added to the workspace.

12. Open Slack, go to the workspace you selected further above and go to a channel you want to add the bot to.

13. Click on the cluster of profile pictures at the top right. Go to the tab `Integrations`, click on `Add an App`, and search for the name of your bot. Then, simply click `Add` and the bot will be added to this channel.

14. Verify that everything was set up correctly by sending some greeting like "*Hello*" and the question "*What is your name?*" in the Slack channel. The bot should respond to both messages.

### Optional Deployment with Helm to Skip Steps 3 to 7

Instead of following the steps 3 to 7 as described below, the deployment of all needed objects could also be handled via helm.
If you decide to do the deployment with helm, follow [these instructions](https://github.com/SAP-samples/kyma-runtime-extension-samples/tree/main/helm-charts/chatbot#prerequisits).

### 3. Deploy the Knowledge Database to Kyma

The first step will be to deploy the knowledge database. Make sure that you have a running Docker installation and a Docker Hub account (In case of a private docker repository, you have to add a kubernetes secret called "regcred" that contains the given credentials). The proceed with the following steps:

1. Switch to the directory `knowledge-database/database-mssql`.

2. Build the database image:

    ```shell
    docker build -t yourDockerHubAccount/bot-db -f docker/Dockerfile .
    ```

3. Push the database image to your Docker Hub account:

    ```shell
    docker push yourDockerHubAccount/bot-db
    ```

    If you do not have an own Docker Hub account, you can also pull the built images from my account `lasseurban`.

4. Within the `deployment.yaml` in the k8s directory, adjust the value of `spec.template.spec.containers.image`, commented with `#change it to your image`, to use your Docker image.

5. Go to the SAP BTB Cockpit and from there to your Kyma dashboard.

6. Download the Kubeconfig and export it. If you don't know how to do this, check step 3 of [this tutorial](https://developers.sap.com/tutorials/cp-kyma-download-cli.html).

    ```shell
    export KUBECONFIG=<KUBECONFIG_FILE_PATH>
    ```

7. Create a namespace and a context for this namespace (make sure that you replace ******* with your cluster ID):

    ```shell
    kubectl create namespace chatbot
    ```

    ```shell
    kubectl get namespaces
    ```

    ```shell
    kubectl config set-context chatbot-context --namespace=chatbot --cluster=*******.kyma-stage.shoot.live.k8s-hana.ondemand.com --user=OIDCUser
    ```

    ```shell
    kubectl config use-context chatbot-context
    ```

8. From the Command Line, deploy the database secret, the persistent volume claim, and the database itself:

    ```shell
    kubectl apply -f k8s/secret.yaml
    ```

    ```shell
    kubectl apply -f k8s/pvc.yaml
    ```

    ```shell
    kubectl apply -f k8s/deployment.yaml
    ```

    >> *NOTE:* The order of deploying is important and it might take a few minutes until everything is up and running.

    If you want to have more details about what is going on here, please check out [this tutorial](https://developers.sap.com/tutorials/cp-kyma-mssql-deployment.html).

### 4. Deploy the API Function for the Database to Kyma

Next, an API function must be deployed to allow manipulation of the database from outside. This is very similar to the [api-mssql-function](https://github.com/SAP-samples/kyma-runtime-extension-samples/tree/main/api-mssql-function) in this Git repository.

1. Change to the directory `knowledge-database/api-mssql-function`.

2. Within the `k8s/deployment.yaml` in the k8s directory, adjust the value of `spec.env.host.value`, commented with `#change chatbot to your namespace`.

3. Deploy the function:

    ```shell
    kubectl apply -f k8s/deployment.yaml
    ```

4. Verify that the Function is up and running:

    ```shell
    kubectl get function api-mssql-function
    ```

    You should get something like this:

    | NAME               | CONFIGURED | BUILT      | RUNNING    | RUNTIME    | VERSION    | AGE  |
    | ------------------ | ---------- | ---------- | ---------- | ---------- | ---------- | ---- |
    | api-mssql-function | True       | True       | True       | nodejs14   | 1          | XXs  |

5. You can now use the API function (ensure that you replace `{cluster-domain}` with your domain):

    - You can get all questions in the database (should be empty at the moment):

      ```shell
      curl -X GET "https://api-mssql-function.{cluster-domain}/"
      ```

    - You can also get a single question with a specific ID:

      ```shell
      curl -X GET "https://api-mssql-function.{cluster-domain}/ID"
      ```

    - Or, you can delete one or multiple questions from the database:

      ```shell
      for x in {1..3}; do curl -X DELETE "https://api-mssql-function.{cluster-domain}/$x"; done
      ```

### 5. Deploy the Bot Observer Tool to Kyma

Now, it is time to deploy the bot observer tool. This is a simple node.js server that displays the current bot knowledge (requested from SAP CAI), the Stack Overflow content, and the knowledge database content.

1. Change to the directory `bot-observer-tool`.

2. Build the bot observer tool image:

    ```shell
    docker build -t yourDockerHubAccount/bot-observer-tool -f docker/Dockerfile .
    ```

3. Push the bot observer tool image to your Docker Hub account:

    ```shell
    docker push yourDockerHubAccount/bot-observer-tool
    ```

    If you do not have an own Docker Hub account, you can also pull the built images from my account `lasseurban`.

4. Open the file `k8s/secret.yaml` with your favorite editor and make the following adjustments:

    | Name                   | value      |
    | ---------------------- | ---------- |
    | cai-credentials-id     | 1. Go to your chatbot in [SAP Conversational AI](https://cai.tools.sap).
2. Select your bot, click on `Settings` and go to the tab `Tokens`.
3. Next to `Designtime APIs` click on the `Generate` button.
4. Select `Client Credentials` and click `Next`.
5. Copy the `Client ID` and paste it in the secret.yaml as the value of `cai-credentials-id`. |
    | cai-credentials-secret | Copy the `Client Secret` and paste it in the secret.yaml as the value of `cai-credentials-secret`. |
    | bot-url                | The bot URL is needed to communicate with the FAQ bot in SAP Conversational AI and needs to be of this format:

`{user_slug}/bots/{bot_slug}/versions/{version_slug}/qna/topic/knowledge_sources/{knowledge_source_id}/answers`

- The user_slug can be found in the `Settings` of the CAI bot on the tab `Tokens` at the bottom.
- The bot_slug is the name of the bot and can be found in the `Settings` of the CAI bot on the tab `Bot Options`.
- The version_slug can be found in the `Settings` of the CAI bot on the tab `Versions` (the value is most likely `v1`).
- The knowledge_source_id is the name of the csv-file that you uploaded in step 1.2
   (if you took the one from this repo, the value is `kymafaq`).

Please check the [SAP CAI API reference](https://api.sap.com/api/FAQBot_API/resource) for more information. |
    | cai-x-token            | 1. Go back to the `Settings` of the CAI bot and to the tab `Tokens`.
2. Copy the `Developer token` and paste it in the secret.yaml as the value of `cai-x-token`. |
    | stack-tag              | Choose a tag that is used for questions the bot should learn, e.g., `kyma-runtime`. |
    | stack-key              | 1.  Next to the search bar at the top click on your profile picture to access your profile.
3. Click on `Edit profile and settings`.
4. Click on `API access keys`.
5. Choose a name and click `Create access key`.
6. Copy the `Key` and paste it in the secret.yaml as the value of `stack-key`.      |
    | db-name                | Use the value `spec.env.database.value` from the `knowledge-database/api-mssql-function/k8s/deployment.yaml` file. |
    | db-host                |  Use the value `spec.env.host.value` from the `knowledge-database/api-mssql-function/k8s/deployment.yaml` file. |
    | db-username            |  Use the value `spec.env.username.value` from the `knowledge-database/api-mssql-function/k8s/deployment.yaml` file. |
    | db-password            |  Use the value `spec.env.password.value` from the `knowledge-database/api-mssql-function/k8s/deployment.yaml` file. |

5. From the Command Line, deploy the bot secret, the bot observer tool itself and the apirule to access the tool:

    ```shell
    kubectl apply -f k8s/secret.yaml
    ```

    ```shell
    kubectl apply -f k8s/deployment.yaml
    ```

    ```shell
    kubectl apply -f k8s/apirule.yaml
    ```

    >> *NOTE:* The order of deploying is important and it might take a minute until everything is up and running.

6. In the Kyma dashboard, select the namespace and click on `API Rules` in the menu bar on the left.

7. There should be two entries. Click on the link next to `bot-observer-apirule`.

8. A new tab should be opened and you should see the main API endpoint of the node.js server `bot-observer`.

9. Check if everything is working by accessing all the endpoints (you should just append the path of every endpoint to the URL of the node.js server):
    - You can check all the knowledge the bot currently has:

      ```shell
      https://bot-observer.{cluster-domain}/bot
      ```

     (should return one default question about the bots name)
    - You can also check the bot credentials that are automatically requested from SAP CAI:

      ```shell
      https://bot-observer.{cluster-domain}/botcredentials
      ```

    - You can also request all the knowledge from Stack Overflow that is tagged with the tag that you specified in the secret.yaml:

      ```shell
      https://bot-observer.{cluster-domain}/stack
      ```

    - Or, you can list all the entries of the database:

      ```shell
      https://bot-observer.{cluster-domain}/db
      ```

      (should be empty at the moment)

### 6. Deploy the Alert Notification Functionality that sends messages when an error occurs

To ensure that you get notified in case errors happen, you have to follow the following steps:

1. Change to the directory `alert-notif/k8s`

2. Open the file `deployment.yaml`

3. For the ServiceInstance change the value of `spec.parameters.configuration.actions.properties.destination` for the e-mail action to an e-mail to which you would like to receive notifications. If you want to use slack instead of e-mail, then you should change the value `spec.parameters.configuration.actions.properties.destination` for the slack action to the webhook of a given slack channel. [Here](https://api.slack.com/messaging/webhooks) you will find more informations about how to set up a webhook for your slack channel. Furthermore, you have to mention the type of notification `email`or `slack` in the spec.parameters.configuration.subscriptions.actions` field.

4. To allow proper association of the function in the cluster, you have to adjust two more values for the Functions.
The environment variable `CLUSTER_DOMAIN` has to get the value of the domain of the cluster.
The environment variable `url` should have the value of the url of the region

5. Now you can save and close the `deployment.yaml` file

6. Finally, the alert notification has to be deployed to the cluster. For this you have to run the following command in the terminal:

        ```
        kubectl apply -f deployment.yaml
        ```

7. After some minutes the alert notification function should be up and running in your cluster.

### 7. Deploy the Kubernetes CronJob that updates the Bot

1. Change to the directory `update-bot`.

2. Build the bot update image:

    ```shell
    docker build -t yourDockerHubAccount/bot-update -f docker/Dockerfile .
    ```

3. Push the bot observer tool image to your Docker Hub account:

    ```shell
    docker push yourDockerHubAccount/bot-update
    ```

    If you do not have an own Docker Hub account, you can also pull the built images from my account `lasseurban`.

4. From the Command Line, deploy the bot secret:

    >> *NOTE:* You only need to do this, if you have not already deployed the bot secret while deploying the bot observer tool in step 5.5. Please doublecheck now wether you have correctly deployed the bot secret. If you are unsure you can use the command `kubectl get secrets`. You should see the bot-secret of the Type `Opaque` with 10 data items.

   If you have not already done the deployment of the secret, go to step 5.5 and make the described adjustments in `k8s/secret.yaml`. Afterwards, use the following command to deploy the secret:

    ```shell
    kubectl apply -f k8s/secret.yaml
    ```

5. Deploy the Kubernetes Job or the CronJob. Decide wether you want to update the chatbot immediately (use the job.yaml) or repetitively with a fixed schedule (use the cronjob.yaml). Both execute the same update-bot functionality.To use the simple **Kubernetes Job**, do the following steps:

    1. Within the `job.yaml` in the k8s directory, adjust the value of `spec.template.spec.containers.image`, commented with `#change it to your image`, to use your Docker image.

    2. From the Command Line, deploy the Job:

        ```shell
        kubectl apply -f k8s/job.yaml
        ```

    3. If you want to kill the job, use the following command:

        ```shell
        kubectl delete -f k8s/job.yaml
        ```

    To use the **Kubernetes CronJob**, do the following steps:

    1. Within the `cronjob.yaml` in the k8s directory, adjust the value of `spec.template.spec.containers.image`, commented with `#change it to your image`, to use your Docker image.
    2. In the same file, adjust the value of `spec.schedule`, commented with `#change it to your schedule`. Information on how you do that, can be found [here](https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/). For example, you could set the schedule to "0 0 * * *" to update the bot every day at midnight.
    3. From the Command Line, deploy the CronJob:

        ```shell
        kubectl apply -f k8s/cronjob.yaml
        ```

    4. You can check the status of the CronJob:

        ```shell
        kubectl get cronjobs
        ```

    5. If you want to kill the CronJob, use the following command:

        ```shell
        kubectl delete -f k8s/cronjob.yaml
        ```

## About the Contributor and the Project

The development of this chatbot and the tutorial was a project contributed by Lasse Urban, who is a vocational training student at SAP. He spent one rotation in the STAR (Student Training and Rotation) Program with the Kyma Runtime Adoption team from April 2021 until October 2021.
Improvements of the chatbot were done by Alexander Weers, Cansu Doganay and Jano Hanzlik (STAR students that joined the department from April 2022 until October 2022).

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

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


text:
---
date: 2022-11-21
layout: rafaga
rafagas:
- desc: Luxury real estate projects in Cambodia drain the lakes of Phnom Penh to the
    benefit of a few elitists to the detriment of traditional fishing and aquaculture
    increasing the risk of flooding in the capital
  keyw: luxury
  lang: FR
  link: https://fr.mongabay.com/2022/11/quand-lelite-cambodgienne-ensable-les-lacs-de-phnom-penh-et-que-le-reste-de-la-population-senlise-dans-la-pauvrete/
  microlink:
    desc: Kong Khun, 25 ans, se protège de la chaleur estivale de cette fin de mois
      de juin sous une hutte en bambou le long du lac de Boeung Tamok, le plus grand
      de Phnom Penh. Malgré le ciel dégagé, Kong Khun a choisi de ne pas partir pêcher
      avec sa famille aujourd’hui. […]
    image: https://imgs.mongabay.com/wp-content/uploads/sites/26/2022/11/09104122/Sand-Mining-Article-2_Mongabay-1.jpg
    logo: https://fr.mongabay.com/wp-content/themes/mongabay_v1/img/icons/ico-l.jpg
    title: Quand l’élite cambodgienne ensable les lacs de Phnom Penh et que le reste
      de la population s’enlise dans la pauvreté
- desc: UNITAC, the United Nations technology accelerator, has developed BEAM (Building
    & Establishment Automated Mapper) to rapidly detect and visualize building roofs
    from aerial images
  keyw: technology
  link: https://express.adobe.com/page/kyYWPHoATpii6/
  microlink:
    desc: Return to Adobe Express
    title: kyYWPHoATpii6
- desc: Illegal mining, due to the increase in the price of gold, has become one of
    the main drivers of deforestation in the Amazon, especially in Venezuela, Guyana
    and Suriname, and causes a deep environmental footprint
  keyw: mining
  link: https://insightcrime.org/investigations/beneath-surface-illegal-gold-mining-amazon/
  microlink:
    desc: As gold prices have skyrocketed, a boom in illegal mining across the Amazon
      Basin has flourished, leaving a deep environmental footprint.
    image: https://insightcrime.org/wp-content/uploads/2022/10/Amazonas-Fase1-Cover-Capitulo3-B-1024x374.png
    logo: https://insightcrime.org/wp-content/themes/ic/dist/assets/images/favico.png?ver=b1f98f15
    title: Beneath The Surface of Illegal Gold Mining in the Amazon
rid: 1947
---

license: MIT

repository: geoinquiets/rafagas

branch_name: refs/heads/gh-pages

extension: md

gha_language: SCSS

gha_license_id: NOASSERTION

license_type: permissive

repo_name: geoinquiets/rafagas


text:
---
layout: newsletter
title: This Month in Solid 2020-01-07
permalink: /newsletter/2020-01-07
tags: [monthly, updates]
categories: [Updates]
---

## Updates

### [Events](https://solidproject.org/events)

**4 February 2021** -

### [Press](https://solidproject.org/press)

### In Other News

*

#### Solid Implementations

*

#### Job Openings

* [OECO Group is looking for a full-stack Solid developer in Kontich, Belgium](https://www.linkedin.com/jobs/view/2365589216/)

branch_name: refs/heads/main

gha_license_id: MIT


text:
---
layout: post
title:      "Github Oauth: keep it secret"
date:       2018-12-19 22:18:44 +0000
permalink:  github_oauth_keep_it_secret
---

If you wish to get the Github authentication part working you will need to create a key using Github. From your Github profile, go to settings then onto developer settings. Click new Oauth app. For Authorization callback URL enter https://localhost:3000/auth/github/callback. After set up you will be given key and secret. In the house-plant app, go to config/initializers/omniauth.rb, and paste the ID and Secret into their spots like so:

GITHUB_KEY: XXXXXXX GITHUB_SECRET=XXXXX

But if you want to keep your ID and SECRET a secret in omniauth.rb leave GITHUB_KEY and GITHUB_SECRET as 'GITHUB_KEY' and 'GITHUB_SECRET' in the env brackets. Then we can create a secrets.yml file to store the real key and secret. From there place:

    config_files = ['secrets.yml']

    config_files.each do |file_name|
      file_path = File.join(Rails.root, 'config', file_name)
      config_keys = HashWithIndifferentAccess.new(YAML::load(IO.read(file_path)))[Rails.env]
      config_keys.each do |k,v|
        ENV[k.upcase] ||= v
      end
    end

in your application.rb file into your app module. Lastly add your secrets file to your gitignore file so that your secret and key stay hidden from the public on github.

Enjoi

branch_name: refs/heads/master

extension: markdown


text:
# SQLite RxStorage (beta)

This storage is based on [SQLite](https://www.sqlite.org/index.html) and is made to work with **Node.js**, **Electron**, **React Native**, **Cordova** and **Capacitor**.

### Pros

- Much faster compared to the PouchDB+SQLite `RxStorage`
- Small build size

### Cons

- It is part of [RxDB Premium](./premium.md)
- Does not support CouchDB replication.

## Usage (with Node.js SQLite)

```ts
import {
    createRxDatabase
} from 'rxdb';
import {
    getRxStorageSQLite,
    getSQLiteBasicsNode
} from 'rxdb-premium/plugins/sqlite';

/**
 * In Node.js, we get use the SQLite database
 * from the 'sqlite' npm module.
 * @link https://www.npmjs.com/package/sqlite3
 */
import sqlite3 from 'sqlite3';

const myRxDatabase = await createRxDatabase({
    name: 'exampledb',
    storage: getRxStorageSQLite({
        /**
         * Different runtimes have different interfaces to SQLite.
         * For example in node.js we have a callback API,
         * while in capacitor sqlite we have Promises.
         * So we need a helper object that is capable of doing the basic
         * sqlite operations.
         */
        sqliteBasics: getSQLiteBasicsNode(sqlite3)
    })
});
```

## Usage (with SQLite Capacitor)

1. Install the [sqlite capacitor plugin](https://github.com/capacitor-community/sqlite)
2. Add the iOS database location to your capacitor config

```json
{
    "plugins": {
        "CapacitorSQLite": {
            "iosDatabaseLocation": "Library/CapacitorDatabase"
        }
    }
}
```

3. Use the function `getSQLiteBasicsCapacitor` to get the capacitor sqlite wrapper.

```ts
import {
    createRxDatabase
} from 'rxdb';
import {
    getRxStorageSQLite,
    getSQLiteBasicsCapacitor
} from 'rxdb-premium/plugins/sqlite';

/**
 * Import SQLite from the capacitor plugin.
 */
import {
    CapacitorSQLite,
    SQLiteConnection
} from '@capacitor-community/sqlite';
import { Capacitor } from '@capacitor/core';

const sqlite = new SQLiteConnection(CapacitorSQLite);

const myRxDatabase = await createRxDatabase({
    name: 'exampledb',
    storage: getRxStorageSQLite({
        /**
         * Different runtimes have different interfaces to SQLite.
         * For example in node.js we have a callback API,
         * while in capacitor sqlite we have Promises.
         * So we need a helper object that is capable of doing the basic
         * sqlite operations.
         */
        sqliteBasics: getSQLiteBasicsCapacitor(sqlite, Capacitor)
    })
});
```

repository: gvuyk/rxdb

repo_name: gvuyk/rxdb


text:
# Building our User

As we honed our problem statement, we developed a **user persona** to focus our decision making about the product we would build.

###This is Mario:

![Image Title](https://dl.dropboxusercontent.com/u/7894148/Chronicles/mario-persona.jpg)

---

###This is Mario's journey to starting a business:

![Image Title](http://cl.ly/WIjw/unnamed.png)

###Main challenges (as told by our users):

**"I could not borrow money from the bank because MY credit was really bad"**

**"One of the things I know based on my experience is that you have to be properly capitalized. It means you have to have enough money to start"**

**"I didn't have the time to look for incentives and I knew it was going to be all this paperwork to file and I didnt have numbers to back it up."**

repository: CoquiCoders/beta-book

repo_name: CoquiCoders/beta-book


text:
# Getting Started

First, start with the following import:

```scala mdoc
import ch.epfl.scala.Example
```

Then, do nothing with something:

```scala mdoc
Example.doNothing(42)
```

repository: scalacenter/library-example

gha_language: Scala

repo_name: scalacenter/library-example


text:
# Creating an extension to allow custom tags

If you want to use additional tags than the one present in the sanitizer core extensions, you can create your
own extension.

There are two steps in the creation of an extension: creating the node visitor which will handle the
custom tag and registering this visitor by creating an extension class.

To better understand how to create an extension suited to your needs, you can also have a look at the
[HTML5 extension](https://github.com/snebes/html-sanitizer/tree/master/src/Extension/HTML5Extension.php)
which shows the different features available.

## Registering the extension

Once you created an extension, you need to register the extension in the sanitizer.

An extension is a class implementing the `SN\HtmlSanitizer\Extension\ExtensionInterface` interface, which requires
two methods:

- `getName()` which should return the name to use in the configuration (`basic`, `list`, etc.) ;
- and `createNodeVisitors()` which should return a list of node visitors associated to the tag the visit ;

For our node visitor, this could look like this:

```php
namespace App\Sanitizer;

use SN\HtmlSanitizer\Extension\ExtensionInterface;
use SN\HtmlSanitizer\NodeVisitor\TagNodeVisitor;

class MyTagExtension implements ExtensionInterface
{
    public function getName(): string
    {
        return 'my-tag';
    }

    public function createNodeVisitors(array $config = []): array
    {
        return [
            'my-tag' => new TagNodeVisitor($config['tags']['my-tag'] ?? []),
        ];
    }
}
```

Then, you can use the builder to create a Sanitizer that include this extension:

```php
$builder = new SN\HtmlSanitizer\SanitizerBuilder();
$builder->registerExtension(new SN\HtmlSanitizer\Extension\HTML5Extension());
// Add the other core ones you need

$builder->registerExtension(new App\Sanitizer\MyTagExtension());

$sanitizer = $builder->build([
    'extensions' => ['html5', 'my-tag'],
});
```

repository: snebes/html-sanitizer

gha_language: PHP

repo_name: snebes/html-sanitizer


text:
# Varnish

The [Lagoobernetes `Varnish` image Dockerfile](https://github.com/amazeeio/lagoobernetes/blob/master/images/varnish/Dockerfile). Based on the [official `varnish` package](https://hub.docker.com/_/varnish) provided by `alpine:3.7` image.

By default, `vmod-dynamic` and `vmod-bodyaccess` modules are installed.

## Lagoobernetes & OpenShift adaptions

This image is prepared to be used on Lagoobernetes, which leverages OpenShift. There are therefore some things already done:

* Folder permissions are automatically adapted with [`fix-permissions`](https://github.com/sclorg/s2i-base-container/blob/master/core/root/usr/bin/fix-permissions), so this image will work with a random user, and therefore also on OpenShift.

## Included varnish modules

* [`vbox-dynamic`](https://github.com/nigoroll/libvmod-dynamic) - Dynamic backends from DNS lookups and service discovery from SRV records.
* [`vbox-bodyaccess`](https://github.com/aondio/libvmod-bodyaccess) - Varnish `vmod` that lets you access the request body.

## Included `default.vcl` configuration file

The image ships a _default_ `vcl` configuration file, optimized to work on Lagoobernetes. Some options are configurable via environments variables \(see [Environment Variables](../environment_variables.md)\).

## Environment Variables
Environment variables defined in Varnish base image

| Environment Variable         | Default               | Description                                                                            |
| ---------------------------- | --------------------- | -------------------------------------------------------------------------------------- |
| `VARNISH_BACKEND_HOST`       | nginx                 | Default Backend Host                                                                   |
| `VARNISH_BACKEND_PORT`       | 8080                  | Default listening varnish port                                                         |
| `VARNISH_SECRET`             | lagoobernetes_default_secret | Varnish secret used to connect to management                                           |
| `LIBVMOD_DYNAMIC_VERSION`    | 5.2                   | Default version of vmod-dynamic module                                                 |
| `LIBVMOD_BODYACCESS_VERSION` | 5.0                   | Default version of vmod-bodyaccess module                                              |
| `HTTP_RESP_HDR_LEN`          | 8k                    | Maximum length of any HTTP backend response header                                     |
| `HTTP_RESP_SIZE`             | 32k                   | Maximum number of bytes of HTTP backend response we will deal with                     |
| `NUKE_LIMIT`                 | 150                   | Maximum number of objects we attempt to nuke in order to make space for a object body. |
| `CACHE_TYPE`                 | malloc                | Type of varnish cache                                                                  |
| `CACHE_SIZE`                 | 500M                  | Cache size                                                                             |
| `LISTEN`                     | 8080                  | Default backend server port                                                            |
| `MANAGEMENT_LISTEN`          | 6082                  | Default management listening port                                                      |

repository: amazeeio/lagoobernetes

gha_language: JavaScript

repo_name: amazeeio/lagoobernetes


text:
-Arachni-

Arachni is a feature-full, modular, high-performance Ruby framework aimed towards helping penetration testers and administrators evaluate the security of modern web applications.

Website: https://www.arachni-scanner.com/
Github: https://github.com/Arachni/arachni

repository: DefectDojo/sample-scan-files

gha_language: HTML

repo_name: DefectDojo/sample-scan-files


text:
---
external help file: ISEScriptingGeek-help.xml
Module Name: ISEScriptingGeek
online version: http://jdhitsolutions.com/blog/2012/12/create-powershell-scripts-with-a-single-command
schema: 2.0.0
---

# Start-MyScript

## SYNOPSIS

Launch the current script file

## SYNTAX

```yaml
Start-MyScript [[-Path] <String>]
```

## DESCRIPTION

Use this command to launch the current script file with Show-Command. Fill in the form to run the script.

## PARAMETERS

### -Path

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

## INPUTS

### None

## OUTPUTS

### System.Object

## NOTES

Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/

## RELATED LINKS

repository: jdhitsolutions/ISEScriptingGeek

gha_language: PowerShell

repo_name: jdhitsolutions/ISEScriptingGeek


text:
---
external help file: Microsoft.RDInfra.RdPowershell.dll-Help.xml
Module Name: Microsoft.RDInfra.RdPowershell
online version:
schema: 2.0.0
---

# Set-RdsHostPool

## SYNOPSIS
Sets the properties for a host pool.

## SYNTAX

### HP4 (Default)
```
Set-RdsHostPool [-TenantName] <String> [-Name] <String> [-FriendlyName <String>] [-Description <String>]
 [-MaxSessionLimit <Int32>] [<CommonParameters>]
```

### HP5
```
Set-RdsHostPool [-TenantName] <String> [-Name] <String> [-BreadthFirstLoadBalancer] [-MaxSessionLimit <Int32>]
 [<CommonParameters>]
```

### HP6
```
Set-RdsHostPool [-TenantName] <String> [-Name] <String> [-DepthFirstLoadBalancer] -MaxSessionLimit <Int32>
 [<CommonParameters>]
```

### HP3
```
Set-RdsHostPool [-TenantName] <String> [-Name] <String> [-CustomRdpProperty <String>]
 [-UseReverseConnect <Boolean>] [<CommonParameters>]
```

## DESCRIPTION
The Set-RdsHostPool cmdlet sets the properties for the specified host pool. Three parameter sets exist for this cmdlet. First is used to disable user profile disks. The second is used to enable user profile disks. The third is used to set all other properties of the host pool.

## EXAMPLES

### Example 1: Set the host pool to use depth-first load balancing
```powershell
PS C:\> Set-RdsHostPool -TenantName "Contoso" -Name "Contoso Host Pool" -DepthFirstLoadBalancer -MaxSessionLimit 10

TenantName            : Contoso
TenantGroupName       : Default Tenant Group
HostPoolName          : Contoso Host Pool
FriendlyName          :
Description           :
Persistent            : False
CustomRdpProperty     :
MaxSessionLimit       : 10
UseReverseConnect     : True
LoadBalancerType      : DepthFirst
```
This command sets the host pool to use depth-first load balancing, such that incoming users will all be directed to a specific session host until it reaches the MaxSessionLimit, which is specified as 10 in this example. The MaxSessionLimit parameter is a requirement when setting depth-first load balancing since connections will not be distributed to subsequent session hosts until this session limit is reached on the first session host.

### Example 2: Set the host pool to use breadth-first load balancing
```powershell
PS C:\> Set-RdsHostPool -TenantName "Contoso" -Name "Contoso Host Pool" -BreadthFirstLoadBalancer

TenantName            : Contoso
TenantGroupName       : Default Tenant Group
HostPoolName          : Contoso Host Pool
FriendlyName          :
Description           :
Persistent            : False
CustomRdpProperty     :
MaxSessionLimit       : 10
UseReverseConnect     : True
LoadBalancerType      : BreadthFirst
```
This command sets the host pool to use breadth-first load balancing, such that incoming users will be evenly directed across session hosts in the host pool. The MaxSessionLimit parameter is optional since load balancing in breadth-first mode is less restrictive than load balancing in depth-first mode.

### Example 3: Set custom RDP properties for connections to the host pool
```powershell
PS C:\> Set-RdsHostPool -TenantName "Contoso" -Name "Contoso Host Pool" -CustomRdpProperty "use multimon:i:0"

TenantName            : Contoso
TenantGroupName       : Default Tenant Group
HostPoolName          : Contoso Host Pool
FriendlyName          :
Description           :
Persistent            : False
CustomRdpProperty     : use multimon:i:0;
MaxSessionLimit       : 10
UseReverseConnect     : True
LoadBalancerType      : BreadthFirst
```
This command sets custom RDP properties for connections to this host pool.

## PARAMETERS

### -BreadthFirstLoadBalancer
Switch to enable the use of breadth-first load balancing for the host pool. Breadth-first indicates that new user sessions are directed to the session host with the least number of user sessions.

```yaml
Type: SwitchParameter
Parameter Sets: HP5
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -CustomRdpProperty
Specifies Remote Desktop Protocol (RDP) settings to include in the .rdp files for all RemoteApp programs and remote desktops published in this collection.

```yaml
Type: String
Parameter Sets: HP3
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```

### -DepthFirstLoadBalancer
Switch to enable the use of depth-first load balancing for the host pool. Depth-first indicates that new user sessions are directed to the session host with the highest number of user sessions that has not already reached its max session limit.

```yaml
Type: SwitchParameter
Parameter Sets: HP6
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Description
The description for the host pool.

```yaml
Type: String
Parameter Sets: HP4
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -FriendlyName
The friendly name of the host pool to be displayed.

```yaml
Type: String
Parameter Sets: HP4
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -MaxSessionLimit
The maximum number of sessions allowed per session host in the hosr pool. When depth-first mode is set for load-balancing, this value is used to determine when to stop load balancing users to one host and to begin sending users to the next host.

```yaml
Type: Int32
Parameter Sets: HP4, HP5
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

```yaml
Type: Int32
Parameter Sets: HP6
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Name
The name of the host pool.

```yaml
Type: String
Parameter Sets: (All)
Aliases: HostPoolName

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```

### -TenantName
The name of the tenant.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### System.String

## OUTPUTS

### Microsoft.RDInfra.RDManagementData.RdMgmtHostPool

## NOTES

## RELATED LINKS

path: /wvd-templates/Update existing WVD host pool/DSC/DeployAgent/PowerShellModules/Help/Set-RdsHostPool.md


text:
# FSSPEC Reference Maker Talk
### NCAR Earth System Data Science WIP - 2021-09-20
***
## Running locally
The best option to run this notebook is locally, since generating the references can be easily parallelized with Dask

```
git clone https://github.com/lsterzinger/2021-ncar-esds-wip.git
cd 2021-ncar-esds-wip

conda env create -f environment.yml
conda activate fsspec-reference-maker

jupyter lab
```
_Tip: use mamba instead of conda for a faster environment solve_

## Interactive Notebook Links
If desired, the notebook can be run online using Binder/Pangeo. These will probably be much slower than running on a local machine.

| Name | Link | Info |
|------|------|------|
| Binder | [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/lsterzinger/2021-ncar-esds-wip/HEAD?filepath=workshop.ipynb) | Faster to load, but with less computational resources |
| Pangeo | [![Binder](https://binder.pangeo.io/badge_logo.svg)](https://binder.pangeo.io/v2/gh/lsterzinger/2021-ncar-esds-wip/master) | Can be slower to load/build but with more computational resources available |

gha_language: Jupyter Notebook


text:
# November 2021

## Path vs. Insight problems

+ Herbert L. Roitblat (2021), **AI Is No Match for the Quirks of Human Intelligence** → https://thereader.mitpress.mit.edu/ai-insight-problems-quirks-human-intelligence/
  + Discusses the distinction between **path problems** and **insight problems**.
  + > In path problems, the solver is given a representation, which includes a starting state, a goal state, and a set of tools or operators that can be applied to move through the representation. In insight problems, the solver is given none of these.
  + > With path problems, the solver can usually assess how close the current state of the system is to the goal state. Most machine learning algorithms depend on this assessment. With insight problems, it is often difficult to determine whether any progress at all has been made until the problem is essentially solved.
  + > Insight problems are typically posed in such a way that there are multiple ways that they could be represented.
  + > The main barrier to solving problems like this is to abandon the default representation and adopt a more productive one. Once the alternative representation is identified, the rest of the problem-solving process may be very rapid. Laboratory versions of insight problems generally do not require any specific deep technical knowledge. Most of them can be solved by gaining one or two insights that change the nature of how the solver thinks about the problem.

## Algorithms

+ Bouke van der Bijl (2021), **Spreadsheet Formulas for Personal Finance** → https://bou.ke/blog/formulas/
+ Yonatan Kra (2021), **How To Find A Unique Number In A List Of Pairs?** → https://yonatankra.com/how-to-find-a-unique-number-in-a-list-of-pairs/
  + Scroll down to the section, *How to Use Bitwise XOR to find a unique value in a list of pairs in linear time?*
+ Bartosz Sypytkowski (2021), **Deep dive into Yrs architecture** → https://bartoszsypytkowski.com/yrs-architecture/
  > CRDT library used for building collaborative peer-to-peer applications

## Behavioral programming

+ David Harel, Guy Katz, Rami Marelly, and Assaf Marron (2016), **First Steps Towards a Wise Development Environment for Behavioral Models** → https://www.wisdom.weizmann.ac.il/~harel/papers/First%20Steps%20WDE.pdf (PDF)
+ David Harel, Robby Lampert, Assaf Marron, and Gera Weiss (2014), **Model-Checking Behavioral Programs** → https://www.wisdom.weizmann.ac.il/~harel/papers/Model%20checking%20BP.pdf (PDF)

## Design

+ Jay Perlman (2021), **Doodle Ipsum: A New Illustration Tool for Developers** → https://blush.design/blog/post/doodle-ipsum-tool-for-developers
  > A Lorem Ipsum tool for placeholder illustrations
+ Mark Steadman (2021), **A Tangled Web of ARIA** → https://dev.to/steady5063/a-tangled-web-of-aria-50nk
  + ARIA-first development is an anti-pattern, not as maintainable as using semantic HTML, can override native semantics, and is not fully supported by all assistive technologies anyway.
+ Jeff Muller (2020), **Stop Testing Design Candidates** → https://uxdesign.cc/stop-testing-design-candidates-c5c4e66a548f
  > I can teach a designer a new approach.

## Patterns

+ Nasi Jofche (2019), **Using the Command Pattern** → https://betterprogramming.pub/utilizing-the-command-pattern-to-support-undo-redo-and-history-of-operations-b28fa9d58910
> To support undo, redo, and history of operations
+ *leastbad* (2020), **Mutation-First Development: A Call to Action** → https://leastbad.com/mutation-first-development
  1. Developers should create or update libraries and their documentation to assume re-entrancy by default.
  2. A library is not considered high-quality unless it is idempotent. Developers should be able to initialize and destroy an instance many times during a single browser page context, including releasing event handlers and cleaning up/preparing the DOM state for caching during an unload event.
  3. The most celebrated libraries will be atomic, making as few assumptions about DOM structure or CSS framework as possible while allowing several simultaneous instances of the library on a page.

## Anti-patterns

+ Jake Archibald (2021), **Don't use functions as callbacks unless they're designed for it** → https://jakearchibald.com/2021/function-callback-risks/
  > TypeScript doesn't solve this
+ Chuánqí Sun (2021), **The vanishing designer** → https://uxdesign.cc/the-vanishing-designer-6d3d999f9540
  > UX design in the age of destruction standardization.
+ Chuánqí Sun (2018), **Are you experiencing the Kessler Syndrome?** → https://uxdesign.cc/are-you-experiencing-the-kessler-syndrome-23bab3cdd446
  + Describes the front-end ecosystem as the Low Earth orbit polluted to the point of impenetrability by space debris endlessly colliding and creating more space debris.
+ Dillon Shook (2020), **A Critique of React Hooks** → https://dillonshook.com/a-critique-of-react-hooks/

## DOM

+ Jack Jey (2021), **Safe DOM manipulation with the Sanitizer API** → https://web.dev/sanitizer/

## JSDoc for TypeScript (again)

+ Valérian Galliat (2021), **JSDoc: TypeScript inside JavaScript and not the other way around** → https://www.codejam.info/2021/10/jsdoc-typescript-inside-javascript.html

## Privacy

+ Privacy Guides (2021), **The guide to restoring your online privacy.** → https://privacyguides.org/

repository: dfkaye/dev-links

repo_name: dfkaye/dev-links


text:
# AlreadyBuilt     ![](../PDF-DIFFERENCE/Icon/PDF_Delta.ico)

File                                   | Description
---------------------------------------|-----------------------------------------------------------------
PDF-DIFFERNCE.exe                      | The program.
Microsoft.WindowsAPICodePack.dll       | Resource required to be in the same folder as PDF-DIFFERNCE.exe.
Microsoft.WindowsAPICodePack.Shell.dll | Resource required to be in the same folder as PDF-DIFFERNCE.exe.
itextsharp.dll                         | Resource required to be in the same folder as PDF-DIFFERNCE.exe.
itextsharp.xml                         | Resource required to be in the same folder as PDF-DIFFERNCE.exe?
PDF_Delta_Before.pdf                   | A PDF file to try PDF-DIFFERNCE on.
PDF_Delta_After.pdf                    | A PDF file to try PDF-DIFFERNCE on.

Installer  |  Description
--|--
[https://www.imagemagick.org/script/download.php][4b761b88] |  ImageMagick download page. Install the 64 bit version. Make sure to have administrative rights when installing.
[https://www.ghostscript.com/download/gsdnld.html][3b66a2ab]  |  GhostScript download page. Install the 64 bit version. Make sure to have administrative rights when installing.

  [4b761b88]: https://www.imagemagick.org/script/download.php "https://www.imagemagick.org/script/download.php"
  [3b66a2ab]: https://www.ghostscript.com/download/gsdnld.html "https://www.ghostscript.com/download/gsdnld.html"


text:
# luasteam

Lua bindings for SteamWorks API

## Getting Started/Documentation

All our documentation is in [luasteam.readthedocs.io](https://luasteam.readthedocs.io).

## Contributing

Check our [guideline and tips](CONTRIBUTING.md).


text:
# talk-of-europe
Visualisation of Talk-of-Europe data using Pengine and the Swish-Prolog backend

It is very simple to get this example to work in your own environment because you only need a webserver to host html, css, png and js files.

First, the index.html page loads the required libs and css. After that
* the Pengine.js makes connections to the [SWISH Pengine backend](http://linkedpolitics.ops.few.vu.nl/pengine),
* informs it which [prolog file](http://linkedpolitics.ops.few.vu.nl/swish/p/visual2.pl) to use,
* does some prolog queries,
* fetches the results
* and displays them.

repository: rsiebes/talk-of-europe

repo_name: rsiebes/talk-of-europe


text:
dweller
---
[![Build Status](https://travis-ci.org/cloudflavor/dweller.svg?branch=master)](https://travis-ci.org/cloudflavor/dweller)
[![Codecov](https://codecov.io/gh/cloudflavor/dweller/branch/master/graph/badge.svg)](https://codecov.io/gh/cloudflavor/dweller)
[![Documentation](https://godoc.org/github.com/cloudflavor/dweller?status.svg)](http://godoc.org/github.com/cloudflavor/dweller/)
[![Go Report Card](https://goreportcard.com/badge/github.com/cloudflavor/dweller)](https://goreportcard.com/report/github.com/cloudflavor/dweller)

`dweller` manages opinionated virtualized infrastructure on private and cloud environments.

#### Architecture

![dweller arch](assets/dweller-cloudflavor.png)

repository: duzhanyuan/dweller

repo_name: duzhanyuan/dweller


text:
# Changelog

## 5.x.x
##### Released: XXX 2019

### Bugfixes

EPMRPP-40474 - Incorrect message appeared after clicking 'Login with GitHub' if user has been registered as internal user with the same username as he has in GitHub
EPMRPP-52059 - Github login does not work for users with private membership in the organization.

## 3.2.1
##### Released: September, 8 2017

### Bugfixes

* reportportal/reportportal#234

## 3.0.2
##### Released: June, 29 2017

### Bugfixes

* EPMRPP-26051 - Issue with two GitHub and EPAM auth enabled

## 2.7.0
##### Released: XXX 2017

### New Features

* EPMRPP-20577,EPMRPP-20750 - GitHUB settings are moved to database and made configurable through UI
* EPMRPP-23044 - GitHUB user synchronization
* EPMRPP-23477 - Added GitHub integration status to UAT's service info endpoint

### Bugfixes

* EPMRPP-23535 - If GitHub organization is empty, no one can log in
* EPMRPP-23561 - GitHub Auth: Request for update test user profile returns 404 error
* EPMRPP-23532 - Full name should be updated for GitHub user

## 2.6.0
##### Released: October, 2016

### New Features

* Initial release to Public Maven Repositories
* DockerHub Release

repository: reportportal/service-authorization

branch_name: refs/heads/develop

gha_language: Java

repo_name: reportportal/service-authorization


text:
---
layout: post
title: Nominal | A Jekyll Theme
breadcrumb: Nominal
---
## Nominal is a simple, minimal Jekyll theme, perfect for your blog and portfolio. It's built on Svbstrate so it's fast and scalable. Easily hack around to make it your own!

Nominal is set in Open Sans and Georgia, so it's easy on the eyes and the load times. Simple typographic hierarchies look good at any screen size. Nominal also handles images well. Simply add them to your assets folder and insert theme directly into the Markdown of your posts, if you want them inline, or use the two handy *includes* to insert a full width photo or two photos next to each other.

```liquid
{%raw%}{% include blog/images/single.html img="path/to/you/image" img_alt="Alt text for your image" %}{%endraw%}
```

or

```liquid
{%raw%}{% include blog/images/double.html img_1="path/to/you/image" img_1_alt="Alt text for your image" img_2="path/to/you/second/image" img_2_alt="Alt text for your image" %}{%endraw%}
```

Which will output:

{% include blog/images/single.html img="/assets/images/startupstockphoto.jpg"  img_alt="Big, beautiful photos in a Jekyll theme." %}

{% include blog/images/double.html img_1="/assets/images/startupstockphoto2.jpg" img_1_alt="The versatility of Jekyll is really pretty awesome." img_2="/assets/images/startupstockphoto3.jpg" img_2_alt="Photos really can look good in a Jekyll theme." %}

repository: estrattonbailey/Nominal

repo_name: estrattonbailey/Nominal


text:
---
layout: page-breadcrumbs.html
title: Appeal Hearings at the Board
concurrence: complete
plainlanguage: 11-4-16 certified in compliance with the Plain Writing Act
template: detail-page
order: 1
---

Hearings are an optional part of the appeals process. They may add time to your appeal, but if you feel that you need to speak to a Veterans Law Judge (VLJ) about your appeal, the added time may be worthwhile.

What happens in a hearing?

During a hearing, you’ll present your information to a VLJ who has reviewed your appeal file. Hearings aren’t as formal as regular court hearings, but you do provide your testimony under oath, and you can bring a representative with you.

You or your representative can tell the VLJ why you think you qualify for the benefits. You can also submit new evidence at this time. You may answer clarifying questions from the VLJ.

The VLJ doesn’t make a decision at the hearing. A transcript of your hearing is created and added to your appeal file. You’ll be asked in your hearing if you’d like a copy of the transcript for your personal records.

There’s no set amount of time for your hearing.  This person can help you prepare for the hearing and present your information to the VLJ. This person may be a lawyer, a claims agent, or from a Veterans Service Organization (VSO). Search for an accredited representative.

Once you have a representative, you’ll need to let the VA know they have permission to represent you by completing a form.

If your representative is a lawyer or claims agent, fill out the Appointment of Individual as Claimant’s Representative (VA Form 21-22A). Download VA Form 21-22A

If your representative is a VSO, fill out the Appointment of Veterans Service Organization as Claimant’s Representative (VA Form 21-22). Download VA Form 21-22

How do I ask for a hearing?

You can request a hearing at any time in the appeal process.

Veterans who ask to have a hearing usually make the request when completing Form 9. This form asks you to choose one of these options:

No hearing. You have the option to send a letter to the Board.

A videoconference hearing. This takes place at your local VA office (or another facility selected by VA). On average, you’ll get a videoconference hearing faster than you’ll get an in-person hearing.

An in-person hearing at the Board in Washington, DC.

An in-person hearing at your local VA office. This will add a significant amount of time to your appeal as the Travel Board has a limited schedule.

You can also contact your VSO for help requesting a hearing.

When will I have my hearing?

It depends on what type of hearing you request. For example, a videoconference hearing will likely be scheduled much sooner than one with the Travel Board.

You’ll receive a notice in the mail at least 30 days before your hearing is scheduled. It’s best not to send new evidence after you get this notice. You can bring any new evidence with you to your hearing.

What if I have to reschedule my hearing?

Rescheduling In-Person Hearings at the Board in Washington, DC

If you asked for an in-person hearing at the Board, you can send a written request to reschedule your hearing at least 2 weeks before the scheduled hearing date.

If your hearing has already been rescheduled before, or you are within 2 weeks of the scheduled hearing date, you must file a motion requesting that the hearing be rescheduled. You can do this by sending a letter explaining that you have “good cause” to reschedule. “Good cause” includes situations in which you, your representative, or a witness are sick, or you have difficulty getting records needed for your appeal. A VLJ will review your motion and decide if the hearing can be rescheduled. You’ll get a copy of the decision about rescheduling your hearing in the mail.

Rescheduling Travel Board or Videoconference Hearings

If you asked for a Travel Board or videoconference hearing with the Board, you must file a motion if you want to request that the hearing be rescheduled. This needs to happen at least 2 weeks before the scheduled hearing date. You can do this by sending a letter that explains you have “good cause” to reschedule. “Good cause” includes situations in which you, your representative, or a witness are sick, or you have difficulty getting records needed for your appeal. A VLJ will review your motion and decide if the hearing can be rescheduled. You’ll get a copy in the mail of the decision about rescheduling your hearing.

Any request to reschedule must be in writing and be mailed to:

  Director, Office of Management, Planning and Analysis (014)

  Board of Veterans’ Appeals

  PO Box 27063

  Washington, DC 20038

If you’re able to reschedule your hearing, you’ll receive a notice at least 30 days before the new hearing date.

What if I have to cancel my hearing?

If you need to cancel your hearing, please send a letter to the Board at least 2 weeks before your hearing, so the VLJ can hear another appeal at that time. The VLJ will make a decision based on the information you’ve provided in your appeal.

Send the letter to:

  Director, Office of Management, Planning and Analysis (014)

  Board of Veterans’ Appeals

  PO Box 27063

  Washington, DC 20038

repository: lzim/vets-website

repo_name: lzim/vets-website


text:
# Contributing

This document outlines how to get the application set up
and how we continuously ship working software.

## External Contributions

This document outlines the process for members of the Code for
America development team and other partners.

While this project is open source,
we are not currently seeking external contributions.
If you would like to learn more about this project,
please email<EMAIL_ADDRESS>
## Getting Set Up

### macOS

Install [Homebrew].

Install [Heroku CLI].

`brew install heroku/brew/heroku`

Install and start PostgreSQL.

`brew install postgresql`

`brew services start postgresql`

[Homebrew]: https://brew.sh/
[Heroku CLI]: https://devcenter.heroku.com/articles/heroku-cli

### Ruby on Rails

This application is built using [Ruby on Rails].

Your system will require [Ruby] to develop on the application.

The required Ruby version is listed in the [.ruby-version](.ruby-version) file.

If you do not have this binary, [use this guide to get set up on MacOS].

[Ruby on Rails]: http://rubyonrails.org
[Ruby]: https://www.ruby-lang.org/en/
[use this guide to get set up on MacOS]: http://installfest.railsbridge.org/installfest/macintosh

### Configuring the Application

* After cloning this repo, run: `bin/setup`.

## Day-to-day Development

### Local Server

* Run the server(s): `foreman start`
* Visit [your local server](http://localhost:3000)
* To preview any emails that were sent while testing locally, visit the [running mailhog instance](http://localhost:8025/)
* Run tests, Rubocop, bundle audit, and Brakeman: `rake`

### Conventions

* **Secrets** - api keys and secrets should be placed in `config/secrets.yml` and
  referenced via Rails' secrets api. Eg: `Rails.application.secrets.an_api_key`.
* **Environment variables** - required environment variables for development should be included in the `.env` file.

    When adding a new required environment variable, update `.env.sample`. When preparing a development environment for the first time, copy `.sample.env` as `.env` and replace any required values.

### Step Navigation

This application is a long questionnaire. You will probably want to work on parts of
it without completing the whole application.

After booting the server and filling out the first few questions,
go to `http://localhost:3000/sections` to jump around.

If [running the application in single-program application mode](#single-program-mode)
navigation can instead be found at `http://localhost:3000/steps` after completing
the first few questions.

### Single-program mode

A previous iteration of MichiganBenefits.org featured single-program applications
for SNAP and Medicaid, instead of one integrated application.

It's still possible to run the application in single-program mode. To do set, set `SINGLE_PROGRAM_APPLICATIONS_ENABLED=true` in the environment before
starting the server (e.g. `SINGLE_PROGRAM_APPLICATIONS_ENABLED=true foreman start`).

### Testing

#### Running specs

For development purposes, we generally just run `rspec`.

By default, running `rspec` excludes:

* Accessibility checks (enabled with `RUN_ACCESSIBILITY_SPECS=true`)

Because of the length of time it takes to run accessibility checks, we only run them on CI.

Feature tests for single-program mode applications can be disabled by excluding specs
with the `single_app_flow` tag (e.g. `rspec --tag ~single_app_flow`). Since this
codepath is no longer in active development, it's recommended to add the tag exclusion
to your local `.rspec` config.

#### Spec Helpers

* Use `with_modified_env` to modify an env variable for one test:

```ruby
with_modified_env INVITATION_CODE: "inv-code", INVITATIONS_ENABLED: "true" do
  post :create, user: { name: "Alice", invitation_code: "wrong-code" }
  expect(flash[:alert]).to equal "Invalid invitation code"
end
```

* Use `match_html` to test that two HTML strings match, excluding whitespace, order of attributes, etc.:

```ruby
expect(rendered).to match_html <<-HTML
  <table class="foo bar">
  <tr>
  <td>Hi!</td>
  </tr>
  </table>
HTML
```

### Document / Photo Uploading Details

* The file uploading service is called [Shubox]. The [dashboard] can be
accessed with account info found in 1password. Contact [@jayroh] for any
questions or issues related to Shubox.
* The file limit is currently set to 8MB. That can be bumped up if we notice
that people are often taking photos or attaching documents larger than that.
* The file formats currently allowed as "Documents" consist of:
  * .gif
  * .jpg
  * .pdf
  * .png

[Shubox]: https://shubox.io
[dashboard]: https://dashboard.shubox.io
[@jayroh]: https://github.com/jayroh

### Rebuilding the Docker image for CI

To run tests and other checks on Circle CI, we use a custom Docker image hosted on [Docker Hub](https://hub.docker.com/r/chartsockcfa/michigan-benefits-ci/).

To update this image (for example, when we update our version of ruby in the app):

* cd into `.ci`
* Make any required updates to the Dockerfile (updating base image, adding dependencies, etc.)
* With [Docker for Mac](https://www.docker.com/docker-mac) running, type `docker build` in Terminal to build the image
* Push the image with a unique tag to Docker Hub (with tag) via instructions [here](https://ropenscilabs.github.io/r-docker-tutorial/04-Dockerhub.html)
* Update the image tag in our Circle CI config at `.circleci/config.yml`

### Admin dashboard

Our admin dashboard is built with [administrate].

In order to access the admin dashboard in any environment, you'll need an
`AdminUser` account.

To add new users on staging and production, those with Heroku access can create
accounts via Heroku console. Example:

```
heroku run rails c -r staging
AdminUser.create!(email<EMAIL_ADDRESS>password: SecureRandom.base64)
```

If you are creating an account for someone else, you can instruct them to visit
`/admin_users/password/new` (eg:
https://staging.michiganbenefits.org/admin_users/password/new) and enter their
email address. Submitting the form on that page triggers a password reset email.

Require any users to enable two-factor authentication on account setup.

[administrate]: https://github.com/thoughtbot/administrate

### Styleguide/Branding
This application was designed using an Atomic design system.

The styleguide is a modified version of the [GetCalFresh Styleguide](http://demo.getcalfresh.org/styleguide).

A Rails gem version of the base styles can be found at [https://github.com/codeforamerica/cfa-styleguide-gem](the CfA Styleguide Gem repository).

### Deploying

See [DEPLOYING.md](DEPLOYING.md)

repository: codeforamerica/michigan-benefits

gha_language: Ruby

repo_name: codeforamerica/michigan-benefits


text:
# Meetings and Events

This page lists past and future meetings of the Probabilistic Numerics
community.

## 2021
* *October 24 - 29*
  [Dagstuhl Seminar: Probabilistic Numerical Methods - From Theory to Implementation](https://www.dagstuhl.de/en/program/calendar/semhp/?semnr=21432) at Schloss Dagstuhl in Wadern, Germany. Organized by Philipp Hennig, Ilse Ipsen, Maren Mahsereci and Tim Sullivan supported by Jonathan Wenger.
* *August 16 - 20*
  Special session Probabilistic Numerical Methods at [MCM 2021](https://www.uni-mannheim.de/mcm-2021/) in Mannheim, Germany. Organized by Jon Cockayne and Toni Karvonen.

## 2020
* *March 24 - 27*
  [Minisymposia on Probabilistic Numerical Methods](SIAMUQ2020) at [SIAM Conference on Uncertainty Quantification](https://siam-uq20.ma.tum.de/)
  Organized by Alex Diaz, Chris Oates, Toni Karvonen, Alexandra Gessner, Philipp Hennig, and Tim Sullivan.

## 2019
* *May 19 - 22*
  Minisymposium Probabilistic Numerics and Kernel-Based Methods at [Approximation Theory 16](https://my.vanderbilt.edu/at16/) in Nashville, Tennessee, USA. Organized by Toni Karvonen.
* *July 8 - 12*
  Special session Probabilistic Numerical Methods at [MCM 2019](http://www.mcm2019.unsw.edu.au/) in Sydney, Australia. Organized by Jon Cockayne and Toni Karvonen.

## 2018
* *16 - 19 April*
  [Minisymposium on Probabilistic Numerical Methods for Quantification of Discretization Error](http://meetings.siam.org/sess/dsp_programsess.cfm?SESSIONCODE=63606) at the [SIAM Conference on Uncertainty Quantification](https://www.siam.org/meetings/uq18/) in Garden Grove, California.
  Organized by Tim Sullivan, Philipp Hennig, Chris Oates and Mark Girolami.
* *11 - 13 April*
  [SAMSI-Lloyds-Turing Workshop on Probabilistic Numerics](https://prob-num.github.io) at the Alan Turing Institute in London, UK.
  Organized by Chris Oates and Tim Sullivan.

## 2017
* *June 18 - 23*
  [Dobbiaco Summer School on Probabilistic Numerics](http://www.dmi.units.it/dobbiaco/)
  at the [Hotel Union](http://hotelunion.it) in Dobbiaco, Italy.
  Organized by Alfredo Bellen, Stefano Maset and Marino Zennaro (University of Trieste) and Alexander Ostermann (University of Innsbruck).
  Taught by Philipp Hennig & Mark Girolami.
* *June 5 - 9*
  Seminar on [Probabilistic Scientific Computing: Statistical inference approaches to numerical analysis and algorithm design](https://icerm.brown.edu/topical_workshops/tw17-4-psc/)
  at [ICERM (the Institute for Computational and Experimental Research in Mathematics)](https://icerm.brown.edu/home/), Brown University, Providence, Rhode Island.
  Organized by Philipp Hennig, George Em Karniadakis, Michael A Osborne, Houman Owhadi and Paris Perdikaris.

## 2016
* *9 December*
  [Optimizing the Optimizers](NIPS2016) @ [NIPS 2016](https://nips.cc/Conferences/2016)
  in Barcelona, Spain. Organized by Maren Mahsereci, Alex Davies and Philipp Hennig.
* *18 August*
  [Probabilistic Numerics](MCQMC2016) @
  [MCQMC 2016](http://mcqmc2016.stanford.edu)
  at Stanford University, California. Organized by Mark Girolami and François-Xavier Briol.
* *7 January*
  [Probabilistic Numerics: Integrating Inference With Integration](MCMSki2016) @  [MCMSki](http://www.pages.drexel.edu/~mwl25/mcmskiV/index.html)
  in Lenzerheide, Switzerland. Organized by Michael Osborne, Chris Oates and François-Xavier Briol.

## 2015
* *11 December*
  [Probabilistic Integration](NIPS2015) @ [NIPS 2015](https://nips.cc/Conferences/2015)
  in Montréal, Canada. Organized by Michael Osborne and Philipp Hennig.

* *14 - 18 September*
[Probabilistic numerical analysis of differential equations](http://scicade2015.math.uni-potsdam.de/scicade2015/minisymposiadetails.html#MS22)
hosted by [SciCADE](http://scicade2015.math.uni-potsdam.de/scicade2015/index.html) in Potsdam, Germany. Organised by Ben Calderhead.

* *21 April*
  [Probabilistic Numerics for Differential Equations](http://www2.warwick.ac.uk/fac/sci/statistics/crism/workshops/probnumerics)
  at the University of Warwick, UK. Organized by Mark Girolami, Philipp Hennig, Chris Oates and Michael Osborne.

* *10-12 April*
  [Probabilistic Numerics @ Data, Learning and Inference (DALI)](LaPalma2015)
  on La Palma, Canary Islands. Organized by Philipp Hennig, Michael Osborne and Mark Girolami.

## 2014

* *21/22 August*
  [Roundtable on Probabilistic Numerics](RoundtablePN2014)
  hosted by the
  [Max Planck Institute for Intelligent Systems](http://is.tuebingen.mpg.de) in
  Tübingen, Germany. Organized by Philipp Hennig and Michael Osborne.

## 2012

* *8 December*
  [Inaugural NIPS Workshop on Probabilistic Numerics](NIPS2012)
  hosted by [Advances in Neural Information Processing Systems 2012](http://nips.cc/Conferences/2012/),
  Lake Tahoe, Nevada, USA. Organized by Philipp Hennig, Michael A Osborne and John P Cunningham.

```{toctree}
---
maxdepth: 1
hidden:
---

SIAMUQ2020
NIPS2016
MCQMC2016
MCMSki2016
NIPS2015
LaPalma2015
RoundtablePN2014
NIPS2012
```

repository: christopheroates/probnum

gha_language: Python

repo_name: christopheroates/probnum


text:
# target-schedule-exporter
This is a Chrome Extension that grabs the calendar data from Target's employee selfservice website and puts it in Google Calendar.

## Usage
If you're not logged-in to your Google account, either sign in or click the "Authorize Me!" button beneath the calendar. Then, all you need to do is click the export button.

![preview](images/preview.gif)

repository: jgollhardt/target-schedule-exporter

repo_name: jgollhardt/target-schedule-exporter


text:
# Nodejs Examples

## Table of contents
* [Requirements](#requirements)
* [Installing](#installing)
* [Running](#running)
    * [Sample scripts](#sample-scripts)
* [Examples](#examples)
    * [Simple voice campaign](#simple-voice-campaign)
    * [Send sms](#send-sms)
    * [Click2Call Full Web Demo](#click2call-full-web-demo)
    * [Create ClickToCall](#create-clicktocall)
* [Further help](#further-help)

- - -

## Requirements
* nodejs >= 0.7.0 [available here](https://nodejs.org/)
* npm - node package manager ( installed by default with nodejs )
* CALLR npm package [available here](https://www.npmjs.com/package/callr)

---

## Installing
1. To get started with the CALLR npm package, first create your project directory then base project files using `npm init`.
**npm init** initialises the project with a *package.json*, which contains meta data about your project or app, including modules needed for it to run.
    ```
    // create your project
    $ mkdir myproject
    $ cd myproject
    $ npm init
    ...
    About to write to /working/myproject:
    {
        "name": "myproject",
        "version": "1.0.0",
        "description": "",
        "main": "index.js",
        "scripts": {
            "test": "echo \"Error: no test specified\" && exit 1"
        },
        "author": "",
        "license": "ISC"
    }
    Is this ok? (yes)
    ```

2. Install and add the CALLR SDK to your application dependencies.
    ```
    $ npm install --save callr
<EMAIL_ADDRESS>/working/myproject
    `--<EMAIL_ADDRESS>
    npm WARN<EMAIL_ADDRESS>No description
    npm WARN<EMAIL_ADDRESS>No repository field.
    ```
3. require the CALLR sdk in your project source to begin using.
    ```javascript
    var callr = require('callr');
    var api = new callr.api('login', 'password');

    api.call('system.get_timestamp').success(function(response) {
        // success callback
    }).error(function(error) {
        // error callback
    });
    ```

---
## Running

Export your CALLR credentials as environment variables:
```
// bash
$ export CALLR_LOGIN=<your_login>
$ export CALLR_PASS=<your_password>

// windows cmd
c:\> set CALLR_LOGIN=<your_login>
c:\> set CALLR_PASS=<your_password>
```

### Sample scripts
Located in `scripts/`

* send-sms.js - send an sms message to destination
    * *node send-sms -t <destination number> -m '<message>'*
* media.js - manage media, upload media files, create TTS media
    * *node media -h* // display help
    * *node media <command> -h* // display command help
* campaign.js - manage campaigns, create / list / delete
    * *node campaign -h* // display help
    * *node campaign <command> -h* // display command help
* address.js - manage address books, upload / list / delete
    * *node address -h* // display help
    * *node address <command> -h* // display command help
* click2call.js - list, create and start click2call applications
    * *node click2call -h* // display help
    * *node click2call <command> -h* // display command help

- - -

## Examples

### Simple voice campaign
This will guide you through the commands and output needed to create a simple voice campaign, that utilises 2 different sources of media.

1. Upload our pre-recorded mp3 and create our TTS media
    ```
    // upload mp3
    $ node media upload samples/sample-recording.mp3 -n 'mp3 recording'
    Import job id: 358c1467123456789123456789ABCDEFG, mp3 recording
    Media uploaded: mp3 recording, id: 1012345

    // create tts voice message
    $ node media create-tts -n 'my tts' -t 'Hello, welcome to our simple voice campaign' TTS_EN-GB_SERENA
    media created, id: 1023456
    ```

2. We can check our media library to make sure the creation was successful.
    ```
    // list media library contents
    $ node media list
    ...
    media id: 1012345, name: mp3 recording, content: , voice: NONE, source: API_IMPORT
    media id: 1023456, name: my tts, content: Hello, welcome to our simple voice campaign, voice: TTS_EN-GB_SERENA, source: TTS
    ```

3. Next we need to upload our addressbook, this is done with the *address.js* script:
    ```
    // upload addressbook
    $ node address upload -c FR -n "my addressbook" -p 2 samples/sample-addressbook.csv
    Import job id: 358c146764abcdefghijklmno123, my addressbook
    Addressbook LH9Q92DC - my addressbook successfully uploaded.
    ```
    *  _**-c**_ determines the country code for the phonenumbers listed in the addressbook
    *  _**-p**_ is the zero based index of the phonenumbers column in the csv/excel document.
    ( see *node address upload -h* for more information )

4. We can list our addressbooks to confirm the upload, or view the ids of already imported addressbooks:
    ```
    // list addressbooks
    $ node address list
    id: LH9QABCD - name: my addressbook, items_count: 5, imported: 2016-01-01 12:00:00
    Total of 1 addressbooks found
    ```

5. Next we create our simple voice campaign using the campaign script, using the addressbook id, and media ids.
    ```
    // create voice campaign
    $ node campaign create -t 'my simple voice campaign' -a LH9Q92DC -m 1012345,1023456 VOICE_SIMPLE
    Campaign created ID: QRTCA1B2
    ```
    * _**-t**_ is our name for the campaign
    * _**-a**_ determines which addressbook to use for the campaign
    * _**-m**_ denotes a comma separated list of media files to use for said campaign
    * _**VOICE_SIMPLE**_ denotes the type of campaign we are creating
    ( see *node campaign create -h* for more information )

6. With our returned campaign id, we can perform different operations, start / stop / pause, retrieve the config or view the status. ( see node campaign -h for more information )
    ```
    // show campaign status
    $ node campaign status QRTCBFTO
    {
    "run_id": 1,
    "state": "CREATED",
    "finished_cause": "NONE",
    "finished_cause_data": null,
    "percent": 0,
    "items_done": 0,
    "items_total": 5,
    "items_total_t": 5,
    "counters": {
        "broadcast": {
            "completed": 0,
            "history": {}
        },
        "cost": "0.00",
        "call_status": {
            "ANSWERED/COMPLETE": 0,
            "ANSWERED/INCOMPLETE": 0,
            "ABSENT/NO_ANSWER": 0,
            "ABSENT/BUSY": 0,
            "ABSENT/VOICEMAIL_DETECTED": 0,
            "ERROR/UNALLOCATED_NUMBER": 0,
            "ERROR/REJECTED": 0,
            "ERROR/BLACKLISTED": 0,
            "ERROR/OTHER": 0
    ...
    "scheduled": false,
    "started_at": "0000-00-00 00:00:00",
    "ended_at": "0000-00-00 00:00:00",
    "reports": [],
    "state_history": []
    }
    ```

### Send sms
To send a sms, use the send-sms.js script
```
$ node send-sms.js -t +33123456789 -m "Hello, from test sms!"
sms sent id: 6CQLABCD
```

### Click2Call full web demo
Please see the README [here](click2call-web/README.md) for more information on running the full Click2Call web demo application.

### Create ClickToCall
To create a simple click to call application, use *click2call.js*, here we will create a click to call application
with a tts media that will be played to person A before they are connected to person B.

For more information on the Click to Call api, see the [documentation here](http://thecallr.com/docs/api/services/clicktocall/calls/)
and [related objects here](http://thecallr.com/docs/objects/#CLICKTOCALL10).

1. Create our tts media file, with a simple greeting. ( see [Sample scripts](#sample-scripts) for more information on using the media script )
    ```
    $ node media create-tts -t 'Hello, connecting you to home base, please hold' -n 'my greeting' TTS_EN-GB_SERENA
    media created, id: 1051111
    ```

2. Create the click to call application, passing the media to be played to callee A before connecting them to callee B
    ```
    $ node click2call.js create -m 1051111 'my click2call application'
    Click2Call app created, id: N9BUABCD  name: my click2call application
    ```

3. Start the click to call application, passing the 2 telephones to be connected
    ```
    $ node click2call.js start -a +33123456789 -b +33123456987 N9BUABCD
    Click2Call application started, call id: PHABCD1U
    ```

4. A call will be first placed to person A, and the media file passed to Click to call creation will be played before being connected with person B.

---

## Further help
* You will find API documentation and snippets here at [http://thecallr.com/docs/](http://thecallr.com/docs/)
* Or in our github repository [https://github.com/THECALLR/](https://github.com/THECALLR/)
* nodejs sdk github here ([https://github.com/THECALLR/sdk-nodejs](https://github.com/THECALLR/sdk-nodejs))
* nodejs examples here ([https://github.com/THECALLR/examples-nodejs](https://github.com/THECALLR/examples-nodejs))

If you have any further questions or require assistance with these examples, please contact CALLR Support
*<EMAIL_ADDRESS>* FR: +33 (0)1 84 14 00 30

- - -

license: ISC

repository: THECALLR/examples-nodejs

repo_name: THECALLR/examples-nodejs


text:
# Hacker News

  ## Badge

  ![Badge](https://img.shields.io/badge/license-MIT-green.svg)

  ## Description

  A ReactJs and JS front-end application for searching Hacker News.

  ## Table of Contents

  - [Installation](#Installation)
  - [Usage](#Usage)
  - [Technologies](#Technologies)
  - [Questions](#Questions)
  - [License](#License)

  ## Installation

  ```bash
  To get started clone repo and save to desired location. From the command line, navigate to the 'hackernews' folder. Then, run npm i to install packages and npm start to get up and running.
  ```

  [Back to Table of Contents](#table-of-contents)

  ## Usage

  To use, enter a search term and click search.  News stories containing the search term will populate the page.  Searches are saved in session storage and session storage data populates the Search History page upon navigation to that page.

  View and try out the deployed application [here](https://jnel-221.github.io/hackerNews/#/hackerNews/)!

  Mobile-responsive views of Search and History pages:
  ![Hacker News Search page](./assets/searchpage.png)

  ![Hacker News History page](./assets/searchHistory.png)

  [Back to Table of Contents](#table-of-contents)

  ## Technologies
  ReactJS, React-router-dom, Axios, MomentJS, JavaScript, React-bootstrap, Bootstrap, and the Hacker News Algolia API.

  [Back to Table of Contents](#table-of-contents)

  ## Questions

  Questions? You can reach me by email at<EMAIL_ADDRESS>Feel free to check out additional projects at [my GitHub profile](https://github.com/jnel-221).

  [Back to Table of Contents](#table-of-contents)

  ## License

  This project is licensed under the terms of the [MIT](LICENSE) license.

  [Back to Table of Contents](#table-of-contents)


text:
---
layout: default
---

# 1995-12-06 - Compliance Audits

## Header Data

From<EMAIL_ADDRESS>(Timothy C. May)

To<EMAIL_ADDRESS>Message Hash: af67d721ca7d6348dda6b51271c563834a9db6179250281a9527cdd8b6a05819

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1995-12-06 16:50:35 UTC

Raw Date: Wed, 6 Dec 95 08:50:35 PST

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Timothy C. May)
Date: Wed, 6 Dec 95 08:50:35 PST
To<EMAIL_ADDRESS>Subject: Compliance Audits
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

(This is just a tangential thought, inspired by someone's commentary. Not a
substitute for first principles argument.)

At 3:53 PM 12/6/95, Brad Dolan wrote:

>Firearms dealers are requred to keep records of purchases.  In theory
>(and by law) they don't pass these records along to the authorities
>except in response to specific inquiries.
>
>However, in the last couple of years there have been numerous reports of
>mass copying of records by BATF or surrogates (specifics on request).
>
>And when a firearms dealer goes out of business, all records go to the BATF.
>
>So there is something of a precedent.

One FFL holder reported someplace (?) that when he drops out of the
business--soon, as the licensing and reporting requirements, plus the fees,
have risen a lot--he expects to have an accidental "office fire" to destroy
the boxes of records he's kept for the last 20 years.

I think BATF is currently too preoccupied with other more pressing matters
to go around and conduct "compliance audits," but such audits are likely to
increase in the future. (Especially as the new FFL licensing rules and fees
squeeze the number of FFL holders down to a "manageable" level, which was
one of the stated reasons for cranking up the fees and tightening the
reporting requirements a while back.)

The connection with crypto and key escrow is that licensed escrow agents
(Big Brother Inside) will likely face compliance audits. Some random amount
of traffic may even be opened to ensure compliance.

(More speculatively, the rules may be written so that compliance audits are
done on the traffic of end-users, with some fraction opened and the
contents measured to ensure they are readable. The old "Use a random
number, go to jail" scenario.)

--Tim May

Views here are not the views of my Internet Service Provider or Government.
---------:---------:---------:---------:---------:---------:---------:----
Timothy C. May              | Crypto Anarchy: encryption, digital money,
<EMAIL_ADDRESS>408-728-0152 | anonymous networks, digital pseudonyms, zero
Corralitos, CA              | knowledge, reputations, information markets,
Higher Power: 2^756839      | black markets, collapse of governments.
"National borders are just speed bumps on the information superhighway."

{% endraw %}
```

## Thread

+ Return to [December 1995](/archive/1995/12)

+ Return to<EMAIL_ADDRESS>(Timothy C. May)](/authors/tcmay_at_got_net_timothy_c_may_)"

+ 1995-12-06 (Wed, 6 Dec 95 08:50:35 PST) - Compliance Audits -<EMAIL_ADDRESS>(Timothy C. May)_


text:
---
title: TiDB Operator
summary: Learn about TiDB Operator, the automatic operation system for TiDB clusters on Kubernetes.
aliases: ['/docs/tidb-in-kubernetes/dev/']
---

# TiDB Operator

[TiDB Operator](https://github.com/pingcap/tidb-operator) is an automatic operation system for TiDB clusters on Kubernetes. It provides full life-cycle management for TiDB including deployment, upgrades, scaling, backup, fail-over, and configuration changes. With TiDB Operator, TiDB can run seamlessly in the Kubernetes clusters deployed on a public or private cloud.

Currently, the TiDB Operator documentation (also named as TiDB on Kubernetes documentation) is independent of the TiDB documentation. To access the documentation, click the following link:

- [TiDB on Kubernetes documentation](https://docs.pingcap.com/tidb-in-kubernetes/stable/)


text:
### [CVE-2010-1140](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-1140)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

The USB service in VMware Workstation 7.0 before 7.0.1 build 227600 and VMware Player 3.0 before 3.0.1 build 227600 on Windows might allow host OS users to gain privileges by placing a Trojan horse program at an unspecified location on the host OS disk.

### POC

#### Reference
- http://www.vmware.com/security/advisories/VMSA-2010-0007.html

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

repository: trickest/cve

repo_name: trickest/cve


text:
---
layout: page-fullwidth
title: "Upgrade Your Life, Non-Geek"
subheadline: Book
teaser: Does grandma ask you to explain smartphones, blogs, and twitter? Buy her this book.
date: "2015-03-24 05:28"
category: book
---

**Table of Contents**
{: #toc }
*  TOC
{:toc}

An in-progress publication through leanpub, [Upgrade Your Life, Non-Geek][1] walks the average, non-technical reader through the current technical big issues, with the goal of improving their life through the skilled application of technology.

[1]:https://leanpub.com/upgrading-your-life-non-geek

## Who This Book Is For

The book is intended as a reference guide for non-geeks who **want** to be just a bit more geeky, enjoying the life-improving benefits of technology that everyone else is always talking about.

## What You Will Learn

* Feel confident that your digital assets (your stuff) is backed up and secure
* Take better photos, control how they're shared
* Share important stuff with important people, but not with the nasty people


text:
single_fw/fws11/internal_gateway/fws11 - Primary/internal_endpoint/<IP_ADDRESS>

## bugs

### bug: auto login after session expired does not work

Unexpected error 'UnicodeEncodeError'

## export full conf

- transform all urls into hname
- follow recursively urls and export them (only if not system)
- identify read-only parameters
- discards "links", "key"...
- follow recursively links and export them
- nice to have: simplify objects by comparing with a default object

## features to add

### wait for policy to be published/report error

policy push from the cli with progress bar

### hname containing regexp or wildcard

ideas for the syntax:

contains the word LogServer

    '#log_server/~LogServer'

Starts with LogServer

    '#log_server/LogServer*'

Regex

    '#log_server/LogServer.+'

### filter get result with xpath

using an xpath expression

    smc-script get 'fw_policy/AAAA/fw_ipv4_access_rules/Rule @106.4' -q "action['@action']"

or simply a dotted notation

    smc-script get 'fw_policy/AAAA/fw_ipv4_access_rules/Rule @106.4' -q "destinations.dst"

### simplify get result

skip

- false values
- links
- key, read_only, system

### handle concurrent update exception

reload with correct etag, reapply pending changes and reattempt update

### href to hname in get display (reverse resolve in get)

- at least for elements

### 'get' cli command outputs python api

- generates automatically the python script of an existing element

### 'get' with wildcard

eg get all the access rules

    smc-script get 'fw_policy/AAAA/fw_ipv4_access_rules/*'

### write tests

- check exit status
- at least run automatically all the examples

### log cli command

- view
- and control the log verbosity/shows log
- delete log

### bash completion

-

### config script in yaml

-

### config script in json

-

### automatically prefix all names

-

### scripted login/logout

-

### cache resolved hname for performance

-

### python3 support

-

## nice to have

- pluggable template engine (jinja2...)

## ansible integration

write the config as ansible playbook

eg

https://github.com/F5Networks/f5-ansible/blob/devel/examples/0000-getting-started/playbook.yaml

## smc-mount

mount the smc conf as a fusefs. Navigate in the config using regular
unix commands:
- cd
- cat
- rm
- mv

## write more examples

- virtual engine
- policy based vpns
- cloud scaleset (sg_smc_create_engine replacement)

---

## moka template, variable expand command line

    host "myhost1" {
        ipv6_address = ${ip}
    }

    smc-script run myscript.conf --ip <IP_ADDRESS>

## done

- command in conf file (eg add route)
- update object (eg routing table)
- test add dns server
- test add default route
- test dhcp relay
- test cluster
- cloud use case (sg_smc_create_engine replacement)
- logging file ~/.config/smc-script/
- session ~/.config/smc-script/session
- restore session ~/.config/smc-script/session
- command execute
- update
- get
- logout
- list
- autologin using ~/.smcrc (case no session/session expired)
- https from cli
- login specify version
- logout
- error handling
- delete mode, where the script 'apply' deletes all the objects
- apply get from stdin: here-doc command from bash
- strict mode  (stop on first error)
- improve output of 'apply' to see which command has failed
- login fail 401 proper displayed message
- list hname at any level
- hname resolve code more generic
- rb vpn example
- variable from env. eg     export CNF_VAR_ip="<IP_ADDRESS>"
- variable from file matching *.cnfvars
- variable from file  '--var-file='
- exit status is incorrect on error
- list available versions on the cli
- make the working version available in a variable to have conditionals

repository: yherve/smc-script

repo_name: yherve/smc-script