text:
# loco

An implementation of the LOCO-I (LOw COmplexity LOssless COmpression for Images)
algorithm geared towards flight-safety and portability

Developer/maintainer: Neil Abcouwer, neil.abcouwer [at] jpl.nasa.gov

This software is based on the LOCO-I algorithm which is described in:

  Marcelo J. Weinberger, Gadiel Seroussi and Guillermo Sapiro,
    "LOCO-I: A Low Complexity, Context-Based, Lossless Image
    Compression Algorithm", in Proc. Data Compression Conference
    (DCC '96), pp. 140-149, 1996.

This implementation originates with Matt Klimesh and Aaron Kiely's
implementation for MER, and was modified by Neil Abcouwer.
Modifications include using fixed-width types, putting code common
to compression and decompression in a loco_common file,
removal of global variables in favor of passed struct pointers,
reduction of function parameters via use of structs,
and other modifications per MISRA/JPL/P10 guidelines.

This implementation lacks the run length encoding ("embedded
alphabet extension") of LOCO-I.  There are other differences as well.

## Using the code

`include/loco/loco_pub.h` defines public functions for compression and decompression.

`include/loco/loco_types_pub.h` defines macros for buffer sizing
at compile time and various public types.

loco expects a configuration dependent `include/loco/loco_conf_global_types.h`
and `include/loco/loco_conf_private.h` that one must create for your
specific configuration. `loco_conf_global_types.h` defines sized types, and
`loco_conf_global_types.h` defines macros.
`test/loco_test_global_types.h` and `test/loco_test_private.h` are examples
that will be copied over to `include/loco` for unit testing.

## building

This code does not by itself compile into an executable or library.
This code is intended to be compiled along with the code that uses it.

For testing, you'll need the following dependencies:

`build-essential cmake gcc valgrind lcov`

To run unit tests (including pulling google test framework):

`./build.bash test`

To run unit tests with coverage reports:

`./build.bash coverage`

Then open ./build/coverage/index.html to look at results.

To save unit test output to the test folder (so it can be committed
for later delta comparison)

`  ./build.bash save`

To run unit tests with valgrind
(note, this disables death tests, as they don't play well with valgrind):

`./build.bash valgrind`

To clean (remove the build directory):

`./build.bash clean`

To use with your own framework, you will need to define your own versions of
`loco_conf_global_types.h` and `loco_conf_private.h`,
to do appropriate declarations for your framework, and you may need to make
build changes so they aren't overwritten.

### configuration, types, and macros

This library was written with the intention of being usable for safety-critical
applications (like spaceflight) and to be flexible enough to be used in
multiple frameworks. This leads to conflict. For instance,
safety critical code neccesitates the use of fixed-width types,
but flexibility means that such types may vary. If not already available,
users must write a `loco_conf_global_types.h` to define certain types and a
`loco_conf_private.h` to define certain macros.
`test/loco_test_global_types.h` and `test/loco_test_private.h`
provide more explanation and examples, and are copied when running unit tests.

One example is using NASA Core FSW's `common_types.h` as the basis
for sized types. Running

`./build.bash cfstest`

copies `configs/cfs/loco_cfs_global_types.h`, which includes
`common_types.h` (copied to the test folder for convenience) to
`loco_conf_global_types.h`, then builds and runs the unit tests.
But it is unclear (to Neil) whether Core FSW has assertions (see below)
so as of yet there is no `loco_cfs_private.h`.

## assertions

This library was written with the philosophy that inproper inputs to functions,
such as an improperly sized image, are programming errors, and that assertions
be used to check programming errors. See http://spinroot.com/p10/rule5.html
for more on asserts.

Functions use `LOCO_ASSERT` macros. It is the intent that users of the
loco library will copy an appropriate `loco_conf_private.h` to include/loco,
such that asserts are defined appropriately for the application.
They might be defined as `ROS_ASSERT`, `BOOST_ASSERT`,
c `assert`, or send some asycnhronous message to do whatever
the system needs during an anomaly.

They could also be disabled, but this is is discouraged.

## static analysis

This library has been analyzed using Cobra (http://spinroot.com/cobra/,
https://github.com/nimble-code/Cobra).

To use Cobra, follow the Cobra instructions to clone and configure.
On linux, you may need the "yacc" program from the "bison" package.
You may want to add these lines in your bashrc (or equivalent)
as discussed in the cobra readme:

`export COBRA=/path/to/your/clone/of/Cobra`

`export PATH=$PATH:$COBRA/bin_linux`

`export C_BASE=$COBRA/rules`

Then run commands of the form:

`cobra -f file -I/path/to/this/repo/include /path/to/this/repo/src/*.c`

Where file can be one of several rules files. This code, compiled with the
unit test headers, was checked against the basic, misra2012, p10, and jpl rules.
Running

`./build.bash cobra`

runs all these checks.

Deviations from the rules:
- The main encoding/decoding loops loop over every pixel of an image or
the entirety of the compressed bitstream. Thus the overhead of function calls
becomes significant. Therefore these main loops exceed advised function sizes
and use macros for the sake of performance.
- P10: Locally-defined macro functions are used to improve performance.
- JPL: Using "ifdef __cplusplus" mangle guard puts code over the preprocessor
conditional limit of one per header, but that's the price you pay for c++ compatibility.

## contributions

Pull requests or emails about small code fixes, new code features,
configurations for targeted frameworks, or improvements to the build process
are welcome. Please ensure any pull requests are fully covered by unit testing,
follow the established standards, and pass static analysis.

## todo

- Run semmle and codesonar on code
- Add more pictures to test against during unit testing
- Optimize decompression code (which did not run on-board for MER and inheritors)
- Support images stored in 8-bit pixels

## JPL Development Info

This software was developed at the Jet Propulsion Laboratory,
California Institute of Technology, under a contract with the
National Aeronautics and Space Administration (80NM0018D0004).

This work was funded by funded by the NASA Space Technology
Mission Directorate (STMD) and the proposal,
"CubeRover for Affordable, Modular, and Scalable Planetary Exploration"
was selected as part of the NASA 2019 Tipping Point solicitation Topic 4:
Other Capabilities Needed for Exploration. The project is managed by the
STMD Utilizing Public-Private Partnerships to Advance Tipping Point
Technologies Program.

This software was developed under JPL Task Plan No 15-106860.

This software is reported via JPL NTR 51705.

This software was approved for open source by JPL Software Release Authority
Brian Morrison on 2020-10-21.

repository: abcouwer-jpl/loco

repo_name: abcouwer-jpl/loco


text:
This example uses `fs-remote` to write test snapshots to the filesystem from the browser.

### Instructions

* Run `yarn install`
* Run `yarn server` in one terminal
* Run `yarn client` in another terminal
* Open <http://localhost:8080> in your browser.
* Check console output.

license: MIT

repository: leoalves/fs-remote

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: leoalves/fs-remote


text:
# Hiboot - web/cli application framework

## About

Hiboot is a cloud native web and cli application framework written in Go.

Hiboot is not trying to reinvent everything, it integrates the popular libraries but make them simpler, easier to use. It borrowed some of the Spring features like dependency injection, aspect oriented programming, and auto configuration. You can integrate any other libraries easily by auto configuration with dependency injection support.

If you are a Java developer, you can start coding in Go without learning curve.

## Overview

* Web MVC (Model-View-Controller).
* Auto Configuration, pre-create instance with properties configs for dependency injection.
* Dependency injection with struct tag name **\`inject:""\`**, **Constructor** func, or **Method**.

## Getting Started

* [Hiboot Documentation in English](https://hiboot.netlify.app/)
* [Hiboot 中文文档](https://hiboot.netlify.app/cn)

## Community Contributions Guide

Thank you for considering contributing to the Hiboot framework, The contribution guide can be found [here](CONTRIBUTING.md).

## License

© John Deng, 2017 ~ time.Now

Released under the [Apache License 2.0](https://hidevops.io/hiboot/blob/master/LICENSE)
=====================================

Released under the [Apache License 2.0](https://github.com/hidevopsio/hiboot/blob/master/LICENSE)

[Jetbrains](https://www.jetbrains.com/?from=hiboot) supports this project with GoLand licenses. We appreciate their support for free and open source software!

repository: hidevopsio/hiboot

gha_language: Go

repo_name: hidevopsio/hiboot


text:
# 9.g Use boolean settings to modify system SELinux settings

## SELinux Booleans

Booleans are on/off settings for functions in SELinux. There are hundreds of settings that can turn SELinux capabilities on or off, and many are already predefined.

### Listing Booleans

Use 'getsebool' to get current booleans and their values.

Get status on a specific boolean

    # getsebool httpd_enable_cgi
    httpd_enable_cgi --> on

List all booleans

    # getsebool -a | head -n 4
    abrt_anon_write --> off
    abrt_handle_event --> off
    abrt_upload_watch_anon_write --> on
    antivirus_can_scan_system --> off

_You can also use 'semanage'_

    # semanage boolean -l | head -n 4
    SELinux boolean                State  Default Description
    abrt_anon_write                (off  ,  off)  Allow ABRT to modify public files used for public file transfer services.
    abrt_handle_event              (off  ,  off)  Determine whether ABRT can run in the abrt_handle_event_t domain to handle ABRT event scripts.

_Or 'sestatus -b'_

    # sestatus -b | tail -n 4
    zarafa_setrlimit                            off
    zebra_write_config                          off
    zoneminder_anon_write                       off
    zoneminder_run_sudo                         off

**Examples**

List all enabled booleans

    # getsebool -a | grep ' on'

Getting info on SQL booleans

    # getsebool -a | grep -i sql
    mysql_connect_any --> off
    mysql_connect_http --> off
    postgresql_can_rsync --> off
    postgresql_selinux_transmit_client_label --> off
    postgresql_selinux_unconfined_dbadm --> on
    postgresql_selinux_users_ddl --> on
    selinuxuser_mysql_connect_enabled --> off
    selinuxuser_postgresql_connect_enabled --> off

Getting additional information on boolean (not part of RHCSA v8 and requires the `setools-console` package)

    # sesearch -b httpd_execmem -A
    allow httpd_suexec_t httpd_suexec_t:process { execmem execstack }; [ httpd_execmem ]:True
    allow httpd_sys_script_t httpd_sys_script_t:process { execmem execstack }; [ httpd_execmem ]:True
    allow httpd_t httpd_t:process { execmem execstack }; [ httpd_execmem ]:True

### Changing Boolean Values

Booleans can be set for runtime or persistent (survives reboots)

#### Runtime

Configures a policy for runtime

    # setsebool httpd_enable_cgi on

In some systems you can also use `togglesebool`

    # togglesebool httpd_enable_cgi

**💡 TIP:** _switching booleans on runtime only is fast and helps you to debug problems_

#### Persistent

To make the change persistent, use the `-P` option with `setsebool`

    # setsebool -P httpd_enable_cgi on

---
[⬅ Back](9-manage-security.md)

repository: victorbrca/rhcsa-study-guide

branch_name: refs/heads/main

gha_license_id: MIT

repo_name: victorbrca/rhcsa-study-guide


text:
---
layout: guide
title: Unstructured data (blob) user guide
permalink: /user_guide/unstructured_data
excerpt: This user guide is about working with unstructured data (BLOB) in Rest.li framework.
index: 2
---

# Unstructured Data (BLOB) User Guide

## Contents

* [Summary](#summary)
* [About Unstructured Data](#about)
* [Features Overview](#features)
* [Unstructured Data Resources](#create)
* [Consume Unstructured Data](#consume)
* [FAQs](#faq)

## Summary

Rest.li applications are built around *Resources*. The key ingredient to creating a resource is _data model_, whose internal structure is defined by [Pegasus Data Schema](/rest.li/DATA-Data-Schema-and-Templates) in key-values style. A fundamental presumption was that such structure exists for every Rest.li data model. However, it's not the case for _unstructured_ data such as images or PDFs, which are usually consumed in raw binary forms without a containing data structure.

This user guide is about working with _unstructured data_ in Rest.li framework. This is _not_ a comprehensive guide to building Rest.li resources in general, which is already covered in great details at [Writing Resources](/rest.li/user_guide/restli_server#writing-resources). This guide focuses on the differences of unstructured data resource.

See also [Unstructured Data in Rest.li Quick Start](/rest.li/start/unstructured).

## About Unstructured Data

To Rest.li, the key difference about unstructured data is that they don't have any defined schema and don't have to be represented by a single generated class in Rest.li like schema-base data does (RecordTemplate). Unstructured data can be handled in the rawest form as a bytes array or a more advanced form as InputStream/ByteBuffer in Java for example.

Additionally, there are several other differences that set them apart from the typical structured data:

* **Different Wire Protocol.** Rest.li transports _structured_ data as JSON content. But _unstructured_ data should be transported in their own MIME type with the body contains only the binaries.
* **Larger Data Size.** Unstructured data are usually larger in sheer size. Buffering the entire payload in system memory may not be a good idea and not as necessary as for structured data (in order for the codec to work).
* **Different Data Handling.** Application logic is much less likely to have reasons to peek into or even mutate unstructured data on the fly. Once the data is minted or fetched, they should remain immutable during transportation. (except maybe for special handling like compression/decompression which is taken care by the framework anyway)
* **Different Types of Client.** The query for unstructured data is usually initiated by end-user clients in some native manner. A good example is that a web browser could initiate a binary upload/download without invoking any JavaScript logic.
* **Breakable.** Unstructured data can be broken down and processed as a series of byte chunks. This is perfect for streaming which is necessary to reduce the memory footprint.

## Features Overview

By default, unstructured data enjoys the same level of support as structured data in Rest.li: they can be modeled as various resource types and most resource-supporting features and tooling should work. **However**, because of the lack of RecordTemplate-based data model, any feature that works on the structure of the resource value, such as Field Projections, Entity Validation etc, do _not_ apply to unstructured data resources, although they will continue to work with structured data resources that live in the same Rest.li application.

**Features Highlights:**

* Model as Collection, Association or Simple (Singleton) with both Sync and Async I/O
* Model as sub-resource of structured data resources
* Download/Get, Post/Upload, Put and Delete methods
* Rest.li and R2 Filters
* Unstructured Data Streaming
* Generated Rest APIs documentation (limited)

**Not Supported Features:**

* Model as Action or Free-Form resource
* Model as parent-resource
* APIs of BATCH_*, FINDERS, PARTIAL_UPDATES
* Field projections (skipped)
* Decoration

**Streaming Support**

In this context, _streaming_ means the ability to transport and process _unstructured data_ in small chunks without the need to buffering the whole content in memory. It sounds appealing, but it introduces complexities for the app developers that might be unnecessary in most simple use cases. Therefore, Rest.li supports both non-streaming and streaming method.

## Unstructured Data Resources

### Base Resource Interfaces

Base interface determines the resource type, the resource key and value type. Unstructured data has its own set of base interfaces. The main difference is the absence of the resource value type. Each resource type has two variants: Non-Streaming and Streaming version. Non-streaming comes with synchronous and asynchronous style, while there is no such distinction for streaming.

**Non-Streaming base interfaces**
- Collection
    - `UnstructuredDataCollectionResource`
    - Async
        - `UnstructuredDataCollectionResourceAsync`
        - `UnstructuredDataCollectionResourceTask`
        - `UnstructuredDataCollectionResourcePromise`
- Association
    - `UnstructuredDataAssociationResource`
    - Async
        - `UnstructuredDataAssociationResourceAsync`
        - `UnstructuredDataAssociationResourceTask`
        - `UnstructuredDataAssociationResourcePromise`
- Simple
    - `UnstructuredDataSimpleResource`
    - Async
        - `UnstructuredDataSimpleResourceAsync`
        - `UnstructuredDataSimpleResourceTask`
        - `UnstructuredDataSimpleResourcePromise`

**Streaming base interfaces**
* `UnstructuredDataCollectionResourceReactive`
* `UnstructuredDataAssociationResourceReactive`
* `UnstructuredDataSimpleResourceReactive`

### Working with Streaming Resources

**Highlights:**
* Streaming resources are _relatively_ more complicated to write, maintain and debug. It's recommended for high performance demand. Still, performance gain with using streaming is not guaranteed. Benchmarking is the best way to tell.
* Creating a streaming resource doesn't automatically make it end-to-end streaming across network nodes. It only guarantees that no buffering will happen within the Rest.li application that host this resource. For example, the data source must provide a way to allow partial data fetching, same to the other end: the destination node must be able to consume the data partially.
* Rest.li streaming adapts the [EntityStream interface](https://github.com/linkedin/rest.li/wiki/EntityStream)

#### Resource Definition

The definition of streaming unstructured data resource is similar to a regular resource. However, no value type is needed.

```java
@RestLiCollection(name = "resumes", namespace = "com.mycompany")
public class ResumesResource extends UnstructuredDataCollectionResourceReactiveTemplate<String> { ... }
```

#### Download/Get API

The interface of streaming resource is similar to the [asynchronous resources](/rest.li/Asynchronous-Servers-and-Clients-in-Rest_li) with a callback parameter that's used to return the result.

```java
@Override
public void get(String resumeId, @CallbackParam Callback<UnstructuredDataReactiveResult> callback) {
    Writer<ByteString> writer = new SingletonWriter<>(ByteString.copy(UNSTRUCTURED_DATA_BYTES));
    callback.onSuccess(new UnstructuredDataReactiveResult(EntityStreams.newEntityStream(writer), MIME_TYPE));
}
```

**Get Response**

_UnstructuredDataReactiveResult_ represents the download response which encapsulates the unstructured data EntityStream as well as the metadata needed to return a successful response. Its merely a container and could be subclassed if desires.

**Writing Unstructured Data**

Streaming requires the data to be read/write in continuous chunks manner. Simple bytes array or InputStream won't do the job. Rest.li adopt the [EntityStream interface](https://github.com/linkedin/rest.li/wiki/EntityStream)

ByteString is essentially Rest.li's immutable bytes array implementation and is used here to represent a single _chunk_. EntityStream is the interface that provides the chunks when they are requested. Note that the chunk size is not enforced, however, it's recommended to make the size reasonable and consistent.

*Writing Unstructured Data w. R2 Writer*

Rest.li's R2 layer has its own similar EntityStream implementation. If a writer is already provided, it can be easily converted to Rest.Li Writer using [EntityStreamAdapters](https://github.com/linkedin/rest.li/blob/master/r2-core/src/main/java/com/linkedin/r2/message/stream/entitystream/adapter/EntityStreamAdapters.java) util.

```java
Writer dataWriter = new ResumeDataWriter(id);
com.linkedin.entitystream.Writer<ByteString> writer = EntityStreamAdapters.toGenericWriterx(dataWriter);
```

**Setting the Content-Type**

A content-specific [MIME content-type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) is required for the unstructured response to be handled correctly by its clients. It is required as part of the _UnstructuredDataReactiveResult_ and is used _as it-is_ in the HTTP response header. No validation is done by Rest.li.

**Setting Additional Headers**

More headers/metadata can be set using the ResourceContext. Here is an example to add a 'disposition' header to the response:

```java
getContext().setResponseHeader("Content-Disposition", "attachment; filename=\"filename.jpg\"");
```

### Rest.li Filters and Unstructured Data

Rest.li [filters](/rest.li/Rest_li-Filters) currently don't support access to the unstructured data payload. Any existing or new filter that tries to access the payload will get an empty record. (No, they won't just fail.)

### Resource IDL for Unstructured Data

Resource IDLs are also generated for unstructured data resources, with a few minor differences in the generated IDL and Restspec files:

* A new "entityType" field to indicate the resource entity type being UNSTRUCTURED_DATA
* The existing "schema" field is empty when the "entityType" field is UNSTRUCTURED_DATA

### Online Documentation

Rest.li generates online [API documentation](/rest.li/user_guide/restli_server#online-documentation) for every resource. It also works for unstructured data resource, however, in the API page, unstructured data is currently treated as an empty missing model.

## Consume Unstructured Data

**Highlights**
* Unstructured data resources are designed to be invoked by any HTTP client natively without the need of decoding/unwrapping by a _rich client_ like Rest.li's RestClient. In fact, no request builders are generated at all for unstructured data resources.
* Use a D2 client directly for use cases that need the dynamic host feature from RestClient.

### Response Anatomy

A simple unstructured data GET response:

```sh
curl 'http://myhost/resumes/1'

HTTP/1.1 200 OK
Content-Type: application/pdf
Content:
<<< bytes >>>
```

### Using an Http Client

One common Http client is a native browser (not the JavaScript client _lives_ in a browser). Unstructured data resource endpoints can be used in place wherever a standard web resource link is expected.

```html
<html>
  <a src="http://myhost/resumes/1">Download Resume</a>
</html>
```

### Using a D2 Client

[D2](/rest.li/Dynamic_Discovery) is what powers the host finding capability of RestClient under the hood. With a [D2 client](/rest.li/start/d2_quick_start#step-3-create-a-client), you can send a request without having to specify the actual hostname of your resources:

```java
URI uri = URI.create("d2://resumes/1");
StreamRequest req = new StreamRequestBuilder(uri).build(...);
d2Client.streamRequest(req, responseCallback)
...
```

### Error Handlings

A request to unstructured data resource could fail in the [same ways](/rest.li/user_guide/restli_server#returning-errors) a regular resource does. Moreover, even when a request such as Get is successful, the data flow could still be interrupted or timeout. When that happens, you could receive a successful HTTP status like 200 and still get an incomplete response or long hanging that results in a client timeout.

## FAQs

* *Q: Is there a size limit on how large an unstructured data could be served by Rest.li resource?*
A: No. But practically, the size will be cap base on your server's timeout value. If you are seeing incompleted content on the client, it could be caused by an undersize server timeout value.

* *Q: What should be a reasonable server timeout?*
A: It depends on if the Rest.li application hosts a mix of structured and unstructured resources. Currently, Rest.li only allow one timeout setting for the entire app. You may not want a long timeout for APIs that serve small structured data. On the other hand, a short timeout for APIs that serve large unstructured data.

* *Q: Should I create a streaming or non-streaming resource for my unstructured data?*
A: First of all, streaming doesn't come for free and true end-to-end streaming also depends on your other nodes in the network, so make sure you understand what you are getting into. Secondly, the performance depends on many factors such as the size of the data and I/O performances etc.

* *Q: What is reactive streaming and how can I leverage it?*
A: [EntityStream](https://github.com/linkedin/rest.li/wiki/EntityStream)

gha_language: Java

gha_license_id: NOASSERTION


text:
# To handle authentication with Node JS, Express, Mongo DB, JWT

This project demonstrate how we can use JavaScript Technologies to write a code to handle authentication part for node js application.

# To run the project in development server

1. git clone `https://github.com/Kuljeet-123/User-Authentication-JWT.git`

2.  Create `.env` file and add the `DB_CONNECT` URI and scret key `TOKEN_SECRET`.

```
> npm install

> npm start or npm run dev
```

# Pre-requites

1. Node JS
2. Postman

# Technologies used

1. Express
2. MongoDB
3. JWT
4. Mongoose
5. Token Based Authentication


text:
# KYTE - A College networking site.

A social networking site restricted to college and the students enrolled there, College Networking Site provides a platform via which student can share information between them. The prototype runs on LAMP platform. It should be a completely working module with all functionalities as defined in the Business Requirements document. All code and documents to be maintained in a Project Code repository on a server as per the Config management document.

# Setup

1.Clone the repository.

2.Start xampp and add the kyte.sql file to a database named kyte.

3.Navigate to localhost/KYTE-master/index.php.

# Installing xampp

1.For Windows User: https://make.wordpress.org/core/handbook/tutorials/installing-a-local-server/xampp/

2.For Linux Users: https://www.wikihow.com/Install-XAMPP-on-Linux

3.For Mac Users: https://www.webucator.com/how-to/how-install-start-test-xampp-on-mac-osx.cfm

# 1.1 Purpose

This Web Page defines the requirements for the Student Social Networking Site. The College Student seeks to develop a web portal, to be able to link the students with the colleges / universities. The Student portal will be a platform for students to submit their details and for colleges around the world to be able to view the profiles. This would also help students to network and interact to be able to make their choices.

# Sceenshots
![SS](https://i.ibb.co/yXNYzt0/Screenshot-11.png)
![SS](https://i.ibb.co/n6VzzqF/Screenshot-12.png)
![SS](https://i.ibb.co/FbnXtWw/Screenshot-13.png)

# 1.2 Features

1. Responsive website
2. Custom validation for correct data entry.
3. Each user will have his own space
4. Communication module for interaction
5. User friendly design for better look and fill.
6. Application Management

repository: kyte-org/KYTE

gha_language: PHP

repo_name: kyte-org/KYTE


text:
# kafka-infra

This repository contains Cloudformation templates and scripts to
help deploy a secure Kafka cluster in Amazon ECS.

For details related to deployment/monitoring of specific components,
please consult the [Wiki](https://github.com/LoyaltyOne/kafka-infra/wiki).

repository: dichque/kafka-infra

repo_name: dichque/kafka-infra


text:
---
layout: post
title: Awesome Terminal Setup with iTerm2, ZSH and Oh-My-Zsh
---

Are you bored with the default terminal of Mac? Want to turn your terminal into something more interactive and colorful? Well here is the iTerm2 and oh-my-zsh for rescue.

iTerm2 is a Mac OS terminal replacement, download it from [here](https://www.iterm2.com/downloads.html) or install it using ```homebrew``` by executing

```
brew install cask
brew cask install iterm2
```

[Oh-My-Zsh](https://github.com/robbyrussell/oh-my-zsh) is an open source, a community-driven framework for managing your zsh configuration.

Let's utilize both to setup a customisable and interactive terminal development environment.

## Step 1: Install iTerm2

[Download](https://www.iterm2.com/downloads.html) and install the iTerm2.

Now change the default theme to ```Solarized Dark``` through

```
Iterm2 -> Preferences -> Profiles -> Colors
```

Select the ```Solarized Dark``` from the ```color presets``` drop-down menu. If ```Solarized Dark``` option is not available then download the theme through

```
cd ~/Downloads
wget https://raw.github.com/altercation/solarized/master/iterm2-colors-solarized/Solarized%20Dark.itermcolors
```
And then select the import option from the drop-down menu to import the theme.

There are few more tweaking we can do such as setting scroll back to unlimited and open existing file path in a text editor from the terminal by clicking on a link with command key.

#### Set an unlimited scroll back
```
Preferences -> Profiles -> Terminal
```
And check the unlimited scroll back option.

#### Select the editor for file opening

```
Preference -> Profile -> Advanced
```

In ```semantic history ``` select ```open with editor``` and select your choice of editor from the drop-down menu.

## Step 2: Install Zsh

Install zsh and zsh completions using homebrew

```
brew install zsh zsh-completions
```

## Step 3: Install oh-my-zsh

You can install this via the command-line with either curl or wget.

### via curl
```
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
```

### via wget
```
sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
```

## Step 4: Basic configuration and install plugins

You can change the zsh configuration in ``` .zshrc``` file placed in the home directory. Open the ```.zshrc``` file in your choice of editor, I am using vi editor in the below example

```
cd
vi .zshrc
```
Find below line and set the theme to ```agnoster```

```
ZSH_THEME="agnoster"
```
Now reload the configuration file to reflect the changes

```
source ./.zshrc
```
If you find weird character on your terminal download and install [Meslo](https://github.com/powerline/fonts/blob/master/Meslo%20Slashed/Meslo%20LG%20M%20Regular%20for%20Powerline.ttf) font.

Now set iTerm2 to use this font through

```
Preference -> Profiles -> Text
```

Click on change font, from family drop-down select ```meslo LG M DZ for powerline``` with font size ```14```.

It seems weird to see your username prepended in display path, let's remove it.

Open ```.zshrc```

```
cd
vi .zshrc
```
Add following in the file

```
DEFAULT_USER=`whoami`
```

Let's install some useful plugins.

#### Install zsh-syntax-highlighting
[zsh-syntax-highlighting](https://github.com/zsh-users/zsh-syntax-highlighting) highlight the syntax with different colors.
```
brew install zsh-syntax-highlighting
```
Add in the end of  ```.zshrc```

```
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
```
#### Install zsh-autosuggestions

[zsh-autosuggestions](https://github.com/zsh-users/zsh-autosuggestions) suggest the command used in past. Use right arrow key to use command from the suggestion.

Clone the repo
```
cd
git clone git://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
```
Then add ```zsh-autosuggestions``` in the plugins list inside ```.zshrc```

```
plugins=(zsh-autosuggestions)
```
Reload the configuration file

```
source ./.zshrc
```
Still, if you are not able to see the suggestion, add following line in the end of ```.zshrc```
```
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=white'
```

repository: dev-miche/my-blog

repo_name: dev-miche/my-blog


text:
# Ubiquiti Rocket M5 Signal Scraper
A Selenium-powered signal strength scraper module for the Rocket M5.

To use, you will need to get the ChromeDriver executable: [ChromeDriver.exe](https://sites.google.com/a/chromium.org/chromedriver/downloads)

Then, in your Python environment, install Selenium:
```
python -m pip install selenium
```

And that's it!

# Example Usage

This script starts the scraper and then updates every second.
The first variable passed is the location of your driver.
```python
import signalscraper as scraper
import time

scraper.begin('C://chromedriver.exe', password='ground')

while True:
    print(scraper.fetch_signal())
    time.sleep(1)
```

repository: sierra-m/Ubiquiti-Signal-Scraper

repo_name: sierra-m/Ubiquiti-Signal-Scraper


text:
---
layout: project_page
team: dlpa
categories: dlpa

front_id: 1

title: 'Gaussian Process Classification for Variable Fidelity Data'
authors:
  - name: Nikita Klyuchnikov
  - name: Evgeny Burnaev
affiliation:
  - Skolkovo Institute of Science and Technology
venue: Neurocomputing 2019

excerpt: 'We have adapted a co-kriging schema for the classification problem where two sources of labels with different levels of fidelity are available.'

abstract: 'In this paper we address a classification problem where two sources of labels with different levels of fidelity are available. Our approach is to combine data from both sources by applying a co-kriging schema on latent functions, which allows the model to account item-dependent labeling discrepancy. We provide an extension of Laplace inference for Gaussian process classification, that takes into account multi-fidelity data. We evaluate the proposed method on real and synthetic datasets and show that it is more resistant to different levels of discrepancy between sources than other approaches for data fusion. Our method can provide accuracy/cost trade-off for a number of practical tasks such as crowd-sourced data annotation and feasibility regions construction in engineering design.'

thumbnail: /assets/img/projects/mfgpc/mfgpc_intro.png
visual_abstract: /assets/img/projects/mfgpc/mfgpc_intro.png
visual_abstract_description: 'Prediction results example.'
bibtex: "\
@article{klyuchnikov2020gaussian,
  title={Gaussian process classification for variable fidelity data},
  author={Klyuchnikov, Nikita and Burnaev, Evgeny},
  journal={Neurocomputing},
  volume={397},
  pages={345--355},
  year={2020},
  publisher={Elsevier}
}"

materials:
    - name: Paper
      url: https://arxiv.org/pdf/1809.05143.pdf
      icon: fa fa-file-pdf-o
    - name: Code
      url: https://github.com/user525/mfgpc
      icon: fa fa-github-alt
---

gha_language: SCSS


text:
<properties
	pageTitle="Reset the password or Remote Desktop on a Windows VM | Microsoft Azure"
	description="Reset the administrator password or Remote Desktop services on a Windows VM created with the Resource Manager deployment model."
	services="virtual-machines"
	documentationCenter=""
	authors="dsk-2015"
	manager="timlt"
	editor=""
	tags="azure-resource-manager"/>

<tags
	ms.service="virtual-machines"
	ms.workload="infrastructure-services"
	ms.tgt_pltfrm="vm-windows"
	ms.devlang="na"
	ms.topic="article"
	ms.date="10/14/2015"
	ms.author="dkshir"/>

# How to reset a password or the Remote Desktop service for a Windows VM

> [AZURE.NOTE] Azure has two different deployment models for creating and working with resources:  [Resource Manager and classic](../resource-manager-deployment-model.md).  This article covers using the Resource Manager deployment model, which Microsoft recommends for most new deployments instead of the classic deployment model.

If you can't connect to a Windows virtual machine because of a forgotten password or a problem with the Remote Desktop service configuration, use the Azure portal or the VMAccess extension to reset the local administrator password or reset the Remote Desktop service configuration.

## Azure portal

To reset the Remote Desktop service in the [Azure portal](https://portal.azure.com), click **Browse all** > **Virtual machines (classic)** > *your Windows virtual machine* > **Reset Remote Access**. The following page appears.

![](./media/virtual-machines-windows-reset-password/Portal-RDP-Reset-Windows.png)

To reset the name and password of the local administrator account in the [Azure portal](https://portal.azure.com), click **Browse all** > **Virtual machines (classic)** > *your Windows virtual machine* > **All settings** > **Password reset**. The following page appears.

![](./media/virtual-machines-windows-reset-password/Portal-PW-Reset-Windows.png)

## VMAccess extension and PowerShell

Before you begin, you'll need the following:

- The Azure PowerShell module, version 0.8.5 or later. You can check the version of Azure PowerShell that you have installed with the **Get-Module azure | format-table version** command. For instructions and a link to the latest version, see [How to install and configure Azure PowerShell](http://go.microsoft.com/fwlink/p/?linkid=320552&clcid=0x409).
- The new local administrator account password. You don't need this if you want to reset the Remote Desktop service configuration.
- The VM Agent.

The VMAccess extension doesn't need to be installed before you can use it. As long as the VM Agent is installed on the virtual machine, the extension is loaded automatically when you run an Azure PowerShell command that uses the **Set-AzureVMExtension** cmdlet.

First, verify that the VM Agent is already installed. Add the cloud service name and virtual machine name, and then run the following commands at an administrator-level Azure PowerShell command prompt. Replace everything within the quotes, including the < and > characters.

	$csName = "<cloud service name>"
	$vmName = "<virtual machine name>"
	$vm = Get-AzureVM -ServiceName $csName -Name $vmName
	write-host $vm.VM.ProvisionGuestAgent

If you don't know the cloud service and virtual machine name, run **Get-AzureVM** to display that information for all the virtual machines in your current subscription.

If the **write-host** command displays **True**, the VM Agent is installed. If it displays **False**, see the instructions and a link to the download in the [VM Agent and Extensions - Part 2](http://go.microsoft.com/fwlink/p/?linkid=403947&clcid=0x409) Azure blog post.

If you created the virtual machine with the portal, run the following additional command.

	$vm.GetInstance().ProvisionGuestAgent = $true

This command will prevent the “Provision Guest Agent must be enabled on the VM object before setting IaaS VM Access Extension” error when running the **Set-AzureVMExtension** command in the following sections.

Now, you can do these tasks:

- Reset a local administrator account password.
- Reset the Remote Desktop service configuration.

## Reset the local administrator account password

Add the current local administrator account name and the new password, and then run the following commands.

	$cred=Get-Credential –Message "Type the name of the current local administrator account and the new password."
	Set-AzureVMAccessExtension –vm $vm -UserName $cred.GetNetworkCredential().Username -Password $cred.GetNetworkCredential().Password  | Update-AzureVM

- If you type a different name than the current account, the VMAccess extension renames the local administrator account, assigns the password to that account, and issues a Remote Desktop log off.
- If the local administrator account is disabled, the VMAccess extension enables it.

These commands also reset the Remote Desktop service configuration.

## Reset the Remote Desktop service configuration

To reset the Remote Desktop service configuration, run the following command.

	Set-AzureVMAccessExtension –vm $vm | Update-AzureVM

The VMAccess extension runs these two commands on the virtual machine:

- **netsh advfirewall firewall set rule group="Remote Desktop" new enable=Yes**

	This command enables the built-in Windows Firewall group that allows incoming Remote Desktop traffic, which uses TCP port 3389.

- **Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name "fDenyTSConnections" -Value 0**

	This command sets the fDenyTSConnections registry value to 0, enabling Remote Desktop connections.

If this did not solve your Remote Desktop access problem, run the [Azure IaaS (Windows) diagnostics package](https://home.diagnostics.support.microsoft.com/SelfHelp?knowledgebaseArticleFilter=2976864).

1.	In the diagnostics package, click **Microsoft Azure IaaS (Windows) diagnostics package** to create a new diagnostics session.
2.	On the **Which of the following issues are you experiencing with your Azure VM?** page, select the **RDP connectivity to an Azure VM (Reboot Required)** issue.

For more information, see the [Microsoft Azure IaaS (Windows) diagnostics package](http://support.microsoft.com/kb/2976864) Knowledge Base article.

If you were unable to run the Azure IaaS (Windows) diagnostics package or running it did not solve your problem, see [Troubleshoot Remote Desktop connections to a Windows-based Azure virtual machine](virtual-machines-troubleshoot-remote-desktop-connections.md).

## Additional resources

[Azure VM extensions and features](virtual-machines-extensions-features.md)

[Connect to an Azure virtual machine with RDP or SSH](http://msdn.microsoft.com/library/azure/dn535788.aspx)

[Troubleshoot Remote Desktop connections to a Windows-based Azure virtual machine](virtual-machines-troubleshoot-remote-desktop-connections.md)

repository: wacncontent/MooncakePortal

repo_name: wacncontent/MooncakePortal


text:
Trellis Monit
=========

This role is made to be used with [Trellis](https://roots.io/trellis/).
It configure Monit on the server and allow you to monitor any services.

Get Started
----------------
Add the role to the `galaxy.yml` file of Trellis :
```yaml
- name: trellis-monit
  src: 2kloc.trellis-monit
  version: 1.1.1
```

Run `ansible-galaxy install -r galaxy.yml` to install the new role.<br>
Then, add the role into server.yml :
```yaml
roles:
    ... other Trellis roles ...
    - { role: trellis-monit, tags: [monit]}
```

By default, the role will copy all monit configuration file located in the
`monit` folder at the root of the Trellis project.

```
monit
│   nginx.conf.j2
│   mysql.conf.j2
│   memcached.conf.j2
│   php7.1-fpm.conf.j2
│   ...
```

Here a really basic example for the Nginx service
```
check process nginx with pidfile /var/run/nginx.pid
    start program = "/etc/init.d/nginx start"
    stop program  = "/etc/init.d/nginx stop"
    group www-data
```
Check out the [Monit documentation](https://mmonit.com/wiki/Monit/ConfigurationExamples) for other examples.

Role Variables
--------------
You can use these variables to configure Monit like you want.
The variables could be add into `group_vars/all/main.yml`

```yaml

# Check service every X seconds
monit_daemon: 120

# Delay the first service check
monit_start_delay: false

# Path of monit files
monit_log_file: /var/log/monit.log
monit_pid_file: /var/run/monit.pid
monit_id_file: /var/lib/monit/id
monit_state_file: /var/lib/monit/state

# Event queue setup (Use if mail server not available)
monit_event_queue: true
monit_event_queue_file: /var/lib/monit/events
monit_event_queue_limit: 100

# Active mail server for alert delivery
monit_smtp: false

# If you active the mail server, you will need to define the sysadmin email
# with `monit_smtp_sysadmin_email` variable

# The role will use the Trellis mail variable by default but you can overwrite it
# monit_smtp_host: "mail.bar.baz"
# monit_smtp_port: "25"
# monit_smtp_username: "user"
# vault_monit_smtp_password: "password"
# monit_smtp_hostname: "mail.bar"
# monit_smtp_sender_address<EMAIL_ADDRESS>
# You can avoid getting alerts with this filter
# monit_alert_filters:
#   - instance
#   - action
monit_alert_filters: []

# Enable Web Interface
monit_httpd: false

# Set the port for the Web Interface
monit_httpd_port: 2812

# Set the ssl directory for the Web Interface
monit_ssl_directory_name: "{{ nginx_path }}/ssl/monit"

# Set the credentiels for the Web Interface
monit_httpd_username: admin
vault_monit_httpd_password: monit

# Create a Nginx configuration for the web interface
monit_httpd_nginx: true

# Set the server_name for Nginx configuration
monit_httpd_server_name: host.example.com
monit_httpd_location: /monit/

# Set the folder with services monitoring files
monit_configuration_path: monit

# Use to delete all files missing a corresponding template in your local machine's
monit_configuration_cleanup: true
```


text:
# Use map() to double the values in an array

## Problem Domain
Use map() to double the values in an array.

## Solution
They provided a link to the MDN help page, so I simply copied and pasted the example code, used the name of the array provided into the example, and returned the variable in the example.  It worked, and I could not find another solution that was as transparent as mine.

repository: ErmineNotyours/code-wars

gha_language: JavaScript

repo_name: ErmineNotyours/code-wars


text:
# Configs

X-modaler provides a key-value based config system that can be used to obtain standard, common behaviors.

X-modaler’s config system uses YAML. In addition to the basic operations that access and update a config, we provide the following extra functionality:
* The config can have `_BASE_: base.yaml` field, which will load a base config first. Values in the base config will be overwritten in sub-configs, if there are any conflicts. We provided several base configs for standard model architectures in the folder `configs/`.

## Basic Usage

Some basic usage of the `CfgNode` object is shown here:
```
from xmodaler.config import get_cfg
from xmodaler.modeling import add_config
cfg = get_cfg() # obtain X-modaler's default config
tmp_cfg = cfg.load_from_file_tmp(config_file) # load custom config
add_config(cfg, tmp_cfg) # combining default and custom configs
cfg.merge_from_file(config_file) # load values from a file
cfg.merge_from_list(opts) # # can also load values from a list of str
```

Many builtin tools in X-modaler accept command line config overwrite: key-value pairs provided in the command line will overwrite the existing values in the config file. For example,
```
python train_net.py --config-file config.yaml [--other-options] \
  --opts MODEL.WEIGHTS /path/to/weights
```


text:
# This is a simple windows desktop TODO application

## Environment
* [Windows host setup](https://crosswalk-project.org/documentation/windows/windows_host_setup.html)
* Python

### Setup Python
Download [Python](https://www.python.org/ftp/python/3.5.1/python-3.5.1-embed-amd64.zip), unzip and put the folder on the PATH.

```
npm install
```

## How to run
Download newest [CrossWalk](https://download.01.org/crosswalk/releases/crosswalk/windows/canary/latest/),
unzip and put the folder on your PATH.

```python
python -m http.server 8000;
```

    xwalk http://localhost:8000

To enable debugging remotely:

    xwalk http://localhost:8000 --remote-debugging-port=9222

Then navigate to the the url [http://localhost:9222](http://localhost:9222) in Chrome.

### Technology stack
For running the application:
* CrossWalk
* Python

For development:
* Typescript
* RequireJS
* AngularJS
* Bootstrap
* Karma

repository: csabbee/xwalk-todo

repo_name: csabbee/xwalk-todo


text:
[Blog post](https://lgtm.com/blog/apple_xnu_nfs_boot_CVE-2018-4136_CVE-2018-4160)

Bug was fixed in [macOS High Sierra 10.13.4](https://support.apple.com/en-gb/HT208692).

[This snapshot](https://downloads.lgtm.com/snapshots/cpp/apple/xnu/xnu-4570.41.2_macOS-10.13.3_Semmle-1.16.1.zip) has the bug.

repository: JarLob/securitylab

repo_name: JarLob/securitylab


text:
# IntersightClient::WorkflowSolutionOutputAllOf

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **class_id** | **String** | The fully-qualified name of the instantiated, concrete type. This property is used as a discriminator to identify the type of the payload when marshaling and unmarshaling data. | [default to 'workflow.SolutionOutput'] |
| **object_type** | **String** | The fully-qualified name of the instantiated, concrete type. The value should be the same as the 'ClassId' property. | [default to 'workflow.SolutionOutput'] |
| **name** | **String** | Output name which is used in the output definition of the solution. | [optional] |
| **output** | **Object** | Solution output for a solution instance and the format is specified by output definition of the solution definition. | [optional] |
| **solution_instance** | [**WorkflowSolutionInstanceRelationship**](WorkflowSolutionInstanceRelationship.md) |  | [optional] |

## Example

```ruby
require 'intersight_client'

instance = IntersightClient::WorkflowSolutionOutputAllOf.new(
  class_id: null,
  object_type: null,
  name: null,
  output: null,
  solution_instance: null
)
```

repository: xlab-si/intersight-sdk-ruby

gha_language: Ruby

repo_name: xlab-si/intersight-sdk-ruby


text:
# Video Signal Generator

![ppu_locator_vid_out](/BreakingNESWiki/imgstore/ppu/ppu_locator_vid_out.jpg)

![vidout_logic](/BreakingNESWiki/imgstore/ppu/vidout_logic.jpg)

Input signals:

|Signal|From|Description|
|---|---|---|
|/CLK|CLK Pad|First half of the PPU cycle|
|CLK|CLK Pad|Second half of the PPU cycle|
|/PCLK|PCLK Distribution|First half of the Pixel Clock cycle|
|PCLK|PCLK Distribution|Second half of the Pixel Clock cycle|
|RES|/RES Pad|Global reset|
|#CC0-3|Color Buffer|4 bits of the chrominance of the current "pixel" (inverted value)|
|#LL0-1|Color Buffer|2 bits of the luminance of the current "pixel" (inverted value)|
|BURST|FSM|Color Burst|
|SYNC|FSM|Sync pulse|
|/PICTURE|FSM|Visible part of the scan-lines|
|/TR|Regs $2001\[5\]|"Tint Red". Modifying value for Emphasis|
|/TG|Regs $2001\[6\]|"Tint Green". Modifying value for Emphasis|
|/TB|Regs $2001\[7\]|"Tint Blue". Modifying value for Emphasis|

## Phase Shifter

![vout_phase_shifter](/BreakingNESWiki/imgstore/ppu/vout_phase_shifter.jpg)

![vidout_phase_shifter_logic](/BreakingNESWiki/imgstore/ppu/vidout_phase_shifter_logic.jpg)

Schematic of a single bit shift register used in the phase shifter circuit:

![vidout_sr_bit_logic](/BreakingNESWiki/imgstore/ppu/vidout_sr_bit_logic.jpg)

If you dump each half-cycle phase shifter outputs and match them to the PPU color number with which it is associated, you get this:

```
123456......
12345......C
1234......BC
123......ABC
12......9ABC
1......89ABC
......789ABC
.....6789AB.
....56789A..
...456789...
..345678....
.234567.....
```

If you split the dump from the beginning of the PPU into pixels (8 half-cycles per pixel, according to the PCLK divider), you get the following:

```
.<IP_ADDRESS>.A.C
.<IP_ADDRESS>.A..
.2.456.8.A..
.2.456.8....
.23456.8....
.23456......
123456......
12345......C

1234......BC
123......ABC
12......9ABC
1......89ABC
......789ABC
.....6789AB.
....56789A..
...456789...

..345678....
.234567.....
123456......
12345......C
1234......BC
123......ABC
12......9ABC
1......89ABC

......789ABC
.....6789AB.
....56789A..
...456789...
..345678....
.234567.....
123456......
12345......C
```

That is, the first pixel phase shifter first "comes to its senses", and then begins to output 12 phases. Note that the phases do not correspond to the "boundaries" of the pixels, so the phase will "float". But since all phases "float" simultaneously with the phase that is used for Color Burst - the overall phase pattern will not be disturbed.

![cb_drift](/BreakingNESWiki/imgstore/ppu/cb_drift.png)

## Chrominance Decoder

![vout_phase_decoder](/BreakingNESWiki/imgstore/ppu/vout_phase_decoder.jpg)

![vidout_chroma_decoder_logic](/BreakingNESWiki/imgstore/ppu/vidout_chroma_decoder_logic.jpg)

The color decoder selects one of the 12 phases. 12 because:
- Gray halftones do not need a phase.
- There is no phase for colors 13-15. However, for color 13 there is an option to use brightness, and colors 14-15 are forced to be "Black" using the `PBLACK` signal

Table of matching decoder outputs and PPU colors:

|Color decoder output|Corresponding PPU color|Phase shift|
|---|---|---|
|0|12|120°|
|1|5|270°|
|2|10|60°|
|3|3|210°|
|4|0. Not connected to the phase shifter because gray halftones do not need a phase.| |
|5|8. Also used for the Color Burst phase|0°|
|6|1|150°|
|7|6|300°|
|8|11|90°|
|9|4|240°|
|10|9|30°|
|11|2|180°|
|12|7|330°|

(The numbering of the decoder outputs is topological, from left to right, starting from 0).

## Luminance Level

|![vout_level_select](/BreakingNESWiki/imgstore/ppu/vout_level_select.jpg)|![vidout_luma_decoder_logic](/BreakingNESWiki/imgstore/ppu/vidout_luma_decoder_logic.jpg)|
|---|---|

The brightness decoder selects one of 4 brightness levels.

Waveform of the visible part of the video signal at different luminance values (`LU`):

![vid_levels](/BreakingNESWiki/imgstore/ppu/vid_levels.png)

(Emphasis is not shown, see below)

## Emphasis

|![vout_emphasis](/BreakingNESWiki/imgstore/ppu/vout_emphasis.jpg)|![vidout_emphasis_logic](/BreakingNESWiki/imgstore/ppu/vidout_emphasis_logic.jpg)|
|---|---|

If a dimming color is selected in the phase shifter and dimming for that color is enabled in the control register $2001, it activates the `TINT` signal, which slightly lowers the voltage levels, thereby dimming the color.

The `TINT` signal can only be applied to the visible part of the video signal (see /POUT signal).

## DAC

![vout_dac](/BreakingNESWiki/imgstore/ppu/vout_dac.jpg)

![vidout_dac_logic](/BreakingNESWiki/imgstore/ppu/vidout_dac_logic.jpg)

Level values of the unloaded video signal:

|L|Absolute V|Description|
|---|---|---|
|0|0.781|Synch|
|1|1.000|Colorburst L|
|2|1.131|Color 0D|
|3|1.300|Color 1D (black)|
|4|1.712|Colorburst H|
|5|1.743|Color 2D|
|6|1.875|Color 00|
|7|2.287|Color 10|
|8|2.331|Color 3D|
|9|2.743|Color 20 / 30|

If the `TINT` signal value is 1, the voltage is multiplied by approx. 0.746f.

repository: ogamespec/breaks

repo_name: ogamespec/breaks


text:
# Money Money Money

## Created By

- [Megan Tran](https://github.com/meganjtran)
- [Reshmi Ranjith](https://github.com/ReshmiCode)
- [Saloni Shivdasani](https://github.com/SaloniSS)
- [Vincent Vu](https://github.com/vincent-vu280)

## Links

[Extension Store Listing](https://chrome.google.com/webstore/detail/money-money-money/ehdcenmhmjlkmlnmlglncndglmoglojd)
[Website](https://www.moneymoneymoney.tech)
[Demo Video](https://www.youtube.com/watch?v=r2eyxjckIYY)
[Devpost Submission](https://devpost.com/software/moneymoneymoney)

## Submission
Submitted for Hacklarious - MLH Summer League 2020

### Awards
- Best Demo Video

## Usage

Refer to the README.md in each folder to get detailed description.

## Detailed Description

### Inspiration

Most of us have been guilty of impulse-buying something we don’t need online. When shopping online, it’s easy to get lost since there’s so many weird and interesting things that you can buy. MoneyMoneyMoney is here to help ground your decisions by comparing the costs of a potential purchase to the cost of something you’re more familiar with.

### What it does

The extension takes the price of the amazon item you’re looking at and converts it into the equivalent number of chipotle burritos, cups of boba, boxes of chicken nuggets, or rolls of toilet paper (maybe not as accurately for that last one right now!). When checking out, the extension also sends multiple (slightly passive aggressive) pop-ups asking if you really want to complete your purchase.

### How we built it

- **Backend:** Our extension was created through a React base. We utilized Python and one of its libraries, SelectorLib, to create an API for web-scraping Amazon’s product pages to get prices based on productIDs. This information was transferred to the server, a Flask app.
- **DevOps:** The server is hosted on Google App Engine and the frontend website is hosted on Firebase and redirected to Domain.com.
- **Frontend:** For the extension, we used react along with semantic ui for the design and functionality. This was incorporated with Chrome Extension apis and functions to convert it into an extension. For the website, we used a static react page.

### Challenges we ran into

Understanding how flask server deployments work was a challenge.  We also had to learn how servers handle production and development modes of backend code, which took reading and lots of trial and error. Even then, the hosted code would sometimes crash and would need to be redeployed.

### Accomplishments that we're proud of

Our extension is fully functional and we are extremely proud to have pulled that off. We’re not used to doing online hackathons, so being able to work together so well and create something together is something we’re very proud of.
Also, in our last hackathon, we struggled a lot with creating a good video to demo our code, but this time, we are proud that we could create an entertaining video to present our hard work.

### What we learned

We learned that we had to use the Google Storage API to save data for the extension rather than using global variables or state in React. We also learned about conditional rendering for providing different information on different product pages, which required a lot of research.

### What's next for MoneyMoneyMoney

More items! We want to let users be able to search a bigger database for items they could use to compare prices, or add their own custom items! We would also like to keep a running total of money spent that can be converted into the different items so that users can be aware of their long-term spending.


text:
# uSIM2018_Paper29/analysis

This folder contains the folders and code used for the analysis.

The folders are numbered and this gives the order in which the analysis is done. Some folders contain data files (D)
and some contains the analysis code (C) written as Jupyter notebooks.

The details of the analysis workflow is:

- **01_D-original_gbXML**: this contains a gbXML file which describes a detached house. This is the starting point of the analysis
the remaining steps modify this file, run simuations, and analyse the results.
- **02_C-mod_gbXML_files**: this contains a Jupyter notebook which modifies the original gbXML file. The file is modified by altering
the orientation from 0 to 355 degrees in steps of 5 degrees.
- **03_D-new_gbXML**: this contains the 72 modified gbXML files.
- **04_C-run_energyplus**: this contains a Jupyter notebook which runs an EnergyPlus simulation for each of the 72 gbXML files. The results are saved as an openbuilding.BimGraph object for each simulation run.
- **05_D-energyplus_results**: this contains the raw EnergyPlus simulation results, a .pickle BimGraph file and a .graphml file for each simulation run.
- **06_C-energyplus_analysis**: this contains a Jupyter notebook which analyses the EnergyPlus results and creates the 2 figures used in the paper.
- **FIGURE_bim_gephi**: this contains a figure generated by the Gephi software of the graph structure of a BimGraph file. This figure is used in the paper.
- **openbuilding**: This contains a prototype Python package called 'openbuilding'. This package is used by the Jupyter notebooks in the analysis for the paper.


text:
---
layout: default
---

# 1994-07-21 - Re: *comeon

## Header Data

From<EMAIL_ADDRESS>(Sidney Markowitz)

To<EMAIL_ADDRESS>Message Hash: a2f84a0720f5bfc89b79edfafdae6257687228b10ab168fcf2eda23d46754311

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1994-07-21 02:00:52 UTC

Raw Date: Wed, 20 Jul 94 19:00:52 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Sidney Markowitz)
Date: Wed, 20 Jul 94 19:00:52 PDT
To<EMAIL_ADDRESS>Subject: Re: *comeon
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

"Gary Jeffers"<EMAIL_ADDRESS>wrote:

>We [...] are amused [...]
>The Cypherpunks' list is [...] "politically incorrect" [...]
> & we like it this way.
> We are sick of [...]
> We also do not like [...]
> We would be quite pleased by [...]

Thank you for speaking up for us.

Unfortunately you got it wrong. Unless you were using the archaic royal
"we". Or unless you just forgot to say what "we" you were talking about.

>  Of course, I'm not really familiar with you.

Now you got it right.

 -- sidney markowitz<EMAIL_ADDRESS>  One of the 500+ subscribers to the cypherpunk mailing list.
  Not one of the n who let Gary Jeffers know their personal political and
social philosophies so that he could speak authoritatively for their
collective.

{% endraw %}
```

## Thread

+ Return to [July 1994](/archive/1994/07)

+ Return to<EMAIL_ADDRESS>(Sidney Markowitz)](/authors/sidney_at_taurus_apple_com_sidney_markowitz_)"

+ 1994-07-21 (Wed, 20 Jul 94 19:00:52 PDT) - Re: *comeon -<EMAIL_ADDRESS>(Sidney Markowitz)_


text:
---
name: Translation
about: " Request the addition of a new translation of the GitBook"
title: Translation to LANGUAGE
labels: Translation
assignees: ''

---

* What language would you like GLFW in a Nutshell to be translated to?
* Are you willing to translate yourself?
 * Do you have someone in mind to double-check your translation?
 * Are you sure you want to translate more than 5,000 words? Just warning you...

repository: DesertCookie/GLFW-in-a-Nutshell

repo_name: DesertCookie/GLFW-in-a-Nutshell


text:
# W3C Browser Automation Specification Tests

This repository defines a set of conformance tests for the W3C web
browser automation specification known as WebDriver.  The purpose is
for the different driver implementations to be tested to determine
whether they meet the recognized standard.

## How to run the tests

1. It is highly recommended that you use a virtual Python environment.
   Install it via `<sudo> easy_install virtualenv`, `<sudo> pip
   install virtualenv`, or `<sudo> apt-get install python-virtualenv`
2. `virtualenv webdriver-tests`
3. `cd webdriver-tests`
4. `source bin/activate` to activate the local Python installation
5. `pip install selenium` or `easy_install selenium`
6. `cd _WEBDRIVER_TEST_ROOT_`
6. `python test_example.py`

## Updating configuration

The _webdriver.cfg_ file holds any configuration that the tests might
require.  Change the value of browser to your needs.  This will then
be picked up by WebDriverBaseTest when tests are run.

## How to write tests

1. Create a test file per section from the specification.
2. For each test there needs to be one or more corresponding HTML
   files that will be used for testing.  HTML files are not to be
   reused between tests.
3. Test name should explain the intention of the test e.g. `def
   test_navigate_and_return_title(self):`.

repository: kenkania/web-platform-tests

repo_name: kenkania/web-platform-tests


text:
---
layout: post
title: "Cebu Photowalk by Asus PH"
author: "Anbaks"
categories: Photography
page_description: "Photowalk is one of the most popular activities that photographers love doing"
---

Photowalk is one of the most popular activities that photographers love doing. Aside from being fun, a photowalk presents interesting opportunities for creating stories with pictures.

It was my first time experience to joined photowalk and it was **FUN** and **INSPIRATIONAL** to my end. Our destination is from [Sirao](https://goo.gl/maps/WoV8AbDUhSP2) which is located in upper part Cebu City to along the bay of SM Seaside by riding a Yacht.

 So much to learn from other people by observing on how the react when the are on the site. As a beginner on this hobby I would highly recommend to join on Photowalk Events. I beleive it would help your creativity and to have **FUN**.


text:
---
metaTitle: "C++ | Storage class specifiers"
description: "register, extern, mutable, static, auto"
---

# Storage class specifiers

Storage class specifiers are [keywords](http://stackoverflow.com/documentation/c%2b%2b/4891/keywords) that can be used in declarations. They do not affect the type of the declaration, but typically modify the way in which the entity is stored.

## register

A storage class specifier that hints to the compiler that a variable will be heavily used. The word "register" is related to the fact that a compiler might choose to store such a variable in a CPU register so that it can be accessed in fewer clock cycles. It was deprecated starting in C++11.

```cpp
register int i = 0;
while (i < 100) {
    f(i);
    int g = i*i;
    i += h(i, g);
}

```

Both local variables and function parameters may be declared `register`. Unlike C, C++ does not place any restrictions on what can be done with a `register` variable. For example, it is valid to take the address of a `register` variable, but this may prevent the compiler from actually storing such a variable in a register.

The keyword `register` is unused and reserved. A program that uses the keyword `register` is ill-formed.

## extern

The `extern` storage class specifier can modify a declaration in one of the three following ways, depending on context:

It can be used to declare a variable without defining it. Typically, this is used in a header file for a variable that will be defined in a separate implementation file.

```cpp
// global scope
int x;             // definition; x will be default-initialized
extern int y;      // declaration; y is defined elsewhere, most likely another TU
extern int z = 42; // definition; "extern" has no effect here (compiler may warn)

```

It gives external linkage to a variable at namespace scope even if `const` or `constexpr` would have otherwise caused it to have internal linkage.

```cpp
// global scope
const int w = 42;            // internal linkage in C++; external linkage in C
static const int x = 42;     // internal linkage in both C++ and C
extern const int y = 42;     // external linkage in both C++ and C
namespace {
    extern const int z = 42; // however, this has internal linkage since
                             // it's in an unnamed namespace
}

```

It redeclares a variable at block scope if it was previously declared with linkage. Otherwise, it declares a new variable with linkage, which is a member of the nearest enclosing namespace.

```cpp
// global scope
namespace {
    int x = 1;
    struct C {
        int x = 2;
        void f() {
            extern int x;           // redeclares namespace-scope x
            std::cout << x << '\n'; // therefore, this prints 1, not 2
        }
    };
}
void g() {
    extern int y; // y has external linkage; refers to global y defined elsewhere
}

```

A function can also be declared `extern`, but this has no effect. It is usually used as a hint to the reader that a function declared here is defined in another translation unit. For example:

```

void f();        // typically a forward declaration; f defined later in this TU
 extern void g(); // typically not a forward declaration; g defined in another TU

```

In the above code, if `f` were changed to `extern` and `g` to non-`extern`, it would not affect the correctness or semantics of the program at all, but would likely confuse the reader of the code.

## mutable

A specifier that can be applied to the declaration of a non-static, non-reference data member of a class. A mutable member of a class is not `const` even when the object is `const`.

```cpp
class C {
    int x;
    mutable int times_accessed;
  public:
    C(): x(0), times_accessed(0) {
    }
    int get_x() const {
        ++times_accessed; // ok: const member function can modify mutable data member
        return x;
    }
    void set_x(int x) {
        ++times_accessed;
        this->x = x;
    }
};

```

A second meaning for `mutable` was added in C++11. When it follows the parameter list of a lambda, it suppresses the implicit `const` on the lambda's function call operator. Therefore, a mutable lambda can modify the values of entities captured by copy. See [mutable lambdas](http://stackoverflow.com/documentation/c%2b%2b/2705/mutable-keyword/9059/mutable-lambdas) for more details.

```cpp
std::vector<int> my_iota(int start, int count) {
    std::vector<int> result(count);
    std::generate(result.begin(), result.end(),
                  [start]() mutable { return start++; });
    return result;
}

```

Note that `mutable` is **not** a storage class specifier when used this way to form a mutable lambda.

## static

The `static` storage class specifier has three different meanings.

Gives internal linkage to a variable or function declared at namespace scope.

```cpp
// internal function; can't be linked to
static double semiperimeter(double a, double b, double c) {
    return (a + b + c)/2.0;
}
// exported to client
double area(double a, double b, double c) {
    const double s = semiperimeter(a, b, c);
    return sqrt(s*(s-a)*(s-b)*(s-c));
}

```

Declares a variable to have static storage duration (unless it is `thread_local`). Namespace-scope variables are implicitly static. A static local variable is initialized only once, the first time control passes through its definition, and is not destroyed every time its scope is exited.

```cpp
void f() {
    static int count = 0;
    std::cout << "f has been called " << ++count << " times so far\n";
}

```

When applied to the declaration of a class member, declares that member to be a [static member](http://stackoverflow.com/documentation/c%2b%2b/508/classes-structures/15150/static-class-members).

```cpp
struct S {
    static S* create() {
        return new S;
    }
};
int main() {
    S* s = S::create();
}

```

Note that in the case of a static data member of a class, both 2 and 3 apply simultaneously: the `static` keyword both makes the member into a static data member and makes it into a variable with static storage duration.

## auto

Declares a variable to have automatic storage duration. It is redundant, since automatic storage duration is already the default at block scope, and the auto specifier is not allowed at namespace scope.

```cpp
void f() {
    auto int x; // equivalent to: int x;
    auto y;     // illegal in C++; legal in C89
}
auto int z;     // illegal: namespace-scope variable cannot be automatic

```

In C++11, `auto` changed meaning completely, and is no longer a storage class specifier, but is instead used for [type deduction](http://stackoverflow.com/documentation/c%2b%2b/7863/type-deduction/25567/auto-type-deduction).

#### Remarks

There are six storage class specifiers, although not all in the same version of the language: `auto` (until C++11), `register` (until C++17), `static`, [`thread_local`](http://stackoverflow.com/documentation/c%2b%2b) (since C++11), `extern`, and `mutable`.

According to the standard,

>
At most one **storage-class-specifier** shall appear in a given **decl-specifier-seq,** except that `thread_local` may appear with `static` or `extern`.

A declaration may contain no storage class specifier. In that case, the language specifies a default behaviour. For example, by default, a variable declared at block scope implicitly has automatic storage duration.

repository: haifenghuang/generate

repo_name: haifenghuang/generate


text:
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## v0.5.1

[compare changes](https://github.com/nuxt/module-builder/compare/v0.5.0...v0.5.1)

### 🚀 Enhancements

- Support `--sourcemap` option ([#163](https://github.com/nuxt/module-builder/pull/163))

### ❤ Contributors

- Bobbie Goede<EMAIL_ADDRESS>
## v0.5.0

[compare changes](https://github.com/nuxt/module-builder/compare/v0.4.0...v0.5.0)

### 🚀 Enhancements

- Expose `prepareModule` function ([76b5654](https://github.com/nuxt/module-builder/commit/76b5654))
- Upgrade to `unbuild@2` ([#161](https://github.com/nuxt/module-builder/pull/161))

### 🏡 Chore

- Add type safety to prepare overrides ([9d0804a](https://github.com/nuxt/module-builder/commit/9d0804a))
- Switch to changelogen for release ([ba811da](https://github.com/nuxt/module-builder/commit/ba811da))

### ❤ Contributors

- Daniel Roe<EMAIL_ADDRESS>- Anthony Fu<EMAIL_ADDRESS>
## [0.4.0](https://github.com/nuxt/module-builder/compare/v0.3.1...v0.4.0) (2023-05-26)

### Features

* add `prepare` command for local types support ([#124](https://github.com/nuxt/module-builder/issues/124)) ([612c6b2](https://github.com/nuxt/module-builder/commit/612c6b29a6bad321764d1b0d48d28ada56677f85))

### [0.3.1](https://github.com/nuxt/module-builder/compare/v0.3.0...v0.3.1) (2023-05-01)

### Bug Fixes

* extend `nuxt/schema` as well ([796d6ab](https://github.com/nuxt/module-builder/commit/796d6ab161f753b3cce66ebf182f1f46b22f2a7c))

## [0.3.0](https://github.com/nuxt/module-builder/compare/v0.2.1...v0.3.0) (2023-04-11)

### [0.2.1](https://github.com/nuxt/module-builder/compare/v0.2.0...v0.2.1) (2022-11-16)

## [0.2.0](https://github.com/nuxt/module-builder/compare/v0.1.7...v0.2.0) (2022-10-15)

### Features

* export all module types in `types.d.ts` ([#46](https://github.com/nuxt/module-builder/issues/46)) ([64f3ba5](https://github.com/nuxt/module-builder/commit/64f3ba5e89471fb3dfed0cf83411f90c584f205c))
* support `ModuleRuntimeConfig` and `ModulePublicRuntimeConfig` type exports ([#45](https://github.com/nuxt/module-builder/issues/45)) ([a552495](https://github.com/nuxt/module-builder/commit/a5524952ef09ed3748e46db71b6e989611253076))
* support `outDir` option  ([#37](https://github.com/nuxt/module-builder/issues/37)) ([6453ed0](https://github.com/nuxt/module-builder/commit/6453ed0bc104f7ef167f9f16bc012968d1b9261d))

### Bug Fixes

* **pkg:** export `./package.json` subpath ([#47](https://github.com/nuxt/module-builder/issues/47)) ([82ab400](https://github.com/nuxt/module-builder/commit/82ab400f236bbc8aacaaddfabb62dcf292d5b698))

### [0.1.7](https://github.com/nuxt/module-builder/compare/v0.1.6...v0.1.7) (2022-01-18)

### Bug Fixes

* ensure nuxt packages are externalized ([ebad137](https://github.com/nuxt/module-builder/commit/ebad137dea9cc3d45659dc7cdb6446ee81e82e96))

### [0.1.6](https://github.com/nuxt/module-builder/compare/v0.1.5...v0.1.6) (2022-01-17)

### Bug Fixes

* typo meta.json => module.json ([55863c1](https://github.com/nuxt/module-builder/commit/55863c110af7aea562c3ffb3e4681f9b1b61446b))

### [0.1.5](https://github.com/nuxt/module-builder/compare/v0.1.4...v0.1.5) (2022-01-17)

### Bug Fixes

* add default export for `types.d.ts` ([885c02f](https://github.com/nuxt/module-builder/commit/885c02f0285679ab437ae3e9b5dca8436a8e84f8))

### [0.1.4](https://github.com/nuxt/module-builder/compare/v0.1.3...v0.1.4) (2022-01-17)

### Features

* parse `module.d` exports to generate ModuleOptions conditionally ([9cd8282](https://github.com/nuxt/module-builder/commit/9cd828203623d25c325129b0bd2d1fa40470b55a))
* support `--stub` ([746d59b](https://github.com/nuxt/module-builder/commit/746d59bd95ddc3dd63c89db01193c764f6f0bdde))
* support `ModuleHooks` type export ([269ce20](https://github.com/nuxt/module-builder/commit/269ce20b33377707c2e7a9460cdc3403afacb285))

### [0.1.3](https://github.com/nuxt/module-builder/compare/v0.1.2...v0.1.3) (2022-01-17)

### Features

* generate module.json file ([ac12805](https://github.com/nuxt/module-builder/commit/ac12805b71848d9abbf8daa68a88ede4df5a5c6c))

### Bug Fixes

* win32 support ([#14](https://github.com/nuxt/module-builder/issues/14)) ([c8ab1ad](https://github.com/nuxt/module-builder/commit/c8ab1ad68c28913aeecf46bf3288ed316e3e1d8e))

### [0.1.2](https://github.com/nuxt/module-builder/compare/v0.1.1...v0.1.2) (2021-12-23)

### Bug Fixes

* **pkg:** only include dist ([d2ff7e4](https://github.com/nuxt/module-builder/commit/d2ff7e4168363dd4e8a93dc9c909e6f6e07765ff))

### 0.1.1 (2021-12-23)

### Features

* poc for schema types generation ([4991907](https://github.com/nuxt/module-builder/commit/49919078806b95e8d9bde64b708cb430a3bb09cf))

### Bug Fixes

* emit cjs stub before validation ([0154bc5](https://github.com/nuxt/module-builder/commit/0154bc51db2246217287c0fba4d9be42955fa306))
* improve types generation ([68c02e6](https://github.com/nuxt/module-builder/commit/68c02e60ab4f504c6b7d078c7e8e5fb13cb81e37))

repository: nuxt/module-builder

gha_language: TypeScript

repo_name: nuxt/module-builder


text:
# Running Bare Metal Operator with or without Ironic

This document explains the deployment scenarios of deploying Bare Metal
Operator(BMO) with or without Ironic as well as deploying only Ironic scenario.

**These are the deployment use cases in this document:**

1. Deploying baremetal-operator with Ironic.

2. Deploying baremetal-operator without Ironic.

3. Deploying only Ironic.

## Current structure of baremetal-operator config directory

```diff
tree config/
config/
├── basic-auth
│   ├── default
│   │   ├── credentials_patch.yaml
│   │   └── kustomization.yaml
│   └── tls
│       ├── credentials_patch.yaml
│       └── kustomization.yaml
├── certmanager
│   ├── certificate.yaml
│   ├── kustomization.yaml
│   └── kustomizeconfig.yaml
├── crd
│   ├── bases
│   │   ├── metal3.io_baremetalhosts.yaml
│   │   ├── metal3.io_firmwareschemas.yaml
│   │   └── metal3.io_hostfirmwaresettings.yaml
│   ├── kustomization.yaml
│   ├── kustomizeconfig.yaml
│   └── patches
│       ├── cainjection_in_baremetalhosts.yaml
│       ├── cainjection_in_firmwareschemas.yaml
│       ├── cainjection_in_hostfirmwaresettings.yaml
│       ├── webhook_in_baremetalhosts.yaml
│       ├── webhook_in_firmwareschemas.yaml
│       └── webhook_in_hostfirmwaresettings.yaml
├── default
│   ├── ironic.env
│   ├── kustomization.yaml
│   ├── manager_auth_proxy_patch.yaml
│   ├── manager_webhook_patch.yaml
│   └── webhookcainjection_patch.yaml
├── kustomization.yaml
├── manager
│   ├── kustomization.yaml
│   └── manager.yaml
├── namespace
│   ├── kustomization.yaml
│   └── namespace.yaml
├── OWNERS
├── prometheus
│   ├── kustomization.yaml
│   └── monitor.yaml
├── rbac
│   ├── auth_proxy_client_clusterrole.yaml
│   ├── auth_proxy_role_binding.yaml
│   ├── auth_proxy_role.yaml
│   ├── auth_proxy_service.yaml
│   ├── baremetalhost_editor_role.yaml
│   ├── baremetalhost_viewer_role.yaml
│   ├── firmwareschema_editor_role.yaml
│   ├── firmwareschema_viewer_role.yaml
│   ├── hostfirmwaresettings_editor_role.yaml
│   ├── hostfirmwaresettings_viewer_role.yaml
│   ├── kustomization.yaml
│   ├── leader_election_role_binding.yaml
│   ├── leader_election_role.yaml
│   ├── role_binding.yaml
│   └── role.yaml
├── render
│   └── capm3.yaml
├── samples
│   ├── metal3.io_v1alpha1_baremetalhost.yaml
│   ├── metal3.io_v1alpha1_firmwareschema.yaml
│   └── metal3.io_v1alpha1_hostfirmwaresettings.yaml
├── tls
│   ├── kustomization.yaml
│   └── tls_ca_patch.yaml
└── webhook
    ├── kustomization.yaml
    ├── kustomizeconfig.yaml
    ├── manifests.yaml
    └── service_patch.yaml
```

The `config` directory has one top level folder for deployment, namely `default`
and it deploys only baremetal-operator through kustomization file calling
`manager` folder. In addition, `basic-auth`, `certmanager`, `crd`, `namespace`,
`prometheus`, `rbac`, `tls` and `webhook`folders have their own kustomization
and yaml files. `samples` folder includes yaml representation of sample CRDs.

## Current structure of ironic-deployment directory

```diff
tree ironic-deployment/
ironic-deployment/
├── base
│   ├── ironic.yaml
│   └── kustomization.yaml
├── components
│   ├── basic-auth
│   │   ├── auth.yaml
│   │   ├── ironic-auth-config
│   │   ├── ironic-auth-config-tpl
│   │   ├── ironic-htpasswd
│   │   ├── ironic-inspector-auth-config
│   │   ├── ironic-inspector-auth-config-tpl
│   │   ├── ironic-inspector-htpasswd
│   │   └── kustomization.yaml
│   ├── keepalived
│   │   ├── ironic_bmo_configmap.env
│   │   ├── keepalived_patch.yaml
│   │   └── kustomization.yaml
│   └── tls
│       ├── certificate.yaml
│       ├── kustomization.yaml
│       ├── kustomizeconfig.yaml
│       └── tls.yaml
├── default
│   ├── ironic_bmo_configmap.env
│   └── kustomization.yaml
├── overlays
│   ├── basic-auth_tls
│   │   ├── basic-auth_tls.yaml
│   │   └── kustomization.yaml
│   └── basic-auth_tls_keepalived
│       └── kustomization.yaml
├── OWNERS
└── README.md
```

The `ironic-deployment` folder contains kustomizations for deploying Ironic.
It makes use of kustomize components for basic auth, TLS and keepalived configurations.
This makes it easy to combine the configurations, for example basic auth + TLS.
There are some ready made overlays in the `overlays` folder that shows how this can be done.
For more information, check the readme in the `ironic-deployment` folder.

## Deployment commands

There is a useful deployment script that configures and deploys BareMetal
Operator and Ironic. It requires some variables :

- IRONIC_HOST : domain name for Ironic and inspector
- IRONIC_HOST_IP : IP on which Ironic and inspector are listening

In addition you can configure the following variables. They are **optional**.
If you leave them unset, then passwords and certificates will be generated
for you.

- KUBECTL_ARGS : Additional arguments to kubectl apply
- IRONIC_USERNAME : username for ironic
- IRONIC_PASSWORD : password for ironic
- IRONIC_INSPECTOR_USERNAME : username for inspector
- IRONIC_INSPECTOR_PASSWORD : password for inspector
- IRONIC_CACERT_FILE : CA certificate path for ironic
- IRONIC_CAKEY_FILE : CA certificate key path, unneeded if ironic
  certificates exist
- IRONIC_CERT_FILE : Ironic certificate path
- IRONIC_KEY_FILE : Ironic certificate key path
- IRONIC_INSPECTOR_CERT_FILE : Inspector certificate path
- IRONIC_INSPECTOR_KEY_FILE : Inspector certificate key path
- IRONIC_INSPECTOR_CACERT_FILE : CA certificate path for inspector, defaults to
  IRONIC_CACERT_FILE
- IRONIC_INSPECTOR_CAKEY_FILE : CA certificate key path, unneeded if inspector
  certificates exist
- MARIADB_KEY_FILE: Path to the key of MariaDB
- MARIADB_CERT_FILE:  Path to the cert of MariaDB
- MARIADB_CAKEY_FILE: Path to the CA key of MariaDB
- MARIADB_CACERT_FILE: Path to the CA certificate of MariaDB

Then run :

```sh
./tools/deploy.sh [-b -i -t -n -k]
```

- `-b`: deploy BMO
- `-i`: deploy Ironic
- `-t`: deploy with TLS enabled
- `-n`: deploy without authentication
- `-k`: deploy with keepalived

This will deploy BMO and / or Ironic with the proper configuration.

## Useful tips

It is worth mentioning some tips for when the different configurations are
useful as well. For example:

1. Only BMO is deployed, in  a case when Ironic is already running, e.g. as part
   of Cluster API Provider Metal3
   [(CAPM3)](https://github.com/metal3-io/cluster-api-provider-metal3) when
   a successful pivoting state was met and ironic being deployed.

2. BMO and Ironic are deployed together, in a case when CAPM3 is not used and
   baremetal-operator and ironic containers to be deployed together.

3. Only Ironic is deployed, in a case when BMO is deployed as part of CAPM3 and
   only Ironic setup is sufficient, e.g.
   [clusterctl](https://cluster-api.sigs.k8s.io/clusterctl/commands/move.html)
   provided by Cluster API(CAPI) deploys BMO, so that it can take care of moving
   the BaremetalHost during the pivoting.

**Important Note**
When the baremetal-operator is deployed through metal3-dev-env, baremetal-operator
container inherits the following environment variables through configmap:

```ini

$PROVISIONING_IP
$PROVISIONING_INTERFACE

```

In case you are deploying baremetal-operator locally, make sure to populate and
export these environment variables before deploying.


text:
# ChargeEvents API

## Abstract

This is a preliminary specification of the `ChargeEvent` REST API.

## Basics, API Endpoints and Auth

Currently the API is publicly available using this endpoint:

https://chargev-db.herokuapp.com/api/v1/

### Auth

Authentication is currently implemented using a JWT (JSON Web Token). During development all issued tokens will expire
after 2 months.

The JWT Token is a string like e.g.

```
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjbGllbnRJRCI6ImZvb0NsaWVudCIsImFjbCI6eyJzb3VyY2VzIjpbMCwxXX0sImlhdCI6MTUyMjc2NDM2NiwiZXhwIjoxNTI3OTQ4MzY2fQ.jpWlbxuvcNXLpmYsRs1xcVZgbRxja_aozqwxKR8L3hM
```

For authentication purposes, the user agent should send the JWT, typically in the Authorization header using the Bearer
schema. The content of the header should look like the following:

```
Authorization: Bearer <token>
```

For convenience, the token can also be send as a URL query parameter named `token`.

### Endpoints

#### ChargsEvents List

`GET /events`

This endpoint will deliver the list of all events.

Note: there is a configured maximum record count for a single REST call. See the Response description for instructions how to
fetch all records using the `startToken` info.

##### Response

The API Response has the following structure:

```
{
   "success": boolean,
   "totalCount": number,
   "moreComing": boolean,
   "startToken": number | null,
   "changeToken": string,
   "events": ChargeEvent[]
}
```

* `success`: true if the request was successful. If `false`, use the `message` key to obtain a (non localized) error
  message description.
* `totalCount`: The total number of records available
* `moreComing`: if true, the `startToken` value is not `null` and means that there are more records available. Fetch them
  using subsequent API calls and pass the `startToken`.
* `startToken`: Pass this value to the subsequent API call to fetch more records (only available if `moreComing` is
  `true`)
* `changeToken`: For delta downloads, save this token locally and use it next time you want to get updated records
* `events`: Array of `ChargeEvents`. Basically a Sub-Type, see the "Models" section below.

##### Options (URL query params)a

There are some (all optional) query params:

* `limit`: limit the result set (fetch only n newest records)
* `start-token`: if moreComing is true, use the `startToken` value from the last request to fetch more records
* `change-token`: use this for delta downloads to get only changed records
* `limit`: limit the result set
* `changed-since`: fetch only records newer than the given timestamp. The Timestamp can be a ISO formatted date string or
  timestamp (UTC miliseconds after 1.1.70)

#### Default sorting

The records are sorted by the modification timestamp in an **ascending** order.

### Delta Downloads

Delta Downloads are useful to synchronise the local cache. Using the `changeToken` from last request will
give you only updated records since the last time you fetched them.

#### In a nutshell

Initially, when you want to fetch all records and build the local cache for the first time, don't use a changeToken.
After the batch run ends, save the received `changeToken` locally, e.g. filesystem or database.

Next time you want to get only the updated records, to update the local cache, use the saved `changeToken` and use the
`change-token` URL GET param for that. The API will send you all updated records.

Note: while using the `changeToken` you will also receive potentially deleted records. Make sure to check the
appropriate flag and act accordingly, e.g. delete these records from the local cache.

#### Insert and Delete Records

There is a single endpoint for a batch style insert and delete:

`POST /events`

##### Payload

```typescript
export interface PostEventsPayload {
  recordsToSave?: CheckIn[],
  recordIDsToDelete?: string[],
}
```

##### Response

```typescript
export interface PostEventsResponse {
  savedRecords: any[],
  deletedRecordCount: number,
}
```

The save operation will do a validation check and throw a 400 error if this fails. Else an array of
all saved records will be returned and also the count of records deleted.

`DELETE /events`

Use this endpoint to purge all existing records tagged with your source identifier. This means, this commend will
remove all records and data you uploaded to chargEV DB entirely. Useful for development or for security/privacy.

This can also be used to purge all data and upload everything from scratch, if desired.

##### Response

```typescript
export interface DeleteEventsResponse {
  deletedRecordCount: number,
}
```

`GET /events/latest`

This will fetch the "last inserted" record. Basically this will fetch the records using your client's source identifier
and returns the latest one. This means the record with the highest `upstreamUpdatedAt` timestamp.

Use this endpoint to get the last record inserted so you can implement a delta upload logic.

## Models

### ChargeEvent

A `ChargeEvent` is a base type for all charge related events:

```typescript
export interface ChargeEvent {
  updatedAt: Date;
  upstreamUpdatedAt: Date;
  deleted: boolean;
  source: number;
  timestamp: Date;
  chargepoint: string; // e.g. chargepoint-0-3358
  comment?: string;
  nickname?: string;
  userID?: string;
}
```

### `updatedAt`

The exact timestamp when this record was last updated in chargEV DB. Note that this timestamp is distinct from the `timestamp`
field, the latter being editable by the user (e.g. the user can adjust the timestamp up to 7 days in the past).

You can use it for the parameter `changed-since`, to get only newer records.

### `upstreamUpdatedAt`

This is the timestamp when a specific record was modified on upstream. Because chargEV DB is an kind-of aggregation
database, all records basically originates from other sources.

There is an endpoint to fetch the "latest inserted charge event". This endpoint will use this field and fetches the
latest one. Using this value you can implement a delta-upload algorithm, uploading only new records to chargEV DB.

#### `deleted`

When set to `true`, make sure to delete (or mark as deleted) the record from the backend.

Note: deleted records are filtered out by default and only available by using the delta download feature.

#### `source`

The source field identifies the origin of the record. A unique identifier will be assigned for each pairing peer.
For example, the [chargEV](http://ev-freaks.com/chargev/) App uses the identifier `0`, "Ladelogs" from
[GoingElectric](https://www.goingelectric.de/stromtankstellen/) `1` and so on.

The own `source` identifier is stored in the [JWT Auth Token](#Auth) and can be easily discovered by inspecting the
token.

#### `timestamp`

This is the timestamp associated with the event. Please note that this timestamp is different than the record
modification timestamps, e.g. `modifiedAt` or `createdAt`. Usually the user can adjust this timestamp while creating a new event using the GUI, for
example using a date picker.

This info is meant to be shown in the events list view and should also be used to sort the events chronologically.

#### `chargepoint`

The `chargepoint` field will reference the associated `ChargePoint`. The structure is:

`chargepoint-<registryID>-<chargepointID>`

Currently there are two registries configures:

| Registry | registryID |
| -------- | ---------- |
| GoingElectric (GE) |  0|
| Open Charge Map (OCM) | 1 |

The second part, `chargepointID` is the identifier of the chargepoint in context of the specific registry.

##### Example:

A `chargepoint` identifier like `chargepoint-0-20312` means the GoingElectric ChargePoint with the ID 20312.

#### `comment`

This is the comment entered by the user. This is optional, can be empty. This text is a plain UTF-8 coded string and
must not contain HTML entities like e.g. `ü` or HTML tags like `<br>`. Convert them to plain UTF-8 entities if
appropriate.

#### `nickname`

User nickname, if available

#### `userID`

A stable identifier for the user, if available.

## Derived types

Using inheritance there are currently two specialized types which extend the base type and add other infos. E.g.
the `CheckIn` type which is being used with the `CloudKit` backend will add some `CloudKit` related infos like e.g.
CloudKit User Identifier and other stuff. On the other hand, the `Ladelog` type does have other data related to the
GoingElectric data structure.

### CheckIn Type

```typescript
export interface CheckIn extends ChargeEvent {
  reason: number;
  plug: string;
}
```

#### Fields

##### `reason`

The `reason` code is a code which classifies the `ChargeEvent`, e.g. if the event was a successful charge event or failure.
Current mapping is:

```swift
        enum Reason: Int {
            case ok = 10
            case recovery = 11

            // failed
            case equipementProblem = 100, equipementProblemNew
            case notCompatible, notCompatibleNew
            case noChargingEquipement, noChargingEquipementNew

            // other
            case notFound = 200
            case dupplicate
            case positive
            case negative
        }
```

##### `plug`

Used plug type (if selected, can be `null`):

```swift
public enum EVChargePoingConnectionPlugType: String {
    case type1 = "Type1"
    case type2 = "Type2"
    case CHAdeMO = "CHAdeMO"
    case CCS = "CCS"
    case CEEBlau = "CEEBlau"
    case CEERot = "CEERot"
    case schuko = "Schuko"
    case teslaSupercharger = "TeslaSupercharger"
    case unknown
}
```

### Ladelog Type

"Ladelog" event from GoingElectric

```typescript
export interface Ladelog extends ChargeEvent {
  isFault: boolean;
}
```

Because the MongoDB Backend uses Mongoose inheritance model, it is using the default discriminator field named `__t`
to specify which type is being used for a particular record.

## Examples

Using curl. Make sure you setup the JWT in the `$token` ENV var, e.g. using:

```bash
export token=MY_TOKEN
```

#### Request

```bash
$ curl -qs -H "Authorization: Bearer $token" https://chargev-db.herokuapp.com/api/v1/events/?limit=3 | json_pp
```

#### Response

```json
{
   "totalCount" : 400,
   "moreComing" : true,
   "success" : true,
   "startToken" : 3,
   "events" : [
      {
         "source" : null,
         "chargepoint" : "chargepoint-0-23830",
         "reason" : 10,
         "plug" : "Type2",
         "timestamp" : "2018-04-03T15:01:47.757Z",
         "__t" : "CKCheckIn",
         "id" : "5ac397898fd342c660008973",
         "comment" : "This is a test from the simulator",
         "userID" : "_189e255e4e1e1dedaf293a9f8839d84e",
         "nickname" : "Developer"
      },
      {
         "id" : "5ac381c20acbe2e563c88351",
         "timestamp" : "2016-11-16T23:00:00.000Z",
         "__t" : "Ladelog",
         "comment" : "Typ 2 Ladeabbruch nach 1 min",
         "isFault" : true,
         "chargepoint" : "chargepoint-0-9304",
         "source" : 1
      },
      {
         "chargepoint" : "chargepoint-0-7656",
         "source" : 1,
         "comment" : "22kW auf Parkdeck P1 ist defekt.",
         "isFault" : true,
         "id" : "5ac381c20acbe2e563c88352",
         "__t" : "Ladelog",
         "timestamp" : "2018-02-09T23:00:00.000Z"
      }
   ]
}
```

#### Create and Delete

##### Payload

```json
{
  "recordsToSave": [
    {
      "timestamp": "2018-04-11T10:00:00",
      "chargepoint": "chargepoint-0-7656",
      "reason": 10,
      "nickname": "Foo",
      "userID": "BarID"
    },
    {
      "timestamp": "2018-04-11T10:00:00",
      "chargepoint": "chargepoint-0-7656",
      "reason": 10,
      "nickname": "Foo",
      "userID": "BarID",
      "plug": "CHAdeMO"
    }
  ],
  "recordIDsToDelete": [
    "5acdf9eb1a8ea9a8eedbbd72",
    "5acdf92e470ebaa8c94a7c5a"
  ]
}
```

##### curl call

```bash
curl -qs -H "Authorization: Bearer $token" -XPOST -H"Content-type: Application/json"<EMAIL_ADDRESS>http://localhost:3000/api/v1/events | json_pp
```

##### Response

```json
{
   "savedRecords" : [
      {
         "user" : null,
         "__v" : 0,
         "__t" : "CheckIn",
         "id" : "5acdfcb71a8ea9a8eedbbd87",
         "reason" : 10,
         "updatedAt" : "2018-04-11T12:16:55.146Z",
         "source" : 10,
         "nickname" : "Foo",
         "_id" : "5acdfcb71a8ea9a8eedbbd87",
         "createdAt" : "2018-04-11T12:16:55.146Z",
         "timestamp" : "2018-04-11T08:00:00.000Z",
         "chargepoint" : "chargepoint-0-7656",
         "userID" : "BarID"
      },
      {
         "__v" : 0,
         "plug" : "CHAdeMO",
         "user" : null,
         "__t" : "CheckIn",
         "id" : "5acdfcb71a8ea9a8eedbbd88",
         "reason" : 10,
         "createdAt" : "2018-04-11T12:16:55.146Z",
         "_id" : "5acdfcb71a8ea9a8eedbbd88",
         "source" : 10,
         "nickname" : "Foo",
         "updatedAt" : "2018-04-11T12:16:55.146Z",
         "timestamp" : "2018-04-11T08:00:00.000Z",
         "chargepoint" : "chargepoint-0-7656",
         "userID" : "BarID"
      }
   ],
   "deletedRecordCount" : 2
}

```
## References

1. [JWT - JSON Web Token Introduction](https://jwt.io/introduction/)
2. [Tutorial: Authenticate a Node.js API with JSON Web Tokens](https://scotch.io/tutorials/authenticate-a-node-js-api-with-json-web-tokens)
3. [Mongoose schema inheritance mechanism](http://mongoosejs.com/docs/discriminators.html)

repository: ev-freaks/chargev-db

repo_name: ev-freaks/chargev-db


text:
# Release Notes Flyt CMS 7.9.7

## Extend traficlogg.RemoteAddress so that it can store ipv6-addresses.

## TinyMCE decodes html entities
When trying to publish html in the editor the html was removed. E.g. </title> was decoded and removed.
Fixed by replacing <,> -> &lt;,&gt;

repository: kantega/Flyt-cms

repo_name: kantega/Flyt-cms


text:
# Sarras

**Note:** IN PROGRESS ... NOT IMPLEMENTED YET, STAY TUNED!!!

## What is Sarras?

**Sarras** is [Reflection Configuration File](https://github.com/oracle/graal/blob/master/substratevm/REFLECTION.md) Generator tool for **Graal Substrate VM** by Static and Dynamic Profiling of Java Applicatons.

See the technical discussion about the approach: https://github.com/oracle/graal/issues/476

### Static Profiling

Parses bytecode of all classes in the given jar, introspectes reflective calls (class/method/field accesses through reflection, etc ...) and adds their configurations to the generated reflection configuration file.

### Dynamic Profiling

Attaches to a regular Java application (not from native image) as Java agent and intercepts reflection calls (also includes `Class.forName(...)` and `ClassLoader.loadClass(...)` calls). So it can collect information at runtime about which classes/methods/fields are accessed/referenced through reflection and adds their configurations to the generated reflection configuration file.

## Where the Name `Sarras` Come From?
> Sarras is a mystical island to which the Holy Grail is brought in the Arthurian legend.

See [Wikipedia](https://en.wikipedia.org/wiki/Sarras) for more details.

repository: serkan-ozal/sarras

repo_name: serkan-ozal/sarras