text:
![Video.js logo][logo]

# [Video.js - HTML5 Video Player][vjs]

[![Build Status][travis-icon]][travis-link]
[![Coverage Status][coveralls-icon]][coveralls-link]
[![Greenkeeper badge](https://badges.greenkeeper.io/videojs/video.js.svg)](https://greenkeeper.io/)
[![Slack Status][slack-icon]][slack-link]

[![NPM][npm-icon]][npm-link]

> Video.js is a web video player built from the ground up for an HTML5 world. It supports HTML5 video and Media Source Extensions, as well as other playback techs like YouTube and Vimeo (through [plugins][plugins]). It supports video playback on desktops and mobile devices. This project was started mid 2010, and the player is now used on over ~~50,000~~ ~~100,000~~ ~~200,000~~ ~~400,000~~ [600,000 websites][builtwith].

## Table of Contents

* [Quick Start](#quick-start)
* [Contributing](#contributing)
* [Code of Conduct](#code-of-conduct)
* [License](#license)

## Quick Start

Thanks to the awesome folks over at [Fastly][fastly], there's a free, CDN hosted version of Video.js that anyone can use. Add these tags to your document's `<head>`:

```html
<link href="//vjs.zencdn.net/7.10.2/video-js.min.css" rel="stylesheet">
<script src="//vjs.zencdn.net/7.10.2/video.min.js"></script>
```

> For the latest version of video.js and URLs to use, check out the [Getting Started][getting-started] page on our website.

Video.js version 7 (and newer) CDN builds do not send any data to Google Analytics.

In older versions of Video.js (6 and earlier), in the `vjs.zencdn.net` CDN-hosted versions we include a [stripped down Google Analytics pixel](https://github.com/videojs/cdn/blob/master/src/analytics.js) that tracks a random sampling (currently 1%) of players loaded from the CDN. This allows us to see (roughly) what browsers are in use in the wild, along with other useful metrics such as OS and device. If you'd like to disable analytics, you can simply include the following global before including Video.js via the free CDN:

```html
<script>window.HELP_IMPROVE_VIDEOJS = false;</script>
```

Alternatively, you can include Video.js by getting it from [npm](https://videojs.com/getting-started/#install-via-npm), downloading from [GitHub releases](https://github.com/videojs/video.js/releases) or by including it via [unpkg](https://unpkg.com) or another JavaScript CDN like CDNjs. These releases _do not_ include Google Analytics tracking at all.

```html
<!-- unpkg : use the latest version of Video.js -->
<link href="https://unpkg.com/video.js/dist/video-js.min.css" rel="stylesheet">
<script src="https://unpkg.com/video.js/dist/video.min.js"></script>

<!-- unpkg : use a specific version of Video.js (change the version numbers as necessary) -->
<link<EMAIL_ADDRESS>rel="stylesheet">
<script<EMAIL_ADDRESS>
<!-- cdnjs : use a specific version of Video.js (change the version numbers as necessary) -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.10.2/video-js.min.css" rel="stylesheet">
<script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/7.10.2/video.min.js"></script>
```

Next, using Video.js is as simple as creating a `<video>` element, but with an additional `data-setup` attribute. At a minimum, this attribute must have a value of `'{}'`, but it can include any Video.js [options][options] - just make sure it contains valid JSON!

```html
<video
    id="my-player"
    class="video-js"
    controls
    preload="auto"
    poster="//vjs.zencdn.net/v/oceans.png"
    data-setup='{}'>
  <source src="//vjs.zencdn.net/v/oceans.mp4" type="video/mp4"></source>
  <source src="//vjs.zencdn.net/v/oceans.webm" type="video/webm"></source>
  <source src="//vjs.zencdn.net/v/oceans.ogv" type="video/ogg"></source>
  <p class="vjs-no-js">
    To view this video please enable JavaScript, and consider upgrading to a
    web browser that
    <a href="https://videojs.com/html5-video-support/" target="_blank">
      supports HTML5 video
    </a>
  </p>
</video>
```

When the page loads, Video.js will find this element and automatically setup a player in its place.

If you don't want to use automatic setup, you can leave off the `data-setup` attribute and initialize a `<video>` element manually using the `videojs` function:

```js
var player = videojs('my-player');
```

The `videojs` function also accepts an `options` object and a callback to be invoked
 when the player is ready:

```js
var options = {};

var player = videojs('my-player', options, function onPlayerReady() {
  videojs.log('Your player is ready!');

  // In this context, `this` is the player that was created by Video.js.
  this.play();

  // How about an event listener?
  this.on('ended', function() {
    videojs.log('Awww...over so soon?!');
  });
});
```

If you're ready to dive in, the [Getting Started][getting-started] page and [documentation][docs] are the best places to go for more information. If you get stuck, head over to our [Slack channel][slack-link]!

## Contributing

Video.js is a free and open source library, and we appreciate any help you're willing to give - whether it's fixing bugs, improving documentation, or suggesting new features. Check out the [contributing guide][contributing] for more!

_Video.js uses [BrowserStack][browserstack] for compatibility testing._

## [Code of Conduct][coc]

Please note that this project is released with a [Contributor Code of Conduct][coc]. By participating in this project you agree to abide by its terms.

## [License][license]

Video.js is [licensed][license] under the Apache License, Version 2.0.

[browserstack]: https://browserstack.com

[builtwith]: https://trends.builtwith.com/media/VideoJS

[contributing]: CONTRIBUTING.md

[coveralls-icon]: https://coveralls.io/repos/github/videojs/video.js/badge.svg?branch=main

[coveralls-link]: https://coveralls.io/github/videojs/video.js?branch=main

[docs]: https://docs.videojs.com

[fastly]: https://www.fastly.com/

[getting-started]: https://videojs.com/getting-started/

[license]: LICENSE

[logo]: https://videojs.com/logo-white.png

[npm-icon]: https://nodei.co/npm/video.js.png?downloads=true&downloadRank=true

[npm-link]: https://nodei.co/npm/video.js/

[options]: docs/guides/options.md

[plugins]: https://videojs.com/plugins/

[slack-icon]: http://slack.videojs.com/badge.svg

[slack-link]: http://slack.videojs.com

[travis-icon]: https://travis-ci.org/videojs/video.js.svg?branch=main

[travis-link]: https://travis-ci.org/videojs/video.js

[vjs]: https://videojs.com

[coc]: CODE_OF_CONDUCT.md

	/*
		常用方法
		播放：myPlayer.play();
		暂停：myPlayer.pause();
		获取播放进度：var whereYouAt = myPlayer.currentTime();
		设置播放进度：myPlayer.currentTime(120);
		视频持续时间，加载完成视频才可以知道视频时长，且在flash情况下无效: var howLongIsThis = myPlayer.duration();
		缓冲，就是返回下载了多少: `var whatHasBeenBuffered = myPlayer.buffered();
		百分比的缓冲: var howMuchIsDownloaded = myPlayer.bufferedPercent();
		声音大小（0-1之间）: var howLoudIsIt = myPlayer.volume();
		设置声音大小: myPlayer.volume(0.5);
		取得视频的宽度: var howWideIsIt = myPlayer.width();
		设置宽度：myPlayer.width(640);
		获取高度: var howTallIsIt = myPlayer.height();
		设置高度：: myPlayer.height(480);
		一步到位的设置大小：myPlayer.size(640,480);
		全屏: myPlayer.enterFullScreen();
		离开全屏 : myPlayer.enterFullScreen();
		(4)、网络状态
		myPlayer.currentSrc; //返回当前资源的URL
		myPlayer.src = value; //返回或设置当前资源的URL
		myPlayer.canPlayType(type); //是否能播放某种格式的资源
		myPlayer.networkState; //0.此元素未初始化 1.正常但没有使用网络 2.正在下载数据 3.没有找到资源
		myPlayer.load(); //重新加载src指定的资源
		myPlayer.buffered; //返回已缓冲区域，TimeRanges
		myPlayer.preload; //none:不预载 metadata:预载资源信息 auto:立即加载视频
		(5)、播放状态
    myPlayer.currentTime = value; //当前播放的位置，赋值可改变位置
    myPlayer.startTime; //一般为0，如果为流媒体或者不从0开始的资源，则不为0
    myPlayer.duration; //当前资源长度 流返回无限
    myPlayer.paused; //是否暂停
    myPlayer.defaultPlaybackRate = value;//默认的回放速度，可以设置
    myPlayer.playbackRate = value;//当前播放速度，设置后马上改变
    myPlayer.played; //返回已经播放的区域，TimeRanges，关于此对象见下文
    myPlayer.seekable; //返回可以seek的区域 TimeRanges
    myPlayer.ended; //是否结束
    myPlayer.autoPlay; //是否自动播放
    myPlayer.loop; //是否循环播放
		(6)、视频控制
    myPlayer.controls;//是否有默认控制条
    myPlayer.volume = value; //音量
    myPlayer.muted = value; //静音
    TimeRanges(区域)对象
    TimeRanges.length; //区域段数
    TimeRanges.start(index) //第index段区域的开始位置
    TimeRanges.end(index) //第index段区域的结束位置
		*/

    createVideoplayer(){
				var player = videojs(document.getElementById('videoplayer'), {
				  controls: true, // 是否显示控制条
				  poster: 'https://qn.leadership.dv.zhizunweb.com/media/test.jpg', // 视频封面图地址
				  preload: 'auto',
				  autoplay: false,
				  fluid: true, // 自适应宽高
				  language: 'zh-CN', // 设置语言
				  muted: false, // 是否静音
				  inactivityTimeout: false,
				  controlBar: { // 设置控制条组件
				    /* 设置控制条里面组件的相关属性及显示与否
				    'currentTimeDisplay':true,
				    'timeDivider':true,
				    'durationDisplay':true,
				    'remainingTimeDisplay':false,
				    volumePanel: {
				      inline: false,
				    }
				    */
				    /* 使用children的形式可以控制每一个控件的位置，以及显示与否 * /
				    children: [
				      {name: 'playToggle'}, // 播放按钮
				      {name: 'currentTimeDisplay'}, // 当前已播放时间
				      {name: 'progressControl'}, // 播放进度条
				      {name: 'durationDisplay'}, // 总时间
				      { // 倍数播放
				        name: 'playbackRateMenuButton',
				        'playbackRates': playbackRates
				      },
				      {
				        name: 'volumePanel', // 音量控制
				        inline: false, // 不使用水平方式
				      },
				      {name: 'FullscreenToggle'} // 全屏
				    ]
				  },
				  sources:[ // 视频源
				      {
								type: 'video/mp4',
				        src: 'https://qn.leadership.dv.zhizunweb.com/media/test.mp4',
				        poster: 'https://qn.leadership.dv.zhizunweb.com/media/test.jpg'
				      }
				  ]
				}, function (){
				  console.log('视频可以播放了',this);
				});
			}

gha_license_id: NOASSERTION


text:
How to configure this bundle?
=============================

If you installed this bundle using Symfony Flex, it comes with a default configuration.
**It is very important to change the key sets otherwise you will have a security issue.**

*Note: you can find [a complete example from our application configuration used for the tests](https://github.com/Spomky-Labs/lexik-jose-bridge/blob/v2.0/Tests/app/config/config.yml#L27-L41).*

## Without Encryption

```yml
lexik_jose:
    ttl: 3600                                     // The TTL of each token issued by the bundle
    server_name: 'https://my.super.service/'      // This value is used to verify the issuer of the tokens
    audience: 'MyProject'                         // This value is used to verify the audience of the tokens. If not set `server_name` will be used.
    key_set: '%env(LEXIK_JOSE_SIGNATURE_KEYSET)%' // The signature key set (loaded through an env variable)
    key_index: 0                                  // The index of the signature key in the key set
    signature_algorithm: "RS512"                  // The signature algorithm.
    claim_checked:                                // A list of additional claim checker aliases (optional).
        - 'my_claim_checker_alias'                // See https://web-token.spomky-labs.com for more information
```

For all available signature algorithms and key sets, please refer to the [web-token/jwt-framework documentation](https://web-token.spomky-labs.com/).

## With Encryption

```yml
lexik_jose:
    ...
    encryption:
        enabled: true                                  // We enable the encryption (highly recommended)
        key_set: '%env(LEXIK_JOSE_ENCRYPTION_KEYSET)%' // The encryption key set (loaded through an env variable)
        key_index: 0                                   // The index of the encryption key in the key set
        key_encryption_algorithm: 'A256GCMKW'          // The key encryption algorithm
        content_encryption_algorithm: 'A256GCM'        // The content encryption algorithm
```

The `key_set` parameters must contain valid key sets as per the [RFC7517](https://tools.ietf.org/html/rfc7517).

**Note: we highly recommend you to enable the encryption support as the token may contain very sensitive information**

license: MIT

repository: mabuonomo/lexik-jose-bridge

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: mabuonomo/lexik-jose-bridge


text:
# Introduction

[https://gitlab.com/trdgit/trd](https://gitlab.com/trdgit/trd)

TRD is a daemon that allows you to determine which sites a particular release
should be traded to, and the corresponding bookmark. It is primary designed to
work with cbftp, but can be modified to work with other clients.

An example flow is:
- You connect IRC client to TRD over TCP channel, and TRD receieves messages
- TRD detects that a particular message looks like mkdir on a site channel
- TRD determines the bookmark that the release belongs to
- TRD determines which sites are allowed to receieve it, and returns the list of sites

In essence, releasename comes in, site list comes out.

license: Unlicense

branch_name: refs/heads/main


text:
---
id: install-cardano-node-written
title: Install cardano-node
sidebar_label: Install cardano-node
description: "Stake pool course: Learn how to install cardano-node and all its dependencies."
image: ./img/og-developer-portal.png
---

## Prerequisites

Check the [cardano-node latest release](https://github.com/input-output-hk/cardano-node/releases) and set up your platform:

You will need:

* An x86 host \(AMD or Intel\), Virtual Machine or AWS instance with at least 2 cores, 4GB of RAM and at least 10GB of free disk space;
* A recent version of Linux, not Windows or MacOS – this will help us isolate any issues that arise.
* Make sure you are on a network that is not firewalled. In particular, we will be using TCP/IP port 3000 and 3001 by default to establish connections with other nodes, so this will need to be open.

## Install dependencies

We need the following packages and tools on our Linux system to download the source code and build it:

* the version control system `git`,
* the `gcc` C-compiler,
* C++ support for `gcc`,
* developer libraries for the arbitrary precision library `gmp`,
* developer libraries for the compression library `zlib`,
* developer libraries for `systemd`,
* developer libraries for `ncurses`,
* `ncurses` compatibility libraries,
* the Haskell build tool `cabal`,
* the GHC Haskell compiler.

If we are using an AWS instance running Amazon Linux AMI 2 \(see the [AWS walk-through](../lesson-1#setup-a-linux-server-on-aws) for how to get such an instance up and running\) or another CentOS/RHEL based system, we can install these dependencies as follows:

```sh
sudo yum update -y
sudo yum install git gcc gcc-c++ tmux gmp-devel make tar wget -y
sudo yum install zlib-devel libtool autoconf -y
sudo yum install systemd-devel ncurses-devel ncurses-compat-libs -y
```

For Debian/Ubuntu use the following instead:

```sh
sudo apt-get update -y
sudo apt-get install build-essential pkg-config libffi-dev libgmp-dev -y
sudo apt-get install libssl-dev libtinfo-dev libsystemd-dev zlib1g-dev -y
sudo apt-get install make g++ tmux git jq wget libncursesw5 libtool autoconf -y
```

If you are using a different flavor of Linux, you will need to use the package manager suitable for your platform instead of `yum` or `apt-get`, and the names of the packages you need to install might differ.

## Download, unpack, install and update Cabal:

```sh
wget https://downloads.haskell.org/~cabal/cabal-install-<IP_ADDRESS>/cabal-install-<IP_ADDRESS>-x86_64-unknown-linux.tar.xz
tar -xf cabal-install-<IP_ADDRESS>-x86_64-unknown-linux.tar.xz
rm cabal-install-<IP_ADDRESS>-x86_64-unknown-linux.tar.xz cabal.sig
mkdir -p $HOME/.local/bin
mv cabal $HOME/.local/bin/
```

Verify that .local/bin is in your PATH

```sh
echo $PATH
```

If .local/bin is not in the PATH, you need to add the following line to your `.bashrc`file

Navigate to your home folder:

```sh
cd
```

Open your .bashrc file with nano   editor

```sh
nano .bashrc
```

Go to the bottom of the file and add the following lines

```sh
export PATH="$HOME/.local/bin:$PATH"
```

You need to restart your server or source your .bashrc file

```sh
source .bashrc
```

Update cabal

```sh
cabal update
```

Above instructions install Cabal version `<IP_ADDRESS>`. You can check the version by typing

```sh
cabal --version
```

## Download and install GHC:

For Debian/Ubuntu systems:

```sh
wget https://downloads.haskell.org/~ghc/8.10.2/ghc-8.10.2-x86_64-deb9-linux.tar.xz
tar -xf ghc-8.10.2-x86_64-deb9-linux.tar.xz
rm ghc-8.10.2-x86_64-deb9-linux.tar.xz
cd ghc-8.10.2
./configure
sudo make install
cd ..
```

For CentOS/RHEL systems:

```sh
wget https://downloads.haskell.org/~ghc/8.10.2/ghc-8.10.2-x86_64-centos7-linux.tar.xz
tar -xf ghc-8.10.2-x86_64-centos7-linux.tar.xz
rm ghc-8.10.2-x86_64-centos7-linux.tar.xz
cd ghc-8.10.2
./configure
sudo make install
cd ..
```

Alternatively, the ghcup tool can be used to install and set several versions of GHC:

```sh
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
ghcup upgrade
ghcup install <VERSION>
ghcup set <VERSION>
```
`<VERSION>` here could be for example 8.10.2

You can check that your default GHC version has been properly set:

```sh

ghc --version
```

## Install Libsodium

```
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"

git clone https://github.com/input-output-hk/libsodium
cd libsodium
git checkout 66f017f1
./autogen.sh
./configure
make
sudo make install
```

## Download the source code for cardano-node

```sh

cd
git clone https://github.com/input-output-hk/cardano-node.git

```

This creates the folder `cardano-node` and downloads the latest source code.

After the download has finished, we can check its content by

```sh
ls cardano-node
```

We change our working directory to the downloaded source code folder:

```sh
cd cardano-node
```

For reproducible builds, we should check out a specific release, a specific "tag". For the Shelley Testnet, we will use tag `1.24.2`, which we can check out as follows:

```bash
git fetch --all --tags
git tag
git checkout $(curl -s https://api.github.com/repos/input-output-hk/cardano-node/releases/latest | jq -r .tag_name)
```

## Build and install the node

Now we build and install the node with `cabal`, which will take a few minutes the first time you do a build. Later builds will be much faster, because everything that does not change will be cached.

```sh
cabal clean
cabal update
cabal build all
```

Now we can copy the executables files to the .local/bin directory

```sh
cp -p dist-newstyle/build/x86_64-linux/ghc-8.10.2/cardano-node-1.24.2/x/cardano-node/build/cardano-node/cardano-node $HOME/.local/bin/
```

```sh
cp -p dist-newstyle/build/x86_64-linux/ghc-8.10.2/cardano-cli-1.24.2/x/cardano-cli/build/cardano-cli/cardano-cli $HOME/.local/bin/
```

```sh
cardano-cli --version
```

## If you need to update to a newer version follow the steps below:

```sh
cd cardano-node
git fetch --all --tags
git tag
git checkout tags/<the-tag-you-want>
cabal update
cabal build cardano-node cardano-cli
```

This is a good time to backup your current binaries (in case you have to revert to an earlier version). Something like this will work:
```sh
cd $HOME/.local/bin
mv cardano-cli cardano-cli-backup
mv cardano-node cardano-node-backup
```
Now copy your newly built binaries to the appropriate directory, with:
```sh
cp -p dist-newstyle/build/x86_64-linux/ghc-8.10.2/cardano-node-<NEW VERSION>/x/cardano-node/build/cardano-node/cardano-node $HOME/.local/bin/

cp -p dist-newstyle/build/x86_64-linux/ghc-8.10.2/cardano-cli-<NEW VERSION>/x/cardano-cli/build/cardano-cli/cardano-cli $HOME/.local/bin/
```

:::note
It might be necessary to delete the `db`-folder \(the database-folder\) before running an updated version of the node.
:::

branch_name: refs/heads/staging

gha_license_id: MIT


text:
# Initial Development Environment Solution Overview

The following diagram represents a typical team development environment as a distinct AWS account supported by an initial set of foundation capabilities managed via a set of shared AWS accounts to meet the typical requirements outlined above.

Since your specific requirements may include some of the optional [fast follow-on capabilities](../2-fast-follow-ons/README.md), aspects of your initial solution may be different than shown in this diagram.

![alt text](https://github.com/ckamps/aws-foundation-journey/raw/master/images/dev-initial.png "Initial Development Environment")

Key aspects of the initial, minimal solution include:

## Initial Users of Your AWS Environment

The initial development team, your designated cloud administrators, security and compliance team members, and potentially your finance team members who are concerned with cloud spend, will typically use their corporate desktops to access the AWS Management Console and AWS service APIs over the Internet.

Technical users will typically install the AWS Command Line Interface (CLI) and related Software Development Kits (SDKs) on their local corporate desktops to ease the process of interacting with your AWS environment.

## Development Team AWS Accounts

Each development team is allocated a distinct AWS account to act as a resource container for the AWS resources a team creates and manages on its own.  Since AWS service costs are automatically reported for each AWS account, using a distinct AWS account for each team’s development needs is a convenient way to make costs visible and attributable to each team.

In addition to your initial application and data engineering development teams that need access to the AWS platform, you should view your initial cloud and security administrators as a development team in its own right that should have its own AWS account for its own work to iterate on, develop, and perform early testing of changes to the foundation..

## Shared Development VPC Network

A shared development network in the form of an AWS Virtual Private Cloud (VPC) will be used to support the networking needs of development teams.  Your Cloud Administrators will provision this shared development VPC to a new "Network" AWS account and share it with all future development team AWS accounts.

The shared VPC will support cases in which a development team needs to deploy AWS resources that reside in VPCs. For example, deploying Amazon EC2 Virtual Machines (VMs) and Amazon Relational Database Service (RDS) instances. The shared development VPC provides both public and private subnets across multiple Availability Zones (AZs) to both mimic typical production topologies and enable teams to access Internet-based resources such as package repositories and publicly available APIs during their experiment and development work.

Benefits of using a shared VPC for development team include:
* The organization needs to manage and pay for only one set of common shared VPC resources for all development teams. For example, one set of NAT Gateways - which are billed on an hourly basis.
* Configuration of organization standard newtork services such as AWS VPC endpoints is easier to manage in a single VPC.
* Development teams reuse centrally managed VPC resources for multiple development teams.
* Development teams still manage security groups, EC2 instances, etc.
* Development teams have inherent connectivity to other teams' services given that they are in the same VPC.
* Development teams cannot see and manage other teams' workloads even though they're sharing the same VPCs.
* Development teams cannot modify the VPC and related resources that are centally hosted and managed in a separate network AWS account. No additional IAM policies are required.
* Costs for development teams' cloud resources are still allocated to their respective development team AWS accounts.
* Costs for shared VPC foundation resources are allocated to the network AWS account.

## Direct Internet Access

In this initial stage of your foundation, your users’ existing access to the Internet via the corporate network is used both to enable all users to access the AWS platform and to enable developers to access their workloads and data services hosted in their development team AWS accounts.

In this initial stage, there’s no network connectivity between your AWS accounts and your on-premises data center.

## AWS Single Sign-On (SSO)

AWS SSO is used to manage the initial relatively limited number of human users across your development teams and cloud administrators who need to access the AWS Management Console and AWS APIs to get things done in either team development AWS accounts or in support of managing and operating the overall use of AWS. Initially, you’ll use a locally managed store of groups and users in AWS to represent people who can access your AWS accounts.

As a best practice, it’s strongly recommended that all users managed via AWS SSO set up MFA for their user accounts.

AWS SSO includes the ability to manage permission sets that define which groups of users can access which AWS accounts and the fine grained AWS Identity and Access Management (IAM) permissions associated with this access.  AWS SSO automatically propagates these permissions to each member AWS account in your AWS organization.

## Shared AWS Accounts

Once you’ve signed up for a new AWS account, the “master” account, your cloud administrators will use AWS Control Tower via the Master AWS account to establish a “landing zone” of conventional shared AWS accounts and resources to help provide an initial foundation for your use of AWS.

Your master AWS account will be the place in which your cloud administrators will use AWS Control Tower’s [Account Factory](https://docs.aws.amazon.com/controltower/latest/userguide/account-factory.html) via AWS Service Catalog to create new team development accounts, AWS SSO to create and manage groups and users in the locally managed directory, and generally monitor the overall use and health of your AWS environment.

You can grant access to members of your Security and Compliance teams access to the Audit AWS account so that they can easily get into any of the other AWS accounts to review usage and investigate issues.

AWS Control Tower sets up a Log Archive AWS account to secure store AWS platform-wide logs such as AWS CloudTrail logs that record access to all AWS APIs across your AWS accounts and AWS Config logs that record all changes to AWS resources across your AWS accounts.

## Standard AWS Control Tower Guardrails

By using AWS Control Tower, your organization automatically benefits from the set of [built-in guardrails](https://docs.aws.amazon.com/controltower/latest/userguide/guardrails.html) that represent common preventative and detective security controls. AWS Control Tower includes mandatory, strongly recommended, and elective guardrails.

## Next Steps

[Map People to Foundation Functional Roles](1-3-map-people-to-foundation-roles.md)

repository: amiburch/aws-foundation-journey

repo_name: amiburch/aws-foundation-journey


text:
CCCP
====

Cross Correlation Compilation Programme

Files and what they do
-----------------------

cccp.m - Main control file - order of suggested operation script.

general_settings.m - Control settings for the program. These will be drop in interchangable with a GUI.

template_data_input.m - Current input file with station and arrival time information

CC_SingleChannel_Java.m - Works in conjunction with irisFetch.m to capture single day waveforms and match them against a given template

convertTraces.m - Converts the struct data given by irisFetch.m into a waveform object.
convertTracesRM_IR.m - Same as above, but also removes instrument response.

CC_SingleStation_Stack.m - Stacks three components of cross correlations for a particular station.

CC_Scan_Stack.m - Reviews the stacked cross correlations from one station for template matches.

generateCorrelationObject.m - Takes results generated by scan function and picks out waveform snippets for further review.

Things that need work
---------------------

-The whole template determination process needs to be clearer.
- As of now, it requires the user to input data about the station and the event with regard to the station.

- Template matches need to be better scrutinized for duplicates
- Station stacking needs to be enhanced to 12+ components (multiple stations)

Odd/Unresolved Stuff
---------------------
Station ACSO goes completely off the chart during the year of 2010, detecting thousands of events.
For this sort of stuff, we really need some sort of side lobe function


text:
---
layout: about
title: about
permalink: /
description:

profile:
  align: right
  image: pic.jpg
  address:

news: true  # includes a list of news items
selected_papers: true # includes a list of papers marked as "selected={true}"
social: true  # includes social icons at the bottom of the page
---

I work in the field of human-computer interaction and user experience, where I work on novel interaction techniques, tangible interfaces and shape changing technologies.

My PhD thesis focused on enhancing digital art and design technology with new tangible augmentations such as mobiles that feel like paint or module screens for colour exploration. In pursuit of bringing ideas to life I engaged with people in workshops and interviews for scoping ideas, built prototypes and testing them in user studies. During this time I enhanced my skills in rapid software and hardware (including some chemical) prototyping. I used a wide range of UX research methods, and conducted the necessary data analysis to test research questions and validate ideas. During my PhD I presented academic papers in world-leading conferences, collaborated with BBC R&D, and was a finalist in EPSRC Nation of Pioneers.

gha_language: JavaScript


text:
# PhoneGap Social Sharing plugin for Android and iOS6+

by [Eddy Verbruggen](http://www.x-services.nl)

1. [Description](https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin#1-description)
2. [Installation](https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin#2-installation)
	2. [Automatically (CLI / Plugman)](https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin#automatically-cli--plugman)
	2. [Manually](https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin#manually)
	2. [PhoneGap Build](https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin#phonegap-build)
3. [Usage](https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin#3-usage)
4. [Credits](https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin#4-credits)
5. [License](https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin#5-license)

## 1. Description

This plugin allows you to use the native sharing window of your mobile device.

* Works on Android, version 2.3.3 and higher (possibly even lower)
* Works on iOS, version 6 and higher
* Share text or an image (or both). Subject is also supported, when the receiving app supports it.
* Supports sharing images from the internet, the local filesystem, or from the www folder
* Compatible with [Cordova Plugman](https://github.com/apache/cordova-plugman) and ready for PhoneGap 3.0
* Officially supported by [PhoneGap Build](https://build.phonegap.com/plugins/95)

iOS screenshot (options are based on what has been setup in the device settings):

![ScreenShot](https://raw.github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/master/screenshot.png)

## 2. Installation

### Automatically (CLI / Plugman)
SocialSharing is compatible with [Cordova Plugman](https://github.com/apache/cordova-plugman) and ready for the [PhoneGap 3.0 CLI](http://docs.phonegap.com/en/3.0.0/guide_cli_index.md.html#The%20Command-line%20Interface_add_features), here's how it works with the CLI:

```
$ phonegap local plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git
```
or
```
$ cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git
```
don't forget to run this command afterwards:
```
$ cordova build
```
Then reference `SocialSharing.js` in `index.html`, after `cordova.js`:
```html
<script type="text/javascript" src="js/plugins/SocialSharing.js"></script>
```

### Manually

1\. Add the following xml to your `config.xml` in the root directory of your `www` folder:
```xml
<!-- for iOS -->
<feature name="SocialSharing">
	<param name="ios-package" value="SocialSharing" />
</feature>
```

```xml
<!-- for Android as plugin (deprecated) -->
<plugin name="SocialSharing" value="nl.xservices.plugins.SocialSharing"/>
```

```xml
<!-- for Android as feature -->
<feature name="SocialSharing">
  <param name="android-package" value="nl.xservices.plugins.SocialSharing" />
</feature>
```

Also for Android, images from the internet are only shareable with this permission added to `AndroidManifest.xml`:
```xml
<config-file target="AndroidManifest.xml" parent="/manifest">
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</config-file>
```

2\. Grab a copy of SocialSharing.js, add it to your project and reference it in `index.html`:
```html
<script type="text/javascript" src="js/SocialSharing.js"></script>
```

3\. Download the source files for iOS and/or Android and copy them to your project.

iOS: Copy `SocialSharing.h` and `SocialSharing.h` to `platforms/ios/<ProjectName>/Plugins`

Android: Copy `SocialSharing.java` to `platforms/android/src/nl/xservices/plugins` (create the folders)

### PhoneGap Build

SocialSharing works with PhoneGap build too. You can implement the plugin with these simple steps.

1\. Add the following xml to your `config.xml` to always use the latest version of this plugin:
```xml
<gap:plugin name="nl.x-services.plugins.socialsharing" />
```
or to use this exact version:
```xml
<gap:plugin name="nl.x-services.plugins.socialsharing" version="2.0" />
```

2\. Reference the JavaScript code in your `index.html`:
```html
<!-- below <script src="phonegap.js"></script> -->
<script src="js/plugins/SocialSharing.js"></script>
```

## 3. Usage
You can share text (including a link), a subject and (any type of) image. However, what exactly gets shared,
depends on the application the user chooses to complete the action. A few examples:
- Mail: message, subject, image.
- Twitter: message, image (any link in the message will be nicely shortened).
- Google+ / Hangouts: message, subject.
- Facebook iOS: message, image.
- Facebook Android: when an image is passed to Facebook, the message needs to be entered by the user.
- Facebook Android: when a link is added to the message, the link is shared, the message needs to be entered by the user.

```javascript
// note: instead of available(), you could also check the useragent (android or ios6+)
window.plugins.socialsharing.available(function(isAvailable) {
  if (isAvailable) {
    // use a local image from inside the www folder:
    window.plugins.socialsharing.share('My text with a link: http://domain.com', 'My subject', 'www/image.gif'); // succes/error callback params may be added as 4th and 5th param
    // .. or a local image from anywhere else (if permitted):
    // local-iOS:
    window.plugins.socialsharing.share('My text with a link: http://domain.com', 'My subject', '/Users/username/Library/Application Support/iPhone/6.1/Applications/25A1E7CF-079F-438D-823B-55C6F8CD2DC0/Documents/.nl.x-services.appname/pics/img.jpg');
    // local-Android:
    window.plugins.socialsharing.share('My text with a link: http://domain.com', 'My subject', 'file:///storage/emulated/0/nl.xservices.testapp/5359/Photos/16832/Thumb.jpg');
    // .. or an image from the internet:
    window.plugins.socialsharing.share('My text with a link: http://domain.com', 'My subject', 'http://domain.com/image.jpg');
    // .. or only text:
    window.plugins.socialsharing.share('My text');
    // .. (or like this):
    window.plugins.socialsharing.share('My text', null, null); // use '' instead of null for pre-2.0 versions of this plugin
  }
});
```

## 4. CREDITS ##

This plugin was enhanced for Plugman / PhoneGap Build by [Eddy Verbruggen](http://www.x-services.nl).
The Android code was entirely created by the author.
The iOS code was inspired by [Cameron Lerch](https://github.com/bfcam/phonegap-ios-social-plugin).
I also included a nice enhancement posted [here](https://github.com/bfcam/phonegap-ios-social-plugin/issues/3#issuecomment-21353674) to allow sharing files from the internet.

## 5. License

[The MIT License (MIT)](http://www.opensource.org/licenses/mit-license.html)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/EddyVerbruggen/socialsharing-phonegap-plugin/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

repository: bayousoft/SocialSharing-PhoneGap-Plugin

repo_name: bayousoft/SocialSharing-PhoneGap-Plugin


text:
# debugger-ruby package

Ruby debugger for Atom. Inspired by [atom-ruby-debugger](https://github.com/johanlunds/atom-ruby-debugger). The main reasoning behind this project is my lack of CoffeeScript skills.

# Todo

## UI
- Call stack
- Visual indicator on lines with breakpoints
- Navigate to line when clicking breakpoints
- Rethink button toolbar

## Backend
- Delete/enable/disable breakpoints

# Screenshot
![A screenshot of your package](https://f.cloud.github.com/assets/69169/2290250/c35d867a-a017-11e3-86be-cd7c5bf3ff9b.gif)

repository: andreimoldo/ruby-debugger

repo_name: andreimoldo/ruby-debugger


text:
# model-transform

Common toJSON Transform for KeystoneJS / Mongoose Models.

Automatically renames `_id` to `id`, removes `__v` and can optionally run an additional transform.

The transform method may return a new object, or modify the provided one by reference.

## Changes from 1.x -> 2.x

In `1.x`, the document object was the first argument of the transform function.

In `2.0.0` and up, the document object is `this` and `rtn` is the first argument.

## Usage

```
npm install model-transform --save
```

```js
var keystone = require('keystone');
var transform = require('model-transform');

var User = new keystone.List('User');
User.add({
	/* fields */
	// add a field you never want included in JSON data
	somethingPrivate: String
});

// add a virtual that you always want included in JSON data
User.schema.virtual('includeMe').get(function() {
	return true;
});

transform.toJSON(User, function(rtn) {
	// add individual virtual properties
	rtn.includeMe = this.includeMe;
	// delete private properties
	delete rtn.somethingPrivate;
	// return is optional becuase we've modified rtn by reference
	// return rtn;
});

User.register();
```

# License

The MIT License (MIT)

Copyright (c) 2015 Jed Watson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

repository: JedWatson/model-transform

repo_name: JedWatson/model-transform


text:
[![Build Status][badge-travis-image]][badge-travis-url]

Usher: Kong plugin to route requests based on HTTP Headers
================================================================

Usher is a configurable Kong plugin that routes requests to different upstreams
based on HTTP Header name-value pairs.

[badge-travis-url]: https://travis-ci.org/malhotraamit236/kong-plugin
[badge-travis-image]: https://travis-ci.org/malhotraamit236/kong-plugin.svg?branch=master

# Table of Contents
- [Usher: Kong plugin to route requests based on HTTP Headers](#usher-kong-plugin-to-route-requests-based-on-http-headers)
- [Table of Contents](#table-of-contents)
  - [Terminology](#terminology)
  - [Use Case - Example](#use-case---example)
  - [Configuration](#configuration)
    - [Rules](#rules)
  - [Usage Demo (macOS)](#usage-demo-macos)
    - [Setup Kong Vagrant Environment](#setup-kong-vagrant-environment)
    - [Setup Upstreams with Targets](#setup-upstreams-with-targets)
    - [Setup Service](#setup-service)
    - [Setup Route](#setup-route)
    - [Enable Usher Plugin](#enable-usher-plugin)
    - [Test cases](#test-cases)

## Terminology
- `plugin`: a plugin executing actions inside Kong before or after a request has been proxied to the upstream API.
- `Service`: the Kong entity representing an external upstream API or microservice.
- `Route`: the Kong entity representing a way to map downstream requests to upstream services.
- `Upstream`: the Kong entity representing a virtual hostname and can be used to loadbalance incoming requests over multiple services (targets)
- `Target`: A target is an ip address/hostname with a port that identifies an instance of a backend service.

## Use Case - Example
Requests that match route `/local` will be proxied to `Upstream` `europe_cluster`,
except requests that contain `X-Country = Italy` will be proxied to Upstream `italy_cluster`.

## Configuration
This plugin has been tested by enabling on `Service` object and works in `access` phase. In that context, following paramters
can be used for configuration.
| **Parameter**                  | **Description**                                         |
| ------------------------------ | ------------------------------------------------------- |
| `name`                         | The name of the plugin to use - `usher` for this plugin |
| `service.id`                   | The ID of the Service the plugin targets.               |
| `config.rules`
*(required)* | List of rules                                           |

### Rules
`config.rules` takes a list of rules and each rule has two mandatory properties:
| **Property**                                                                                | **Description**                                                                     |
| --------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| `condition`
*(required)*
*(duplicate header names
 with differing case not allowed)* | Map of header name and value pairs where header name is the key                     |
| `upstream_name`
*(required)*                                                               | `name` of the `Upstream` object which load-balances traffic on its `Target` objects |

The header name-value pairs given in a `condition` are evaluated with a logical AND.
The rule with a `condition` that has maximum ANDed header name-value match wins and request is proxied to
the `Upstream` specified by `upstream_name`.

If more than one rule evalutes to true, then the one that appears earliest in the `config.rules` wins.
For example, given a config like:
```
config = {
  "rules": [
    {
      "condition": {
        "X-Country": "Italy"
      }
      "upstream_name": "italy_cluster"
    },
    {
      "condition": {
        "X-Region": "Milan"
      }
      "upstream_name": "milan_cluster"
    }
  ]
}
```
If request headers contain `"X-Country": "Italy"` and `"X-Region": "Milan"` then request will be proxied to `italy_cluster`.

## Usage Demo (macOS)
We are going to demo following scenario:
| `Route`  | Custom HTTP Request Headers              | Proxied to `Upstream` |
| -------- | ---------------------------------------- | --------------------- |
| `/local` | *no custom header*                       | `europe_cluster`      |
| `/local` | `X-Country=Italy`                        | `italy_cluster`       |
| `/local` | `X-Country=Italy`
 `X-Region=Milan`  | `milan_cluster`       |
| `/local` | `X-Country=Italy`
 `X-Region=Venice` | `venice_cluster`      |

For the purpose of this demo we are building [`kong`](https://github.com/Kong/kong) and `usher` from source on a vagrant machine with [`kong-vagrant`](https://github.com/Kong/kong-vagrant). Also the demo uses [`HTTPie`](https://httpie.org/) but you an use `curl` as well.

[![asciicast](https://asciinema.org/a/mJz2tOP5K7Li5JBtDsXQWauAi.svg)](https://asciinema.org/a/mJz2tOP5K7Li5JBtDsXQWauAi)

### Setup Kong Vagrant Environment
- Download and Install [Vagrant](https://www.vagrantup.com/downloads.html) if not already installed. To check if it is already installed, try `vagrant version` in terminal.
- Setup environment:
  ```shell
  # clone this repository
  $ git clone https://github.com/Kong/kong-vagrant
  $ cd kong-vagrant

  # clone the Kong repo (inside the vagrant one)
  $ git clone https://github.com/Kong/kong

  # clone usher plugin
  $ git clone https://github.com/malhotraamit236/kong-plugin.git

  # build a box with a folder synced to your local Kong and plugin sources
  $ vagrant up

  # ssh into the Vagrant machine, and setup the dev environment
  $ vagrant ssh
  $ cd /kong
  $ make dev

  # build usher
  $ cd /kong-plugin
  $ luarocks make

  # tell Kong to load usher plugin
  $ export KONG_PLUGINS=bundled,usher
  # if you are running Kong < 0.14.0, run this instead:
  # $ export KONG_CUSTOM_PLUGINS=usher

  # startup kong: while inside '/kong' call `kong` from the repo as `bin/kong`!
  # we will also need to ensure that migrations are up to date
  $ cd /kong
  $ bin/kong migrations bootstrap
  # if you are running Kong < 0.15.0, run this instead of bootstrap:
  # $ bin/kong migrations up
  $ bin/kong start
  ```
- Open a new terminal window and `cd` into `kong-vagrant` repo directory created in the step before.
- Check if `kong` has started.
  ```shell
  $ http :8001
  ```
  Admin api root should output `kong` configuration if kong has sucessfully started.

### Setup Upstreams with Targets
- Add `Upstream` `europe_cluster` with target `mockbin.org:80`
  ```shell
  $ http POST :8001/upstreams name=europe_cluster
  $ http POST :8001/upstreams/europe_cluster/targets target=mockbin.org:80
  ```
- Add `Upstream` `italy_cluster` with target `httpbin.org:80`
  ```shell
  $ http POST :8001/upstreams name=italy_cluster
  $ http POST :8001/upstreams/italy_cluster/targets target=httpbin.org:80
  ```
- Add `Upstream` `milan_cluster` with target `requestbin.com:80`
  ```shell
  $ http POST :8001/upstreams name=milan_cluster
  $ http POST :8001/upstreams/milan_cluster/targets target=requestbin.com:80
  ```
- Add `Upstream` `venice_cluster` with target `postb.in:80`
  ```shell
  $ http POST :8001/upstreams name=venice_cluster
  $ http POST :8001/upstreams/venice_cluster/targets target=postb.in:80
  ```
### Setup Service
Add a `Service` `name=example_service` with `host=europe_cluster`
```shell
$ http :8001/services name=example_service host=europe_cluster
```

### Setup Route
Add a `Route` to `example_service` with `name=localroute` and a path `/local`.
```shell
$ http :8001/services/example_service/routes name=localroute paths:='["/local"]'
```

### Enable Usher Plugin
Let's enable `usher` on `example_service` for our scenario.
```shell
$ http POST :8001/services/example_service/plugins \
    name=usher \
    config:='{"rules":[{"condition":{"X-Country":"Italy"},"upstream_name":"italy_cluster"},{"condition":{"X-Country":"Italy","X-Region":"Milan"},"upstream_name":"milan_cluster"},{"condition":{"X-Country":"Italy","X-Region":"Venice"},"upstream_name":"venice_cluster"}]}'
```
The config looks like this:
```
{
   "rules":[
      {
         "condition":{
            "X-Country":"Italy"
         },
         "upstream_name":"italy_cluster"
      },
      {
         "condition":{
            "X-Country":"Italy",
            "X-Region":"Milan"
         },
         "upstream_name":"milan_cluster"
      },
      {
         "condition":{
            "X-Country":"Italy",
            "X-Region":"Venice"
         },
         "upstream_name":"venice_cluster"
      }
   ]
}
```
### Test cases
1. No custom header
    | `Route`  | Custom HTTP Request Headers | Proxied to `Upstream` | Response from Target |
    | -------- | --------------------------- | --------------------- | -------------------- |
    | `/local` | *no custom header*          | `europe_cluster`      | mockbin.org          |
    ```shell
    $ http :8000/local

    HTTP/1.1 200 OK
    Connection: keep-alive
    Content-Encoding: gzip
    Content-Type: text/html; charset=utf-8
    Date: Tue, 05 May 2020 18:14:22 GMT
    Etag: W/"29c7-XG+PICJmz/J+UYWt5gkKqqAUXjc"
    Kong-Cloud-Request-ID: d03ebc07ef2f0fa78d1cf5fa86f35011
    Server: Cowboy
    Transfer-Encoding: chunked
    Vary: Accept-Encoding
    Via: kong/2.0.4
    X-Kong-Proxy-Latency: 0
    X-Kong-Upstream-Latency: 115
    X-Kong-Upstream-Status: 200

    <!DOCTYPE html><html><head><meta charset="utf-8"><title>Mockbin by Kong</title>

    ...
    ```
2. With `X-Country=Italy`
    | `Route`  | Custom HTTP Request Headers | Proxied to `Upstream` | Response from Target |
    | -------- | --------------------------- | --------------------- | -------------------- |
    | `/local` | `X-Country=Italy`           | `italy_cluster`       | httpbin.org          |
    ```shell
    $ http GET :8000/local X-Country:Italy

    HTTP/1.1 200 OK
    Access-Control-Allow-Credentials: true
    Access-Control-Allow-Origin: *
    Connection: keep-alive
    Content-Length: 9593
    Content-Type: text/html; charset=utf-8
    Date: Tue, 05 May 2020 18:21:56 GMT
    Server: gunicorn/19.9.0
    Via: kong/2.0.4
    X-Kong-Proxy-Latency: 1
    X-Kong-Upstream-Latency: 91

    ...

    <a href="https://github.com/requests/httpbin" class="github-corner" aria-label="View source on Github">

    ...
    ```
3. With `X-Country=Italy` and `X-Region=Milan`
    | `Route`  | Custom HTTP Request Headers             | Proxied to `Upstream` | Response from Target |
    | -------- | --------------------------------------- | --------------------- | -------------------- |
    | `/local` | `X-Country=Italy`
 `X-Region=Milan` | `milan_cluster`       | requestbin.com       |
    ```shell
    $ http GET :8000/local X-Country:Italy X-Region:Milan

    HTTP/1.1 301 Moved Permanently
    Connection: keep-alive
    Content-Length: 183
    Content-Type: text/html
    Date: Tue, 05 May 2020 18:28:16 GMT
    Location: https://requestbin.com/
    Server: CloudFront
    Via: kong/2.0.4
    X-Amz-Cf-Id: sEMftS-6ZcalP4XfDG_WHJ7yel50j4_VzxI-V9E8cxGTtrDE4UsPBA==
    X-Amz-Cf-Pop: YTO50-C1
    X-Cache: Redirect from cloudfront
    X-Kong-Proxy-Latency: 1
    X-Kong-Upstream-Latency: 36

    <html>
    <head><title>301 Moved Permanently</title></head>
    <body bgcolor="white">
    <center><h1>301 Moved Permanently</h1></center>
    <hr><center>CloudFront</center>
    </body>
    </html>

    ...
    ```
4. With `X-Country=Italy` and `X-Region=Venice`
    | `Route`  | Custom HTTP Request Headers              | Proxied to `Upstream` | Response from Target |
    | -------- | ---------------------------------------- | --------------------- | -------------------- |
    | `/local` | `X-Country=Italy`
 `X-Region=Venice` | `venice_cluster`      | postb.in             |
    ```shell
    $ http GET :8000/local X-Country:Italy X-Region:Venice

    HTTP/1.1 301 Moved Permanently
    Connection: keep-alive
    Content-Length: 194
    Content-Type: text/html
    Date: Tue, 05 May 2020 18:31:11 GMT
    Location: https://postb.in/
    Server: nginx/1.10.3 (Ubuntu)
    Via: kong/2.0.4
    X-Kong-Proxy-Latency: 0
    X-Kong-Upstream-Latency: 87

    <html>
    <head><title>301 Moved Permanently</title></head>
    <body bgcolor="white">
    <center><h1>301 Moved Permanently</h1></center>
    <hr><center>nginx/1.10.3 (Ubuntu)</center>
    </body>
    </html>

    ...
    ```
5. With `X-Country=Italy` and `X-Region=Venice` and `X-Region=Milan`. This is a special scenario where
    duplicate header names appear in a Request. In this case the header that appears last in the
    request is considered for matching.
    | `Route`  | Custom HTTP Request Headers                                   | Proxied to `Upstream` | Response from Target |
    | -------- | ------------------------------------------------------------- | --------------------- | -------------------- |
    | `/local` | `X-Country=Italy`
 `X-Region=Venice`
 `X-Region=Milan` | `milan_cluster`      | requestbin.com       |
    ```shell
    $ http GET :8000/local X-Country:Italy X-Region:Venice X-Region:Milan

    HTTP/1.1 301 Moved Permanently
    Connection: keep-alive
    Content-Length: 183
    Content-Type: text/html
    Date: Tue, 05 May 2020 22:20:07 GMT
    Location: https://requestbin.com/
    Server: CloudFront
    Via: kong/2.0.4
    X-Amz-Cf-Id: pDX-LQWU0Lk3E080BCb3_rVvlyNOxmhSAgayswcv9vwuyjHtHdZVbg==
    X-Amz-Cf-Pop: YTO50-C1
    X-Cache: Redirect from cloudfront
    X-Kong-Proxy-Latency: 0
    X-Kong-Upstream-Latency: 34

    <html>
    <head><title>301 Moved Permanently</title></head>
    <body bgcolor="white">
    <center><h1>301 Moved Permanently</h1></center>
    <hr><center>CloudFront</center>
    </body>

    ...
    ```


text:
---
layout: video
template-title: Video
template-description: Feature size YouTube video embed
title: President Biden Answers Twitter Questions
publish-date: Feb 19, 2021
youtube-id: ODdRJSbXAVo
source-domain: youtube.com
source-url: https://www.youtube.com/watch?v=ODdRJSbXAVo
breadcrumbs:
  - name: Media
    url: media.html
  - name: Videos
    url: media/videos.html
figma: https://www.figma.com/file/QVPduB8h6DIENYULFVCism/?node-id=1101%3A3141
---

President Biden answers questions from Twitter on stimulus checks, vaccine production, and his morning routine, including making himself a cup of coffee.
{: .maxw-tablet}

license: MIT,Unlicense

repository: Bixal/uswds-page-templates

detected_licenses: MIT Unlicense

gha_language: HTML

repo_name: Bixal/uswds-page-templates


text:
# Keybindings and Shortcuts

## Swap modifiers

Put [altwin](./altwin) in `/usr/share/X11/xkb/symbols` and check "Meta is mapped to Win" in "GNOME Tweak Tool > Keyboard & Mouse > Additional Layout Options > Alt/Win key behavior".

Download [autokey](https://github.com/autokey/autokey) and use config files in `autokey/data/Mac`. (Acknowledgement: It is based on the work from https://github.com/xortim/autokey)

Some useful tools and commands:
- `xev`: get keycodes and to check how your keymap works.
- `dconf-editor`: directly edit dconf settting file (`org/gnome/desktop/input-sources/xkb-options`) instead of using GNOME Tweak Tool.
- `dconf watch /`: see which dconf setting is changed.

## Capslock as Shift

Put [capslock](./capslock) in `/usr/share/X11/xkb/symbols` and check "Make Caps Lock an additional Menu key" in "GNOME Tweak Tool > Keyboard & Mouse > Additional Layout Options > Caps Lock behavior".

## System Settings

Change shortcuts to whatever you like.

## IntelliJ IDEA

Go to "File > Settings > Keymap" and select "Default for macOS".

## Visual Studio Code

Move [keybindings.json](./keybindings.json) to `~/.config/Condig/User/`.

repository: guoyiteng/linux-for-macos-user

repo_name: guoyiteng/linux-for-macos-user


text:
# FolderList

A simple command line tool for listing the files and folders in a directory. It can optionally print to the console and/or save the output to a text file.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development.

### Prerequisites

The project was created using Visual Studio 2017 Version 15.3.4 and .NET Framework 4.6.1.

### Build

Simply open the project and build in Visual Studio 2017. The final exe will be in the Release folder.

## Authors

* **Kyle Domaszewicz** - [kdomasze](https://github.com/kdomasze)

## License

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

repository: kdomasze/Folder-List

repo_name: kdomasze/Folder-List


text:
# JsUnit

* **c3p** [jsunit.c3p](source/c3p/jsunit.c3p)
* **demo** [link](demo)
* **Patreon** [link](https://patreon.com/el3um4s)

C3 does not allow to use Unit Test regularly. I think it's a problem, but I don't know how to fix it.

Searching the net I found an interesting article: **[JsUnit (s): The First JavaScript Unit Testing Libraries](https://medium.com/@denny.headrick/jsunit-s-the-first-javascript-unit-testing-libraries-af57d51d6ea1)**.

I decided to integrate the first JsUnit in C3: this is the result.

I have not yet decided whether this experiment will have a follow-up. For the time being, I'll just keep it for the future.

repository: XHXIAIEIN/construct-demo

repo_name: XHXIAIEIN/construct-demo


text:
# MOT-Live-Streaming
This is MOT task with live streaming.

## HW4 Grading
1. Base Model (40%): video/audio live steaming
2. Function 1 (30%): video live streaming with object tracking
3. Function 2 (10%): Providing a user interface to specify which object to track
4. Report (20%)
5. Bonus (10%): supporting multiple bitrates OR trick mode (users can perform
pause/resume/rewind)

## TODO
To create live streaming with MPEG-DASH, you will need to
* Use webcam to capture/encode live video
* Use your deep learning network model to do segmentation or object tracking
* Use ffmpeg to transcode the video into .mp4
* Use MP4Box with a live profile (there are two profiles supported: live and onDemand) to generate
fragmented mp4 and a .mpd file
* Create HTML file to play the video (or with controls such as play, pause)
* View the results in a browser that supports HTML5.

## Requirements
### Python Packages
* Flask
* motmetrics
* [cython_bbox](https://blog.csdn.net/qq_19707521/article/details/106692395)
### Others
* [MP4Box](https://gpac.wp.imt.fr/downloads/)
* ffmpeg

## Main Files
* camera_tracking.py : load camera and track people
* track.py : main for tracking, saving frames, and generating mpdfile
* visualization.py : plot the tracked bboxs on frames
* app.py : main for Flask

## Usages
* camera tracking on local
```python camera_tracking.py --weights weights/jde.1088x608.uncertainty.pt```

* run flask, and access [<IP_ADDRESS>:5000](<IP_ADDRESS>:5000).
```Flask run```

* generate mpd file (sample example)
```MP4Box -dash 1000 -profile dashavc264:live -bs-switching multi <source.mp4>```

## Problems
* The video output by ```cv2.VideoWriter_fourcc(*'MP4')``` is not supported by HTML.
+ [Solution](https://stackoverflow.com/questions/49530857/python-opencv-video-format-play-in-browser): get OpenH264 library

* Due to cache of Flask, mpd file will not update


text:
# Ansible Lab Automation
> :warning: **Deprcation Notice**: This is the last commit before a major restructure of the project!

Keeping up with technology is hard. And sometimes reading websites, blogs and occacional screenshots just don't cut it, what you need is a demo setup.

While creating VMs and configuring basic networking every time is boring, actually setting up automatic provisioning and keeping it running manually is error prone and may cost more time fixing unintended damage, than doing everything manually.

This Ansible project automates the setup of essential infrastructure services and selected open source projects, which allows to quickly spin up complete environments on-demand and tear them down, following a "Cattle instead of Pets" approach.

## Features
### Ansible
The heart piece os this project is the Ansible configuration itself. All the configuration is stored in git, including necessary credentials for external systems, which are encrypted using ansible-vault.

### KVM Hypervisor
The virtualization layer is implemented with KVM and libvirt. While it is no full blown datacenter virtualization solution like oVirt or VMware vCenter (which is sort-of-mandatory for API integrations), it has a way smaller footprint and libvirt serves as an excellent interface to other management interfaces. For day-to-day operations this lab uses Cockpit and Foreman

### Foreman
Foreman is the provisioning tool in the environment. Configuration includes a all-in-one Foreman+SmartProxy and the necessary setup to automatically provsion new VMs. All VMs come with the latest CentOS 7 or 8 and the SSH key used by ansible for configuration. Possible compute resources are KVM/libvirt (prefered) or VMware vSphere.

> :information_source: Unfortunately the foreman ansible module assumes the Katello API, which is different from the pure Foreman API, therefore all actions have been implemented by a python wrapper around the hammer cli tool.

### Kubernetes
Kubernetes is at the center of the container revolution and no lab is complete without a Kubernetes cluster. But Kubernetes allone is no complete container platform, additional components are:

Component | Project
---|---
CRI | Docker
CNI | WeaveNet
WebuUI | OKD Console
Registry | Docker-Registry
Storage | Local
NFS
Gluster
ServiceMesh | Istio (unused for now)
Ingress-Controller | traefik
Monitoring | Grafana
Prometheus
loki
Jaeger
GitOps | ArgoCD

### Storage
Storage has 3 Tiers: most storage either ephermeral or automated (e.g. VMs, K8s-Config, ...), important can be stored on NFS (not part of th lab) and everything else uses GlusterFS

GlusterFS is a network Storage, that aggregates local disks into a global namespace. It can run on almost any Filesystem and has a very small footprint, making it perfect for hyperconverged use-cases

### Internet hosting
Parts of the Lab can be exposed to the Internet. It uses the Kubernetes Cluster to deploy individual URLs (Ingress-Objects) and a traefik reverse proxy (on an isolated node) forwards the traffic, after it generates a LetsEncrypt Certificate and authenticates the user using oAuth.

### Additional features
* KVM performs deduplication on the libvirt storage pool
* Small DNS server (dnsmasq) for name resolution
* All nodes run Cockpit for GUI based remote administration
* SSH keys are managed in the background and updated automatically
* External storage can be mounted via NFS

The site.yml contains infrastructure components (currently FreeIPA and Foreman) which other plays can rely on to be present, while additional applications live in the plays directory. Applications consist of a spinup_<name>.yml which performs setup of the component from stratch (in general using the latest release) and can be disposed again with teardown_<name>.yml, while adhoc plays (play_<name>.yml) are generally smaller and are not associated with a specific component.

Additional roles:
- common: Install common packages.
  All nodes run Cockpit for simple GUI based activities
- config_nfs: simple NFS mount
- config_ssh_key: Enables management of SSH keys (manage key files, known_hosts and authorized_keys)
- config_ssh_server: Hardened SSH server that only accepts PublicKey Authentication
- config_vdo: Configures Virtual-Data-Optimizer (vdo) driver for dedup and compresion on a disk

## Next
* Terraform
* Make all playbooks compatible to Ansible 2.10s colections
* Notifications (Push or Chat)
* OpenStack (Dev-Stack)
* Jenkins
* Mail Server

## Pre-Existing Infrastructure
* Any Red Hat or CentOS box (for KVM) or VMware vCenter Server
* Basic Networking
* Manualy set up one VM for Foreman


text:
Note=State parameters

State=New York

State.LLCStatute=New York statute

Note=Body begins

Ti={Co.Name-Full} Operating Agreement

1.Ti=Name

1.sec=This operating agreement (this “{Agreement}”) is made by {Co.Name-Full} (the “{Company}”), a {State} limited liability company, and its sole member, {Member.Name-Full} (the “{Member}”).

2.Ti=Formation

2.sec=The {Company} has been formed under the {State.LLCStatute} authorizing the formation of limited liability companies. The purpose of the {Company} is stated in the articles of organization.

3.Ti=Offices

3.sec=The {Company} will have one or more offices at places the {Member} designates. The initial registered office of the {Company} is located at {Co.RegisteredOffice.Addr-1,2,3}.

4. Management

4.1.sec=The {Company} shall be managed by a Board of Directors appointed by the {Member}.  Each Director shall serve until resignation or removal. There shall be no more than {Director.Max#} Directors at any one time. All significant business decisions will require the majority approval (i.e. 51%) of the Board of Directors.  The Board of Directors is hereby appointed as follows, and each Director’s vote will be in proportion to the following percentages:
{Director.List.NameAndVoting%}

4.2.sec=No significant business decision requiring a vote of the Directors as set forth above shall be made without 100% of the Directors having cast a vote, which need not be made in person, in writing, or simultaneously with the other Directors, unless requested by the {Member}.

4.3.sec=The Board of Directors may delegate to another person the authority to perform specified acts on behalf of the {Company}.

4.4.sec=If the {Member} resigns, dies, is incapacitated, is unable to act, or is otherwise removed from his position by a majority vote of the Board of Directors, the percentages above will redistribute in equal percentage, and the {Company}’s full interest and membership will transfer to {Member.Successor.Name-Full}.

4.5.sec=If a Director resigns, dies, is incapacitated, is unable to act, or is otherwise removed from his or her position by a unanimous vote of the other Directors, the Board of Directors will meet to redistribute the percentages above and may, in its discretion, appoint a new Director to the Board of Directors. A new Director must be appointed by a unanimous vote of the remaining Directors.

4.6.sec=The Directors shall each perform the duties of a director of a national, professional organization.

4.=[Z/ol/s6]

Management.Xref={x-}Section 4{-x}

5.Ti=Capital Contributions

5.sec=The {Member} has contributed {Member.CapitalContribution$} to the {Company} in exchange for the {Member}s’ ownership interest in the {Company}. The {Member} will not be paid interest on this capital contribution, and the {Member} will have no further obligation to contribute money or property to the {Company}.

6.Ti=Taxes

6.sec=For federal tax purposes, the {Company} will be taxed as a sole proprietorship, with profits and losses passing through to the {Member}, solely for tax purposes.

7.Ti=Funds

7.sec=The {Member} will determine the financial institution that will hold {Company} funds and will determine the authorized signatures on {Company} accounts.

8.Ti=Additional {Members}

8.sec=The {Company} may admit one or more additional members upon such terms as are determined by the {Company} and the {Member}(s). If new members are admitted, the articles of organization and the operating agreement will be appropriately amended.

9.Ti=Limitations on Transfer/Right of First Refusal

9.1.sec=Except as set forth in this {Transfer.Xref} and {Term.AfterStopForBankBalance.Xref}, the {Member} shall not, for any reason, whether voluntarily, involuntarily or by operation of law, transfer all or any of the {Member}’s interest in the {Company} without a unanimous vote of the Board of Directors. Any such transfer not expressly permitted in this {Agreement} shall be null and void.

9.2.sec=The {Member}, upon receiving, or making, a bona fide offer from or to a third party to transfer all or a part of the {Member}’s interest in the {Company} (the “Offered Interests”), shall notify the Board of Directors in writing of the proposed transferee and the complete terms of the transfer (the “Sale Notice”).

9.3.sec=The {Company} shall have the right to purchase all (and only all) of the Offered Interests on the terms set forth in the Sale Notice. The {Company} may exercise its right to purchase only by giving written notice thereof to the selling {Member} within forty-five (45) days after the date on which the {Company} received the Sale Notice. The selling {Member} shall not participate in any vote that may be required in connection with the {Company}’s decision as to whether to exercise its right to purchase all of the Offered Interests.

9.4.sec=If the {Company} does not exercise its right to purchase all of the Offered Interests, the Directors shall have the right, collectively, to purchase from the selling {Member} all (and only all) of the Offered Interests on the terms set forth in the Sale Notice.The Directors may exercise their right to purchase only by giving written notice thereof to the selling {Member} within fifteen (15) days of the {Company}’s written decision to not, or failure to, exercise its right to purchase the Offered Interests. If the total amount of the Offered Interests specified in the Directors’ acceptance notices exceeds the Offered Interests, the Directors electing to purchase the Offered Interests shall each purchase an equal amount of the Offered Interests.

9.=[Z/ol/s4]

Transfer.Xref={x-}Section 9{-x}

10.Ti=Distributions

10.sec=The {Company} shall not make distributions to the {Member} or any of the Directors, except upon (a) the dissolution of the {Company} under Section {Term.Stop.BoardVote.Xref}; or (b) as necessary to recompensate the {Member} for any and all applicable income taxes the {Member} bears as a result of {Company} revenues.

Term.Stop.BoardVote.Xref={x-}Section 11.2.(a){-x}

Note=should be 11.2(b)

Term.Stop.BankBalance.Xref={x-}Section 11.1(b){-x}

11.Ti=Term

11.1.sec=This {Agreement} will remain in effect in perpetuity until:

11.1.1..sec=the Board of Directors elects to dissolve the {Company}; or

11.1.2.sec=the {Company} reaches, for thirty (30) consecutive days, a bank account balance of {BankBalanceTrigger.$}.

11.1.xlist={11.1.alist}

11.1.=[Z/ol/s2]

11.2.0.sec=If this {Agreement} is terminated pursuant to {Term.Stop.BoardVote.Xref}, the {Company}’s assets shall be distributed in the following order:

11.2.1.sec=First, to the payment of the debts and liabilities of the {Company} to creditors, including the {Member} and Directors who are creditors, to the extent permitted by law, in satisfaction of such debts and liabilities, and to the payment of necessary expenses of liquidation and dissolution;

11.2.2.sec=Second, to the {Member} in the amount of his capital contribution to the {Company}; and

11.2.3.sec=Then to the Board of Directors, in equal amounts.

11.2.=[Z/ol/s3]

11.3.sec=If this {Agreement} is terminated pursuant to {Term.Stop.BankBalance.Xref} above, all persons on the Board of Directors on the 30th day after termination who are not a {Member}s shall automatically become members of the {Company}, in the same percentages as their voting interests under {Management.Xref} of this {Agreement}, without any action by the {Member}, the Board of Directors, or the {Company}. Thereafter, all of the members shall meet as soon as practically possible to (a) determine the consideration due to the {Member} and/or the {Company} in exchange for their interest in the {Company}; and (b) draft a new operating agreement for the {Company}.

Term.AfterStopForBankBalance.Xref={x-}Section 11.3{-x}

11.=[Z/ol/s3]

12.Ti=Miscellaneous

12.sec=This {Agreement} constitutes the entire understanding of the parties and supersedes all prior written and oral agreements regarding the subject matter herein.  All disputes arising from or under this agreement will be governed by the laws of the state of {State}, without reference to conflicts of law principles.

90.sec={Member.Sign.Block}

=[Z/ol/12]

DocBody={Doc}

Agreement={d-}Agreement{-d}

Company={d-}Company{-d}

Member={d-}Member{-d}

Members={d-}Members{-d}

d-=

-d=

x-=

-x=

repository: HumanDynamics/BlockCreditUnion

repo_name: HumanDynamics/BlockCreditUnion


text:
You can search for any location, or enter a latitude and longitude, or use your current, and the map will take you there.

Click on the marker to see a forecast of the next few hours, and a graph of the current temperature and windspeed.

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).

## How to use this application

Enter a location to find a place to get the weather forecast. Just click on the marker and a short forecast will show in the popup.

A chart is provided, showing the temperature and windspeed, with a datatable showing the next few hours forecasted weather.

## Demo

See the application hosted at https://breakable-skate.surge.sh

# Developers

## Getting Started

### Prerequisites

This application makes use of 2 external APIs for weather and location data:

1. Open Weather API (https://openweathermap.org/api)

2. Algolia Places API (for geocoding - https://community.algolia.com/places/documentation.html)

If you clone this repo, please create a file 'env.local' in the root of the project folder, with the following variables:

REACT_APP_OPEN_WEATHERMAP_API=`<your open weathermap API Key>`

REACT_APP_ALGOLIA_API=`<Your Algolia places API name>`

REACT_APP_ALGOLIA_API_KEY=`<Your Algolia places API Key>`

## SVG Symbol Set

All svgs are collected into a symbol set which is imported into the DOM. This is done for svg effeciency.

The created file is held in `/src/assets/svg/wi-symbol.svg`

See the folder /scripts/svg-to-symbol for more detail.

### Installing

Use yarn or npm to install the package dependancies:

```

yarn

```

or

```

npm install

```

In the project directory, you can run:

### `npm start`

Runs the app in the development mode.

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

The page will reload if you make edits.

You will also see any lint errors in the console.

## Running the tests

Unit tests using Jest/Enzyme are run by:

`yarn test` or `npm test`

## Deployment

Run `yarn build` or `npm build` to create a production build. The build in /build can then be hosted anywhere.

repository: stephenwil/react-weather-app-js-test

repo_name: stephenwil/react-weather-app-js-test


text:
---
layout: creature
name: "Beli"
tags: [small, fey, cr2, tome-of-beasts]
cha: 14 (+2)
wis: 11 (+0)
int: 8 (-1)
con: 12 (+1)
dex: 16 (+3)
str: 11 (+0)
size: Small fey
alignment: neutral evil
challenge: "2 (450 XP)"
languages: "Common, Dwarvish, Giant"
skills: "Perception +4, Stealth +5"
senses: "darkvision 60 ft., passive Perception 14"
saving_throws: "Dex +5"
damage_vulnerabilities: "fire"
damage_immunities: "cold"
speed: "30 ft., fly 30 ft."
hit_points: "45 (10d6 + 10)"
armor_class: "15 (natural armor)"
---

***Arctic Hunter.*** Beli have advantage on Dexterity (Stealth) checks and Wisdom (Perception) checks made in icy, natural surroundings.

***Cold Regeneration.*** As long as the temperature is below freezing, the beli regains 3 hit points at the start of its turn. If the beli takes fire damage, this trait doesn't function at the start of the beli's next turn. The beli dies only if it starts its turn with 0 hit points and it doesn't regenerate.

***Flyby.*** The beli doesn't provoke an opportunity attack when it flies out of an enemy's reach.

***Innate Spellcasting.*** The beli's innate spellcasting ability is Charisma (spell save DC 12, +4 to hit with spell attacks). It can innately cast the following spells, requiring no material components:

* At will: invisibility

* 3/day: chill touch

### Actions

***Ice Dagger.*** Melee Weapon Attack: +5 to hit, reach 5 ft., one target. Hit: 5 (1d4 + 3) piercing damage plus 2 (1d4) cold damage.

***Icy Shortbow.*** Ranged Weapon Attack: +5 to hit, range 80/320 ft., one target. Hit: 5 (1d4 + 3) piercing damage plus 2 (1d4) cold damage, and the target must make a successful DC 13 Constitution saving throw or gain 2 levels of exhaustion from the arrow's icy chill. If the save succeeds, the target also becomes immune to further exhaustion from beli arrows for 24 hours (but any levels of exhaustion already gained remain in effect). A character who gains a sixth level of exhaustion doesn't die automatically but drops to 0 hit points and must make death saving throws as normal. The exhaustion lasts until the target recovers fully from the cold damage.

gha_language: CSS


text:
# Wanaprez! - Simply turns Markdown into presentation

Wanaprez is just a simple presentation tools written in JavaScript.

**Quick and easy:**

* Just take 5 min to write some **Markdown**,
* give it to Wanaprez,
* and you're done!

**Try it out!**

* https://prez.wanadev.org/

## How does it work?

Just write Markdown... It is as simple as that!

```markdown
# My Prez

## Some Title

### Slide 1

**Lorem ipsum** dolor _sit amet_, consectetur ~~adipiscing elit~~.

### Slide 2

* Foo
* Bar
* Baz
```

## Demo

Look at the demo prez here:

* https://prez.wanadev.org/#url=prez.md&slide=0

## How to build

You can build the `wanaprez.dist.js` file with the following command:

    npm run build

## Changelog

* **1.0.1:** Some CSS fixes
* **1.0.0:** First public release

repository: arnauldb/wanaprez

repo_name: arnauldb/wanaprez


text:
---
title: "Deploy KubeSphere on Huawei CCE"
keywords: "KubeSphere, Kubernetes, installation, huawei, cce"
description: "Learn how to deploy KubeSphere on Huawei Cloud Container Engine."

weight: 4250
---

This guide walks you through the steps of deploying KubeSphere on [Huaiwei CCE](https://support.huaweicloud.com/en-us/qs-cce/cce_qs_0001.html).

## Preparation for Huawei CCE

### Create Kubernetes cluster

First, create a Kubernetes cluster based on the requirements below.

- To install KubeSphere 3.3 on Kubernetes, your Kubernetes version must be v1.20.x, v1.21.x, * v1.22.x, * v1.23.x, and * v1.24.x. For Kubernetes versions with an asterisk, some features of edge nodes may be unavailable due to incompatability. Therefore, if you want to use edge nodes, you are advised to install Kubernetes v1.21.x.
- Ensure the cloud computing network for your Kubernetes cluster works, or use an elastic IP when you use **Auto Create** or **Select Existing**. You can also configure the network after the cluster is created. Refer to [NAT Gateway](https://support.huaweicloud.com/en-us/productdesc-natgateway/en-us_topic_0086739762.html).
- Select `s3.xlarge.2` `4-core｜8GB` for nodes and add more if necessary (3 and more nodes are required for a production environment).

### Create a public key for kubectl

- Go to **Resource Management** > **Cluster Management** > **Basic Information** > **Network**, and bind `Public apiserver`.
- Select **kubectl** on the right column, go to **Download kubectl configuration file**, and click **Click here to download**, then you will get a public key for kubectl.

  ![Generate Kubectl config file](/images/docs/v3.3/huawei-cce/en/generate-kubeconfig.png)

After you get the configuration file for kubectl, use kubectl command line to verify the connection to the cluster.

```bash
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.8", GitCommit:"9f2892aab98fe339f3bd70e3c470144299398ace", GitTreeState:"clean", BuildDate:"2020-08-15T10:08:56Z", GoVersion:"go1.14.7", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"17+", GitVersion:"v1.17.9-r0-CCE20.7.1.B003-17.36.3", GitCommit:"136c81cf3bd314fcbc5154e07cbeece860777e93", GitTreeState:"clean", BuildDate:"2020-08-08T06:01:28Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
```

## Deploy KubeSphere

### Create a custom StorageClass

{{< notice note >}}

Huawei CCE built-in Everest CSI provides StorageClass `csi-disk` which uses SATA (normal I/O) by default, but the actual disk that is used for Kubernetes clusters is either SAS (high I/O) or SSD (extremely high I/O). Therefore, it is suggested that you create an extra StorageClass and set it as **default**. Refer to the official document - [Use kubectl to create a cloud storage](https://support.huaweicloud.com/en-us/usermanual-cce/cce_01_0044.html).

{{</ notice >}}

Below is an example to create a SAS (high I/O) for its corresponding StorageClass.

```yaml
# csi-disk-sas.yaml

---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  annotations:
    storageclass.kubernetes.io/is-default-class: "true"
    storageclass.kubesphere.io/support-snapshot: "false"
  name: csi-disk-sas
parameters:
  csi.storage.k8s.io/csi-driver-name: disk.csi.everest.io
  csi.storage.k8s.io/fstype: ext4
  # Bind Huawei “high I/O storage. If use “extremely high I/O, change it to SSD.
  everest.io/disk-volume-type: SAS
  everest.io/passthrough: "true"
provisioner: everest-csi-provisioner
allowVolumeExpansion: true
reclaimPolicy: Delete
volumeBindingMode: Immediate

```

For how to set up or cancel a default StorageClass, refer to Kubernetes official document - [Change Default StorageClass](https://kubernetes.io/docs/tasks/administer-cluster/change-default-storage-class/).

### Use ks-installer to minimize the deployment

Use [ks-installer](https://github.com/kubesphere/ks-installer) to deploy KubeSphere on an existing Kubernetes cluster. Execute the following commands directly for a minimal installation:

```bash
kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.3.2/kubesphere-installer.yaml

kubectl apply -f https://github.com/kubesphere/ks-installer/releases/download/v3.3.2/cluster-configuration.yaml
```

Go to **Workload** > **Pod**, and check the running status of the pod in `kubesphere-system` of its namespace to understand the minimal deployment of KubeSphere. Check `ks-console-xxxx`  of the namespace to understand the availability of KubeSphere console.

  ![Deploy KubeSphere in Minimal](/images/docs/v3.3/huawei-cce/en/deploy-ks-minimal.png)

### Expose KubeSphere Console

Check the running status of Pods in `kubesphere-system` namespace and make sure the basic components of  KubeSphere are running. Then expose KubeSphere console.

Go to **Resource Management** > **Network** and choose the service in `ks-console`. It is suggested that you choose `LoadBalancer` (Public IP is required). The configuration is shown below.

  ![Expose KubeSphere Console](/images/docs/v3.3/huawei-cce/en/expose-ks-console.png)

Default settings are OK for other detailed configurations. You can also set them based on your needs.

  ![Edit KubeSphere Console SVC](/images/docs/v3.3/huawei-cce/en/edit-ks-console-svc.png)

After you set LoadBalancer for KubeSphere console, you can visit it via the given address. Go to KubeSphere login page and use the default account (username `admin` and password `P@88w0rd`) to log in.

## Enable Pluggable Components (Optional)

The example above demonstrates the process of a default minimal installation. To enable other components in KubeSphere, see [Enable Pluggable Components](../../../pluggable-components/) for more details.

{{< notice warning >}}

Before you use Istio-based features of KubeSphere, you have to delete `applications.app.k8s.io` built in Huawei CCE due to the CRD conflict. You can run the command `kubectl delete crd applications.app.k8s.io` directly to delete it.

{{</ notice >}}

After your component is installed, go to the **Cluster Management** page, and you will see the interface below. You can check the status of your component in **System Components**.

repository: kubesphere/website

gha_language: SCSS

repo_name: kubesphere/website


text:
## localMeanTouchPortionMap

Takes a label map, determines which labels touch and how much, relatively taking the whole outline of
each label into account, and determines for every label with the mean of this value and replaces the
label index with that value.

Categories: [Graphs](https://clij.github.io/clij2-docs/reference__graph), [Labels](https://clij.github.io/clij2-docs/reference__label), [Measurements](https://clij.github.io/clij2-docs/reference__measurement), Visualisation

### Usage in ImageJ macro
```
Ext.CLIJx_localMeanTouchPortionMap(Image input, Image destination);
```

[Back to CLIJ2 reference](https://clij.github.io/clij2-docs/reference)
[Back to CLIJ2 documentation](https://clij.github.io/clij2-docs)

[Imprint](https://clij.github.io/imprint)


text:
# How to transform HTML to plain text

Although the HTML tags could be removed using regular expressions, the best solution is parsing the HTML code with a specific library, such as [HTMLAgilityPack](http://html-agility-pack.net/).

The following code shows how to parse an input string with HTML code and remove all tags:

```csharp
using HtmlAgilityPack;

namespace Example {

    internal class Example
    {
		/// <summary>
		/// Convert the HTML content to plain text
		/// </summary>
		/// <param name="html">The html content which is going to be converted</param>
		/// <returns>A string</returns>
		public static string HtmlToPlainText(string html)
		{
			HtmlDocument document = new HtmlDocument();
			document.LoadHtml(html);
			return document.DocumentNode == null ? string.Empty : document.DocumentNode.InnerText;
		}
	}
}

```

repository: girishbaviskar/sendgrid-csharp

repo_name: girishbaviskar/sendgrid-csharp


text:
# docmatic

> Be dogmatic about working documentation.

[![Build Status](https://travis-ci.org/assert-rs/docmatic.svg?branch=master)](https://travis-ci.org/assert-rs/docmatic)
[![Build status](https://ci.appveyor.com/api/projects/status/bte7gyfxylva10ax?svg=true)](https://ci.appveyor.com/project/epage/docmatic)
[![Documentation](https://img.shields.io/badge/docs-master-blue.svg)](https://docs.rs/docmatic)
![License](https://img.shields.io/crates/l/docmatic.svg)
[![Crates.io](https://img.shields.io/crates/v/docmatic.svg?maxAge=2592000)](https://crates.io/crates/docmatic)

## Usage

First, add this to your `Cargo.toml`:

```toml
[dev-dependencies]
docmatic = "0.1"
```

Next, in your test file:

```rust
extern crate docmatic;

fn test_readme() {
    docmatic::assert_file("README.md");
}
```

For more information on using docmatic, look at the
[documentation](https://docs.rs/docmatic)

## Why Docmatic?

Compared to doing nothing:
- When you have stale documentation, it gives a sour taste to those considering your crate

Compared to [`#![doc(include = "../README.md")]`](https://github.com/yoshuawuyts/human-panic/tree/ed11055e0602c3c8d223ed8354058fefb9ac47ec)
- Allows your README to focus on potential contributors and your API docs on potential users
- Doesn't require nightly

Compared to `rustdoc -L target/debug/deps/ --test README.md`
- Docmatic pros:
  - Easier for contributors to know how to run
- `rustdoc` pros:
  - Simple
  - No dependencies to muck with

Compared to [skeptic](https://github.com/budziq/rust-skeptic):
- Docmatic pros:
  - Fewer dependencies for faster build
  - Doesn't require exposing those dependencies to your users via a `[build-dependencies]`
  - Runs in the expected working directory
- Skeptic pros:
  - Skeptic templates
  - Better integration with `cargo test` (each block is a distinct test)

See [doc-comment](https://github.com/GuillaumeGomez/doc-comment) for another aproach.

## License

`docmatic` is distributed under the terms of both the MIT license and the
Apache License (Version 2.0).

See LICENSE-APACHE, and LICENSE-MIT for details.

## Credits

We're grateful for all of the work done on
[skeptic](https://github.com/budziq/rust-skeptic), the spiritual predecessor to
docmatic and the work of [people iterating on a lighter weight
solution](https://github.com/budziq/rust-skeptic/issues/60).

repository: assert-rs/docmatic

gha_language: Rust

repo_name: assert-rs/docmatic


text:
Quick bites in Java
===

Contains simple examples of various programming topics in Java. The examples should be self-contained and each directory contains a Maven project which exemplifies a certain programming topic.

[![Build Status](https://travis-ci.org/rombert/quickbites.svg?branch=master)](https://travis-ci.org/rombert/quickbites)

repository: rombert/quickbites

repo_name: rombert/quickbites


text:
# Commonly-used acronyms

| Acronym | Expansion |
|:--------|:----------|
| EM | Electromagnetics |
| FED | Fluctuational electrodynamics |
| DOF | Degree of freedom |
| BZ | Brillouin zone |
| vdW | van der Waals |
| RHT | Radiative heat transfer |
| PEC | Perfect electrical conductor |
| MBD | Many-body dispersion |
| RMB | Retarded many-body |
| AARMBEM | Ab-initio Atomistic Retarded Many-Body Electromagnetics at the Mesoscale |
| AARMBEM-C | Ab-initio Atomistic Retarded Many-Body Electromagnetics at the Mesoscale with Conduction |
| RPA | Random phase approximation |


text:
minih264
==========

[![Build Status](https://travis-ci.org/lieff/minih264.svg)](https://travis-ci.org/lieff/minih264)

Small, but yet reasonably fast H264/SVC encoder single-header library with SSE/NEON optimizations.
Decoder can be popped up in future.

Disclaimer: code highly experimental.

## Comparison with [x264](https://www.videolan.org/developers/x264.html)

Rough comparison with x264 on an i7-6700K:

`x264 -I 30 --profile baseline --preset veryfast --tune zerolatency -b 0 -r 1 --qp 33 --ipratio 1.0 --qcomp 1.0 -o x264.264 --fps 30 vectors/foreman.cif --input-res 352x288 --slices 1 --threads 1`

vs

`./h264enc_x64 vectors/foreman.cif`

| x264         | minih264 |
| ------------ | -------- |
| source: ~4.6mb | 409kb |
| binary: 1.2mb | 100kb |
| time: 0,282s | 0,503s |
| out size: 320kb | 391kb  |

PSNR:
```
x264:     PSNR y:32.774824 u:38.874450 v:39.926132 average:34.084281 min:31.842667 max:36.630286
minih264: PSNR y:33.321686 u:38.858879 v:39.955914 average:34.574459 min:32.389171 max:37.174073
```

First intra frame screenshot (left-to-right: original 152064, minih264 5067, x264 5297 bytes):

![Intra screenshot](images/intra.png?raw=true)

You can compare results in motion using ffplay/mpv players on vectors/out_ref.264 and vectors/x264.264 .

## Usage

TBD

## SVC

Minih264 supports both spatial and temporal layers. Spatial layers are almost same as encode 2 independent AVC streams except for Intra frames prediction.
Following diagram shows minih264 SVC scheme for two spatial layers:

![SVC diargam](images/svc.png?raw=true)

That's because P frames spatial prediction are almost useless in practice. But for Intra frames there is a ~20% benefit in full resolution frame size.
Note that decoder must have both base layer I frame _and_ full resolution SVC I frame to decode whole sequence of next P frames in full resolution.

## Limitations

The following major features are not supported compared to x264 (baseline):

 * Trellis quantization.
 * Select prediction mode using Sum of Absolute Transform Differences (SATD).
 * 4x4 motion compensation.

## Interesting links

 * https://www.videolan.org/developers/x264.html
 * https://www.openh264.org/
 * https://github.com/cisco/openh264
 * http://iphome.hhi.de/suehring/tml/
 * https://github.com/oneam/h264bsd
 * https://github.com/fhunleth/hollowcore-h264
 * https://github.com/digetx/h264_decoder
 * https://github.com/lspbeyond/p264decoder
 * https://github.com/jcasal-homer/HomerHEVC
 * https://github.com/ultravideo/kvazaar
 * https://github.com/neocoretechs/h264j
 * https://github.com/jcodec/jcodec


text:
% Git Yourself out of Trouble
% Vaibhav Sagar

# Intro

- Collection of `git` curiousities
- Real or quasi-real examples
- Less puns
- Assumes prior `git` experience, unlike my last talk.

# Git Add

- **git add --patch** - Interactively choose hunks of patch between the index and the work tree and add them to the index.

# Git Rebase

- **git show** - Shows one or more objects (blobs, trees, tags, and commits)
- **git commit --amend** - Replace the tip of the current branch by creating a new commit
- **git rebase** - Forward-port local commits to the updated upstream head (what?)
- **git cherry-pick** - Apply the changes introduced by some existing commits

# Git Reflog

- **git reflog** - Manage reflog information (uhhh...)

# Git Bisect

- **git bisect** -  Use binary search to find the commit that introduced a bug

# Git Fsck

- **git fsck** - Verifies the connectivity and validity of the objects in the database

# Questions?


text:
cookiecutter-pypackage-travisci
==================================
A cookiecutter template for creating a python project & using travis ci for
continuous integration.

What is Travis CI?
-------------------

Requirements
------------
Install `cookiecutter` via the command line: `pip install cookiecutter`

Also, check out [@audreyr](https://github.com/audreyr)'s [cookiecutter](https://github.com/audreyr/cookiecutter) package in depth for more information.

Usage
-----
To start a new travisci python package:

`cookiecutter gh:datasnakes/cookiecutter-pypackage-travisci`

License
-------
This project is licensed under the terms of the [BSD License](/LICENSE)


text:
# laravel-smsoffice

[![Latest Version on Packagist][ico-version]][link-packagist]
[![Software License][ico-license]](LICENSE.md)
[![Build Status][ico-travis]][link-travis]
[![Coverage Status][ico-scrutinizer]][link-scrutinizer]
[![Quality Score][ico-code-quality]][link-code-quality]
[![StyleCI][ico-styleci]][link-styleci]
[![Total Downloads][ico-downloads]][link-downloads]

Custom driver, [SMSOffice](http://smsoffice.ge/), integration for [Laravel Notifications](https://laravel.com/docs/5.5/notifications)

## Table of Contents

- [Install](#install)
    - [Configuration](#configuration)
- [Usage](#usage)
- [Changelog](#changelog)
- [Testing](#testing)
- [Contributing](#contributing)
- [Security](#security)
- [Credits](#credits)
- [License](#license)

## Install

Via Composer

```bash
$ composer require zgabievi/laravel-smsoffice
```

If you do not run Laravel 5.5 (or higher), then follow next step:

```php
// config/app.php
'providers' => [
    ...
    Gabievi\LaravelSMSOffice\SMSOfficeServiceProvider::class,
],
```

If you do run the package on Laravel 5.5+, [package auto-discovery](https://medium.com/@taylorotwell/package-auto-discovery-in-laravel-5-5-ea9e3ab20518) takes care of the magic of adding the service provider.

Optional you can publish the configuration to provide an own service provider stub.

```bash
php artisan vendor:publish --provider="Gabievi\LaravelSMSOffice\SMSOfficeServiceProvider"
```

### Configuration

```php
// config/services.php
...
'smsoffice' => [
    'key'  => env('SMSOFFICE_KEY'),
    'sender' => 'JOHN'
],
...
```

## Usage

You can use the channel in your via() method inside the notification:

``` php
use Illuminate\Notifications\Notification;
use Gabievi\LaravelSMSOffice\SMSOfficeMessage;
use Gabievi\LaravelSMSOffice\SMSOfficeChannel;

class Welcome extends Notification
{
    //
    public function via($notifiable)
    {
        return [SMSOfficeChannel::class];
    }

    //
    public function toSMSOffice($notifiable)
    {
        return SMSOfficeMessage::create('Welcome to the real world!');
    }
}
```

In your notifiable model, make sure to include a routeNotificationForSmsoffice() method, which return the phone number.

```php
//
public function routeNotificationForSmsoffice()
{
    return $this->phone;
}
```

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Testing

``` bash
$ composer test
```

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## Security

If you discover any security related issues, please email<EMAIL_ADDRESS>instead of using the issue tracker.

## Credits

- [Zura Gabievi][link-author]
- [All Contributors][link-contributors]

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

[ico-version]: https://img.shields.io/packagist/v/zgabievi/laravel-smsoffice.svg?style=flat-square
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
[ico-travis]: https://img.shields.io/travis/zgabievi/laravel-smsoffice/master.svg?style=flat-square
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/zgabievi/laravel-smsoffice.svg?style=flat-square
[ico-code-quality]: https://img.shields.io/scrutinizer/g/zgabievi/laravel-smsoffice.svg?style=flat-square
[ico-styleci]: https://styleci.io/repos/105359139/shield
[ico-downloads]: https://img.shields.io/packagist/dt/zgabievi/laravel-smsoffice.svg?style=flat-square

[link-packagist]: https://packagist.org/packages/zgabievi/laravel-smsoffice
[link-travis]: https://travis-ci.org/zgabievi/laravel-smsoffice
[link-scrutinizer]: https://scrutinizer-ci.com/g/zgabievi/laravel-smsoffice/code-structure
[link-code-quality]: https://scrutinizer-ci.com/g/zgabievi/laravel-smsoffice
[link-styleci]: https://styleci.io/repos/105359139
[link-downloads]: https://packagist.org/packages/zgabievi/laravel-smsoffice
[link-author]: https://github.com/zgabievi
[link-contributors]: ../../contributors

repository: zgabievi/laravel-smsoffice

gha_language: PHP

repo_name: zgabievi/laravel-smsoffice