text:
dial
====

A UI dial component for use with [component](https://github.com/component/component). Bind to an input field and turn it into a sleek dial.

Tested in Chrome, Firefox, Safari, Opera, IE9+

[Check out the related button component](https://jsantell.github.com/button)

[View Example](http://jsantell.github.com/dial)

## Installation

```
component install jsantell/dial
```

## API

### new Dial(input, [options])

Create a new dial instance, linked to `inputEl`. May also pass in an options object, details in options section. Upon instantiation, the dial is rendered, the input is hidden, and events are bound to the dial.

```js
var Dial = require('dial');
var input = document.getElementById('inputEl');
var dial = new Dial(input, {
  min: -25,
  max: 25
});
```

### Dial#set(val)

If `val` is within the allowed range, it is set on the input field and the dial is updated accordingly. A `change` event is fired with the `val` passed in as the only argument.

### Dial#render()

Reconstructs the dial's `el` property containing the dial element. Already called during instantiation.

### Dial#bind()

Binds events necessary for the dial -- also binds mouseup and mousemove to `document` if this is the first dial. Already called during instantiation.

### Dial#unbind()

Unbinds the events related to the dial.

### Dial#hideInput()

Hides the corresponding input field. Already called on instantiation.

### Dial#showInput()

Displays the corresponding input field. Called on destroy, or call it manually to display the element.

### Dial#destroy()

Destroys the dials element, reveals original input element and unbinds dial events

## Events

Dial inherits from [Emitter](https://github.com/component/emitter), so all emitter methods apply. By default, only a `change` event is fired when the dial's value changes, which can be hooked into via:

```js
var dial = new Dial(input);
dial.on('change', function (val) {
  console.log('Dial value is now: ' + val);
});
```

## Options

Configuration options can be set up via the option object in the constructor, data attributes in the input element, or by default -- this is also the order in which they're checked on a property by property basis.

Using options object:

```js
var dial = new Dial(input, {
  min: -10,
  max: 10,
  value: 0,
  float: true,
  increment: 0.5
});
```

Or using data attributes (and value) on an input element:

```
<input type="text" data-min="-10" data-max="10" float="true" data-increment="0.5" value="0" />
```

Or just falling back to defaults which are:

```js
min   : 0
max   : 10
value : 5
float : false
increment : // 1/25th of the range between min and max
```

repository: jsantell/dial

repo_name: jsantell/dial


text:
# What If - Extreme Programming Experiments

This is a curated series of videos which explores extreme programming techniques you can submit additions to.

Here is a non exhaustive list of video series recorded so far:

- [What if we exclusively do property based testing](https://youtu.be/R9TkFRsktVk)
- [What if we continuously de-duplicate test code](https://youtu.be/3UH4i2NeAcs)
- [What if we exclusively did un-conditional programming](https://youtu.be/zB-B--lx7f0)

Visit the [youtube channel](https://www.youtube.com/channel/UCbObifuqh2tvqQotlr8Lb9g)
for direct access to that community.

license: Unlicense

repository: heyleng/software-engineering-handbook

path: /Guides/Video Series/What If.md

branch_name: refs/heads/master

extension: md

filename: What If.md

gha_license_id: Unlicense

license_type: permissive

repo_name: heyleng/software-engineering-handbook


text:
<!--
Copyright (c) KMG. All Rights Reserved.

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

    http://www.apache.org/licenses/LICENSE-2.0
-->
# Ignite Benchmarking with SBK
The SBK supports the benchmarking of Ignite key value store with multiple writers and readers.
It also supports End to End latency benchmarking. The SBK supports the thin client and complete cluster key value store benchmarking.

# Ignite thin client benchmarking with Docker
Use the below command start the ignite docker

```
docker run -p <IP_ADDRESS>:10800:10800/tcp  apacheignite/ignite
```

The port is redirect the local host "<IP_ADDRESS>:10800"

An Example SBK command for benchmarking single writer is as follows

```
./build/install/sbk/bin/sbk  -class ignite  -size 100 -writers 1 -seconds 60
```
In the above example, the data size is 100 bytes and writer generates the linearly incrementing keys.
example output:

```
./build/install/sbk/bin/sbk  -class ignite  -size 100 -writers 1 -seconds 60
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/mnt/c/KMG/kmg-linux/SBK/build/install/sbk/lib/slf4j-simple-1.7.14.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/mnt/c/KMG/kmg-linux/SBK/build/install/sbk/lib/logback-classic-1.0.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/mnt/c/KMG/kmg-linux/SBK/build/install/sbk/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]
2020-07-19 07:22:38 INFO
       _____   ____    _   __
      / ____| |  _ \  | | / /
     | (___   | |_) | | |/ /
      \___ \  |  _ <  |   <
      ____) | | |_) | | |\ \
     |_____/  |____/  |_| \_\

2020-07-19 07:22:38 INFO SBK version: 0.81
2020-07-19 07:22:38 INFO Reflections took 109 ms to scan 23 urls, producing 31 keys and 119 values
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.ignite.internal.util.GridUnsafe$2 (file:/mnt/c/KMG/kmg-linux/SBK/build/install/sbk/lib/ignite-core-2.8.1.jar) to field java.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of org.apache.ignite.internal.util.GridUnsafe$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Writing       4290 records,     857.8 records/sec,     0.08 MB/sec,      1.1 ms avg latency,       9 ms max latency; Discarded Latencies:       0 lower,        0 higher;  Latency Percentiles:       1 ms 10th,       1 ms 25th,       1 ms 50th,       1 ms 75th,       2 ms 95th,       2 ms 99th,       2 ms 99.9th,       9 ms 99.99th.
Writing       4215 records,     841.1 records/sec,     0.08 MB/sec,      1.2 ms avg latency,       3 ms max latency; Discarded Latencies:       0 lower,        0 higher;  Latency Percentiles:       1 ms 10th,       1 ms 25th,       1 ms 50th,       1 ms 75th,       2 ms 95th,       2 ms 99th,       3 ms 99.9th,       3 ms 99.99th.
Writing       4084 records,     816.5 records/sec,     0.08 MB/sec,      1.2 ms avg latency,       3 ms max latency; Discarded Latencies:       0 lower,        0 higher;  Latency Percentiles:       1 ms 10th,       1 ms 25th,       1 ms 50th,       1 ms 75th,       2 ms 95th,       2 ms 99th,       3 ms 99.9th,       3 ms 99.99th.
Writing       4005 records,     800.4 records/sec,     0.08 MB/sec,      1.2 ms avg latency,       4 ms max latency; Discarded Latencies:       0 lower,        0 higher;  Latency Percentiles:       1 ms 10th,       1 ms 25th,       1 ms 50th,       1 ms 75th,       2 ms 95th,       2 ms 99th,       3 ms 99.9th,       4 ms 99.99th.
Writing       4295 records,     858.8 records/sec,     0.08 MB/sec,      1.2 ms avg latency,      15 ms max latency; Discarded Latencies:       0 lower,        0 higher;  Latency Percentiles:       1 ms 10th,       1 ms 25th,       1 ms 50th,       1 ms 75th,       2 ms 95th,       2 ms 99th,       3 ms 99.9th,      15 ms 99.99th.
Writing       4087 records,     817.1 records/sec,     0.08 MB/sec,      1.2 ms avg latency,       8 ms max latency; Discarded Latencies:       0 lower,        0 higher;  Latency Percentiles:       1 ms 10th,       1 ms 25th,       1 ms 50th,       1 ms 75th,       2 ms 95th,       2 ms 99th,       3 ms 99.9th,       8 ms 99.99th.
Writing       3855 records,     770.4 records/sec,     0.07 MB/sec,      1.3 ms avg latency,      11 ms max latency; Discarded Latencies:       0 lower,        0 higher;  Latency Percentiles:       1 ms 10th,       1 ms 25th,       1 ms 50th,       2 ms 75th,       2 ms 95th,       3 ms 99th,       7 ms 99.9th,      11 ms 99.99th.
Writing       4185 records,     836.7 records/sec,     0.08 MB/sec,      1.2 ms avg latency,       5 ms max latency; Discarded Latencies:       0 lower,        0 higher;  Latency Percentiles:       1 ms 10th,       1 ms 25th,       1 ms 50th,       1 ms 75th,       2 ms 95th,       2 ms 99th,       2 ms 99.9th,       5 ms 99.99th.
Writing       4196 records,     838.9 records/sec,     0.08 MB/sec,      1.2 ms avg latency,       9 ms max latency; Discarded Latencies:       0 lower,        0 higher;  Latency Percentiles:       1 ms 10th,       1 ms 25th,       1 ms 50th,       1 ms 75th,       2 ms 95th,       2 ms 99th,       3 ms 99.9th,       9 ms 99.99th.
Writing       4161 records,     831.9 records/sec,     0.08 MB/sec,      1.2 ms avg latency,       3 ms max latency; Discarded Latencies:       0 lower,        0 higher;  Latency Percentiles:       1 ms 10th,       1 ms 25th,       1 ms 50th,       1 ms 75th,       2 ms 95th,       2 ms 99th,       2 ms 99.9th,       3 ms 99.99th.
Writing       4228 records,     845.1 records/sec,     0.08 MB/sec,      1.2 ms avg latency,       3 ms max latency; Discarded Latencies:       0 lower,        0 higher;  Latency Percentiles:       1 ms 10th,       1 ms 25th,       1 ms 50th,       1 ms 75th,       2 ms 95th,       2 ms 99th,       2 ms 99.9th,       3 ms 99.99th.
Writing(Total)      48229 records,     790.1 records/sec,     0.08 MB/sec,      1.2 ms avg latency,      15 ms max latency; Discarded Latencies:       0 lower,        0 higher;  Latency Percentiles:       1 ms 10th,       1 ms 25th,       1 ms 50th,       1 ms 75th,       2 ms 95th,       2 ms 99th,       3 ms 99.9th,       8 ms 99.99th.
```

repository: sanjaynv/SBK

repo_name: sanjaynv/SBK


text:
[link-doc-image-creation]:              create-image.md
[link-doc-template-creation]:           creating-instance-template.md
[link-doc-managed-autoscaling-group]:   creating-autoscaling-group.md
[link-doc-lb-guide]:                    load-balancing-guide.md

#   Setting Up Filter Node Auto Scaling on the Google Cloud Platform: Overview

You can set up Wallarm filter node auto scaling on the Google Cloud Platform (GCP) to make sure that filter nodes are capable of handling traffic fluctuations (if there are any). Enabling auto scaling allows the processing of incoming requests to the application using the filter nodes even when traffic soars significantly.

!!! warning "Prerequisites"
    Setting up auto scaling requires the image of the virtual machine with the Wallarm filter node.

    For detailed information about creating an image of the virtual machine with the Wallarm filter node on GCP, proceed to this [link][link-doc-image-creation].

--8<-- "../include/gcp-autoscaling-connect-ssh.md"

To auto scale filter nodes on the Google Cloud Platform, perform the following steps:
1.  Set up filter node auto scaling:
    1.  [Create a filter node instance template][link-doc-template-creation];
    2.  [Create a managed instance group with auto scaling enabled][link-doc-managed-autoscaling-group];
2.  [Set up incoming requests balancing][link-doc-lb-guide].

!!! info "Required rights"
    Before setting up auto scaling, make sure that your GCP account has the `Compute Admin` role.

license: MIT

repository: AnastasiaTWW/product-docs-en

gha_language: JavaScript

gha_license_id: MIT

repo_name: AnastasiaTWW/product-docs-en


text:
---
title: "BEM"
date: "2019-07-27T23:45:25.555Z"
template: "post"
draft: false
slug: "/posts/bem/"
category: "CSS"
tags:
  - "CSS"
  - "BEM"
description: "Learning HTML and CSS naming comventions"
socialImage: ""
---

Some of my first tasks at Planning Center involved updating the blank-state illustrations throughout the Check-Ins product, where the lead illustrator would provide me with a new image, and I would go in and swap it with the old one. I would generally need to add additional styling to the image so that it would display correctly.

Since now I was adding additional CSS styling at this point, Check-Ins designer Jonathan Suh gave me the short-and-sweet regarding CSS naming - specifically, he introduced me to Block-Element-Modifier (BEM),  - specifically, he introduced me to Block-Element-Modifier (BEM), a widely used naming convention for CSS. BEM outlines a clear and readable naming strategy for CSS classes.

Here's a breakdown of BEM:

1. Block: This is the item that has inherent meaning. It can be named with letters, numbers, or dashes
>	.piano

2. Element: This is the item that is part of the block.  It is named by combining the block name with two underscores and a name of its own that describes a part of the block.
>	.piano__keys

3. Modifier: This changes the attribute of a block entity or element. It is named by combining either the block name or a block name and element name with two dashes and a name of its own.
>	.piano--black
>	.piano__keys--black

Here's a link to an article about BEM naming comventions.

Obligatory css-tricks.com link here.

repository: abe-zt/abel-blog

repo_name: abe-zt/abel-blog


text:
# Lecidella elaeochroma var. soralifera (Erichsen) Hertel VARIETY

#### Status
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
in Poelt & Vezda, Biblthca Lichenol. 16: 199 (1981)

#### Original name
Lecidea elaeochroma var. soralifera Erichsen

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Lecanoromycetes/Lecanorales/Lecanoraceae/Lecidella/Lecidella elaeochroma/ Syn. Lecidella elaeochroma soralifera/README.md

repo_name: mdoering/backbone


text:
# Sample apps

This package contains a number of sample apps used to tests different web frameworks.

## Laravel

In order to generate the sample Laravel apps we used the default commands from the framework's 'Getting started' guides.

    $ cd tests/Integration/Frameworks/Laravel

### Laravel 4.2

Link: https://laravel.com/docs/4.2/quick#installation

    $ composer create-project laravel/laravel Version_4_2 4.2.*

### Laravel 5.7

Link: https://laravel.com/docs/5.7/installation

    $ composer create-project --prefer-dist laravel/laravel Version_5_7 5.7.*

## Symfony

In order to generate the sample Symfony apps we used the default commands from the framework's 'Getting started' guides.

    $ cd tests/Integration/Frameworks/Symfony

### Symfony 3.4

Link: https://symfony.com/doc/3.4/setup.html

    $ composer create-project symfony/framework-standard-edition Version_3_4 "3.4.*"

### Symfony 4.2

Link: https://symfony.com/doc/4.2/setup.html

    $ composer create-project symfony/website-skeleton Version_4_2

repository: raffaellopaletta/dd-trace-php

gha_language: PHP

repo_name: raffaellopaletta/dd-trace-php


text:
+++
title = "Handling informative dropout in longitudinal analysis of health-related quality of life"

# Talk start and end times.
#   End time can optionally be hidden by prefixing the line with `#`.
date = 2018-10-26T14:24:00
#date_end = 2018-10-26T14:42:00
all_day = true

# Schedule page publish date (NOT talk date).
publishDate = 2017-01-01T00:00:00

# Authors. Comma separated list, e.g. `["Bob Smith", "David Jones"]`.
authors = []

# Location of event.
location = "Dublin, Ireland"

# Name of event and optional event URL.
event = "ISOQOL"
event_url = "https://www.isoqol.org"

# Abstract. What's your talk about?
abstract = ""

# Summary. An optional shortened abstract.
summary = "Application on data from the oesophageal cancer clinical trial PRODIGE5/ACCORD17"

# Is this a featured talk? (true/false)
featured = false

# Tags (optional).
#   Set `tags = []` for no tags, or use the form `tags = ["A Tag", "Another Tag"]` for one or more tags.
tags = []

# Markdown Slides (optional).
#   Associate this talk with Markdown slides.
#   Simply enter your slide deck's filename without extension.
#   E.g. `slides = "example-slides"` references
#   `content/slides/example-slides.md`.
#   Otherwise, set `slides = ""`.
slides = ""

# Optional filename of your slides within your talk folder or a URL.
url_slides = "2018-10_ISOQOL.pdf"

# Projects (optional).
#   Associate this talk with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["deep-learning"]` references
#   `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects = []

# Links (optional).
url_pdf = ""
url_video = ""
url_code = ""

# Demo talk page uses LaTeX math.
math = true

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
[image]
  # Caption (optional)
  caption = ""

  # Focal point (optional)
  # Options: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight
  focal_point = "Right"
+++

Aims
Health-related quality of life (HRQoL) has become a crucial endpoint in cancer clinical trials but missing data can compromise its longitudinal analysis. Missingness can depend only on observed characteristics or HRQoL (MAR assumption), or additionally on unobserved HRQoL (MNAR assumption).
Our objective was to explore and compare several approaches to longitudinally model HRQoL data with potentially informative drop-out (subsequent to HRQoL deterioration) in the PRODIGE5/ACCORD17 clinical trial.

Methods
In this trial, HRQoL were assessed using the EORTC QLQ-C30 questionnaire in 267 patients with advanced oesophageal cancer receiving FOLFOX or fluorouracil-cisplatin.
We have first used linear mixed models (LMMs) which produce unbiased estimates under the MAR assumption. Assuming a MNAR assumption, we have considered the joint distribution of the HRQoL score and the missingness process. It decomposes in two ways leading to pattern-mixture models (PMMs) or selection models (SMs). PMMs were mixtures of the conditional distribution of the HRQoL score given the pattern of drop-out weighted by the probability of drop-out in each pattern. SMs factored the joint distribution into the HRQoL score distribution and the conditional distribution of the missingness process given the HRQoL scores.

Results
At baseline and at 12 months (6th assessment), the compliance was 119/134 (89%) and 48/101 (48%) in the FOLFOX arm and 120/133 (90%) and 44/99 (44%) in the fluorouracil-cisplatin arm, respectively.
Using LMMs (MAR assumption), we have obtained estimates including time and arm effects.
Using the PMM approach (MNAR assumption), we have considered 6 patterns corresponding to the time of drop-out. The HRQoL score were modeled using a mixture of LMMs, thus we have calculated weighted estimates and compared them to the estimates from the LMM approach.
Using the SM approach, we have modeled the drop-out probability using a logistic regression depending on the last (observed) and current (unobserved) HRQoL scores. In this case, the unobserved score coefficient allowed to test the MNAR assumption.

Conclusions
Although PMMs and SMs account for informative drop-out contrary to LMMs, they also rely on untestable modelling assumptions. This work has allowed to better understand them. We have also illustrated the advantages/drawbacks of PMMs and SMs regarding clinical interpretation.

repository: bcuer/academic-kickstart

repo_name: bcuer/academic-kickstart


text:
---
title: InstantSearch
mainTitle: Components
layout: main.pug
category: Components
withHeadings: true
navWeight: 1
editable: true
githubSource: docs/src/components/InstantSearch.md
---

A wrapper component that allows you to configure the credentials and query parameters for the search.

This component automatically provides the search state to all its children.

## Usage

Basic usage:

```html
<template>
  <!-- this index-name is an example -->
  <ais-instant-search
    index-name="instant_search"
    :search-client="searchClient"
  >
    <!-- Add your InstantSearch components here. -->
  </ais-instant-search>
</template>

<!-- You need to instantiate the search client in your script -->
<script>
import algoliasearch from 'algoliasearch/lite';

export default {
  data() {
    return {
      // these credentials are an example
      searchClient: algoliasearch(
        'latency',
        '3d9875e51fbd20c7754e65422f7ce5e1'
      ),
    };
  },
};
</script>
```

## Props
Name | Type | Default | Description | Required
---|---|---|---|---
`search-client` | Object | | The instance of a search client. Usage with Algolia is done via [`algoliasearch`](https://npm.im/algoliasearch) | yes
`index-name` | String  | | The index to target for the search | yes
`searchFunction` | `(AlgoliaHelper) => void` | | A hook that will be called each time a search needs to be done, with the [helper](https://community.algolia.com/algoliasearch-helper-js/) as a parameter. It’s your responsibility to call `helper.search()`. This option allows you to avoid doing searches at page load for example. | no
`stalled-search-delay` | Number | `200`  | Time (in ms) before the search is considered unresponsive. Used to display a loading indicator. | no
`routing` | Object | | documented [here](/advanced/vue-router-url-sync.html). | no
class-names | Object | `{}` | Override class names | no

## Slots

Name | Description
---|---
default | Can contain anything. All InstantSearch components are required to be inside a `ais-instant-search` component.

## CSS Classes

Class name | Description
---|---
`ais-InstantSearch` | Container class

repository: DavidRouyer/vue-instantsearch

repo_name: DavidRouyer/vue-instantsearch


text:
![Awesome Resources For Code Newbies](https://raw.githubusercontent.com/olawanlejoel/Awesome-Resources-For-Code-Newbies/master/img/awesome.jpg)

# Awesome Resources For Code Newbies

> :anchor: Awesome resources you need to aid your learning

Many people wish to learn but don’t have an idea of where they could discover materials both Free/Paid to learn. They spend so much time surfing the internet for the right materials to learn with and most times dont get the best.
This repository contains helpful resources on various aspect of programming languages, frameworks and lots more that Newbies in such aspect would find very useful and actually save them the stress/time of surfing the internet for material.

Contributions are _always_ welcome! Please see our [Contribution Guidelines](CONTRIBUTING.md). Also, if you don't find a language/framework below, you can [create a new issue](https://github.com/olawanlejoel/Awesome-Resources-For-Code-Newbies/issues/new) to request it.

## Contents

 - [FrontEnd](/FrontEnd/README.md)
 - [BackEnd](/BackEnd/README.md)


text:
### [CVE-2022-46161](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-46161)
![](https://img.shields.io/static/v1?label=Product&message=pdfmake&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=%3D%20%3C%3D%200.2.5%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-94%3A%20Improper%20Control%20of%20Generation%20of%20Code%20('Code%20Injection')&color=brighgreen)

### Description

pdfmake is an open source client/server side PDF printing in pure JavaScript. In versions up to and including 0.2.5 pdfmake contains an unsafe evaluation of user controlled input. Users of pdfmake are thus subject to arbitrary code execution in the context of the process running the pdfmake code. There are no known fixes for this issue. Users are advised to restrict access to trusted user input.

### POC

#### Reference
- https://securitylab.github.com/advisories/GHSL-2022-068_pdfmake/

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

repository: trickest/cve

branch_name: refs/heads/main

gha_language: HTML

repo_name: trickest/cve


text:
# Flashcardz

[![Build Status](https://img.shields.io/travis/jamescostian/flashcardz.svg?style=flat)](https://travis-ci.org/jamescostian/flashcardz)
[![Coverage Status](https://img.shields.io/coveralls/jamescostian/flashcardz.svg?style=flat)](https://coveralls.io/r/jamescostian/flashcardz?branch=master)
[![License](https://img.shields.io/npm/l/flashcardz.svg?style=flat)](https://github.com/jamescostian/flashcardz/blob/master/LICENSE)
[![NPM Version](https://img.shields.io/npm/v/flashcardz.svg?style=flat)](https://www.npmjs.com/package/flashcardz)

Intelligently quizzes you

## Features

* Small typos are (pretty intelligently) [ignored](tests/check-answer.test.js)
* You won't be quizzed too much over things you get right
* You'll be quizzed a lot over things you get wrong
* You won't see the same card over and over again (assuming you have enough cards); you'll get enough variety to learn
* Importing stacks of cards from [Quizlet](http://quizlet.com/) works
* Comes with a [CLI](cli.md) that can help with basic things like removing duplicate cards or deleting your history of getting cards right/wrong
* Comes with an [API](js-api.md) so that you can get quizzed from any interface (not just a terminal emulator)

## Install

Assuming you have [Node](http://nodejs.org), installing the CLI is as easy as:

```bash
npm install -g flashcardz
```

To use Flashcardz programatically, use

```bash
npm install --save flashcardz
```

## Usage

### CLI

Say you have a file called `myfile` with flashcards (each card has a "front" and a "back" - normally, you see the front first and have to recall what the back is). Let's say `myfile` looks like this:

```
ostensible	stated or appearing to be true, but not necessarily so.
palpable	able to be touched or felt.
diaphanous	(especially of fabric) light, delicate, and translucent.
```

**ProTip™**: if you're studying stuff on [Quizlet](http://quizlet.com), you can just export your set of cards with the default settings to get a file like `myfile` in this example

Converting that file to a Flashcardz stack would look like this:

```bash
flash convert myfile tab/newline > mystack
```

The command above will convert `myfile` to a "stack" which would be saved as `mystack` which you can be quized on if you run:

```bash
flash quiz mystack
```

The CLI has many other commands. If you run `flash help` you can see a list of them and the arguments they take. You can also get help for individual commands with `flash help [command]`, e.g. `flash help convert`

### JS API

```js
const f = require('flashcardz')

// Convert this nice-looking object with flashcards into the Flashcardz format
const myCards = f.convert({
  ostensible: 'stated or appearing to be true, but not necessarily so.',
  palpable: 'able to be touched or felt.',
  diaphanous: '(especially of fabric) light, delicate, and translucent.'
}, 'objecty')

// Get quized on the terminal over 1 card in that stack of flashcards
const myCardsAfterQuiz = flashcardz.quiz(myCards, require('flashcardz/cli-quizzer'), flashcardz.pick.random)

// Get the term that you struggled with most from quizzes
const hardestCard = flashcardz.hardest(myCardsAfterQuiz)
console.log(hardestCard.front + ' is a difficult word.') // ex: 'ostensible is a difficult word.'
```

## Documentation

Documentation for the JS API is [here](https://github.com/jamescostian/flashcardz/blob/master/js-api.md), in `js-api.md`

Documentation for the CLI is [here](https://github.com/jamescostian/flashcardz/blob/master/cli.md), in `cli.md`

## Contributing

Contributions welcome! Please read the [contributing guidelines](https://github.com/jamescostian/flashcardz/blob/master/CONTRIBUTING.md) first.

## License

This is licensed under the [ISC License](https://github.com/jamescostian/flashcardz/blob/master/LICENSE)

license: ISC

repository: jamescostian/flashcardz

gha_license_id: ISC

repo_name: jamescostian/flashcardz


text:
# Kafka Proxy Rust Forever (kprf)

HTTP Kafka producer-proxy based on librdkafka & warp

### NOTE: This is non-stable alpha version so API and configuration can be changed.

## Inspirations

In CityMobil we heavily rely on data-processing. It is widely used for pricing, statistics collection etc.
Most of this data is processed from php-fpm.

For producing data to kafka internal librdkafka thread-pool is explicitly created. It is quite heavy operation
for every php-fpm worker.

One of the easiest solutions is to use some external http-proxy. This is where 'kafka-proxy' (or kprf) comes to play.

## Setup

`rustc 1.51.0` is required to build kafka-proxy.

- To build debug version of kafka-proxy:
```shell
make # builds rust-debug version
```

Built debug binary is stored at `target/debug/kprf`

- To build release version of kafka-proxy:
```shell
make build_release
```

Built release binary is stored at `target/release/kprf`

- To run kafka-proxy(release version is recommended to use in production environment):
```shell
target/release/kprf --config=config_example.yaml
```

## QuickStart

Following examples work if kafka-proxy is set up and running.

```
# Try asynchronous producing
curl 'http://<IP_ADDRESS>:4242/push' -H 'Content-Type: application/json' -d '{"records": [{"topic": "SOME_TOPIC", "data": "{"\a"\: "\b"\}"}],
"wait_for_send": false}'

# Possible success response:
{"status": "ok", "errors": []}

# Possible erroring response:
{"status": "error", "errors": [{"status": "error", "error": "some_message"}, {"status": "ok", "error":""}]}
```

JSON Fields:
- `records` - describes records for further producing.
- `records[i].topic` - describes some kafka topic for producing.
- `records[i].data` -  describes some string data. Can be JSON, XML or anything.
- `wait_for_send` - describes if http-producer client has to wait for delivery result or not.
If false, message is produced asynchronously. Otherwise, synchronously. Default value is `false`

## Configuration

At this moment, this options from [librdkafka](https://github.com/edenhill/librdkafka/blob/master/CONFIGURATION.md) are supported:

- `kafka.brokers` - alias for `bootstrap.servers` from librdkafka. Default value is empty array.
- `kafka.user` - alias for `sasl.username` from librdkafka. Default value is empty string.
- `kafka.password` - alias for `sasl.password` from librdkafka. Default value is empty string.
- `kafka.message_max_bytes` - alias for `message.max.bytes` from librdkafka. Default value is `1 MiB`.
- `kafka.queue_buffering_max_messages` - alias for `queue.buffering.max.messages` from librdkafka. Default value is `100000`.
- `kafka.queue_buffering_max_ms` - alias for `queue.buffering.max.ms` from librdkafka. Default value is `10`.
- `kafka.queue_buffering_max_kbytes` - alias for `queue.buffering.max.kbytes` from librdkafka. Default value is `1048576`.
- `kafka.retries` - alias for `retries` from librdkafka. Default value is `3`.
- `kafka.message_timeout_ms` - alias for `message.timeout.ms` from librdkafka. Default value is `2000`.
- `kafka.request_timeout_ms` - alias for `request.timeout.ms` from librdkafka. Default value is `30000`.
- `kafka.request_required_acks` - alias for `request.required.acks` from librdkafka. Default value is `-1`.
- `http.port` - port for HTTP server for producing messages. Default value is `4242`
- `output_file` - output file for logging. Default value is `/dev/stdout`

### Example configuration
```yaml
kafka:
  brokers:
    - '<IP_ADDRESS>:9092'
  request_required_acks: 1
  queue_buffering_max_ms: 20
  queue_buffering_max_kbytes: 2048 # 2 MiB

http:
  port: 4242
  metrics_port: 8088

output_file: "/dev/stdout"

ratelimit: # ratelimit settings.
  enabled: true # enables or disables ratelimiting.
  rules: # defines list of rules for concrete topics.
    - topic_name: "some_topic_name" # concrete topic name.
      max_requests_per_minute: 42 # maximum requests per minute allowed for concrete topic.
```

## Benchmarks

We managed to get such results with `wrk` on v0.0.1-alpha version with `4 KiB` message size.

External host configuration:
```text
CPU: 2-core Intel Core Processor (Broadwell) 2095 MHz.
RAM: 4 GiB DDR4
Virtualization: VT-x
Hypervisor vendor: KVM.
```

Kafka-proxy configuration:

```yaml
kafka:
  brokers:
    - "some_kafka_broker_1.some_external_server"
    - "some_kafka_broker_2.some_external_server"
    - "some_kafka_broker_3.some_external_server"
    - "some_kafka_broker_4.some_external_server"
    - "some_kafka_broker_5.some_external_server"
  request_required_acks: 1
  queue_buffering_max_ms: 10
  queue_buffering_max_kbytes: 2048 # 2 MiB

http:
  port: 4242
```

- Asynchronous producing
```text
wrk -s wrk.lua -t256 -c256 -d120s 'http://some_external_host:4242/push'
Running 2m test @ http://some_external_host:4242/push
  256 threads and 256 connections

  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    20.72ms   11.53ms 145.52ms   72.16%
    Req/Sec    49.57     21.97     1.02k    87.15%
  864241 requests in 1.14m, 108.79MB read
Requests/sec:  12672.49
Transfer/sec:      1.60MB
```

- Synchronous producing
```text
  256 threads and 256 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency    31.41ms   88.92ms   1.01s    96.82%
    Req/Sec    59.35     13.91   111.00     74.87%
  1765717 requests in 2.00m, 222.28MB read
Requests/sec:  14701.92
Transfer/sec:      1.85MB
```

## Metrics

All metrics are available in OpenMetrics(prometheus) format on `:8088` port(non-configurable at v0.0.1-alpha).

At this moment(v0.1.0) these metrics are available:

- `http_requests_duration` - Histogram of HTTP requests. Label `push/sync` is set when message produced asynchronously,
otherwise, `push/async` is set. `code` label is set according to HTTP response status.
- `kafka_internal_queue_size` - Gauge of internal kafka-queue size, per topic.
- `kafka_message_send_duration` - Histogram of kafka message duration before delivery result callback is received, per topic.
- `kafka_sent_messages` - Counter of total kafka messages sent, per topic.
- `kafka_errors_count` - Counter of total kafka errors, per topic.
- `ratelimit_messages_count` - Counter of total ratelimited messages, per topic.

Kafka librdkafka metrics:
- `kafka_producer_reply_queue_size` - Operations (callbacks, events, etc.) waiting in queue.
- `kafka_producer_current_messages_in_queue` - Current number of messages in producer queues.
- `kafka_producer_current_messages_in_queue_bytes` - Current total size of messages in producer queues.
- `kafka_producer_total_requests_count` - Total number of requests sent to brokers
- `kafka_producer_total_bytes_sent` - Total number of bytes transmitted to brokers
- `kafka_producer_total_responses_received` - Total number of responses received from brokers
- `kafka_producer_total_bytes_received` - Total number of bytes received from brokers
- `kafka_producer_total_messages_sent` - Total number of messages transmitted (produced) to brokers
- `kafka_producer_total_messages_bytes_sent` - Total number of bytes transmitted (produced) to brokers
- `kafka_producer_metadata_cache_topics_count` - Number of topics in the metadata cache
- `kafka_producer_broker_state` - Broker state (INIT, DOWN, CONNECT, AUTH, APIVERSION_QUERY, AUTH_HANDSHAKE, UP, UPDATE).
- `kafka_producer_broker_state_age` - The time since the last broker state change, in microseconds
- `kafka_producer_broker_outbuf_count` - Number of requests awaiting transmission to the broker
- `kafka_producer_broker_outbuf_msg_count` - Number of messages awaiting transmission to the broker
- `kafka_producer_broker_waitresp_count` - Number of requests in-flight to the broker that are awaiting response
- `kafka_producer_broker_waitresp_msg_count` - Number of messages awaiting transmission to the broker
- `kafka_producer_broker_requests_sent` - Total number of requests sent to the broker
- `kafka_producer_broker_requests_sent_bytes` - Total number of bytes sent to the broker
- `kafka_producer_broker_transmission_errors` - Total number of transmission errors
- `kafka_producer_broker_request_retries` - Total number of request retries
- `kafka_producer_request_timeouts` - Total number of requests that timed out
- `kafka_producer_broker_responses_count` - Total number of responses received from the broker
- `kafka_producer_broker_bytes_received` - Total number of bytes received from the broker
- `kafka_producer_broker_errors_count` - Total number of received errors
- `kafka_producer_topic_metadata_age` - The age of the client's metadata for this topic, in milliseconds
- `kafka_producer_topic_batchsize_avg` - Rolling window statistics for batch sizes, in bytes
- `kafka_producer_topic_batchcount_avg` - Rolling window statistics for batch message counts

## Further improvements

1. `Write-Ahead-Log`. Write-Ahead-Log can be a good improvement if pattern of usage is asynchronous producing. Client does not know
if his records were successfully sent to kafka. Adding `WAL` can improve durability.


text:
# Next.js Auth0 Example App

In this folder we'll be showing off how to use the [@auth0/nextjs-auth0](https://www.npmjs.com/package/@auth0/nextjs-auth0) package in your Next.js applications.

- [Local Development](#local-development)
    * [Configuring Auth0](#configuring-auth0)
    * [Environment Variables](#environment-variables)
- [Hosting on Vercel](#hosting-on-vercel)
    * [Configuring Auth0](#configuring-auth0-1)
        + [Wildcards](#wildcards)
    * [Configuring Vercel](#configuring-vercel)
    * [Environment Variables](#environment-variables-1)
        + [Assigning the AUTH0_BASE_URL](#assigning-the-auth0-base-url)
            - [Preview deployments](#preview-deployments)
            - [Production deployments (or other environments with fixed urls)](#production-deployments--or-other-environments-with-fixed-urls-)

### Local Development

#### Configuring Auth0

Go to the [Auth0 dashboard](https://manage.auth0.com/) and create a new application of type **Web Application** and make sure to configure the following:

| Setting               | Description                                                                                |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Allowed Callback URLs | Should be set to `http://localhost:3000/api/auth/callback` when testing locally or typically to `https://myapp.com/api/auth/callback` when deploying your application. |
| Allowed Logout URLs   | Should be set to `http://localhost:3000/` when testing locally or typically to `https://myapp.com/` when deploying your application.                                   |

#### Environment Variables

For local development you'll just want to create a `.env.local` file with the necessary settings:

```
AUTH0_SECRET={A SECRET UNIQUE STRING} (at least 32 characters, used to encrypt the cookie)
AUTH0_ISSUER_BASE_URL=https://{YOUR_AUTH0_DOMAIN}
AUTH0_BASE_URL=http://localhost:3000/
AUTH0_CLIENT_ID={YOUR_AUTH0_CLIENT_ID}
AUTH0_CLIENT_SECRET={YOUR_AUTH0_CLIENT_SECRET}
AUTH0_SCOPE=openid profile read:shows
AUTH0_AUDIENCE={YOUR_AUTH0_API_IDENTIFIER}
```

### Hosting on Vercel

The example application is hosted on Vercel, including preview deployments to make Pull Request reviewing a bit easier in terms of verifying the functionalities in the example application.

#### Configuring Auth0

As every environment in Vercel, including preview deployments, has its unique URL, your Auth0 application needs to be configured to allow the corresponding Callback and Logout URLs.
This can be done manually, by going to the Application Settings on your [Auth0 dashboard](https://manage.auth0.com/) and make sure to configure the following:

| Setting               | Description                                                                                |
| --------------------- | ---------------------------------------------------------------------------------------------------------- |
| Allowed Callback URLs | Should be set to `https://{YOUR_VERCEL_URL_PREFIX}.vercel.app/api/auth/callback` when deploying to vercel. |
| Allowed Logout URLs   | Should be set to `https://{YOUR_VERCEL_URL_PREFIX}.vercel.app/` when deploying to vercel.                  |

##### Wildcards

By default, Vercel uses the `vercel.app` domain for all of your environments. Using wildcards for a shared domain opens the possibility to redirect back to a malicious website, as long as the Callback URLs matches the wildcard configuration. Because of that, you should only consider using wildcards for the preview deployments when using a [Preview Deployment Suffix](https://vercel.com/docs/concepts/deployments/automatic-urls#preview-deployment-suffix), which is available as part of Vercel's Pro or Enterprise plan.

| Setting               | Description                                                                                |
| --------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| Allowed Callback URLs | Should be set to `https://{VERCEL_GIT_REPO_SLUG}-*-{VERCEL_TEAM}.yourdomain.com/api/auth/callback` when deploying to vercel. |
| Allowed Logout URLs   | Should be set to `https://{VERCEL_GIT_REPO_SLUG}-*-{VERCEL_TEAM}.yourdomain.com/` when deploying to vercel.                  |

#### Configuring Vercel

If you do not have a Vercel account, you can sign up for one at https://vercel.com/.
Once logged in to your account, you can create a new project and import a Git repository.

Vercel should automatically select the `Next.js` Framework Preset.
Because this app's deployment is a bit different from a standard Next.js repository, we override the `Build and Output settings` command:

- Build Command: `npm run build:vercel`
- Output Directory: `example-app/.next`

#### Environment Variables

Configure the following environment variables when importing your project or in "Settings > Environment Variables":

| Name                  | Value                                                                        |
| --------------------- |------------------------------------------------------------------------------|
| AUTH0_SECRET          | {A SECRET UNIQUE STRING} (at least 32 characters, used to encrypt the cookie) |
| AUTH0_ISSUER_BASE_URL | https://{YOUR_AUTH0_DOMAIN}                                                  |
| AUTH0_CLIENT_ID       | {YOUR_AUTH0_CLIENT_ID}                                                       |
| AUTH0_CLIENT_SECRET   | {YOUR_AUTH0_CLIENT_SECRET}                                                   |
| AUTH0_AUDIENCE        | {YOUR_AUTH0_API_IDENTIFIER}                                                  |

##### Assigning the AUTH0_BASE_URL

###### Preview deployments

For preview deployments you will either want to assign this to:

- **Automatic Deployment URL:** For example `project-d418mhwf5-team.vercel.app` which is the `VERCEL_URL` environment variable.
- **Automatic Branch URL:** For example `project-git-update-team.vercel.app` which is the `VERCEL_BRANCH_URL` environment variable.

See here for more information about Vercel's Automatic Urls: https://vercel.com/docs/concepts/deployments/automatic-urls

To do this, make sure **Automatically expose System Environment Variables** is checked in **Settings > Environment Variables** and assign either the Automatic Deployment URL (`VERCEL_URL`) or the Automatic Branch URL (`VERCEL_BRANCH_URL`) to `NEXT_PUBLIC_AUTH0_BASE_URL` in your `.env.production` file. For example:

```shell
# .env.production
NEXT_PUBLIC_AUTH0_BASE_URL=$VERCEL_URL
```

> Note: The `NEXT_PUBLIC_` prefix is used so you can specify the base URL in your middleware. You must be on version `2.6.0` or later of this SDK to use `NEXT_PUBLIC_AUTH0_BASE_URL`.

> Note: Long URLs (> 63 characters) will get truncated by Vercel. See: https://vercel.com/docs/concepts/deployments/generated-urls#truncation

Unlike other `.env` files, You will need to check in `.env.production` so it should **not** contain any secrets. See how we define `.env.production` in [.env.production](./.env.production).

###### Production deployments (or other environments with fixed urls)

For production deployments or [custom domains assigned to a git branch](https://vercel.com/docs/custom-domains#assigning-a-domain-to-a-git-branch) you should assign the correct url to the `AUTH0_BASE_URL` environment variable in "Settings > Environment Variables". See the [Vercel docs on Environment Variables](https://vercel.com/docs/environment-variables#preview-environment-variables) for more information. This will override your `.env.production` file.

gha_language: TypeScript


text:
Discord Enhancer

If you like to keep discord open while working on other stuff, this extension will allow you to hide the server list, channel list and member list for the discord.com website. This will allow to keep the window as small as possible without loosing the main message part of the website.

## Screenshots

![screenshot_1](screenshots/1.jpg)
![screenshot_1](screenshots/2.jpg)
![screenshot_1](screenshots/3.jpg)
![screenshot_1](screenshots/4.jpg)

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.


text:
---
title: "RIP Nav arrow"
date: "2014-05-07"
---

Before I lay this piece of code to rest, an arrow around the current navigation selection, here it is:

```
setArrowPosition = (target) ->
    parent = target.parent()
    targetX = target.position().left + target.width() / 2
    targetPercent = targetX / parent.width() * 100
    parent.find('.current-arrow').css left : "#{targetPercent}%"

```

repository: ianmcnally/ianmcnallydotme

repo_name: ianmcnally/ianmcnallydotme


text:
# Back-End

Sections:
- [Authorized User Endpoints](#authorized-user-endpoints)
- [Accepted Stories Endpoints](#accepted-stories-endpoints)
- [Pending Stories Endpoints](#pending-stories-endpoints)

## Authorized User Endpoints

### /auth/ GET

Returns all registered users

### /auth/delete/id

Deletes user with given id. Returns id

### /auth/modify/id PUT
  Expects an object with format...
  ```
  {
    "firstName": "updated first name",
    "lastName": "updates last name",
    "username": "updated username",
    "password": "updated password"
  }

### /auth/register POST

  Expects an object with format...
  ```
  {
    "firstName": "ExampleName",
    "lastName": "Example",
    "username": "user",
    "password": "pass"
  }
  ```

### /auth/login POST

  Expects an object with format...
  ```
  {
    "username": "user",
    "password": "pass"
  }
  ```

## Accepted Stories Endpoints

### /acceptedStories/ GET

Returns array of all currently approved stories

### /acceptedstories/id  GET

Returns single story matching ID

### /acceptedStories/delete/id DELETE

Deletes story with given ID. Returns id

### /acceptedstories/modify/id PUT

Requires object with format...
```
{
  "storyContent": "updated story",
  "storyImg": "updated image URL",
  "storyName":"updated name of story"
}
```

## Pending Stories Endpoints

### /pendingStories/add POST
  Expects and requiers an image with name: "image", and objeCt with format...
  ```
  {
    "storyName": "randoName",
    "storyContent": "story goes here"
  }
  ```

### /pendingStories/approve/:id
  Expects id in the URl. If a post is found, it will be added to the "acceptedStories" database and the story will be removed from "pendingStories". Upon successful approval, server will respond with {message: "Approved!"}

### /pendingStories/delete/:id DELETE
  Expects id to be passed in the url parameter. Upon successful delete, should return {message: "deleted"}

### /pendingStories GET
  Should return array of all stories pending approval

### /pendingStories/:id GET
  Expects id in URl, should return single story upon success.

repository: bw-refugeestories/Back-End

repo_name: bw-refugeestories/Back-End


text:
# snowpack-plugin-typescript-eslint-karma

This is a different take on running the Typescript type-checker. The aim is more
smooth output in a 'stream' style log in watch mode.
Once Typescript is error free eslint is called to get even more checks.
At last output is written to a tmp-directory where karma can pickup changed
files.

Intendend Advantage:
* less overhead because less extra process watching for file change
* no intermixed output between typescript and eslint
* no useless eslint call if code is invalid
* in-browser testing via karma
  (instead of headless testing done by @web/test-runner)

This of course is all heavly biased by personal taste.

## Dependencies

Typescript & Eslint & Karma are all peerDepedencies

## Plugin-Options

* tsconfig?: string;
  Alternate name for 'tsconfig.json'
* karmaOutput?: string;
  Where to write temporary files for karma unset to disable
  (relative to current dir)
  Karma should be configured to watch this folder to make any sense.
  Also note that karma needs a proxy to the web_modules folder on
  snowpack host.
  If unset karma Server won't be started
* karmaFilter?: (filename: string, content: string) => string;
  Transform File before writing to karmaOutput
  Depending on testing framework you might want to remove the
  import because it must be accesed globaly. Note that clearing a line
  without removing the line break keeps the sourcemap intact.
* karmaConf?: string;
  Alternate name for 'karma.config.js'
* karmaDisable?: booelan;
  Don't start karma
* eslintFiles?: string|string[];
  Pattern which files to eslint; Defaults to './'
* eslintRun?: 'never'|'force'|'normal';
  Disable eslint or run even with Typescript errors

## Karma

Example to getting karma to run:
* for this plugin:
  karmaOutput: 'build_test/',
* for karma files:
    files: [
	 { pattern: snowpack_output + '/**/*.test.js', type: 'module' },
    ]
* and karma proxy (assuming default snowpack config)
  proxies: {
    '/base/build_test/web_modules/': 'http://localhost:8080/web_modules/',
  }

Note: Karma is only active when snowpack is run as 'dev'

## Development

- `npm run build`: Build the template
- `npm run deploy`: Publish the template to npm using np


text:
# OpenShift Demo Project Template

The Ansible Runner project to deploy operators and their related Custom Resources to OpenShift.

The role [OpenShift Spices](https://github.com/kameshsampath/ansible-role-openshift-spices), allows install and configure the following software components using operators:

- [*] Red Hat OpenShift Serverless both Serving and Eventing

- [*] Red Hat OpenShift Pipelines

- [*] [Argo CD](https://argoproj.github.io/argo-cd/)

- [*] Red Hat OpenShift Service Mesh

- [*] [Strimzi Kafka](https://strimzi.io)

- [*] [Red Hat Advanced Cluster Management for Kubernetes](https://www.redhat.com/en/technologies/management/advanced-cluster-management)

- [ ] [Skupper](https://skupper.io)

- [*] [Apache Camel-K](https://camel.apache.org/docs/#camel-k)

- [*] [Eclipse Che](https://www.eclipse.org/che/)

## Pre-requsites

- [Docker](https://docs.docker.com/get-docker/) or [podman](https://podman.io/)
- [OpenShift  4 Cluster](try.openshift.com)
- [openshift cli `oc`](https://mirror.openshift.com/pub/openshift-v4/clients/ocp/latest/)

__NOTE__: Based on your configuration you might need other tools like:

- [Tekton CLI](https://github.com/tektoncd/cli)
- [Knative Client](https://github.com/knative/client)
- [Argo CD CLI](https://argoproj.github.io/argo-cd/cli_installation/)

## Clone sources

```shell
git clone https://github.com/openshift-spice-runner
export REPO_HOME=`pwd`/openshift-spice-runner
```

## Configuration

All configuration are done using `$REPO_HOME/.cluster/.env`:

| Variable | Description | Default
| -------- | ----------- | -------

| *RUNNER_PLAYBOOK* | The cluster configuration playbook, this file will be searched in $REPO_HOME/project folder. Just filename is suffice. | playbook.yml |

### Playbook Variables

The role variables can be passed using the `$REPO_HOME/cluster/env/extravars`.

Copy the file and update it as needed:

```shell
cp $REPO_HOME/cluster/env/extravars.example $REPO_HOME/cluster/env/extravars
```

Check [kameshsampath.openshift_app_spices](https://github.com/kameshsampath/ansible-role-openshift-spices) for list of configuration parameters.

### OpenShift Cluster Inventory

The inventory file `$REPO_HOME/hosts`, allows the play tobe run across OpenShift clusters:

#### .hosts.example

```ini
; Example Google Cloud
gcp ansible_host=localhost kubeconfig=/runner/inventory/gcp.kubeconfig cloud_profile=gcp

; Example AWS
aws ansible_host=localhost kubeconfig=/runner/inventory/aws.kubeconfig cloud_profile=aws

; Example Azure
azr ansible_host=localhost kubeconfig=/runner/inventory/azr.kubeconfig cloud_profile=azr
```

The above example shows the sample configuration(s) for three clouds GCP, AWS and Azure. Each cloud is configured the format:

```text
<cloud-alias> ansible_host=localhost kubeconfig=/runner/inventory/<kubeconfig file> cloud_profile <gcp|aws|azr>
```

- *cloud-alias*: The host alias for the cloud to used and logged by ansible
- *ansible_host*: The `ansible_host` is always set to `localhost` as the play will run within the docker container and connect to cluster using API
- *kubeconfig*: The Cloud specific `kubeconfig` file path. Just update the file name as needed. The `$REPO_HOME/inventory` is mounted as `/runner/inventory`, which makes the file path `/runner/inventory` to be same for all clouds

Copy the file and update it as needed:

```shell
cp $REPO_HOME/cluster/inventory/hosts.example $REPO_HOME/cluster/inventory/hosts
```

## Make Targets

The [makefile](./Makefile) provides the following targets:

- *provision* - Creates a minikube cluster with profile name
- *configure* - Creates a minikube cluster with profile name
- *unprovision* - Deletes the created minikube cluster

### Examples

To provision a cluster with *OpenShift Service Mesh* run:

```shell
cd $REPO_HOME
cp $REPO_HOME/cluster/examples/servicemesh.yml $REPO_HOME/cluster/project/playbook.yml
make configure
```

To provision a cluster with *OpenShift Serverless* run:

```shell
cd $REPO_HOME
cp $REPO_HOME/cluster/examples/serverless.yml $REPO_HOME/cluster/project/playbook.yml
make configure
```

To provision a cluster with *OpenShift Pipelines, OpenShift Serverless and Argo CD* run:

```shell
cd $REPO_HOME
cp $REPO_HOME/cluster/examples/serverless_pipelines_argocd.yml $REPO_HOME/cluster/project/playbook.yml
make configure
```

## Tutorials

Based on the installation the following Tutorials might be of help:

- [Knative Tutorial](https://dn.dev/knative-tutorial)
- [Tekton Tutorial](https://dn.dev/tekton-tutorial)

## Adding python modules

Any python module that you need to install can added to the `$REPO_HOME/requirements.txt`, this file will be processed automatically before the play runs.

## Adding extra roles and collections

Any roles/collections that need to installed can be added to the `$REPO_HOME/requirements.yml`, this file will be processed automatically before the play runs.

Please check [Galaxy](https://docs.ansible.com/ansible/latest/galaxy/user_guide.html#installing-roles-from-galaxyguide) for the structure of `requirements.yml` file.

## License

[Apache v2](https://github.com/kameshsampath/openshift-spice-runner/tree/master/LICENSE)

## Author Information

[Kamesh<EMAIL_ADDRESS>
## Issues

[Issues](https://github.com/kameshsampath/openshift-spice-runner/issues)

repository: kameshsampath/openshift-spice-runner

repo_name: kameshsampath/openshift-spice-runner


text:
LearnKit
========

LearnKit is a Cocoa framework for Machine Learning. It currently runs on top of the Accelerate framework on iOS and OS X.

Supported Algorithms
--------------------

- Anomaly Detection
- Collaborative Filtering
- Decision Trees
- k-Means
- k-Nearest Neighbors
- Linear Regression
- Logistic Regression
- Naive Bayes
- Neural Networks
- Principal Component Analysis
- Support Vector Machines

Example
-------

In this example, we have a matrix that contains 5000 20x20 digits. Each 20x20 digit has been flattened into a row of 400 pixel intensities. We load it as such:

```objc
NSURL *matrixURL = [NSURL fileURLWithPath:matrixPath];
NSURL *matrixOutputURL = [NSURL fileURLWithPath:outputVectorPath];

LNKMatrix *matrix = [[LNKMatrix alloc] initWithBinaryMatrixAtURL:matrixURL
												 matrixValueType:LNKValueTypeDouble
											   outputVectorAtURL:matrixOutputURL
										   outputVectorValueType:LNKValueTypeUInt8
														rowCount:5000
													 columnCount:400
												addingOnesColumn:YES];
```

Next, we set up a conjugate gradient optimization algorithm to train the neural network.

```objc
LNKOptimizationAlgorithmCG *algorithm = [[LNKOptimizationAlgorithmCG alloc] init];
algorithm.iterationCount = 400;
```

Now we initialize a neural network classifier with our matrix and optimization algorithm. We also indicate the possible outputs are digits ranging from 1 to 10.

```objc
LNKNeuralNetClassifier *classifier = [[LNKNeuralNetClassifier alloc] initWithMatrix:matrix
																 implementationType:LNKImplementationTypeAccelerate
															  optimizationAlgorithm:algorithm
																			classes:[LNKClasses withRange:NSMakeRange(1, 10)]];
classifier.hiddenLayerCount = 1;
classifier.hiddenLayerUnitCount = 25;
```

The neural network parameters above were picked with performance in mind. They can be fine-tuned to increase the accuracy of the classifier. Finally, we train the neural network classifer and predict the class of a previously-unseen digit.

```objc
[classifier train];

LNKClass *someDigit = [classifier predictValueForFeatureVector:someImage length:someImageLength];
```

With the right parameters, classification accuracy rates of over 99% can be attained.

Future Tasks
------------

- Port to Metal and OpenCL

License
-------

LearnKit is available under the MIT license.

Credits
-------

LearnKit uses:

- `fmincg` by Carl Edward Rasmussen
- `liblbfgs`
- Data prepared by Andrew Ng for [Machine Learning](https://www.coursera.org/course/ml)

repository: almost-free/LearnKit

repo_name: almost-free/LearnKit


text:
# Cheetah: a computational toolkit for cybergenetic control

Cheetah is a simple to use Python library to support the development of analysis workflows and real-time cybergenetic control platforms that combine microscopy imaging and environmental control. The toolkit relies on a U-Net convolutional neural network to perform cell segmentation and uses this with additional functions that can label, track and generate control signals based on this information. If you make use of Cheetah in your work we ask that you cite the following paper:

> [**Cheetah: a computational toolkit for cybergenetic control.** Pedone E., de Cesare I., Zamora C., Haener D., Postiglione L., La Regina A., Shannon B., Savery N., Grierson C.S., di Barnardo M., Gorochowski T.E. & Marucci M., bioRxiv (2020).](https://www.biorxiv.org/content/10.1101/2<IP_ADDRESS>751v2)

## Getting started

If you would like to use Cheetah for your own project, we recommend using Anaconda Python and creating a separate environment where all the necessary dependancies can be installed. This can be done after install Anaconda by running the following commands:

`conda create -n py36 python=3.6`

`conda activate py36`

`conda install keras==2.0.8 matplotlib numpy scipy scikit-image scikit-learn`

To test if this has worked successfully, it should now be possible to run the training step for our bacteria example in the `examples/01_bacteria` by running the command:

`python 02_training.py`

This should start up the training cycle using the example bacteria training and validation images provided as part of the package. We also recommend taking a look at some of the other examples provided and reading the associated publication to better understand how all aspects of the functionality can be used.

## Dependences

keras, tensorflow, scikit-learn, scikit-image, scipy, glob, numpy, matplotlib, json

repository: giansimone/cheetah

repo_name: giansimone/cheetah


text:
---
name: Xamarin.Android - Leaderboards and Achievements
description: "Xamarin.Android application that shows the Leaderboards and Achievements for a specific provided game of Google Play Games"
page_type: sample
languages:
- csharp
products:
- xamarin
urlFragment: leaderboardsandachievementsdemo
---
# Leaderboards and Achievements Demo

This is a sample xamarin android application that shows the [Leaderboards](https://developers.google.com/games/services/android/leaderboards) and [Achievements](https://developers.google.com/games/services/android/achievements) for a specific provided game of Google Play Games.

## Setup

You must have a created game in your [Google Play Developer Console](https://play.google.com/apps/publish). If you **don't have a game**, you need to create one following these steps:

1. Sign in to the Google Play Developer Console
2. Add your game to the Google Play Developer Console
3. Generate an OAuth 2.0 client ID
    - Create a linked application
4. Paste you Game ID in [Strings.xml](https://github.com/xamarin/monodroid-samples/blob/master/LeaderboardsAndAchievementsDemo/Resources/values/Strings.xml) file. You have to replace the *PASTE_YOUR_GAME_ID_HERE* text.

For more information, please visit this [web site](https://developers.google.com/games/services/console/enabling).

## Screenshots

![Home screenshot](Screenshots/home.png "Home")

![Leaderboards screenshot](Screenshots/leaderboards.png "Leaderboards")

![Achievements screenshot](Screenshots/achievements.png "Achievements")

repository: xamarin/monodroid-samples

gha_language: C#

repo_name: xamarin/monodroid-samples


text:
# Tito API Test

This project tests the v2 [API](http://teamtito.github.io/tito-api-docs/) of the ticket platform [Tito](https://ti.to/).
It's written in Javascript ES6 and tested in Jest.

## Getting Started

The setup is simple. Install the dependencies, configure and run.

### Prerequisites

You need npm to install the dependencies

### Setup

Install the dependencies

```
npm install
```

Create config.js following the format of config.example.js

## Running the tests

This project is all about tests.

```
npm test
```

## Built With

* [Jest](https://jestjs.io/) - Javascript Testing Library
* [isomorphic-fetch](https://github.com/matthew-andrews/isomorphic-fetch) - To make HTTP calls to the API

## Contributing

Please read [CONTRIBUTING.md](https://gist.github.com/tsu84/4d2990911440f2201f6c25f05d07daa9) for details on our code of conduct, and the process for submitting pull requests to us.

## Versioning

We use [SemVer](http://semver.org/) for versioning.

## Author

* **Tsuneo Kurihara** - [Codemotion](https://codemotionworld.com)

## License

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

## Acknowledgments

* This README.md is based on [PurpleBooth's README-Template.md](https://gist.github.com/PurpleBooth/109311bb0361f32d87a2)


text:
# thought-analysis
The "cool" repo where I analyze all the blog posts I have written

### What is it?
I have tried to actually analyze the blog posts I have written in medium. The analysis is done using word2vec model (a type of word embedding).
The embeddings for each and every word is calculated. The default dimension for each word vector is 300.
So, I have tried using **PCA** to actually reduce the vectors to 2d and 3d space accordingly and then the vectors are visualized.

The dataset for the analysis is done using my another "side-kick" project:
https://github.com/NISH1001/medium-crawler

This crawling project gained its own repo while doing the extraction part for this analysis project.

### Tools
I have used:
- scikit-learn
- numpy
- gensim
- matplotlib

repository: PaaruRa/thought-analysis

repo_name: PaaruRa/thought-analysis


text:
---
sectionid: nginx
sectionclass: h2
parent-id: server
number: 3300
title: Reverse Proxy with Nginx and HTTPS
---

![lets encrypt](./img/nginxletsencrypt.jpg)

Let’s Encrypt is a free, automated, and open certificate authority (CA), run for the public’s benefit. It is a service provided by the Internet Security Research Group (ISRG).

![ssl](./img/ssl.png)

A proxy server is a go‑between or intermediary server that forwards requests for content from multiple clients to different servers across the Internet. A reverse proxy server is a type of proxy server that typically sits behind the firewall in a private network and directs client requests to the appropriate backend server. A reverse proxy provides an additional level of abstraction and control to ensure the smooth flow of network traffic between clients and servers.

repository: admhpr/national-animals

repo_name: admhpr/national-animals


text:
# Repres Bootstrap Roadmap Bootstrap资源表现引擎路线图

## v1.0
1. Style partial
2. Script partial
3. Form Field partial
4. Form Select Box partial

## v1.0.1
1. Improve the Script partial to load Bootstrap Date Picker v1.6.1 by default
2. Improve the Script partial to load Bootstrap File Input v4.3.3 by default
3. Improve the Script partial to load Bootstrap Table v1.11.0 by default
4. Improve the Ruby Gem Specification to depend on the [repres-hyper_text](https://github.com/topbitdu/repres-hyper_text) Ruby Gem

## v1.0.2
1. Improve the Style partial to load Bootstrap v3.3.7 by default
2. Improve the Style partial to load Bootstrap Theme v3.3.7 by default
3. Improve the Script partial to load Bootstrap v3.3.7 by default
4. Improve the Ruby Gem Specification to support Rails v5.0

## v1.0.3
1. Improve the Script partial to load Bootstrap Date Picker v1.6.2 by default
2. Improve the Style partial to load Bootstrap Date Picker v1.6.2 by default

## v1.1
1. Application helper
2. Improve the Script partial to load Bootstrap File Input v4.3.4 by default

## v1.2
1. Form helper
2. Improve the Application Helper to deprecate the #``bootstrap_form_field`` & the #bootstrap_form_select_box methods
3. Improve the Form Field partial to support the rows attribute

## v1.3
1. Platform generator

## v1.3.1
1. Improve the Platform generator for the directory creation

## v1.3.2
1. Improve the Platform generator for the templates

## v1.4
1. Improve the Style partial to load Bootstrap Material Design v4.0.2 by default
2. Improve the Style partial to load Flat UI v2.3.0 by default
3. Improve the Script partial to load Bootstrap Material Design v4.0.2 by default
4. Improve the Script partial to load Flat UI v2.3.0 by default

## v1.5
1. Improve the Ruby Gem Specification to depend on the [repres-hyper_text](https://github.com/topbitdu/repres-hyper_text) v1.2 Ruby Gem
2. Improve the Script partial to support the :cdn option
3. Improve the Style partial to support the :cdn option

## v1.5.1
1. Improve the Application job for namespace
2. Improve the Application mailer for namespace
3. Improve the Application record for namespace
4. Improve the Platform generator

## v1.5.2
1. Improve the Style partial to load Bootstrap File Input v4.3.5 by default
2. Improve the Script partial to load Bootstrap File Input v4.3.5 by default

## v1.6
1. Improve the Form Field partial to support the :size option
2. Improve the Form Field partial to support the customized field class without the .input-group class

## v1.7
1. Improve the Form Select Box partial to support the customized field class without the .input-group class
2. Form Check Box partial
3. Form Radio Box partial

## v1.8
1. Improve the Form helper to add the #``bootstrap_form_check_box`` method & the #``bootstrap_form_radio_box`` method

## v1.9
1. Improve the Style partial to load jQuery Bootstrap Validator v0.5.3 by default
2. Improve the Script partial to load jQuery Bootstrap Validator v0.5.3 by default

## v1.10
1. Models RSpec examples manifest
2. Types RSpec examples manifest
3. Validators RSpec examples manifest

## v1.10.1
1. Improve the Ruby Gem Specification to never depend on the [rails](https://github.com/rails/rails)

## v1.10.2
1. Improve the Style partial to load Bootstrap Date Picker v1.6.4 by default
2. Improve the Style partial to load Bootstrap Date Time Picker v4.17.47 by default
3. Improve the Style partial to load Bootstrap Table v1.11.1 by default
4. Improve the Style partial to load Bootstrap File Input v4.3.8 by default
5. Improve the Script partial to load Bootstrap Date Picker v1.6.4 by default
6. Improve the Script partial to load Bootstrap Date Time Picker v4.17.47 by default
7. Improve the Script partial to load Bootstrap Table v1.11.1 by default
8. Improve the Script partial to load Bootstrap File Input v4.3.8 by default

## v1.11
1. Scaffold generator
2. Improve the Platform generator for the layout & the partial views

## v2.0
1. Improve the Application helper to remove the deprecated methods

repository: topbitdu/repres-bootstrap

repo_name: topbitdu/repres-bootstrap


text:
Southern Appalachians Soils
================

This is a methodology for creating the soil and hydrology maps necessary to Run LANDIS-II NECN. These methods were provided by Dr. Melissa Lucash and I want to thank her for sharing them.

The maps needed to run LANDIS-II are

-   Soil Depth 1
-   Soil Drain 1
-   Base Flow to Streams 4
-   Storm Flow to Streams 4
-   Field Capacity 1
-   Wilting Point 1
-   Percent Sand 1
-   Percent Clay 1
-   Soil Maps representing 4 layers of carbon pools 2
-   Soil Maps representing 4 layers of nitrogen pools 2
-   Dead Wood on the Surface 3
-   Dead Wood of Coarse Roots 3

All of the Maps 1 are derived from the USGS ggsurgo database. The Maps 2 are derived from total soil carbon maps and estimations of each pool. The Maps 3 is interpolated from FIA data. BaseFlow and Storm Flow are treated as stationary variables in this simulation.

For more information on these parameters visit <https://drive.google.com/file/d/1RrDSn0xIA7p5hHxcWx-bWnaBzNo5SwdA/view>

I began by getting the carbon and nitrogen Maps. I started with a total soil carbon map(West 2014), reprojected it, cut to the extent and then used estimated ratios of carbon in each pool (surface, fast, medium and slow) as well as C: N ratios and Dr. Lucash's work to create the soil maps.

As a fraction of total carbon each carbon pool is:

-   SOM1surfC=.01
-   SOM1soilC=.02
-   SOM2C=.59
-   SOM3C=.38

Each nitrogen map is then created by multiplying the carbon in that pool by:

-   SOM1surfN=.1
-   SOM1soilN=.1
-   SOM2N=.04
-   SOM3N=.118

A minimum value of 2.0 was set for the nitrogen value to avoid complete lack of N in some stands by having low soil carbon

Source: West, T.O. 2014. Soil Carbon Estimates in 20-cm Layers to 1-m Depth for the Conterminous US, 1970-1993. Data set. Available on-line \[<http://daac.ornl.gov>\] from Oak Ridge National Laboratory Distributed Active Archive Center, Oak Ridge, Tennessee, USA. <http://dx.doi.org/10.3334/ORNLDAAC/1238>

Include here are the rasters that this resulted in:

![](Soils_files/figure-markdown_github/unnamed-chunk-8-1.png)![](Soils_files/figure-markdown_github/unnamed-chunk-8-2.png)

\*\*\*\*Soils maps in grams per meter 2

#### USGS SSurgo work

We need to pull together a file for Feild Capacity, Wilt Point, Soil Depth, Flood Frequency, Sand Percentage, and Clay Percentage. These are done using the gssurgo and ssurgo database. The Metadata for the ggsurgo and ssurgo fields can be found at

[SSURGO/STATSGO2 Structural Metadata and Documentation](https://www.nrcs.usda.gov/wps/portal/nrcs/detail/soils/survey/geo/?cid=nrcs142p2_053631)

ggsurgo is gridded to a 10m resolution which is much smaller than we need. So for processing, I aggregated it 50m.

ggsurgo works on a component and map key system, requiring attribute joins to create a map of a single trait. The four tables I join here are the chorizon,component,conmonth, and corestriction tables.

This is a key to the fields used

-   Draiange = component:drainagecl
-   Flood Frequency=Conmonth:Flodfreqdcl
-   Wiltpoint= chorizon:wfifteenbar:r
-   Feild capacity= wthirdbar:r
-   Sand Percentage= Chorizon:sandtotal\_R:RV
-   Clay Percentage= Chorizon:claytotal\_R:RV
-   Soil depth = corestriction:resdept\_r

Running this requires the map key raster( later noted as *State*\_Raster\_Sub.tif) and the geodatabase file associated with that state

Ran into some trouble with the merge so passed to Q-gis in order to do the merging

Now we go back to python to cut each merged map to the study area.

These are the resulting maps.

![](Soils_files/figure-markdown_github/unnamed-chunk-13-1.png)![](Soils_files/figure-markdown_github/unnamed-chunk-13-2.png)

#### Dead Wood

To calculate dead wood I isolated each FIA plot in the study area within the last cycle. I looked at the total carbon down dead and interpolated it to the whole study area. I assumed that dead coarse roots make up about a third of that value.

After this, I interpolated in QGIS to get a map with continuous coverage. Here we clean and shape to make the final map.

![](Soils_files/figure-markdown_github/unnamed-chunk-18-1.png)

![](Soils_files/figure-markdown_github/unnamed-chunk-19-1.png)

#### Data clean up and Formatting.

Some additional steps that were used to prepare the maps for LANDIS-II use.

-   The data needs to be resampled to the same size and in the same projection as the initial communities file
-   Create a simple ecoregion for testing
-   Find which files may not overlap with the ecoregion and assigned the missing values a mean value
-   Sand and Clay files need to be between 0 and 1.0. The USGS values are percentage as 100s (0.0-1.0). So here they are divided by 100. Also to clean up values they are minimized at .1
-   Depth that is zero can never grow trees and will trigger weird errors. Here I find each of these and turn the ecoregion to off.
-   Wilt point cannot be greater field capacity so their difference was reduced to 0.01

##### Resample to the same resolution.

![](Soils_files/figure-markdown_github/unnamed-chunk-23-1.png)


text:
## Wall Drawing #289 (1976)

A six-inch (15cm) grid covering each of the four black walls. White lines to points on the grid.
1st wall: 24 lines from the center;
2nd wall: 12 lines from the midpoint of each of the sides;
3rd wall: 12 lines from each corner;
4th wall: 24 lines from the center, 12 lines from the midpoint of each of the sides, 12 lines from each corner.

repository: wholepixel/solving-sol

repo_name: wholepixel/solving-sol


text:
---
title: lib-db-indexeddb-community
tags: [community, indexeddb]
created: 2022-06-13T02:56:38.743Z
modified: 2022-06-13T02:56:51.029Z
---

# lib-db-indexeddb-community

# guide

# discuss-stars
- ## [How to update in indexeddb instead of override all the data?](https://stackoverflow.com/questions/49846187)
- I would point out that calling `put` is not equivalent to SQL update.
  - When putting a new object into a store, if another object with the same keypath (id) already exists, that existing object will be replaced, entirely.
  - indexedDB does not modify the existing object in the store, a property at a time, instead it completely replaces the old object with a new object.
- If you want to only replace some properties of an object, use two requests.
  - One request to get the existing object in the store,
  - and a second request to store the modified object.
  - In between the get and put, make changes to the object.
- This behavior forces the dev to consider idb store design carefully.
  - Imagine wanting to update a single prop with a true/false on 50 objs, each obs has other props with very large strings.
  - You have to read those large objs out, update your true/false prop and write them back.
  - This is not efficient.

- ## [Dexie.js: Update nested object via dynamic id](https://stackoverflow.com/questions/69967027)
- You're updating the entire object just to update one entry in an array.
  - Perhaps it is easier to store each nested object as its own object in an object store?
  - Then you can add, remove, edit, and reorder as you see fit.
- You can store the parent object's details redundantly within each subobject.
  - Store parent id within each child object, then create an index on the parent id,
  - then do getAll on the child object store using the parent id index to load all of the child objects (and sort).

- ## [Using indexeddb as a versioned database with multiple versions](https://stackoverflow.com/questions/60400573)
- IDB uses versioning as a way to let you change the structure. You can only modify object stores when the version changes.
- So you are barking up the wrong tree here, using versioning as a way of partitioning data. I think your solution of an archive table actually makes much more sense.
# discuss
- ##

- ##

- ## 如果把 IndexedDB 当成一个 KV 缓存，如何实现过期一个月自动清除呢？ 有什么思路吗？
- https://twitter.com/hamsterbase/status/1679479640753340418
- 可参考支持过期失效的localStorage
- Value头部带过期时间，懒删除+定时删除

- ## [Indexing array values in an object in an IndexedDB - Stack Overflow](https://stackoverflow.com/questions/36921561/indexing-array-values-in-an-object-in-an-indexeddb)
- the missing of the possibility to index object values in arrays, makes using indexedDB really unneeded complicated. It's a failure in design. This forces the developer to do things like in relational DBs, while lacking all the possibilities of SQL.

- ## [IndexedDB - Is keyPath already an Index? - Stack Overflow](https://stackoverflow.com/questions/31908605/indexeddb-is-keypath-already-an-index)
- It doesn't technically create an index, but it's basically the same thing.
  - Every object in the database is associated with a key.
  - If you set a key path, then they key is whatever the key path evaluates to.
  - Then you can query with for that key (e.g. IDBObjectStore.get), no index needed.
- Indexes only come into play when you want to efficiently query your database for something besides the key.

- ## ios supports indexeddb?
- https://stackoverflow.com/questions/25818860
- To sum up, indexedDB would run on android 4.4+ and iOS8+.


text:
# Pitt Bop-It (Design Project #2)
By: Jason Matuszak, Zach Kubitz, and Joseph Tonecha
# Our Design:
Design Name: Type-it!
* Inputs
    * Keypad ("Type-it" and game start)
    * Potentiometer ("Twist-it")
    * Arcade Button ("Bop-it")
    * Dip Switch (Power)
* Outputs
    * Hex Display (Score Output)
    * Speaker (Game Commands)
* Enclosure and Layout
    * 4x4x12 square PVC pipe
    * Keypad and Arcade Button on each end
    * Speaker, Hex display, Potentiometer, and Dip switch on front
    * Microcontroller and other internal devices within the PVC pipe
# Team Member 1: Jason Matuszak
Senior: Computer Engineering major
* Interests:
    * Robotics
    * Machine-Learning
* Hobbies:
    * Video Games
    * Skateboarding

Role: Hardware soldering and enclosure construction
# Team Member 2: Zach Kubitz
Junior, Computer Engineering major
* Interests: Robotics, Coding
* Hobbies: Hanging with the boys, Video games, Hockey

Role: Enclosure design and Device Programming
# Team Member 3: Joseph Tonecha
Junior, Electrical Engineering major

Interests: Power, Machine Coding

Hobbies: Disc Golf and tennis

url: https://raw.githubusercontent.com/ZachKubitz/github-slideshow/0d2af52d7b6f23f0cd88f8dfa506adda539840b3/_posts/Pitt Bop-It Design Project #2.md

repository: ZachKubitz/github-slideshow

filename: Pitt Bop-It Design Project #2.md

gha_language: Ruby

repo_name: ZachKubitz/github-slideshow


text:
# PIM Samples

## Getting Started

To use the PIM API samples in this project, credentials (AppKey and AppSecret) must first be obtained by contacting Optimizely support at<EMAIL_ADDRESS>
**IMPORTANT** Credentials provided will be **readonly** and limited to Http GET operations!

Once credentials have been obtained, create a document in the solution root folder called **ConnectionInformation.json** from the following sample code

```json
{
  "AppKey": "Enter the App Key",
  "AppSecret": "Enter the App Secret"
}
```

Then simply start the console application to run the example test queries by entering their query number or name using Visual Studio or the .NET cli command in the checkout out code folder

```txt
dotnet run
```

## Requirements

Any applications using this PIM API codebase must support at least one of the following

* [.NET Standard 2.0 ](https://docs.microsoft.com/en-us/dotnet/standard/net-standard) (includes cross platform support with .NET Core)
* [.NET Framework 4.6.1](https://www.microsoft.com/en-us/download/details.aspx?id=49981) (Windows only)

## Important Notes

* API uses [OData](https://www.odata.org/)
* Queryies that specify a $top will never include a next link.
* Queries that do not specify $top will return at most 1,000 results. If more are available a next link will be provided for pagination in the response.
* The console application does not demonstrate iterating a full product set, but sample code is available in the EntityIteratorTests.cs class in the test project.
* JSON Serialization can be done with either [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/) or [System.Text.Json](https://www.nuget.org/packages/System.Text.Json/) implemented using a custom IJsonSerializer interface in the Pim API Project.

## Entities

The following PIM entities are available in this API:

* Assets
* CategoryTree
* Product [OData Open Type](https://docs.microsoft.com/en-us/aspnet/web-api/overview/odata-support-in-aspnet-web-api/odata-v4/use-open-types-in-odata-v4)
* Property
* PropertyGroup
* Template
* Website

## Serializers

Both [Newtonsoft.Json](https://www.nuget.org/packages/Newtonsoft.Json/) and [System.Text.Json](https://www.nuget.org/packages/System.Text.Json/) are supported. Basic serialization and deserialization is available in the PimApi.Serialization namespace. Entities do not utilize any special attributes that each serializer provides to allow for choice. If a different serializer is desired an IJsonSerializer interface is provided for customization, but will not be supported.

## Known Issues

* [OData SQL Query Generation](https://github.com/dotnet/efcore/issues/24877)

```cs
 // example of request with nested $expand that should work but does not
 // the workaround is to not use nested $expands and do a second request to get extra data
 var shouldWorkButFails = '/products?$expand=categorytrees($expand=categorytree($select=name,id))';
```

## Useful Resources

* [OData](https://www.odata.org/)
* [OData Overview](https://docs.microsoft.com/en-us/odata/overview)
* [Querying ODATA Endpoints](https://docs.microsoft.com/en-us/odata/webapi/first-odata-api#query-resources-using-odata)

repository: episerver/pim-api

repo_name: episerver/pim-api


text:
---
layout: essay
title: docker
start: oct 11, 2020
last: oct 11, 2020
---

look at this sequence:
write-program -> test -> rewrite -> build -> deploy
where does docker fit into this sequence?

docker is like a virtual-machine but lighter?

if a national government is like an operating system, a state-government is like a virtual-machine, what is docker like?
turns out docker's like a city government - lighter on the resources and closer to the operating system.

the idea behind a docker is, instead spinning up a whole new operating system, spin up a container instead.
that way you only get what you really need and get rid of the stuff you don't need.
like a GUI.
or a kernel.

you can take this idea to anywhere where you need some serious savings on resources.
where resources can be like money, time, computation, space.
think about it.

there's no such things as a free lunch.
what are the trade offs involved?


text:
# axios-mock-adapter

[![Build Status](https://travis-ci.org/ctimmerm/axios-mock-adapter.svg?branch=master)](https://travis-ci.org/ctimmerm/axios-mock-adapter)
[![devDependency Status](https://david-dm.org/ctimmerm/axios-mock-adapter/dev-status.svg)](https://david-dm.org/ctimmerm/axios-mock-adapter#info=devDependencies)

Axios adapter that allows to easily mock requests

## Installation

Using npm:

`$ npm install axios-mock-adapter --save-dev`

It's also available as a UMD build:

* https://unpkg.com/axios-mock-adapter/dist/axios-mock-adapter.js
* https://unpkg.com/axios-mock-adapter/dist/axios-mock-adapter.min.js

axios-mock-adapter works on Node as well as in a browser, it works with axios v0.9.0 and above.

## Example

Mocking a `GET` request

```js
var axios = require('axios');
var MockAdapter = require('axios-mock-adapter');

// This sets the mock adapter on the default instance
var mock = new MockAdapter(axios);

// Mock any GET request to /users
// arguments for reply are (status, data, headers)
mock.onGet('/users').reply(200, {
  users: [
    { id: 1, name: 'John Smith' }
  ]
});

axios.get('/users')
  .then(function(response) {
    console.log(response.data);
  });

// If a request is made for a URL that is not handled in the mock adapter,
// the promise will reject with a response that has status 404.
```

To add a delay to responses, specify a delay ammount (in milliseconds) when instantiating the adapter

```js
// All requests using this instance will have a 2 seconds delay:
var mock = new MockAdapter(axiosInstance, { delayResponse: 2000 });
```

You can restore the original adapter (which will remove the mocking behavior)

```js
mock.restore();
```

You can also reset the registered mock handlers with `reset`

```js
mock.reset();
```

`reset` is different from `restore` in that `restore` removes the mocking from the axios instance completely,
whereas `reset` only removes all mock handlers that were added with onGet, onPost, etc. but leaves the mocking in place.

Passing a function to `reply`

```js
mock.onGet('/users').reply(function(config) {
  // `config` is the axios config and contains things like the url

  // return an array in the form of [status, data, headers]
  return [200, {
    users: [
      { id: 1, name: 'John Smith' }
    ]
  }];
});
```

Using a regex

```js
mock.onGet(/\/users\/\d+/).reply(function(config) {
  // the actual id can be grabbed from config.url

  return [200, {}];
});
```

Chaining is also supported

```js
mock
  .onGet('/users').reply(200, users)
  .onGet('/posts').reply(200, posts);
```

`.replyOnce()` can be used to let the mock only reply once

```js
mock
  .onGet('/users').replyOnce(200, users) // After the first request to /users, this handler is removed
  .onGet('/users').replyOnce(500);       // The second request to /users will have status code 500
                                         // Any following request would return a 404 since there are
                                         // no matching handlers
```

Mocking any request to a given url

```js
// mocks GET, POST, ... requests to /foo
mock.onAny('/foo').reply(200);
```

`.onAny` can be useful when you want to test for a specific order of requests

```js
// Expected order of requests:
const responses = [
  ['GET',  '/foo', 200, { foo: 'bar' }],
  ['POST', '/bar', 200],
  ['PUT',  '/baz', 200]
];

mock.onAny(/.*/).reply(config => {
  const [method, url, ...response] = responses.shift();
  if (config.url === url && config.method.toUpperCase() === method) return response;
  // Unexpected request, error out
  return [500, {}];
});
```

Mocking a request with a specific request body/data

```js
// usable with reply, replyOnce, onAny, onPatch, onPost, onPut ...
mock.onPut('/withBody', { request: 'body' }).reply(200);
```

repository: dan-turner/axios-mock-adapter

repo_name: dan-turner/axios-mock-adapter


text:
This incompatibility is inspired by the [dotty-staging-fork](https://github.com/dotty-staging/scalacheck) of [scalacheck](https://github.com/typelevel/scalacheck) from this [original commit](https://github.com/dotty-staging/scalacheck/commit/dc37c607cd9715c4e0ddc676314c6784cbf2beb5).

## Error message

As of `0.25.0-RC2` the error message is:

```
[error] -- Error: /home/piquerez/scalacenter/scala-3-migration-guide/incompat/access-modifier/src/main/scala-2.13/access-modifier.scala:4:19
[error] 9 |  true.foo()
[error]   |  ^^^^
[error]   |Found:    (true : Boolean)
[error]   |Required: ?{ foo: ? }
[error]   |Note that implicit extension methods cannot be applied because they are ambiguous;
[error]   |both method boolFoo in object Foo and method lazyBoolFoo in object Foo provide an extension method `foo` on (true : Boolean)
```

## Explanation

In Scala 2 the implicit conversion from `Boolean` wins over the implicit conversion from `=> Boolean`. It is not the case in Scala 3.


text:
Thank you for contributing ValueMax!
=========================================

Thanks for thinking about contributing to this project! This project was built a) because I wanted a tool to make these calculations and b) for learning. Now that the basic functionality is in place, I am inviting other learners to collaborate and make it even more robust. 🤗

This is a great project for working on all skills like coding, writing documentation, writing tests, implementing 3rd party services, etc. If you don't like the sound of any of those, QA is also helpful—you can add bug reports to the [issues](https://github.com/niamurrell/value-app/issues). All contributions welcome!

## Where To Start

To contribute code to this project you can suggest new features, fix an existing functionality for performance or readability, work on open issues, etc. Here's a general guide for contributing:

1. **Find an issue or enhancement to work on.** You could find this by using the site or looking through the [open issues](https://github.com/niamurrell/value-app/issues).
2. **Start a discussion.** This step is optional, but if you're making a big change to the codebase or adding a new feature, it's recommended. This will give us a chance to make sure your change or feature is in scope and alignment for the app, and that your work won't conflict with existing work in progress.
3. **Check pending pull requests.** Take a look through the [pending pull requests](https://github.com/niamurrell/value-app/pulls) to make sure someone else hasn't already started working on the issue you've chosen. New pull requests are always welcome, however duplicate pull requests will not be merged. You can always add new commits to the existing pull request before it is merged—it will get automatically updated.
4. **Fork the repo.** You'll find the **Fork** button in the top-right corner of this repo. Once you're taken to your fork of the repo, use the green **Clone or download** button to open the project on your local machine. You can check the further installation requirements in the project [README](https://github.com/niamurrell/value-app/blob/master/README.md#installation).
5. **Commit your changes with meaningful commits.** Take a look through [previous commits](https://github.com/niamurrell/value-app/commits?author=niamurrell) to see how I'm defining this. Don't forget to add yourself to the list of contributors in the project README! Push commits to your fork of the repo.
6. **Submit a pull request.** 👍👍

## Templates

Please use issue/PR templates which are inserted automatically.

## Resources

* [Node.js](https://nodejs.org/en/) Documentation
* [Express](https://expressjs.com/) Documentation
* [MongoDB](https://www.mongodb.com/) & [Mongoose](https://mongoosejs.com/) Documentation
* [MomentJS](https://momentjs.com/) Documentation
* [Semantic UI](https://semantic-ui.com/) Documentation
* [Git](https://www.atlassian.com/git/tutorials) Tutorials
* [GitHub](https://guides.github.com/activities/hello-world/) guide for pull requests & more

repository: pfistersimon/value-app

repo_name: pfistersimon/value-app


text:
---
external help file: PowershellForDocker-help.xml
Module Name: PowershellForDocker
online version: https://github.com/dcjulian29/scripts-powershell/blob/main/Modules/PowershellForDocker/docs/Start-DockerCompose.md
schema: 2.0.0
---

# Start-DockerCompose

## SYNOPSIS

Builds, (re)creates, and starts containers specified in the Compose file.

## SYNTAX

```powershell
Start-DockerCompose [[-ComposeFile] <String>] [<CommonParameters>]
```

## DESCRIPTION

The Start-DockerCompose function calls the docker compose up command using the specified Compose file.

If there are existing containers for a service, and the service’s configuration or image was changed after the container’s creation, docker compose picks up the changes by stopping and recreating the containers (preserving mounted volumes).

## EXAMPLES

### Example 1

```powershell
PS C:\> Start-DockerCompose

Creating network "portainer_default" with the default driver
Creating portainer_portainer_1 ... done
```

This example starts a Portainer container.

## PARAMETERS

### -ComposeFile

Specify a docker compose file. (default: docker-compose.yml)

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

Required: False
Position: 0
Default value: None
Accept pipeline input: False
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).


text:
Quickstart
==========

Nice to you have here! Let's quickly start our xplr journey with the
following steps:

- [Install][1]
- [Post Install][2]

[1]:install.md
[2]:post-install.md


text:
# Instructions

Tested on:
- Ubuntu Server 20.04
- Ansible 4.3.0, ansible-core 2.11.3
- Docker version 20.10.8

You can check if any related Docker containers are already in existence using the following commands:

    docker ps -a --filter ancestor=fedora-moo
    docker images --filter reference='fedora*'

Next, ensure you have Docker support installed for your Python environment - on my demo system I used the following commands:

    sudo apt install python3-docker
    export ANSIBLE_PYTHON_INTERPRETER=$(which python3)

Then run the playbook as follows to build and run the container:

    ansible-playbook -i mastery-hosts docker-interact.yaml

Now run the two Docker queries again to see the running container:

    docker ps -a --filter ancestor=fedora-moo
    docker images --filter reference='fedora*'

Also check the container is running with:

    curl http://localhost:8080


text:
# MBTA Subway Service

This service is a docker compose project made up of 3 different docker images: app, web, and db. Docker compose will take all three and set them up to work together.

## Build

Docker compose makes this process about as seemless as it can be. Just make sure you have Docker and docker-compose installed and running.

```bash
docker-compose build
```

## Run

Make sure that you have nothing running on ports 3306 or 8080 as these will be needed in the application.

```bash
docker-compose up
```
If you want to rebuild the images before running
```bash
docker-compose up --build
```
## Use
Navigate to [localhost:8080](http://localhost:8080). You should see a very basic landing page as a front-end interface for accessing the API. Enter one of the suggestions like "stops-in-somerville" and click the button to view the results

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)

repository: mcnameel/MBTA-Subway

repo_name: mcnameel/MBTA-Subway


text:
# Handling form data in our Hapi/Node app

## Excercise 4-0: Setting up our form

### What to do:

* Set up a form in public/index.html that takes a red, green, and blue input
* and posts to /addColor

## Excercise 4-1: Handling form data in Hapi

### What to do:

Write a route that watches for POST to /addColor. Use the form data to make the same request to the robot server's /addColor that you did with your GET /addColor route.

### Notes:

When you write a POST route, Hapi gives you access to the form data through `request.payload`!


text:
# **README Generator**

![GitHub license](https://img.shields.io/badge/Made%20by-%40paulinalo22-blue)

This super fun and functional app allows peeps to provide information about their project. Then, the computer (HAL) will gather all the information and generate a super professional README file that can be inserted to their github repo! Say goodbye to boring looking READMEs.
# **Demonstration**
![](Demo.gif)

# **README example**

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## Description

This is a README example to illustrate the functionality of this app.

## Table of contents

- [Description](#Description)
- [Installation](#Installation)
- [Usage](#Usage)
- [Licence](#License)
- [Contributors](#Contributors)
- [Test](#Test)
- [Repository Link](#Repository)
- [GitHub Info](#GitHub)

## Installation

        npm install

## Usage

for fun

## License

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Contributors

![GitHub license](https://img.shields.io/badge/Made%20by-%40paulinalo22-blue)

## Test

Tests: done

## Repository

- [Project Repo](https://github.com/paulinalo22/homework_readUwroteU)

## GitHub

![Image of me](https://avatars0.githubusercontent.com/u/62158203?v=4)
- [GitHub Profile](https://github.com/paulinalo22)


text:
Source Code for this Example App

## Preview
In this image the process was like this:
- Open the app (Home Page).
- Go to *Add New List* page.
- Input some data.
- Close and Terminate on task view.
- Reopen the app again.

And magic happens! All the inputs were retained and not just that but also including the page where you left off. Navigation history is also persisted which means pressing the system back button will navigate you to the correct previous page.

![persistent preview](https://i.imgur.com/9CrFNRG.png)

#### Dark Mode
This theming is done manually using momentum.

![dark mode](https://i.imgur.com/WurrjR1.png)

#### [Source Code for this Example App](https://github.com/xamantra/listify)
This example app shows how powerful momentum is.

repository: drago-vlc/momentum

repo_name: drago-vlc/momentum


text:
---
layout:     post
title:      Jumping Ship
date:       2016-02-28
summary:    Novi was a highlight in my life and i’ll never forget the many lessons I learned.
categories: startup work
---

Sometimes you're not meant to continue riding the ship.

This is the reality for me with my startup. I worked for three years on [Novi Security](http://www.novisecurity.com) (nearly 18 months full-time) and have sadly hung up my cleats and moved to a new adventure.

Novi was a highlight in my life and i’ll never forget the many lessons I learned.

- Entrepreneurship is the noblest of missions.
- If you dream it and work your heart out, you’ll do some amazing things.
- The ecosystem startup is supportive, vibrant, and the heart and soul of the American dream.
- Grinding day in and day out is much tougher than you can imagine.
- Family is most important.

I left Novi because I needed more financial support for my family. My wife and I had our first son in July. We made it as far as we could.

I wish my friends at Novi the best of luck. They will be successful and I am grateful that I could play a small part in building the foundation.

extension: markdown