text:
# construct
--
    import "github.com/pierrec/construct"

Package construct provides a simple way to load configuration into a struct from
multiple sources and formats, by relying on the struct embedded types and
special interfaces.

The goal is to reduce the code boilerplate used to initialize data structures to
a minimum, by leveraging Go's types syntax definitions, interface methods, types
reusability and by providing full support for complex field types (basic Go
types, slices, maps and any combination of those.)

For instance, when loading the data from the command line, instead of defining
the cli options definitions using struct field tags, as it is usually done for
cli parsing packages, the definitions are retrieved from the Config.Usage()
method. This allows building definitions dynamically.

### Status

This is work in progress and there are still issues to be adressed.

### Overview

A struct has its fields populated by calling the Load() function. The rules to
populate the struct fields are as follow:

    - fields are only processed if they are exported
    - a field represents a config item for the Config interface
    - an embedded type implementing the Config interface is used to group config items logically
    - an embedded type implementing the Config and FromFlags interfaces represents a subcommand
    - fields processing can be modified using field tags with the following format

       `... cfg:"[<key>][,<flag1>[,<flag2>]]" ...`

If the key is "-", the field is ignored. If the key is not empty, the value is
used as the field name.

The following struct tag flags are currently supported:

    inline       Inline the field which must be a struct, instead of
                 processing it as a group of config items. Inlined fields
                 must not collide with the outer struct ones.
                 It has no effect on non embedded types.

### Subcommands

Subcommands in command line flags are defined by embedding a struct implementing
both the Config and FromFlags interfaces.

The FlagsDone() method is invoked on the last subcommand with the remaining
command line arguments.

### Sources

Data used to populate structs can be fetched from various sources to override
the current struct instance values in the following order:

    - file in various formats
    - environment variables
    - command line flags

The data sources are defined by implementing the relevant interfaces on the
struct:

    - FromFlags interface for command line flags
    - FromEnv interface for environment variables
    - FromIO interface for io sources

Once the data is loaded from all sources, the Init() method is invoked on the
main struct as well as all the embedded ones except subcommands that have not
been requested.

Supported field types

The following types, as well as slices and maps of them, are supported:

    - time.Duration, time.Time
    - *url.URL
    - *regexp.Regexp
    - *text/template.Template, *html/template.Template
    - *net.IPAddr, *net.IPNet
    - bool
    - string
    - float32, float64
    - int, int8, int16, int32, int64
    - uint, uint8, uint16, uint32, uint64
    - types implementing encoding.TextMarshaler and encoding.TextUnmarshaler

Configuration formats

The FromIO interface is used to load and save the configuration from and to any
kind of storage and using any format.

Implementations for file based storage and widely used formats such as json,
toml, yaml or ini are available in the construct/constructs package.

## Usage

```go
const (
	// TagID is the struct tag name used to annotate struct fields.
	// Struct fields with tag cfg:"-" are discarded.
	// Embedded structs with tag cfg:"name" are renamed with the given name.
	TagID = "cfg"

	// TagSepID is the struct tag name used to specify separators for slice or map struct fields.
	// It is defined as a list of runes as follow:
	//  - a map has 2 runes: one to identify the map items, the other to identify the key within an item
	//  - a slice has 1 rune to identify the slice items
	//
	// e.g. for a field defined as
	//      Field map[int][]string `...sep=" :,"...`
	//
	//  map items are separated by a space, its key by a ':' and the slice items by a ','
	//  so that `key1:a,b key2:x,y` is deserialized as [key1:["a","b"] key2:["x","y"]].
	TagSepID = "sep"
)
```

#### func  Load

```go
func Load(config Config, options ...Option) error
```
Load populates the config with data from various sources. config must be a
pointer to a struct.

The values are set based on the implemented interfaces by config in order of
priority:

    - cli value: provided by the FromFlags interface
    - env value: provided by the FromEnv interface
    - ini value: provided by the FromIO interface
    - default value: values initially set in config

#### func  LoadArgs

```go
func LoadArgs(config Config, args []string, options ...Option) error
```
LoadArgs is equivalent to Load using the given arguments. The first argument
must be the real one, not the executable.

#### type Config

```go
type Config interface {
	// Init initializes the Config struct.
	// It is automatically invoked on Config and recursively on its non subcommand embedded
	// structs until an error is encountered.
	Init() error

	// Usage provides the usage message for the given config item name.
	// If the name is the empty string, then the overall usage message is expected.
	// If the returned value is empty, then the config item or subcommand is considered hidden
	// and not displayed in the flags usage message.
	Usage(name string) string
}
```

Config defines the main interface for a config struct. Any embedded struct is
processed specifically depending on the interfaces it implements:

    - Config interface: it defines a group of config items with a prefix set to the embedded type name
    - Config and FromFlags interfaces: it defines a subcommand, which is automatically loaded from flags.
      Subcommands are not case sensitive.

The embedded type names and field names can be overriden by a struct tag
specifying the name to be used.

#### type FromEnv

```go
type FromEnv interface {
	// Env returns the name of the environment variable used for the given config item.
	// Return an empty value to ignore the config item.
	Env(name string) string
}
```

FromEnv defines the interface to set values from environment variables.

#### type FromFlags

```go
type FromFlags interface {
	// FlagsDone is called once the flags have been processed
	// with the previous subcommands and the remaining arguments.
	FlagsDone(cmds []Config, args []string) error

	// FlagsShort returns the short flag for the long name.
	FlagsShort(name string) string
}
```

FromFlags defines the interface to set values from command line flags.

#### type FromIO

```go
type FromIO interface {
	// Load returns the source for the data.
	Load() (io.ReadCloser, error)

	// Save returns the destination for the data.
	Save() (io.WriteCloser, error)

	// New returns a new instance of Store.
	New(seps LookupFn) Store
}
```

FromIO defines the interface to set values from an io source (typically a file).
The supported formats are currently: ini, toml, json and yaml.

#### type LookupFn

```go
type LookupFn func(key ...string) []rune
```

LookupFn is the function signature used to return the runes used for
(de)serializing data on a given key.

#### type Option

```go
type Option func(*config) error
```

Option is used to customize the behaviour of construct.

#### func  OptionEnvSep

```go
func OptionEnvSep(sep rune) Option
```
OptionEnvSep is used to separate grouped config items in environment variables.

If not set, it defaults to '_'.

#### func  OptionFlagsGroupSep

```go
func OptionFlagsGroupSep(sep rune) Option
```
OptionFlagsGroupSep defines the separator for grouped config items in command
line flags. Config items are grouped using an embedded struct that does not
implement the Config interface.

If not set, it defaults to '-'.

#### func  OptionFlagsUsage

```go
func OptionFlagsUsage(usage func(error, func(io.Writer) error) error) Option
```
OptionFlagsUsage defines the function to be called when an error is encountered
while parsing command line flags. The supplied error is nil if the help was
requested.

#### func  OptionFlagsWriter

```go
func OptionFlagsWriter(w io.Writer) Option
```
OptionFlagsWriter sets the Writer for use when the usage is requested.

If nil, it defaults to os.Stderr.

#### type Store

```go
type Store interface {
	// Has check the existence of the key.
	Has(keys ...string) bool

	// Get retrieves the value of the given key.
	Get(keys ...string) (interface{}, error)

	// Set changes the value of the given key.
	Set(value interface{}, keys ...string) error

	// SetComment defines the comment for the given key.
	SetComment(comment string, keys ...string) error

	// Used when deserializing config items.
	io.ReaderFrom

	// Used when serializing config items.
	io.WriterTo

	// StructTag returns the tag id used in struct field tags for the data format.
	// Field tags set to "-" are ignored.
	StructTag() string
}
```

Store defines the interface for retrieving config items stored in various data
formats.

Check the constructs package for implementations.

repository: pierrec/construct

repo_name: pierrec/construct


text:
# Sources

- The l293d library was originally based on [this tutorial](https://business.tutsplus.com/tutorials/controlling-dc-motors-using-python-with-a-raspberry-pi--cms-20051) - The circuit diagrams in the docs are from there.
- Some helpful information about the driver chip can be found [here](http://www.rakeshmondal.info/L293D-Motor-Driver).
- You can buy L293D driver chips cheaply online - I bought a [pack of 5 on Amazon](https://www.amazon.co.uk/dp/B008KYMVVY)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
## Boot Process

>TODO:

In this image from fs, a small partition is mounted in memory to start booting the machine, it gets IPXE (downloads what it needs), and then 0-OS boots.
After that, going to the hub, downloading different lists.

There is 1 main flist that triggers downloads of multiple flists (see hub, and then https://hub.grid.tf/tf-zos/zos:development:latest.flist.md ).
In there all the components/daemons that do part of the 0-OS.
Also the download of the zos-bins, i.e. external binaries are triggered this way (https://hub.grid.tf/tf-zos-bins).

The core components of [Zero-OS](threefold__zos) can be found in: [Zero-OS repo](https://github.com/threefoldtech/zos/tree/master/bins/packages) =  If something changes in the directory, a workflow is triggered to rebuild the full flist and push it to the hub.

When a node discovers there is a new version of one of these lists on the hub, it downloads it, restarts the daemon with the new version.
Over the lifetime of the node, it keeps pulling on the hub directories to check whether new daemons/flists/binaries are available and whether things need get upgraded.

branch_name: refs/heads/main


text:
## Tutorial: Chaos Engineering with Kubernetes

#### Group member:
Johan Vikström<EMAIL_ADDRESS>
#### Description
Step-by-step tutorial on how to configure and deploy kube-monkey (https://github.com/asobti/kube-monkey) to use chaos engineering to ensure reliability of services.
This will cover deploying kube-monkey manually outside of kube-system (the namespace that has all internal kubernetes system deployments), how to switch configs and finally how to read the logs and make sure it actually works and kills pods.
There are tutorials on how to deploy kube-monkey online, however they aren't very thorough. All of them also deploy to kube-system which is a massive security issue (you basically give kube-monkey admin access to the cluster).

Rough outline:
* What is chaos-engineering and why should I care?
* Short introduction to kube-monkey
* Set up all permission stuff neccesary for kube-monkey
* Deploy kube-monkey with a quick config just to make sure it works.
* Spend some time configuring kube-monkey

## Tutorial Done
The tutorial is now complete and tries to fulfill the following grading criteria:
* The TA can successful execute all the commands of the tutorial (mandatory)
* The tutorial gives enough background
* The tutorial is easy to follow
* The tutorial is original, no such tutorial exists on the web
* The tutorial is doable in the browser without a local environment (eg on https://www.katacoda.com/) (optional)

The tutorial can be found [here](https://katacoda.com/jvikstrom/scenarios/k8s-chaos-engineering)

repository: Agriad/devops-course

branch_name: refs/heads/test

gha_language: Python

gha_license_id: MIT

repo_name: Agriad/devops-course


text:
# docker-mosquitto

Porting official Eclipse mosquitto package to Docker image running on Raspberri Pi 2/3 (ARMv7 32-bit or arm32v7) platform.

## Directories
Three directories have been created in the image to be used for configuration, persistence storage and log.
- /mosquitto/config
- /mosquitto/data
- /mosquitto/log

## Usage
### Alternative 1:
Run Docker with minimal options by using default configuration supplied by Docker image.

`$ docker run -d -e TZ=<timezone> -p 1883:1883 mbixtech/arm32v7-mosquitto`

For example, TZ=Asia/Bangkok

### Alternative 2:
Use a custom configuration file by mounting to local /mosquitto/config/mosquitto.conf file.

`$ docker run -d -e TZ=<timezone> -p 1883:1883 -v mosquitto.conf:/mosquitto/config/mosquitto.conf mbixtech/arm32v7-mosquitto`

In /mosquitto.conf configuration file, it can be put the following parameters pointing specific directories.

persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log

### Alternative 3:
Map local directories to all specific directories of Docker container.

`$ docker run -d -e TZ=<timezone> -p 1883:1883 -v config:/mosquitto/config -v data:/mosquitto/data -v log:/mosquitto/log mbixtech/arm32v7-mosquitto`

## Credits
Build Dockerfile base on original from https://github.com/eclipse/mosquitto/tree/master/docker git repository.

## Git Repository
Refer to https://github.com/somsakc/docker-mosquitto

repository: somsakc/docker-mosquitto

repo_name: somsakc/docker-mosquitto


text:
# Changelog

All notable changes to this project will be documented in this file, in reverse chronological order by release.

## [0.5.0-dev](https://github.com/tuupola/axp192/compare/0.4.0...master) - unreleased

This version adds features needed for using with M5STack Core2.

### Added

- Add ioctl support for setting GPIO0 level ([#20](https://github.com/tuupola/axp192/issues/20))
- Add ioctl support for setting GPIO2 level ([#19](https://github.com/tuupola/axp192/issues/19))
- Add ioctl support to enable and disable LDO2 ([#19](https://github.com/tuupola/axp192/issues/18))
- Add ioctl support to enable and disable DCDC3 ([#17](https://github.com/tuupola/axp192/issues/17))
- Add ioctl support for setting GPIO4 level ([#15](https://github.com/tuupola/axp192/issues/15))
- Add ioctl support for setting GPIO4 level ([#13](https://github.com/tuupola/axp192/issues/13))
- Add ioctl support for setting GPIO1 level ([#12](https://github.com/tuupola/axp192/issues/12))
- Add ioctl support to enable and disable LDO3 ([#11](https://github.com/tuupola/axp192/issues/11))
- Add support for AXP192_GPIO43_FUNCTION_CONTROL ([#10](https://github.com/tuupola/axp192/issues/10))
- Add support for AXP192_GPIO2_CONTROL ([#9](https://github.com/tuupola/axp192/issues/9))
- Add support for AXP192_GPIO1_CONTROL ([#8](https://github.com/tuupola/axp192/issues/8))
- Add support for AXP192_DCDC3_VOLTAGE ([#6](https://github.com/tuupola/axp192/issues/6))
- Add support for AXP192_DCDC1_VOLTAGE ([#5](https://github.com/tuupola/axp192/issues/5))
- Add support for AXP192_BATTERY_CHARGE_CONTROL ([#4](https://github.com/tuupola/axp192/issues/4))

### Changed

- `AXP192_GPIO40_FUNCTION_CONTROL` is now `AXP192_GPIO43_FUNCTION_CONTROL`
- `AXP192_GPIO40_SIGNAL_STATUS` is now `AXP192_GPIO43_SIGNAL_STATUS`

## [0.4.0](https://github.com/tuupola/axp192/compare/0.3.0...0.4.0) - 2020-11-09

### Added

- Add DOIO0, LDO23 and charge control default values in menuconfig ([#2](https://github.com/tuupola/axp192/issues/2))

## [0.3.0](https://github.com/tuupola/axp192/compare/0.2.0...0.3.0) - 2020-05-20
### Added

- Optional handle parameter for the I2C HAL ([#1](https://github.com/tuupola/axp192/issues/1))

### Changed

- `AXP192_ERROR_OK` is now `AXP192_OK`
- All LDO output defaults to 3V0 in menuconfig

## [0.2.0](https://github.com/tuupola/axp192/compare/0.1.0...0.2.0) - 2020-04-21
### Changed

- I2C HAL config is now a struct

    ```c
    axp192_t axp;

    axp.read = &i2c_read;
    axp.write = &i2c_write;

    axp192_init(&axp);
    ```

## 0.1.0 - 2020-04-12

Initial realese.


text:
# ZLOGG3R

Hello everyone, before going over our new application, let me just give you the background of this project. ZL0gg3r was part of my College Research Project. The project was just to create a simple Keylogger which is easy to create with Python, but I decided to challenge myself and create it with C# as I started using it recently. I mentioned the Key Logger idea to one of my friends, and he told me, why not make it even more than just a Keylogger. Which is the reason why we created this tool. So we are going to add more features that will make it go beyond a typical Keylogger.

You can read more about the Project below, it aslo include the installation guide:

[ZLOGGER](https://electronicbots.github.io/posts/ZLOGG3R/)

[ZLOGG3R (Arabic)](https://electronicbots.github.io/posts/ZLOGG3R-Arabic/)

# What’s Next?

So the program may look very basic at the moment, but we are working on adding the new features and testing them out before releasing them, so that will take some time. You can read below what are the features we are adding.

For log files transferring:

- Through Email
- HTTP
- Discord
- Slack
- Telegram
- (Other methods that will not be mentioned currently.)

The Application itself:

- Taking screenshots
- Voice recording
- Voice recording to Text
- USB
- Reading a plugged-in USB content
- Video Recording
- New Theme (based on the community)
- (Other ideas that will not be mentioned currently.)

This Project was made by:

[Z0ldyck](https://twitter.com/electronicbots)

[BugsBunny](https://twitter.com/0xiMazen)


text:
## XSockets.Samples.Netduino

A simple project that shows how easy it is to connect

- Netduino
- Arduino
- Browsers
- Console Application

### Pre Req
Built and tested on windows 8.1 and XSockets.NET 4.0 pre-relase

####UNZIP (important)
Once the zip is downloaded, make sure that the file has not been blocked by Windows. Right-click the file you downloaded and choose "Properties". If it says at the bottom of the properties window: "This file came from another computer and might be blocked to help protect this computer" then make sure to click the "Unblock" button so that all of the binary files will be unzipped later on.

Now you can unzip the file to a location of your choosing

### Project Info
The project contains 5 projects, when testing you should start them in the order they are listed

#### XSockets.IoT.Server
Simple console application that starts a XSockets server.
Has a ref to the "Controllers" project so that the controller is loaded

#### XSockets.IoT.Owin
Self hosted webapp with Owin that runs on localhost:12345
Testpage is http://localhost:12345/Web/index.html

IMPORTANT: See to it that all files under /Web has the property "Copy Always" set

#### XSockets.IoT.Client
Just a C# .NET 4.0 client that listens for messages from the Netduino

#### XSockets.IoT.Netduino42 (start if you have NETMF 4.2)
The netduino will turn lights on/off when the buttons in the browser.
When you press the button in the Netduino chatmessages will appear in the browser and in the Console client application

#### XSockets.IoT.Netduino43 (start if you have NETMF 4.3)
The netduino will turn lights on/off when the buttons in the browser.
When you press the button in the Netduino chatmessages will appear in the browser and in the Console client application

#### XSockets.IoT.Controllers (Should not be started)
XSockets Controller and very simple logic

NOTE: The Arduino code is located in the XSockets.IoT.Arduino folder.


text:
# Vitis simpsonii Munson, 1890, non, 1887 SPECIES

#### Status
SYNONYM

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

#### Published in
Proc. Soc. Promot. Agric. Sci. 8:59. 1887

#### Original name
null

### Remarks
null

repository: mdoering/backbone

path: /life/Plantae/Magnoliophyta/Magnoliopsida/Vitales/Vitaceae/Vitis/Vitis aestivalis/ Syn. Vitis simpsonii/README.md

repo_name: mdoering/backbone


text:
# Referenced Libraries

Jar referenced libraries to import in classpath.

System libraries: java-11-openjdk-amd64

|Library|Description|Link|
|----|----|----|
|json|Library to read json data from meta file|[JSON-java](https://github.com/stleary/JSON-java)|
|zip4j|Llibrary to extract from zip, with password features|[zip4j](https://github.com/srikanth-lingala/zip4j)|

repository: MatMasIt/safeBox

repo_name: MatMasIt/safeBox


text:
Developing **color themes** _that are dynamically selectable
at run-time_ is **a tedious and arduous process**.  Ideally **Dark
Mode** would also be included in our requirements list!  While
**tailwind** provides a powerful foundation to work from, it has no
real support for the dynamics that are needed for this task.

If you are a **tailwind** user _that needs **dynamic color themes**_,
this utility may be just what you are looking for!

> Want to see **tw-themes** in action? ... take a peek at the
> {{book.guide.seeItLive}} section.

[![NPM Version
Badge](https://img.shields.io/npm/v/tw-themes.svg)](https://www.npmjs.com/package/tw-themes)

## Introduction

**tw-themes** is a {{book.ext.tailwindcss}} utility that facilitates
_**dynamic color themes that are selectable at run-time**_.

Using **tw-themes** ...

- You define and use {{book.guide.contextColors}}.  These are
  _abstract colors that have meaning in the context of your
  application_.  You define them however you wish _(such as `primary`
  and `secondary`)_, and reference them throughout your markup with
  **tailwind**'s standard color syntax _(ex: `text-primary`,
  `bg-secondary-400`, etc.)_.

- You then map **Real Colors** to your **Context Colors** through one
  or more {{book.guide.themes}}, which can be selected at run-time to
  **change your application colors on the fly!**

  Your colors can be defined either through the **tailwind**'s
  standard color pallet, or your own custom colors _(or a combination
  of both)_.

  It's common to use {{book.guide.colorShading}} to accentuate various
  aspects of your UI.  In **tw-themes** you can define your own shade
  nomenclature _(e.g. `primaryLight`, `primaryDark`)_, or piggy back
  off of **tailwind**'s numeric shade scale _(e.g. `primary-50`,
  `primary-100`, `primary-200`, etc.)_.

- Speaking of color shades, **tw-themes** even allows you to
  {{book.guide.invertYourColorShades}} at run-time _(light-to-dark,
  and dark-to-light)_, **in effect doubling the number of color themes
  available**, and potentially supporting an **automatic dark mode
  theme** _(depending on how your colors are implemented)_.

  Of course, you can explicitly define your own
  {{book.guide.darkMode}} with minimal effort _(if
  {{book.guide.shadeInversion}} doesn't produce the desired effect)_
  ... it's merely a new theme!  Unlike **tailwind**'s new **Dark
  Mode** feature, using **tw-themes** to define your **dark themes**
  requires **NO CHANGES** to your markup _(the **tailwind** solution
  requires you to tediously add the `dark` variant throughout your
  markup)_.

- Because **tailwind** needs to know about your Context Colors,
  **tw-themes** provides a utility that auto-generates the required
  color definitions ... referenced in your `tailwind.config.js` _(part
  of the build process)_.

- As an internal tidbit, the dynamics of run-time color mapping is
  accomplished through the use of CSS Variables _(see
  {{book.guide.howDoItKnow}})_ ... _**inquiring minds want to know!**_

**tw-themes** promotes a **clean and simple approach** to
 _**dynamic color themes**_ that yields **powerful
 results**.

## At a Glance

- {{book.guide.install}} ... _installation instructions_

- {{book.guide.start}} ... _introduction and basic usage patterns_

- {{book.guide.seeItLive}} ... _see a real **tw-themes** app_

- {{book.guide.concepts}} ... _basic concepts concepts and terminology_

- {{book.api.api}} ... _full API reference_

- {{book.misc.history}} ... _peruse the various revisions of **feature-u**_

- {{book.misc.LICENSE}} ... _legal stuff_

repository: KevinAst/tw-themes

gha_language: JavaScript

repo_name: KevinAst/tw-themes


text:
# HTML5 Canvas

This sample shows how to use Kotlin/Native to build a WebAssembly application and how to call JavaScript functions
from a Kotlin/Native code.

> __Note__: If you build this sample not from the Kotlin/Native repository, you need to specify a path to a
Kotlin/Native distribution. Add the following snippet in `gradle.properties`:
>```
>org.jetbrains.kotlin.native.home=<path-to-distribution>
>```
> The default distribution path is `$HOME/.konan/kotlin-native-<macos|linux|windows>-<version>`.

To build use `../gradlew assemble`.

To run use `../gradlew runProgram`.

repository: koush/kotlin-native

repo_name: koush/kotlin-native


text:
---
layout: post
title: Mememto pattern
bigimg: /img/image-header/california.jpg
tags: [Design Pattern, Behavioral Pattern]
---

In this article, we will learn how to use Memento pattern in our project. Let's get started.

## Table of contents
- [Given problem](#given-problem)
- [Definition of Memento Pattern](#definition-of-memento-pattern)
- [When to use](#when-to-use)
- [Benefits && Drawback](#benefits-&&-drawbacks)
- [Code C++/Java](#code-c++/java)
- [Application && Examples](#application-&&-examples)
- [Wrapping up](#wrapping-up)

## Given problem

Assuming that in our project, we need to save the previous state or other state at the some times, and we can restore their state at a later stage. But, in a class that we're processing logic, we insert functionality to save its state. This class might become too complex and we might end up breaking the single responsibility.

Some problems that we're encoutering with:
- The internal state of an object should be saved externally so that the object can be restored to this state later.
- The object's encapsulation must not be violated.

So, how can we do to prevent this complexity and tackle our problems?

## Definition of Memento Pattern

According to [wikipedia.com](), we have:

```
The memento pattern is a software design pattern that provides the ability to restore an object to its previous state (undo via rollback).
```

The Memento pattern was created by ```Noah Thompson```, ```David Espiritu```, and ```Dr. Drew Clinkenbeard``` for early HP products.

Below is an UML diagram of this pattern.

![](../img/design-pattern/memento/memento-pattern.png)

- ```Originator``` is the object for which we need to memorize the state in case we need to restore it at some point.

    Originator defines an operation for saving its internal state to a memento (```createMemento(): return new Memento(state)```) and for restoring to a previous state from a memento (```restore(memento): state = memento.getState()```).

- ```Memento```  is the class responsible for storing the internal state of the originator.

    Memento defines the required data structures to store an ```originator```'s internal state, and it is protected against access by objects other than the ```originator```.

    This is usually achieved by implementing ```memento``` as inner class of ```originator``` and declaring all members of memento private.

- Clients (```caretaker```) that are responsible for saving/restoring an ```originator```'s internal state hold a list of mementos so that a ```memento``` can be passed back to the originator to restore to a previous state.

    But a ```caretaker``` isn't permitted to access a memento. Only the ```originator``` that created a ```memento``` is permitted to access it. This enables to save and restore ```originator```'s internal state without violating its encapsulation.

The key idea in this pattern is to make an object (originator) itself responsible for saving/restoring its internal state (to/from a memento). Only the originator that created a memento is permitted to access it.

## When to use
- Whenever rollback operations need to be implemented.

- It can be used in all kinds of atomic transactions in which the object must be reverted to the initial state if one of the action fails.

## Benefits && Drawback
1. Benefits

    - Preserves encapsulation

        An object's internal state can be saved externally (to another object) without violating encapsulation (without making the internal data structures accessible).

    - Use Serialization to achieve memento pattern implementation that is more generic rather than Memento pattern where every object needs to have it’s own Memento class implementation.

2. Drawbacks

    - May introduce run-time costs

        Creating large numbers of mementos with large amounts of data may impact memory usage and system performance. "Unless encapsulating and restoring Originator state is cheap, the pattern might not be appropriate."

## Code C++/Java

To understand Memento pattern, we can refer this [link](https://github.com/DucManhPhan/Design-Pattern/tree/master/Behavioral-Pattern/memento/src/Java/basic-memento).

## Application && Examples
- In some applications, we can apply or revert something with undo / redo commands.

- Memento can be used in database transactions. If operation fails, we can roll back our data.

## Wrapping up
- Command and Memento often work together to support undoable operations.

    Memento stores state that command requires to undo its effects.

Thanks for your reading.

Refer:

[http://w3sdesign.com/?gr=b06&ugr=proble#gf](http://w3sdesign.com/?gr=b06&ugr=proble#gf)

[https://howtodoinjava.com/design-patterns/behavioral/memento-design-pattern/](https://howtodoinjava.com/design-patterns/behavioral/memento-design-pattern/)

[https://www.geeksforgeeks.org/memento-design-pattern/](https://www.geeksforgeeks.org/memento-design-pattern/)


text:
Named Entity Recognition
=======
Named Entity Recognition is recognizing entities (Persons, Organizations, Locations, etc.) in a
sentence.
These are two NER projects using the same feature extractor. The first one is based on CRFs
using CRFsuite and the other is based on RNN's written in Keras.
They are meant to be used with the czech named entity recognition corpus,
(http://ufal.mff.cuni.cz/cnec/cnec2.0), but can also work with a .json format. We plan to include
loading options for the CONLL2003 dataset as well.

CRF_NER
-------
This is a NER model evaluator for on conditional random fields. It uses
pythoncrfsuite and sklearn. It is mainly used to experiment with different
features extracted from the dataset and comparing the performance between
models.

Setup
-----
The RAM usage (and model size) highly depends on the number of features picked,
I will add estimates later.

### Data
Download the CNEC2.0 dataset from
https://lindat.mff.cuni.cz/repository/xmlui/handle/11858/00-097C-0000-0023-1B22-8

### Dependencies
To install the dependencies, use pip

    pip install python-crfsuite

Usage
-----

You have to define a model file which specifies which features to extract. They
are listed in the file features.txt. Each line should contain the name of the
model followed by the feature names, separated by whitespace.
Example:

    1_nbr label neighbours_1

The first line means the model will extract the label (i.e. the word) and 1
neighbour to the left and to the right. It will be saved as 1_nbr.crfmodel

### Train

With the CNEC2.0 plaintext files in the same folder, simply run:

    python3 -m src.CRF_NER.CRF_NER.py --train named_ent_train.txt named_ent_etest.txt model.txt merge

where merge can be either "BIO", "supertypes" or "none"
It generates modelname.crfmodel and modelname.log (performance evaluation on test set)

### Predict

Using the same model.txt file, run:

    python3 -m src.CRF_NER.CRF_NER.py --predict named_ent_train.txt named_ent_etest.txt model.txt merge

this will load the models defined in model.txt, extract the same features and run a tagger on the
test set.

Licenses
--------
CRFSuite library is licensed under the BSD license, python-crfsuite is licensed under MIT license


text:
+++
title = "Unsupported Items"
weight = 6
+++

## DataSource Interface

* Do not support timeout related operations

## Connection Interface

* Do not support operations of stored procedure, function and cursor
* Do not support native SQL
* Do not support savepoint related operations
* Do not support Schema/Catalog operation
* Do not support self-defined type mapping

## Statement and PreparedStatement Interface

* Do not support statements that return multiple result sets (stored procedures, multiple pieces of non-SELECT data)
* Do not support the operation of international characters

## ResultSet Interface

* Do not support getting result set pointer position
* Do not support changing result pointer position through none-next method
* Do not support revising the content of result set
* Do not support acquiring international characters
* Do not support getting Array

## JDBC 4.1

* Do not support new functions of JDBC 4.1 interface

For all the unsupported methods, please read `org.apache.shardingsphere.driver.jdbc.unsupported` package.

repository: apache/shardingsphere

gha_language: Java

repo_name: apache/shardingsphere


text:
1. Launch **`Mobile Svcs`** app on your Android device. Tap **SCAN** to start the device camera for scanning the onboarding QR code.

    ![MDK](img-1.png)

 > If you already have the MDK client on-boarded, click *GET STARTED* and *SCAN NEW QR CODE* to continue.

2. Tap **AGREE** on `End User License Agreement`.

    ![MDK](img-2.png)

3. Once scan is succeeded, tap **CONTINUE**.

    ![MDK](img-3.png)

4. Enter your credentials to login to SAP BTP and tap **Log On** to authenticate.

    ![MDK](img-4.png)

5. Choose a passcode with at least 8 characters for unlocking the app and tap **NEXT**.

    ![MDK](img-5.png)

6. Confirm the passcode and tap **DONE**.

    ![MDK](img-6.png)

    Optionally, you can enable Biometric authentication to get faster access to the app data.

    ![MDK](img_7.1.png)

8. Tap **OK**.

    ![MDK](img_8.png)

    The MDK client receives deployed metadata definitions as a bundle.

repository: yyertuganov/cloud-mdk-tutorial-samples

repo_name: yyertuganov/cloud-mdk-tutorial-samples


text:
# Developer-Website-
Portfolio of dev work

*Created a portfolio website to showcase my skills and talents to potential employers.

##Accesibility:
*Added downloadable resume and social media links.
-Linkedin
-Instagram
-Github

##Semantics:
*Created a **hr** element to create thematic breaks between listed items and to select in css and used pseudo code to style with fontawesome.
*Added a copyright to footer.
*Used emojis to customize

##Concision:
*Created a HTML file with all source code and linked CSS stryle sheet.
*Added resume links as well as social media pages.
*Created classes & id's in CSS to create functionality.
*Added flexboxes

##Credits:

*[Github Pages Link] (https://jolizaro.github.io/Developer-Website-/)

##License

Copyright (c) [2021] [JolizaRo]

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: jolizaro/Developer-Website-

repo_name: jolizaro/Developer-Website-


text:
# Frust [![Crates.io](https://img.shields.io/crates/v/frust.svg)]() [![Build Status](https://travis-ci.org/lloydmeta/frust.svg?branch=master)](https://travis-ci.org/lloydmeta/frust)

Functional programming in Rust. Still largely a WIP.

## General idea

Hopefully, make things easier by allowing stuff like this:

```rust
use frust::monoid::*;

let v = vec![Some(1), Some(3)];
assert_eq!(combine_all(&v), Some(4));

// Slightly more magical
let t1 = (1, 2.5f32, String::from("hi"), Some(3));
let t2 = (1, 2.5f32, String::from(" world"), None);
let t3 = (1, 2.5f32, String::from(", goodbye"), Some(10));
let tuples = vec![t1, t2, t3];

let expected = (3, 7.5f32, String::from("hi world, goodbye"), Some(13));
assert_eq!(combine_all(&tuples), expected);
```

## Todo

Lots, but for starters, these are not implemented at all, nor do I know for sure if they
are possible given that Rust has no support for Higher Kinded Types.

0. `Functor`
1. `Monad`
2. `Apply`
3. `Applicative`

`Show`, `Monoid`, and `Semigroup` are at least partially (mostly?) implemented.

Benchmarks would be nice but they're an unstable feature, so perhaps in a different branch.

## Inspirations

Scalaz, Cats, Haskell, the usual suspects ;)

## Contributing

Yes please !

The following are considered important, in keeping with the spirit of Rust and functional programming:

- Safety (type and memory)
- Efficiency
- Correctness

repository: danielSanchezQ/frust

repo_name: danielSanchezQ/frust


text:
# TodoList with Material Ui

This is todo lists with material UI
React, Redux, MaterialUiを使った練習に最適

### Library and Tools used in this project

- Redux
- React
- MaterialUi http://www.material-ui.com/#/

### How to Use

1. Loading item
2. Show existing all items
3. Select items
4. Delete a item
5. Show updated items

### Getting Started

There are two methods for getting started with this repo.

#### Familiar with Git?
Checkout this repo, install dependencies, then start the gulp process with the following:

```
> git clone https://github.com/harunawaizumi/materialui-todoList
> cd materialui-todoList
> npm install
> npm start
```

#### Not Familiar with Git?
Click [here](https://github.com/harunawaizumi/materialui-todoList) then download the .zip file.  Extract the contents of the zip file, then open your terminal, change to the project directory, and:

```
> npm install
> npm start
```

repository: harunawaizumi/todoList

repo_name: harunawaizumi/todoList


text:
# Overview
This software supports the results in the paper:
https://www.medrxiv.org/content/10.1101/2<IP_ADDRESS>52520v1

The algorithm simulates a COVID-19 epidemic for Austin, TX, and determines triggers
to enact social distancing orders to avoid exceeding hospital capacity. Chosen triggers
attempt to minimize the total number of days that a city is in strict levels.

All codes are tested on MacOS but should work on Windows and Linux.

## Installation and running the code
- Download and unzip the code to a local path (e.g., .../COVID_Staged_Alert)
- Add both /COVID_Staged_Alert and /COVID_Staged_Alert/InterventionsMIP to your $PYTHONPATH
- The following packages are required:
* matplotlib
* pandas
* numpy
* scipy
- The installation should take less than a minute.

## Guidelines for contributing
- Create new branches to test new features
- Create a pull request to merge with master

# Structure of the code

## threshold_policy.py
- Main module to launch the search
- Functions to execute the search and find optimized thresholds to enact lock-downs.
- Iterators for traing and testing
- Calendar generation (ad-hoc for Austin instance)

## policy_search_functions.py
- Main module to run the search
- Functions to perform chance-constrained check and select the optimal policies w/o ACS setup

## SEIYHARD_sim.py:
- Simulator engine
- Parallelizarion functions
- Calander utils class (SimCalendar)

## epi_parameters.py
- Class EpiSetup characterizes the simulation and recompute contact matrices as needed.

## intervention.py
- Class intervention defines its properties and used in the simulator.
- Helper function to create multiple interventions

## policies.py
- Class MultiTierPolicy and MultiTierPolicy_ACS defines policy given the thresholds and will have functions to obtain corresponding tier given trigger statistics
- Functions to build a list of trial policies

## objective_functions.py
- Construct the objective function for a simulation path

## utils.py
- Timing function
- Rounding functions

## intances/__init__.py
- Module summarizing the input of the simulator.
- Creates an instance of EpiSetup

# Structure of the test scripts

## main_least_squares.py

- Least-squares fit

Related input files:

instances/austin/
* austin_real_icu_lsq.csv
* austin_real_hosp_lsq.csv
* austin_hos_ad_lsq.csv
* transmission_Final_lsq.csv
* setup_data_Final_lsq.json

instances/houston/
* houston_real_icu_lsq.csv
* houston_real_hosp_lsq.csv
* transmission_Final_lsq.csv
* setup_data_Final_lsq.json

## main_downsampling.py

- Donwsampling procedure (algorithm 1)
- Call downsampling.py

Related input files:

instances/austin/
* tiers5_ds_Final.json
* austin_test_IHT_ds.json

## main_multitier.py

- script to obtain optimal trigger policy
- Call policy_search_functions.py

Related input files:

instances/austin/
* tiers5_opt_Final.json
* transmission_Final.csv

## main_multitier_acs.py

- script to obtain optimal trigger policy and ACS setup threshold
- Call policy_search_functions.py

instances/austin/
* tiers5_acs_Final.json
* transmission_Final_orange25_yellow75.csv

# Structure of the reporting scripts

## plotting.py

- Plot the figures used in the manuscript
* ICU, general wards heads-in-beds
* Total daily admission
* Stacked plots

## output_processors.py

- Obtain statistics based on simulation results in .p file

## report_pdf.py

- generate pdf file by filling in statistics in the .tex template and compile

# Demo

Run the bash file test.sh in Demo folder to obtain an optimal trigger and generate visualization and a report
- The .p file (data file) will be generated in /output
- The plots will be generated under /plots
- The report will be generated under /reporting/reports
- The run time should be within a minutes


text:
Building the connectors from source is only necessary when you want to use or contribute to the latest (not yet released) version of the Pravega Flink connectors.

The connector project is linked to a specific version of Pravega, based on a git submodule pointing to a commit-id.  Gradle automatically builds Pravega as necessary to build the connector.

## Build Steps
### Clone the flink-connectors Repository
Be sure to use the `--recursive` option when cloning the repository.   Alternately, update the submodules using:
```
$ git submodule update
```

### Build and install the Flink Connector library

Build and install the latest version of the Pravega Flink Connector library into your local Maven repository.

```
$ git clone https://github.com/pravega/flink-connectors.git
$ ./gradlew clean install
```

The resulting jar file will be called `pravega-connectors-flink_2.11-<version>.jar`.

## Customizing the Build
### Building against a custom Flink version

You can check and change the Flink version that Pravega builds against via the `flinkVersion` variable in the `gradle.properties` file.
Note that you can only choose Flink versions that are compatible with the latest connector code.

### Building against another Scala version

This section is only relevant if you use [Scala](https://www.scala-lang.org/) in the stream processing application in with Flink and Pravega.

Parts of the Apache Flink use the language or depend on libraries written in Scala. Because Scala is not strictly compatible across versions, there exist different versions of Flink compiled for different Scala versions.
If you use Scala code in the same application where you use the Apache Flink or the Flink connectors, you typically have to make sure you use a version of Flink that uses the same Scala version as your application.

By default, the dependencies point to Flink for Scala **2.11**.
To depend on released Flink artifacts for a different Scala version, you need to edit the `build.gradle` file and change all entries for the Flink dependencies to have a different Scala version suffix. For example, `flink-streaming-java_2.11` would be replaced by `flink-streaming-java_2.12` for Scala 2.12.

In order to build a new version of Flink for a different Scala version, please refer to the [Flink documentation](https://ci.apache.org/projects/flink/flink-docs-release-1.4/start/building.html#scala-versions) (the link refers to Flink 1.4).

## IDE Setup (IntelliJ IDEA)
Import the project into IDEA as a Gradle-based project.

Please install the Lombok plugin to be able to build from within the IDE.  The source code uses Lombok annotations to generate various helper code.

## Updating the Pravega dependency

1. Update the submodule to the head of the master branch:
```
git submodule update --remote --merge
```

2. Build and test the connector.

3. Commit the changes, including the updated commit-id.

repository: Aparnarr/flinkconnectors-docs

repo_name: Aparnarr/flinkconnectors-docs


text:
# Pipeblock
Pipeblock brings the Pipe Operator flow of Functional Programming to Ruby.
It provides a very clean flow for working with static methods.

How to add to Your Project:

```ruby
gem 'pipeblock'
```

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install pipeblock

## Usage
```ruby
# sample method
def cut(text, pattern)
  text.gsub(pattern, '')
end

pipe 'http://www.google.com' do
  cut('http://www.')
  cut('.com')
end
# => google
```

```ruby
require 'date'

def add_day(date, days = 1)
  date + days
end

result_date = pipe Date.today do
                add_day 5
                add_day 5
              end

result_date.should > Date.today + 5
result_date.should <= Date.today + 10
```

Calling external classes
```ruby
pipe 0.0 do
  e -> (entry_value) { Math.cos entry_value }
end
# => 1.0
```

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

repository: andrelip/pipeblock

repo_name: andrelip/pipeblock


text:
# Red Hat Serverless Operator

Provides a collection of API's to support deploying and serving of serverless
applications and functions.

## Requirements

For the scripts in this repository to work properly, the following requirements apply.

- `podman` aliased to `docker` or `docker` (17.05 or newer) (only if you need/want to
build images from code)
- `bash` (4.0.0 or newer)
- `make`
- `yq` (3.4.0)

## Install an unreleased version

To install an unreleased version (either **nightly** from HEAD or the respective version
from an already cut branch), you can follow these steps. You can replace the `crc start`
step with whatever cluster you might want to use. Also make sure to check out the respective
branch of the version you want to install first.

```
$ crc start --cpus=6 --memory 16384
$ unset DOCKER_REPO_OVERRIDE # This makes sure that pre-built images are used
$ make install
```

## Development and private cluster testing

### tl;dr

If you want to quickly run the most relevant tests locally (those that are required by
the CI environment), use these commands:

```
$ crc start --cpus=6 --memory 16384
$ export DOCKER_REPO_OVERRIDE=quay.io/username
$ make images test-operator
```

### CRC-based cluster

If you want to use CRC to run tests locally, the following configuration has
been tested to work with the operator E2E tests.

```
crc start --cpus=6 --memory 16384
```

### Creating the images

To test the Serverless Operator against your private Openshift cluster you first
need to push the necessary images to a publicly available location. To do that,
make sure the `DOCKER_REPO_OVERRIDE` environment variable is set to a docker
repository you can push to, for example `quay.io/markusthoemmes`. You might
need to run `docker login` to be able to push images. Now run
`make images` and all images in this repository will now be built and
pushed to your docker repository.

#### Creating the images on cluster

`make images` requires docker or podman to build images, by setting
`ON_CLUSTER_BUILDS=true` env variable, `make images` will build images
using OpenShift Build and they will be available at the in-cluster
registry `image-registry.openshift-image-registry.svc:5000/openshift-marketplace/<image_name>`.

To install the system using those images, use
`DOCKER_REPO_OVERRIDE=image-registry.openshift-image-registry.svc:5000/openshift-marketplace`

### Installing the system

Use the appropriate make targets or scripts in `hack`:

- `make dev`: Deploys the serverless-operator without deploying Knative Serving, Eventing and Kafka components.
- `make install`: Scales the cluster appropriately, deploys serverless-operator, Knative Serving and Eventing.
- `make install-all`: Scales the cluster appropriately, deploys serverless-operator, Knative Serving, Eventing and Kafka.
- `make install-serving`: Scales the cluster appropriately, deploys serverless-operator and Knative Serving.
- `make install-eventing`: Scales the cluster appropriately, deploys serverless-operator and Knative Eventing.
- `make install-kafka`: Scales the cluster appropriately, deploys serverless-operator, Knative Eventing and Knative Kafka
in `knative-eventing` namespace by default. Requires to install a Strimzi cluster with `make install-strimzi`.
- `make install-previous`: same as `make install` but deploy previous serverless-operator
  version.
- `make install-strimzi`: Install the latest Strimzi operator and a kafka cluster instance in `kafka` namespace by default.
- `make unistall-strimzi`: Uninstall the Strimzi operator and any existing kafka cluster instance.
- `make install-mesh`: Install service mesh operator.
- `make uninstall-mesh `: Uninstall service mesh operator.
- `make install-full-mesh`: Install service mesh operator, Istio Gateway and PeerAuthentication to use Knative Serving for secure traffic.
- `make uninstall-full-mesh `: Uninstall service mesh operator, Istio Gateway and PeerAuthentication.

**Note:** Don't forget you can chain `make` targets. `make images dev` is handy
for example.

### Updating the release files

To update release files with variables stored in [project.yaml](./olm-catalog/serverless-operator/project.yaml)
we use [generate scripts](./hack/generate) and a [templates](./templates). Update
those based on your needs, and generate the files with:

```
make release-files
```

### Running tests

#### serverless-operator tests

- `make test-unit`: Runs unit tests.
- `make test-e2e`: Scales, installs and runs E2E tests (except for Knative Kafka components).
- `make test-e2e-with-kafka`: Scales, installs and runs E2E tests (also tests Knative Kafka components).
- `make install-mesh test-e2e`: Scales, installs and runs E2E tests, including ServiceMesh integration tests
- `make test-operator`: Runs unit and E2E tests.

#### knative-serving and knative-eventing E2E tests

- `make test-upstream-upgrade`: Installs a `previous` version of Serverless and
 runs Knative Serving upgrade tests. Requirements:
     1) Running OCP cluster.
     2) Knative Serving images that the current Serverless operator depends
        on are published in CI registry. This requirement is automatically met
        when the respective branch in
        [Knative Serving](https://github.com/openshift-knative/serving) is created and its
        pre-submit CI checks run at least once.
     3) The path `${GOPATH}/src/knative.dev/serving` containing
        [Knative Serving](https://github.com/openshift-knative/serving) sources from the
        desired branch. This should be checked out before running tests.
- `make test-upstream-e2e-no-upgrade`: Installs the latest version of Serverless and
 runs Knative Serving and Knative Eventing E2E tests (without upgrades). Requirements:
     1) Running OCP cluster.
     2) Knative Serving and Knative Eventing images that the current Serverless operator depends
        on are published in CI registry. This requirement is automatically met
        when the respective branches in [Knative Serving](https://github.com/openshift-knative/serving) and
        [Knative Eventing](https://github.com/openshift-knative/eventing) are created, and their
        pre-submit CI checks run at least once.
     3) The path `${GOPATH}/src/knative.dev/serving` containing
        [Knative Serving](https://github.com/openshift-knative/serving) sources from the desired branch.
        The path `${GOPATH}/src/knative.dev/eventing` containing
        [Knative Eventing](https://github.com/openshift-knative/eventing) sources from the desired branch.
        This should be checked out before running tests.

#### Individual tests from knative-serving and knative-eventing

There are targets for running individual tests in both
[Knative Serving Makefile](https://github.com/openshift-knative/serving/blob/main/Makefile) and
[Knative Eventing Makefile](https://github.com/openshift-knative/eventing/blob/main/Makefile).

Example targets that can be run from the respective repositories (these targets all requires a running OCP
cluster and pre-installed Serverless):

- `make TEST=<name_of_test> BRANCH=<ci_promotion_name> test-e2e-local`: Runs the given test using the
   latest test images that were published under the given promotion name. This doesn't require building
   any images manually.
   Example: `make BRANCH=knative-v0.15.2 TEST=TestDestroyPodInflight test-e2e-local`.
- `make IMAGE=<name_of_image> DOCKER_REPO_OVERRIDE=<dockerhub_registry> test-image-single`: Builds an
   image from `test/test_images/$(IMAGE)` and pushes it into the Dockerhub registry. This requires
   ko 0.2.0 or newer.
- `make TEST=<name_of_test> DOCKER_REPO_OVERRIDE=<dockerhub_registry> test-e2e-local`: Runs the given test
   using the previously built image.

## Operator Framework

This repository contains the metadata required by the
[Operator Lifecycle Manager](https://github.com/operator-framework/operator-lifecycle-manager)

### Create a Subscription

To install the operator, create a subscription:

```
cat <<-EOF | oc apply -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
  name: serverless-operator
  generateName: serverless-operator-
  namespace: openshift-operators
spec:
  source: serverless-operator
  sourceNamespace: openshift-marketplace
  name: serverless-operator
  channel: techpreview
EOF
```

### Test upgrade from previous version

To test upgrade from previous version, deploy serverless operator by `make install-previous`

```
make install-previous
```

Then, you can see the installplans that the latest version has APPROVED `false`.

```
$ oc get installplan -n openshift-operators
NAME            CSV                          APPROVAL    APPROVED
install-ck6jl   serverless-operator.v1.4.1   Manual      true
install-hrzzn   serverless-operator.v1.5.0   Manual      false
```

For example, v1.5.0 is the latest version in this case. To upgrade v1.5.0, you can edit
`spec.approved` to true manually.

```
spec:
  approval: Manual
  approved: true
```

After a few minutes, operators will be upgraded automatically.

## Contributing

### Create a new version

To create a new version of the serverless-operator (usually after a release branch has
been cut), there are a few steps we have to do. These steps can be done one after the
other and do not have to be sent as one PR, to avoid clogging up the respective PR.

#### 1. Update the version metadata of the serverless-operator

The first thing we usually do is to update the version metadata of the operator. That
mostly includes bumping the version to the next desired version (i.e. 1.12 -> 1.13).
This is done by adjusting the respective settings in the `project` and `olm` part of
[`project.yaml`](./olm-catalog/serverless-operator/project.yaml). The settings to be
changed usually are `project.version`, `olm.replaces` and `olm.skipRange`.

Next, add the now outdated version of serverless-operator to the CatalogSource deployment
in [catalogsource.bash](./hack/lib/catalogsource.bash). The image to be added usually has
the following format: `registry.ci.openshift.org/openshift/openshift-serverless-$OLD_VERSION:serverless-bundle`.
Add it before the "current" image, which is `image-registry.openshift-image-registry.svc:5000/$OLM_NAMESPACE/serverless-bundle`.

After the changes are done, commit them and run `make generated-files`. All manifests
will now be updated accordingly. It's encouraged to commit the generated changes
separately, to ease review.

#### 2. Update the image coordinates and installation manifests

To update the image coordinates of the component you want to bump, adjust its version in
the `dependencies` section of [`project.yaml`](./olm-catalog/serverless-operator/project.yaml).

It should be a rare occasion, but between releases, the manifest files we want to pull
might have changed. If that is the case, adjust the files downloaded in
[`update-manifests.sh`](./openshift-knative-operator/hack/update-manifests.sh).

Likewise a rare occasion should be patches to the manifest files. `update-manifests.sh`
might be applying patches that can be removed in the new release or have to be adjusted.
Make sure to review them and act accordingly.

After the changes are done, commit them and run `make generated-files`. All manifests
will now be updated accordingly. It's encouraged to commit the generated changes
separately, to ease review.

#### 3. Update the Golang dependencies

The repository itself depends on the respective upstream releases. The
`openshift-knative-operator` for example is straightly build from vendoring the upstream
operator and the tests heavily rely on upstream clients, APIs and helpers.

To update the dependencies, update the `KN_VERSION` variable in
[`update-deps.sh`](./hack/update-deps.sh). Then run `./hack/update-deps.sh --upgrade`
(like we do upstream) to pull in all the correct versions. It's encouraged to commit
the generated changes separately, to ease review.

If we're bumping our minimum supported Openshift version, bump the `OCP_VERSION` variable
in the same file and follow the same process.

### Linting

To run the linters that CI is running, you can use `make lint`. You can run `make fix-lint`
to fix as many linting warnings automatically as possible. This will for example format YAML
rather than just warn about unformatted YAML.

The required linters for that are:

- [`woke`](https://github.com/get-woke/woke) to detect non-inclusive language
- [`golangci-lint`](https://golangci-lint.run/) to lint golang code
- [`shellcheck`](https://www.shellcheck.net/) to lint shell files
- [`operator-sdk`](https://sdk.operatorframework.io/docs/installation/) to lint the bundle files
- [`misspell`](https://github.com/client9/misspell) to lint typos
- [`prettier`](https://prettier.io/) to format YAML

repository: openshift-knative/serverless-operator

gha_language: Go

repo_name: openshift-knative/serverless-operator


text:
[![Build Status](https://travis-ci.org/Jire/Resourceful.svg?branch=master)](https://travis-ci.org/Jire/Resourceful)
[![Kotlin](https://img.shields.io/badge/kotlin-1.0.2--1-blue.svg)](https://kotlinlang.org)
[![license](https://img.shields.io/badge/license-Unlicense-green.svg)](https://github.com/Jire/Resourceful/blob/master/UNLICENSE)
[![Release](https://jitpack.io/v/Jire/Resourceful.svg)](https://jitpack.io/#Jire/Resourceful)

##Resourceful
A Kotlin library that helps you manage, reuse, and update resources in a concise and meaningful fashion.

license: Unlicense

repository: Jire/Resourceful

repo_name: Jire/Resourceful


text:
# copa-cases
Saving a CSV of all cases stored on the COPA (formerly IPRA) Chicago website, daily

## [View cases here](cases.csv)

[Commit history](https://github.com/CrimeIsDown/copa-cases/commits/master/cases.csv)

NOTE: Only changes will be committed. Thus, you my not see any new
commits for a while, only when cases are added/removed will you see a
new commit.

## Automatic updates

Add this to your crontab to make updates daily at 5pm CDT / 6pm CST:

```
0 22 * * * cd {installpath}; docker-compose up
```

repository: CrimeIsDown/copa-cases

repo_name: CrimeIsDown/copa-cases


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

## Description

SpaceLY is an application that provides a localized map of objects in the night sky. SpaceLY is built around VirtualSky (https://virtualsky.lco.global/), which uses a html canvas element to create an interactable visualization of space objects visible from give latitude and longitude coordinates. SpaceLY enhances VirtualSky by providing passport-authenticated database access to store, share, and display points of interest saved in user journals.
Presentation at: https://docs.google.com/presentation/d/1lW3swENwiEiRAvUTW-EB3-evA3MVwEnQRtRNqYpdrq0/edit?usp=sharing
Deployed at: https://nameless-reaches-15845.herokuapp.com

## Table of Contents

* [Installation](#installation)
* [Usage](#usage)
* [License](#license)
* [Contributing](#contributing)
* [Tests](#tests)
* [Questions](#questions)

## Installation

Clone this repo.
Run `npm install` in the cloned base directory

## Usage

The login page provides access to a basic instance of the VirtualSky canvas, including its keyboard shortcuts and time/location setting features. Visitors can also view and activate user shared journals.
The login page:
![Login Page, No open Items](https://github.com/jodoedjr/SpaceLY/blob/master/assets/login.png "Login Page")

Set Time:
![Login Page, Set Time](https://github.com/jodoedjr/SpaceLY/blob/master/assets/dataAndTime.png "Login Page - Set Time Popup")

Keyboard Shortcuts:
![Login Page, Keyboard Shortcuts](https://github.com/jodoedjr/SpaceLY/blob/master/assets/login-keyboard.png "Login Page - Keyboard Shortcuts Popup")

The navigation drawer (opened by clicking the SpaceLY icon) houses login and signup forms, and access to globally shared journals of points of interest.
![Login Page, Open Nav Drawer](https://github.com/jodoedjr/SpaceLY/blob/master/assets/login-open-menus.png "Login Page - Open Nav Drawer")

The member page gives the user access to My Journals, where a user can create, activate, update, and delete their journals.
![Member Page, Open Nav Drawer](https://github.com/jodoedjr/SpaceLY/blob/master/assets/member-open-menu.png "Member Page - Open Nav Drawer")

Member update journal:
![Member Page, Update Journal Modal](https://github.com/jodoedjr/SpaceLY/blob/master/assets/members-edit-galaxy.png "Member Page - Edit Journal")

## License

This repo is covered by the MIT license

## Contributing

Please add issues to the issues section of the repo

## Tests

no tests provided

## Questions

Find me on GitHub at: https://github.com/jodoedjr

repository: jodoedjr/SpaceLY

repo_name: jodoedjr/SpaceLY


text:
# Eka
Eka is an unfinished podcast parser/analysis tool written in Nim.

## How do I use it?

Compile with `nim compile -d:ssl main.nim` and simply run the executable.

## What does it do?

Right now? Not much. Writing something yourself is the best way to learn a language (and I can only write fibonacci number finders so many times), which is one of two reasons this program exists--the other being that I could not find a similar tool anywhere.

But if you are curious, firing it up it without arguments runs a baked-in test case. The results look like this:

````
title :: Til Death Do Us Blart 2017
pubDate :: Thu, 23 Nov 2017 12:50:21 +0000
itunes:duration :: 01:14:54

title :: Til Death Do Us Blart 2016
pubDate :: Thu, 24 Nov 2016 05:01:00 +0000
itunes:duration :: 01:34:42

title :: Til Death Do Us Blart 2015
pubDate :: Thu, 26 Nov 2015 11:30:37 +0000
itunes:duration :: 01:27:46

title :: Til Death Do Us Blart: Trailer
pubDate :: Fri, 13 Nov 2015 20:02:35 +0000
itunes:duration :: 01:31

average duration: 3883 seconds, or 1.07861 hours
````

## What will it do?

Overall, I'm not sure--but I do have a list of features to be added as of now.

probably:

* [ ] Cross-platform tray icon
* [ ] accepting either a single url or an OPML file as input
* [x] showing the average length of episodes
* [ ] showing the average timespan between episode releases
* [ ] showing the average filesize of episodes
* [ ] showing the average quality of an episode
  * [ ] as a measure of a ratio of length vs size
  * [ ] as measured by bitrate (if sampling each individual episode is feasible)
* [ ] storing gathered data offline (likely as sqlite or json)
* [ ] graphical interface via [webgui](https://github.com/pragmagic/karax) and [tray icon](https://github.com/zserge/tray)

maybe/eventually:

* [ ] abstracting it to general rss feeds
* [ ] ability to scrape feeds on an interval, either in their entirety or just specific fields (ideally without relying on cron or the like)
* [ ] [gpodder](https://gpodder.net/developer) integration
* [ ] distributed network-based recommendation system possibly using PageRank and/or a basic DHT

Feature suggestions and general contributions in the form of PRs are welcome.

## Why Nim?

I like the raw speed that low level languages tend to offer, and the chance to use one with a Python-ish feel was too good to pass up. The availability of several other features (such as the optional garbage collector) played a part too.

## Why that name?

Since this is the first tool of its kind (I looked just about everywhere and found nothing), I've christened it Eka--sanskrit for _one_. This will be slightly awkward if I find a similar tool after starting this one, but the name still sounds cool either way.

## TODO

* [ ] switch to the included testing framework
* [ ] determine weird xml edge cases
  * [ ] handle edge cases


text:
# Agency Theme

Agency Theme is a one page portfolio for companies and freelancers based on the [original Bootstrap theme](//github.com/IronSummitMedia/startbootstrap-agency) by [David Miller](//github.com/davidtmiller). This Hugo theme features several content sections, a responsive portfolio grid with hover effects, full page portfolio item modals, a timeline, and a contact form.

![Hugo Agency Theme screenshot](https://raw.githubusercontent.com/digitalcraftsman/hugo-agency-theme/master/images/screenshot.png)

## Installation

Inside the folder of your Hugo site run:

    $ cd themes
    $ git clone https://github.com/digitalcraftsman/hugo-agency-theme

For more information read the official [setup guide](//gohugo.io/overview/installing/) of Hugo.

## Getting started

After installing the Agency Theme successfully it requires a just a few more steps to get your site running.

### The config file

Take a look inside the [`exampleSite`](//github.com/digitalcraftsman/hugo-agency-theme/tree/master/exampleSite) folder of this theme. You'll find a file called [`config.toml`](//github.com/digitalcraftsman/hugo-agency-theme/blob/master/exampleSite/config.toml). To use it, copy the [`config.toml`](//github.com/digitalcraftsman/hugo-agency-theme/blob/master/exampleSite/config.toml) in the root folder of your Hugo site. Feel free to change the strings in this theme.

### Change the hero background

The hero acts as an eye-catcher for your site. So consider to give him a nice background. You just need to replace the [`header-bg.jpg`](//github.com/digitalcraftsman/hugo-agency-theme/blob/master/static/img/header-bg.jpg) at [`static/img`](//github.com/digitalcraftsman/hugo-agency-theme/tree/master/static/img) with your own background image. But it's important that you keep the original filename.

### Present your skills

This section should show your capabilities and skills. You can change the services at `[params.services.list]` in the [`config.toml`](//github.com/digitalcraftsman/hugo-agency-theme/blob/master/exampleSite/config.toml).

All icons are part of Fontawesome's icon font. Look at the website of [Fontawesome](//fortawesome.github.io/Font-Awesome/icons/) for more icons. The icons are represented by their corresponding CSS class of Fontawesome. A skill is defined like this example:

```toml
[[params.services.list]]
      icon = "fa-shopping-cart"
      title = "E-Commerce"
      description = "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Minima maxime quam architecto quo inventore harum ex magni, dicta impedit."
```

### Create your portfolio

Beside the [`config.toml`](//github.com/digitalcraftsman/hugo-agency-theme/blob/master/exampleSite/config.toml), there is under `data` another subfolder called [`projects`](//github.com/digitalcraftsman/hugo-agency-theme/tree/master/exampleSite/data/projects) which hosts the files that will appear as your projects in the portfolio section.  Lorem ipsum dolor sit amet, consectetur adipisicing elit. Est blanditiis dolorem culpa incidunt minus dignissimos deserunt repellat aperiam quasi sunt officia expedita beatae cupiditate, maiores repudiandae, nostrum, reiciendis facere nemo!

**Want these icons in this portfolio item sample?** You can download 60 of them for free, courtesy of [RoundIcons.com](//getdpd.com/cart/hoplink/18076?referrer=bvbo4kax5k8ogc), or you can purchase the 1500 icon set [here](//getdpd.com/cart/hoplink/18076?referrer=bvbo4kax5k8ogc).
```

Copy [`projects`](//github.com/digitalcraftsman/hugo-agency-theme/tree/master/exampleSite/data/projects) inside the `data` folder in the **root** directory of your site. Let's make some changes.

Pay attention to the `modalID`. It must be a unique integer and be incremented with each new project you want to add to the portfolio. Otherwise, the corresponding modal can't be rendered.

Furthermore, you can use Markdown syntax for URLs like here `[text](//url.to/source)` in the description.

To give your projects an image, save those under [`static/img/portfolio`](github.com/digitalcraftsman/hugo-agency-theme/tree/master/static/img/portfolio). Don't forget to set the appropriate **filename** under `img` in your project.

### Show what happened

This theme features a timeline for important events in your company or your career too. You can add a new event by copying the following snippet to the `[params.about]` section in the [`config.toml`](//github.com/digitalcraftsman/hugo-agency-theme/blob/master/exampleSite/config.toml).

```toml
[[params.about.events]]
      img = "1.jpg"
      date = "2009-2011"
      title = "Our Humble Beginnings"
      description = "Lorem ipsum dolor sit amet, consectetur adipisicing elit. Sunt ut voluptatum eius sapiente, totam reiciendis temporibus qui quibusdam, recusandae sit vero unde, sed, incidunt et ea quo dolore laudantium consectetur!"
```

The image set under `img` needs to be stored at [`static/img/about`](//github.com/digitalcraftsman/hugo-agency-theme/tree/master/static/img/about). The events will be listed from the top to the bottom.

### Introduce your team

Let the visitors or potential clients know who you are. To add a team member paste the code below into the [`config.toml`](//github.com/digitalcraftsman/hugo-agency-theme/blob/master/exampleSite/config.toml). The `img` field refers to the shown image. Paste those of you or your colleages into [`static/img/team`](//github.com/digitalcraftsman/hugo-agency-theme/tree/master/static/img/team)

```toml
[[params.team.members]]
    img = "1.jpg"
    name = "Kay Garland"
    position = "Lead Designer"
    social = [
        ["fa-twitter", "#"],
        ["fa-facebook", "#"],
        ["fa-linkedin", "#"]
    ]
```

As you can see there's an option to link individual social networks. The first index of the array represents the icon (or CSS class) of [Fontawesome](//fortawesome.github.io/Font-Awesome/icons/). The last index is simply the link to the social network profiles.

### List your clients

You can also show some of your clients. To do so, paste the client's logos into [`static/img/logos`](//github.com/digitalcraftsman/hugo-agency-theme/tree/master/static/img/logos) and add the example below to the [`config.toml`](//github.com/digitalcraftsman/hugo-agency-theme/blob/master/exampleSite/config.toml).

```toml
[[params.clients]]
    logo = "designmodo.jpg"
    link = "#"
```

***The logos require a dimension of 200 x 50 pixels.***

### Make the contact form working

Since this page will be static, you can use [formspree.io](//formspree.io/) as proxy to send the actual email. Each month, visitors can send you up to one thousand emails without incurring extra charges. Begin the setup by following the steps below:

1. Enter your email address under 'email' in the [`config.toml`](//github.com/digitalcraftsman/hugo-agency-theme/blob/master/exampleSite/config.toml)
2. Upload the generated site to your server
3. Send a dummy email yourself to confirm your account
4. Click the confirm link in the email from [formspree.io](//formspree.io/)
5. You're done. Happy mailing!

### Nearly finished

In order to see your site in action, run Hugo's built-in local server.

    $ hugo server

Now enter [`localhost:1313`](http://localhost:1313/) in the address bar of your browser.

## Contributing

Did you found a bug or got an idea for a new feature? Feel free to use the [issue tracker](//github.com/digitalcraftsman/hugo-agency-theme/issues) to let me know. Or make directly a [pull request](//github.com/digitalcraftsman/hugo-agency-theme/pulls).

## License

This theme is released under the Apache License 2.0 For more information read the [License](//github.com/digitalcraftsman/hugo-agency-theme/blob/master/LICENSE).

## Acknowledgements

Thanks to

- [David Miller](//github.com/davidtmiller) for creating this theme
- [Steve Francia](//github.com/spf13) for creating Hugo and the awesome community around the project.


text:
### [CVE-2021-32792](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-32792)
![](https://img.shields.io/static/v1?label=Product&message=mod_auth_openidc&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-79%3A%20Improper%20Neutralization%20of%20Input%20During%20Web%20Page%20Generation%20('Cross-site%20Scripting')&color=brighgreen)

### Description

mod_auth_openidc is an authentication/authorization module for the Apache 2.x HTTP server that functions as an OpenID Connect Relying Party, authenticating users against an OpenID Connect Provider. In mod_auth_openidc before version 2.4.9, there is an XSS vulnerability in when using `OIDCPreservePost On`.

### POC

#### Reference
- https://www.oracle.com/security-alerts/cpuapr2022.html

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

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
# Kinect CMYK PhotoBooth
Interactive photo booth experience using Kinect For Windows v2 and real-time image processing to create a CMYK color separation collage from multiple poses and made immediately available for slideshows and download to mobile devices.

## Background

As one of several experiences designed and developed for an open house party hosted by frog in the Austin studio around SXSW 2016, this installation uses Kinect for Windows for body detection and background removal along with image colorization in real-time which allows users to "paint" themselves in CMYK and download the photo for sharing.

## Dependencies

* Windows 10
* .NET 4.6
* Visual Studio 2015
* Kinect For Windows v2 sensor and SDK
* ImageProcessor (.NET library loaded via NuGet package configuration)
* Display output or projection supporting 1080p (1920 x 1080 resolution)

## Usage

* Building and running the application normally launches the photo booth "input" mode
* Launching the application with a /s switch argument launches the slideshow mode that cycles through the captured and published photos

## Examples

![Kinect CMYK PhotoBooth](images/frog-kinect-cmyk-photobooth-input.jpg)

![Kinect CMYK PhotoBooth](images/frog-kinect-cmyk-photobooth-output-1.png)

![Kinect CMYK PhotoBooth](images/frog-kinect-cmyk-photobooth-output-2.png)


text:
Smart Phone Support for Bluetooth Body Sensors - 2010
==========

My final year university project (2010) involving what was then a smartphone, a [Nokia E51](https://en.wikipedia.org/wiki/Nokia_E51), connected via Bluetooth to a [Shimmer](http://www.shimmersensing.com/) sensor running a basic fall detection algorithm. These sensors used [TinyOS](http://www.tinyos.net/) and thus the somewhat unusual [nesC](https://en.wikipedia.org/wiki/NesC) language.

The idea was that a fall-risk person would wear the sensor, and then if a fall was detected the phone would automatically call an emergency contact and route audio to the loudspeaker. It mostly worked.

The phone ran a version of python that allowed for easy access to most of its peripheral, and relatively straightforward graphing of the received signals.

The [final document](https://raw.githubusercontent.com/hughobrien/shimmer-nokia-fall-detection/master/tools/fyp.pdf) is probably worth a look. Tex sources included.

Demo
----
![demonstration](https://raw.githubusercontent.com/hughobrien/shimmer-nokia-fall-detection/master/tools/DSC_7505.jpg)
![demonstration](https://raw.githubusercontent.com/hughobrien/shimmer-nokia-fall-detection/master/tools/DSC_7453.jpg)

repository: hughobrien/shimmer-nokia-fall-detection

repo_name: hughobrien/shimmer-nokia-fall-detection


text:
---
title: Exploring possibilities of Pluggable Transports on Android
date: 2019-04-16T15:00:00-04:00
author: uniq
layout: post
permalink: /2019/04/18/exploring-possibilities-of-pluggable-transports-on-android/
categories:
  - News
tags:
  - android
  - circumvention
  - pluggable transports

---

[Pluggable Transports](https://www.pluggabletransports.info) (PT) give software developers the means
to establishing reliable connections in [DPI-filtered](https://en.wikipedia.org/wiki/Deep_packet_inspection) network scenarios.
A variety of techniques are supported, all available by implementing just one
standard.  We looked into how this can be put to work in Android Apps.
Hence we crafted 3 fully functional
[PT-enabled](https://gitlab.com/uniqx/anynews-android#anynews-pt)
[prototype](https://gitlab.com/uniqx/fdroidclient-pt#f-droid-pt)
[Apps](https://gitlab.com/uniqx/apps-android-wikipedia-pt#wikipedia-android-pt)
based on well known open source projects.

All our prototypes rely on [obfs4](https://github.com/Yawning/obfs4) which is a stable
PT implementation widely deployed by Tor.  Guardian Project published
a library called [AndroidPluggableTransports](https://github.com/guardianproject/AndroidPluggableTransports) for giving Android
developers access easy access to PT.  Since we could not find any easily
accessible sample code, we created a [minimal demo project](https://gitlab.com/uniqx/pt-obfs4proxy-minimal-demo),
illustrating a minimal setup for sending a HTTP-request through a OBFS4
connection.

Conceptually, a PT establishes point to point connections between a PT client
and a PT server.  PT servers are also known as "bridges".  Most app back-ends,
on the other hand, consist of multiple services and third party APIs.  We're
using SOCKS5 for multiplexing several connections over a single PT connection.
A nice benefit to this approach is that client side integration looks similar
to integrating Tor.

Every PT bridge generates an individual set of parameters. These are required
for establishing connections to that bridge. In the context of Tor, these
parameters are often referred to as a "bridge line", which also implies a
quasi-standardized formatting of these parameters.

Starting a PT connection involves several layers of proxying.  This diagram
should give you an idea of what's really going on when we start a PT
connection:

![Schematic overview of establishing a PT connection used](apt-setup-socks5.png)

For many organizations it is not an option to run open proxies on the Internet
because the bandwidth bills would be too large, or the security risks too high.
This means we need to refine our SOCKS5 based approach a bit.  An obvious
solution is to restrict usage of a PT bridge for one specific app.  This can
be achieved simply by whitelisting outgoing connections on a bridge's
SOCKS5 server.  Some SOCKS5 servers have built-in support for this, so we're
covered.  We published the deployment script we're using to set up our [SOCKS5-enabled bridges](https://gitlab.com/uniqx/pt-socks5-over-obfs4proxy) in our prototype environment.

While SOCKS5 support is widespread these days, some apps might still need to
rely on HTTP-proxying.  That's why we also included an embedded HTTP-proxy in
our prototype Apps.  This proxy is configured to transparently send requests
through the SOCK5 connection, which in turn runs through a PT connection.

All that required from the app developer's perspective is to configure APT
(and our soon-to-be upstreamed proxy helper library) with a bridge line,
then configure all network connections to use a either a SOCKS5 or HTTP proxy.

We also looked into ways for distributing parameters for
[PT connections](https://github.com/guardianproject/AndroidPluggableTransports/pull/15). We started out by supporting bridge-lines as
used in Tor browser and Orbot. Copy and pasting these is not very convenient
and probably looks arcane to most users. So we came up with the idea of
sharing bridge connection parameters as URLs.  HTTP(S) URLs are clickable in
most Android Apps which makes sharing a lot easier.  Apps can subscribe to
URL patterns.  This way it's possible to intercept clicks on PT bridge
parameters and configure PT settings accordingly. While these URLs still
look somewhat arcane, they hopefully enable an improved user experience.

Here's an example of a bridge-line and how it looks like the in all URL formats:

```
Bridge obfs4 <IP_ADDRESS>:443 FD9DAEE45A2FDF70D462914A75ADE99A29957920 cert=LSOd9qOffpIFM4az+ueou7sY0eQRAsI/joW4QgCl/LSDo2ecQzAQHNu281oAivLDZuTQNA iat-mode=0
bridge://obfs4@<IP_ADDRESS>:443/FD9DAEE45A2FDF70D462914A75ADE99A29957920?cert=LSOd9qOffpIFM4az%2Bueou7sY0eQRAsI%2FjoW4QgCl/LSDo2ecQzAQHNu281oAivLDZuTQNA&iat-mode=0
http://bridge.onion/FD9DAEE45A2FDF70D462914A75ADE99A29957920?transport=obfs4&ip=<IP_ADDRESS>&port=443&cert=LSOd9qOffpIFM4az%2Bueou7sY0eQRAsI%2FjoW4QgCl/LSDo2ecQzAQHNu281oAivLDZuTQNA&iat-mode=0
https://bridges.torproject.org/FD9DAEE45A2FDF70D462914A75ADE99A29957920?transport=obfs4&ip=<IP_ADDRESS>&port=443&cert=LSOd9qOffpIFM4az%2Bueou7sY0eQRAsI%2FjoW4QgCl/LSDo2ecQzAQHNu281oAivLDZuTQNA&iat-mode=0
```

There's still some room for refining this. Tor Browser, for example, will
happily accept but fail using our experimental SOCKS5 bridges.  Meanwhile our
prototype apps will accept but fail to connect to Tor bridges.  So it would
make sense to explore what metadata apps need to decide whether they are
capable of connecting to a specific bridge or not.

An important missing puzzle piece in this regard also is to make sure DNS
queries can not get filtered.  [DNS-over-HTTPS (DoH)](https://en.wikipedia.org/wiki/DNS_over_HTTPS) could be
a suiteable mitigation. Further down the road, it certainly would make sense
to look into sending DNS requests over pluggable transports too.

Many Android apps use `WebView` for transparently embedding web content.
Sadly, proxy support of `WebView` is not very developer friendly.  We are
shipping a well-tested helper library with [NetCipher](https://gitlab.com/guardianproject/NetCipher/#webview) to
ease this pain.

We also explored an alternative approach to control the networking of
Android's `WebView`. It's possible to replace all network requests
a `WebView` sends by overriding `WebViewClient.shouldInterceptRequest()`.
This technique will work well for read-only (HTTP GET) connections.  Sending
data (HTTP POST and PUT) is not feasible though. There is no interface,
either exposed or hidden, in Android's API which would allow us to retrieve
a HTTP request's body.

Finally here's a list of alternative scenarios we came up with for using PT
on Android.  They are not as generic as the approach we chose to implement in
the prototype Apps.  In some situations these might be easier to implement,
perform better or simply convey how PT can be put to use.

![Schematic overview of establishing a PT connection used](apt-setup-scenarios.png)

repository: guardianproject/info

gha_language: CSS

gha_license_id: NOASSERTION

repo_name: guardianproject/info


text:
# Examples

Example `.drone.yml` configurations that should provide a starting point for integrating Captain's Log.

## Standard Configuration With No Teams

**Uses `SLACK_URL`**

**Note:** If you're using Jira as your default tracker, you will **need** to provide the `jira_team_domain` or the links will not work properly in the output.
**Note:** If you're using Enterprise Github as your default SCM, you will **need** to provide the `enterprise_host` as a fully qualified URL or Captain's Log will not be able to traverse your repositories.

```yaml
my-release-log-step:
  image: target/captains-log:1
  secrets: [SLACK_URL, GITHUB_TOKEN]
  github_owner: ReactTraining
  github_repo: react-media
```

### With Jira and Github Enterprise

```yaml
my-release-log-step:
  image: target/captains-log:1
  secrets: [SLACK_URL, GITHUB_TOKEN]
  github_owner: ReactTraining
  github_repo: react-media
  enterprise_host: https://git.mycompany.com
  jira_team_domain: mycompany # where mycompany would be interpolated to form https://jira.mycompany.com
```

## Standard Jira Configuration With Teams

**Uses `SLACK_TOKEN`**

```yaml
my-release-log-step:
  image: target/captains-log:1
  secrets: [SLACK_TOKEN, GITHUB_TOKEN]
  github_owner: ReactTraining
  github_repo: react-media
  slack_channel: reactify
  jira_team_domain: myteamnamespace
  teams:
    - name: Team1
      color: '#FFDC18'
      emoji: '✨'
      mentions: '<@person1>  <@person2>'
      issueTracking:
        jira:
          projects:
            - TEAM1
            - TEAM1SUBGROUP
    - name: Team2
      color: '#F48642'
      emoji: '🔥'
      mentions: '<@person3>'
      issueTracking:
        jira:
          projects:
            - TEAM2
```

## Standard Github Configuration With Teams

```yaml
my-release-log-step:
  image: target/captains-log:1
  secrets: [SLACK_URL, GITHUB_TOKEN]
  github_owner: ReactTraining
  github_repo: react-media
  teams:
    - name: Team1
      channels:
        - my-teams-private-channel
      color: '#FFDC18'
      emoji: '✨'
      mentions: '<@person1>  <@person2>'
      issueTracking:
        github:
          projects:
            - ReactTraining/waffle_repo
```

---

Next: [Including issues in Captain's Log](/pr-body/).

repository: benzvan/captains-log

repo_name: benzvan/captains-log


text:
# [I Finally Understand Static vs. Dynamic Typing and You Will Too!](https://medium.com/hackernoon/i-finally-understand-static-vs-dynamic-typing-and-you-will-too-ad0c2bd0acc7)

* Source code - "original" code typed by human into computer
* At some point there must be translation from source code to something computer can read (i.e. machine code)
* Runtime - program is executing commands
  * Post-compilation if language is compiled
* Compilation - Code is translated before runtime
* Interpreted - Code is translated on the fly, during execution

## When are types checked?

* `"3" + 5` will raise type errors in strongly-typed languages (like Python or Go) because they don't allow for type coercion
* Type coercion is the ability for a value to change types implicitly in certain contexts
* In weakly-typed languages like JavaScript, the result would be `"35"`
* Static typing is when types are checked _before_ runtime
* Dynamic typing is when types are checked on the fly, during execution
* The difference between static and compiled and dynamic and interpreted is that static / dynamic have to do with when types are checked while compiled / interpreted have to do with when source code is translated

```python
# Illustrative Python Example
# Remember that Python is dynamic and interpreted

def foo(a):
    if a > 0:
        print 'Hi'
    else:
        print "3" + 5
foo(2)
```

* `foo(2)` means that the `else` block never executes fo `"3" + 5` is never even evaluated
* Imagine if Python was statically typed - this would mean that a type error would be thrown before code is executed
  * There would still be type-checking _before_ runtime even though it is interpreted
* Now imagine if Python was compiled - the `else` block would be translated _before_ runtime, but because Python is dynamically typed, no error would be thrown
  * This is because, types would still be checked on the fly / during execution
  * Since the `else` is never reached, no type error would throw

## Performance

* Compiled languages that are statically typed will have better runtime performance as knowledge of types allows for machine code optimization
* Statically type languages have better runtime performance because they don't need to check types dynamically while executing
* Compiled languages are faster at runtime as code has already been translated instead of needing to translate on the fly

repository: jaebradley/notes

repo_name: jaebradley/notes


text:
---
title: Test access style for S3 compatible backupstore
---
### Case 1: Using Alibaba Cloud OSS bucket as backupstore
1. Create an OSS bucket within Region China in Alibaba Cloud(Aliyun).
2. Create a secret without `VIRTUAL_HOSTED_STYLE` for the OSS bucket.
3. Set backup target and the secret in Longhorn UI.
4. Try to list backup. Then the error `error: AWS Error: SecondLevelDomainForbidden Please use virtual hosted style to access.` is triggered.
5. Add `VIRTUAL_HOSTED_STYLE: dHJ1ZQ== # true` to the secret.
6. Backup list/create/delete/restore work fine after the configuration.

### Case 2: Using AWS S3 bucket as backupstore
1. Create a secret without `VIRTUAL_HOSTED_STYLE` for the S3 bucket.
2. Set backup target and the secret in Longhorn UI.
3. Verify backup list/create/delete/restore work fine without the configuration.
4. Add `VIRTUAL_HOSTED_STYLE: dHJ1ZQ== # true` to the secret.
5. Verify backup list/create/delete/restore still work fine after the configuration.

repository: meldafrawi/longhorn-tests

repo_name: meldafrawi/longhorn-tests


text:
ansible-base
=========

A basic role providing some common
development tools and system configrations
for kse201.

Requirements/Dependencies
------------

TBD

Role Variables
--------------

TBD
see [default variables](https://github.com/kse201/ansible-dotfiles/defaults/main.yml)

Example Playbook
----------------

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

    - hosts: servers
      roles:
         - { role: kse201.base }

License
-------

MIT

Author Information
------------------

This role was created by [kse201](https://github.com/kse201).


text:
---
author: DAddYE
email<EMAIL_ADDRESS>categories: update, screencasts
title: Padrino User Resources and Screencasts
---

There has been a lot of interest recently in additional Padrino resources such as more screencasts, advanced tutorials, user-editable wikis, etc. I think the team understands and values the interest in more resources because this means lots of people with varying levels of experience with web development are looking to become familiar with Padrino.

Right now the team is very busy working on bug fixes and towards a 1.0 release. There have been bug reports trickling in on Padrino and we have been working to address them in a timely fashion. It is very important that for a 1.0 release that Padrino is rock-solid and easy to use for every experience level. There are a few thoughts I have about this topic of more Padrino resources.

<break>

First, I would love to hear more of all your thoughts about this subject. Email us, leave comments, send us Github messages about what you would like to see while learning Padrino. This is really important in trying to understand the next steps to improving the Padrino experience.

![](http://dl.dropbox.com/u/5747628/peepcolde_logo.png)

Second, the desire for more screencasts is noted. One interesting screencast the Padrino team would love to see is a Padrino peepcode video that builds on the basics taught in the Sinatra screencast. There is a feedback forum for Peepcode here: [Peepcode Padrino Screencast](http://suggestions.peepcode.com/forums/15-general/suggestions/1064769-padrino) . If you are interested in a high quality video going in-depth about the various aspects of Padrino, let Peepcode know. We would be very excited to see this come to fruition.

Third, we welcome contributors. If you want to improve documentation, add tutorials or pages to our website documentation, add padrino guides, or anything else to improve the state of Padrino, please let us know! We are happy to talk with you and work with you to make Padrino an easier to use web development framework.

Thanks for reading and I appreciate the support given by the Padrino community.

repository: wikimatze/padrinorb-website

repo_name: wikimatze/padrinorb-website


text:
# An unofficial bookdown template for a doctoral thesis at Karolinska Institutet

The files in this repository provide an unofficial blueprint for a doctoral thesis at [Karolinska Institutet](http://ki.se), compiled using the [bookdown](https://bookdown.org/yihui/bookdown/) package to combine multiple RMarkdown documents into one. The primary use is export to PDF via Latex using pandoc. There are a lot of ad hoc Latex insertions which might complicate export to other formats.

## Workflow

1. Execute `bookdown::render_book("index.Rmd")` twice to generate the main body of the thesis in the output subfolder.
2. Knit before_body.Rmd in the before_body subfolder to a PDF. This includes the unnumbered pages before the table of contents, such as the title page, copyright, spikblad (there is a separate spikblad with date and time in the spikblad subfolder), abstract and publication list.
3. Compile PDF (easiest from within RStudio) for combine.tex in the output subfolder to combine the two documents.
4. The output is the final document combine.pdf in the output subfolder.

## Acknowledgments

This thesis template has been inspired by incredibly valuable blogposts from [\@ed_berry](https://twitter.com/ed_berry): [Writing your thesis with bookdown](https://eddjberry.netlify.com/post/writing-your-thesis-with-bookdown/) and [\@rosannavhespen](https://twitter.com/rosannavhespen): [Writing your thesis with R Markdown](https://rosannavanhespenresearch.wordpress.com/2016/02/03/writing-your-thesis-with-r-markdown-1-getting-started/).

The files in this repository compile into my thesis at KI which can also be found [here](https://openarchive.ki.se/xmlui/handle/10616/46090).

## Package versions used to compile the thesis

* R version 3.3.0
* Bookdown 0.5
* RMarkdown 1.6
* Knitr 1.17


text:
# ssh-vault
A vault to store encrypted documents, using a list of SSH Public Keys

## Language

Shell

## Platform

Tested on macOS High Sierra,
running `openssl version`: `LibreSSL 2.2.7`

## Configuration

Copy the list of SSH Public Keys to use for encryption to the file
'vault.public.ssh.keys' in keys/ folder.

Generate the symmetrical key used for encryption of the documents,
and encrypt it with each of the SSH Public Keys in turn (SSH Public
Keys can only encrypt safely small amounts of data directly):

```
keys/create-keys.sh
```

You can modify the list of SSH Public Keys and update the list of encrypted
symmetrical keys (effectively reencrypting the same key with the updated keys)
if you have access to at least one of the private keys needed to decrypt the
symmetrical keys in their current form:

```
keys/update-keys.sh
```

## Usage

Encrypt a document from the clipboard (using `pbpaste`):

```
pbpaste | ./encrypt.sh 'my.document'
```

The document is encrypted to 'safe/my.document.encrypted'.
If you make your own copy of this repository, the encrypted document
can even be added and committed to your git repository.

Decrypt the same document to the clipboard (using 'pbcopy'):

```
./decrypt.sh 'my.document' | pbcopy
```

or

```
./decrypt.sh safe/my.document.encrypted | pbcopy
```

In order to decrypt the file, a private SSH key matching one of the
public SSH keys used for encryption must be found on the local machine.
The location of the local SSH keys can be changed in the file config.sh:

```
# Absolute path to the SSH private key used for decryption on this machine
sshPrivateKeyUsedToDecrypt="$HOME/.ssh/id_rsa"

# Absolute path to the SSH public key used for encryption on this machine
sshPublicKeyUsedToEncrypt="$sshPrivateKeyUsedToDecrypt.pub"
```

## License

Copyright 2017-2018 eGull SAS
Licensed under the [Apache License, Version 2.0][APACHE2]

[APACHE2]: http://www.apache.org/licenses/LICENSE-2.0

repository: eGullGolf/ssh-vault

repo_name: eGullGolf/ssh-vault