text:
[![License: MIT](https://img.shields.io/github/license/jhelvy/splitKbCompare)](https://github.com/jhelvy/splitKbCompare/blob/master/LICENSE.txt)

 Copyright (c) 2020 John Helveston

### Overview

This app is an interactive tool for comparing layouts of different split mechanical keyboards built for the community of [ergonomic keyboard](https://www.reddit.com/r/ErgoMechKeyboards/) users. Split keyboards offer an ergonomic solution to many issues that make regular keyboards painful or uncomfortable to use, but finding which keyboard is right for you can be costly and difficult. Most split keyboards come as DIY kits, making it difficult (if not impossible) to compare different keyboard layouts prior to building them. This app offers one solution to this problem.

View [this repo](https://github.com/diimdeep/awesome-split-keyboards) for a more comprehensive list of split keyboards.

### Features

Click one of the "print" buttons to download a printable PDF of the true-to-scale keyboard layouts (8.5" x 11" or A4 sizes).

Filter the keyboard list:

- Maximum number of keys.
- Has a number row at the top.
- Degree of stagger across the key columns.
- Supports rotary encoders.
- Wireless.
- One-piece board or two halves.
- Availability: DIY and/or pre-built.

### Run locally

The app is hosted for [free online](https://jhelvy.shinyapps.io/splitkbcompare/), but you can also run the app locally on your computer by following these steps:

1. Install [R](https://cloud.r-project.org/)
2. Run this code in R to install the [shiny library](https://shiny.rstudio.com/):

```
install.packages("shiny")
```

3. Run this code in R to launch the app:

```
library(shiny)
runGitHub('jhelvy/splitKbCompare')
```

### Under the hood

This app was built using the [R shiny package](https://shiny.rstudio.com/). Shiny apps are typically used to display data and create interactive dashboards. This app has a different purpose: to help the community of ergonomic keyboard users and hobbyists compare different keyboards.

The app uses the [magick library](https://cran.r-project.org/web/packages/magick/vignettes/intro.html) to overlay images of different keyboard layouts of the user's choosing. The app dynamically changes the colors of each keyboard image in real time to help identify the contours of each different keyboard. To print the image to scale, the overlay image is inserted into a RMarkdown document and converted into a true-to-scale PDF. The app is hosted for free on [shinyapps.io](https://www.shinyapps.io/), and the [open source code is hosted on Github](https://github.com/jhelvy/splitKbCompare).

repository: rtitmuss/splitKbCompare

repo_name: rtitmuss/splitKbCompare


text:
# Changelog

### 0.0.4

* Fix [issue 3](https://github.com/salsify/goldiloader/issues/3) - `exists?` method should take an argument
  — thanks for reporting [Bert Goethals](https://github.com/Bertg)
* Fix [issue 4](https://github.com/salsify/goldiloader/issues/4) - Associations couldn't be loaded in after
  destroy callbacks — thanks for reporting [Bert Goethals](https://github.com/Bertg)
* Fix [issue 6](https://github.com/salsify/goldiloader/issues/6) - Models in read only associations weren't
  being marked as read only
* Fix [issue 7](https://github.com/salsify/goldiloader/issues/7) - Don't attempt to eager load associations that
  aren't eager loadable e.g. if they have a limit
* Fix [issue 8](https://github.com/salsify/goldiloader/issues/8) - Handle eager loading associations whose
  accessor methods have been overridden.

license: MIT

repository: miraks/goldiloader

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: miraks/goldiloader


text:
[![Build Status](https://qa.nuxeo.org/jenkins/buildStatus/icon?job=master/tools_generator-nuxeo-master)](https://qa.nuxeo.org/jenkins/job/master/job/tools_generator-nuxeo-master/)
[![npm version](https://img.shields.io/npm/v/generator-nuxeo.svg?style=flat-square)](https://www.npmjs.com/package/generator-nuxeo)
[![npm downloads](https://img.shields.io/npm/dm/generator-nuxeo.svg?style=flat-square)](https://www.npmjs.com/package/generator-nuxeo)
[![Dependency Status](https://img.shields.io/david/nuxeo/generator-nuxeo.svg?style=flat-square)](https://david-dm.org/nuxeo/generator-nuxeo) [![devDependency Status](https://img.shields.io/david/dev/nuxeo/generator-nuxeo.svg?style=flat-square)](https://david-dm.org/nuxeo/generator-nuxeo#info=devDependencies)

# About
**Yeoman Generator for Nuxeo Platform**

The `generator-nuxeo` provides Nuxeo components scaffolding. It lets you easily scaffold common Nuxeo components like empty projects, Nuxeo Packages, Automation Operations, Nuxeo Services... This saves you time writing boilerplate code to focus on your code instead of the structure.

The generated components all come with unit tested sample code; for instance the Operation generator adds an Operation with some sample code that highlights how to inject context objects, how to specify a parameter and how to unit test that operation.

That tool is based on [Yeoman](http://yeoman.io) (a scaffolding tool for the web).

## Generator Features
- Trigger the Hot reload which allows you to update the deployed bundles without restarting the Nuxeo Server.
- Connect your project to a Studio's one
- Discover some sample Nuxeo Projects.
- Bootstrap an empty Nuxeo Project with multi modules support.
- Bootstrap a single empty Nuxeo Project.
- Initiate an empty component or an empty unit test
- Add a Nuxeo Package module to distribute your Project ([Marketplace](https://connect.nuxeo.com/nuxeo/site/marketplace))
- Add a ready-to-use empty [Polymer](https://www.polymer-project.org) or [Angular2](https://angular.io/) Application.
- Create your own business rules or logic as an [Automation Operation](https://doc.nuxeo.com/x/Go0ZAQ).
- Enrich REST API responses using a [content-enricher](https://doc.nuxeo.com/x/5wUuAQ).
- Manipulate Business Object using a Document Adapter
- Declare your new [Nuxeo Service](https://doc.nuxeo.com/x/DIAO)
- Plug your logic to the event bus using an [Event Listener](https://doc.nuxeo.com/x/C4AO)

## Supported Nuxeo Platform Versions
- Nuxeo Platform 7.10 and newer
- If you are using Nuxeo Platform 5.8 or 6.0, code templates are available in [Nuxeo IDE](https://doc.nuxeo.com/x/ZYKE) using the [Nuxeo wizard](https://doc.nuxeo.com/x/uoSN).

# Local Installation

## Requirements

- [node.js](https://nodejs.org/) v6.0.0 or newer.
- [npm](https://www.npmjs.com/) v3.0.0 or newer.

## [DEPRECATED] - Install

> We strongly recommend you to use our new tool [Nuxeo CLI](https://www.npmjs.com/package/nuxeo-cli) instead of the generator. It embbed all generator's features in a more friendly command line interface.

 To be done, it requires to enable the `sdk` template in your `nuxeo.conf` file.

First step is to associate a Nuxeo Server with your project root. It will ask you the distribution path and if you want to let the `generator-nuxeo` configure the file for you. Reexecute it to change the distribution path.

```bash
yo nuxeo:hotreload configure
```

Then, you will be able to trigger it using:

```bash
yo nuxeo:hotreload
```

## Synchronize

Using this generator lets you synchronize two folders, and automatically create folder/copy/delete files from a `source` folder to a `destination` folder. It helps you automatically copying web resources from your source code to the a running server for previewing your changes live.

First step is to configure the synchronize command for relying either on Docker implementation, or a Local one depending on how you deploy your Nuxeo Server. You'll be prompted to configure a pattern of file matching the synchronize in order to prevent you from copying files you don't need (temp file, zip, ...). The default value is: `*.+(js|html|jpg|gif|svg|png|json|jsp)`.

```bash
yo nuxeo:synchronize configure
```

For starting files changes and synchronize two folders, execute:

```bash
yo nuxeo:synchronize
```

## Studio Connection

Connect your Java project let you have your Studio Project exposed as a dependency and be able to tests anything declared in it, like your Automation Scripting, listeners, Document Types, ...

Link your project to Studio:

```bash
yo nuxeo:studio [link]
```

Unlink your project:

```bash
yo nuxeo:studio unlink
```

Generate a Java Constant class with Studio's freatures

```bash
yo nuxeo:studio import
```

Release your studio project

```bash
yo nuxeo:studio release
```

## Bootstrap an Empty Nuxeo Project with Multi Modules Support

To bootstrap an empty Nuxeo Project (based on a Maven multi-module project), execute the following lines:

```bash
mkdir my-project
cd my-project
yo nuxeo
```

Default values are fine for a quick start. You will have to specify at least your project group ID (for instance `org.company`.)

# Usage
You can generate several features at once like:

```bash
yo nuxeo [options] [<generator>..]
```

## Options

```
  -h,   --help          # Print the generator's options and usage
        --skip-cache    # Do not remember prompt answers                         Default: false
        --skip-install  # Do not automatically install dependencies              Default: false
  -m,   --meta          # Branch of `nuxeo/generator-nuxeo-meta`                 Default: stable
  -l,   --localPath     # Path to a local clone of `nuxeo/generator-nuxeo-meta`
  -n,   --nologo        # Disable welcome logo                                   Default: false
  -t,   --type          # Set module target's type                               Default: core
  -s,   --skipInstall   # Skip external commands installation                    Default: false
  -f,   --force         # Force conflict when generate an existing file          Default: false
  -d,   --dirname       # Set parent folder prefix name                          Default: <PWD>
        --skipPomUpdate # Skip the pom(s) updates when attaching Studio project  Default: false
```

# Available Generators
The main Generator can render templates defined in [https://github.com/nuxeo/generator-nuxeo-meta/](https://github.com/nuxeo/generator-nuxeo-meta/).

> Terminology
>  - _ADD_: Add a dedicated module to your project. For instance, in a `myapp` project, a Polymer Application will add a `myapp-web` submodule.
>  - _CREATE_: Create the files needed for the feature, without specifying a `--type` option, the generation will occurs in the `myapp-core` submodule. When using the `--type` option, files will be generated to a (new) module named `myapp-{type}`;

## Bootstrap an Empty Nuxeo Project with Multi Modules
Set up an empty Nuxeo Bundle using Maven multi module support.

```bash
yo nuxeo multi-module
```

`multi-module` is the default generator when none is given as a parameter to `yo nuxeo`

### Parameters:
- **Use a parent artifact**: Parent artifact makes your project inherit dependencies, properties and other fields from another project. We recommend to keep the default value and use `org.nuxeo.ecm.distribution:nuxeo-distribution`.
- **Nuxeo Version**: _Asked only if no parent specified_, it specify which Nuxeo version of the dependency management will be imported.

### Important Notes
Using a Maven multi module architecture is the recommended way to bootstrap a new project: it allows to generate a Nuxeo Package afterwards to easily deploy your code on a Nuxeo Platform instance. On the other hand, when a project has been generated using a single module architecture, the Nuxeo Package needs to be created manually.

## Bootstrap a Single Empty Nuxeo Bundle
Sets up an empty Nuxeo bundle.

```bash
yo nuxeo single-module
```

### Parameters:
- **Parent Group / Artifact**: Like in `multi-module`, having a parent artifact make project inheritance. If you are in a `multi-module`, you must set your parent module. If not, you can use `org.nuxeo.ecm.distribution:nuxeo-distribution` or `org.nuxeo:nuxeo-addons-parent`
- **Nuxeo Version**: _Asked only if needed_, it specify which Nuxeo version of the dependency management will be imported.

### Important Notes
This option should not be called directly to bootstrap a new project; use the multi-module option instead so that you can generate a Nuxeo Package later on.

## Create an Empty Unit Test
Add an empty [Unit Test](https://doc.nuxeo.com/corg/unit-testing/)

```bash
yo nuxeo test-empty
```

## Create a Bare Component
Add an empty [Contribution](https://doc.nuxeo.com/nxdoc/contributing-to-nuxeo/)

```bash
yo nuxeo contribution
```

## Create Your Own Business Rules or Logic - Automation Operation
Adds an empty Automation [Operation](https://doc.nuxeo.com/x/Go0ZAQ) along with a corresponding unit test.

```bash
yo nuxeo operation
```

## Create an Event Bus Listener
Adds a [listener](https://doc.nuxeo.com/x/C4AO) with its test class, the events will be asked during the generation process. Both existing and custom events can be declared. You can create any listener type: pre-commit, post-commit, synchronous and asynchronous.

```bash
yo nuxeo listener
```

### Parameters:
- **Trigger on events**: List of some common events to bind to your listener.
- **Custom Events**: _In case you select 'custom events'_ in the previous list; comma separate list of other events.
- **Asynchronous Listener**: if you need to run after the transaction has committed, in a new transaction and a separate thread. This is useful for any long-running operations whose result doesn't have to be seen immediately in the user interface.
- **Post-commit Listener**: if you need to run after the transaction has committed, in a new transaction but in the same thread, this is useful for logging.

## Create a Service
Adds a [Nuxeo component](https://doc.nuxeo.com/x/DIAO) exposed as a Nuxeo service.

```bash
yo nuxeo service
```

## Create a REST API Response Enricher
Creates a [Content Enricher](https://doc.nuxeo.com/x/5wUuAQ) that enriches with more information a REST response.

```bash
yo nuxeo enricher
```

## Create a Business Object - Document Adapter
Creates a Document Adapter that turn `DocumentModel` object into business objects.

```bash
yo nuxeo adapter
```

## Add an Empty Polymer Application
Add an application based on [Polymer Starter Kit](https://github.com/PolymerElements/polymer-starter-kit) bundled as a Nuxeo Project.

```bash
yo nuxeo polymer
# npm and bower install must be executed automatically, otherwise:
# cd *-web && npm install && bower install

# To run the application in dev mode; with file changes watch:
cd *-web && npm run serve
```

### Warning
Common bundle's files like `MANIFEST.MF` and `OSGI-INF/*` are stored inside a `nuxeo` folder.

## Add an Empty Angular2 Application
Add an application using [Angular2](https://angular.io/) bundled as a Nuxeo Project.

```bash
yo nuxeo angular2
# npm and bower install must be executed automatically, otherwise:
# cd *-web && npm install && bower install

# To run the application in dev mode; with file changes watch:
cd *-web && npm run dev
```

## Add a Nuxeo Package Module
Creates a module to handle a [Nuxeo Package](https://doc.nuxeo.com/x/CwIz) generation of your project. **Can only be called in a Maven multi-module architecture**, hence make sure to bootstrap your project using `yo nuxeo` or `yo nuxeo multi-module`. If you used `yo nuxeo single-module` to bootstrap your project, you won't be able to call that option afterwards.

```bash
yo nuxeo package
```

# Test locally the generator
To test the generator; you should clone the repository and link it to your local NPM registry:

```bash
git clone https://github.com/nuxeo/generator-nuxeo
cd generator-nuxeo
npm link
```

It will install dependencies and symlink the module to your local registry. After that, you can use the generator as described below.

# Licensing
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)

# About Nuxeo
Nuxeo dramatically improves how content-based applications are built, managed and deployed, making customers more agile, innovative and successful. Nuxeo provides a next generation, enterprise ready platform for building traditional and cutting-edge content oriented applications. Combining a powerful application development environment with SaaS-based tools and a modular architecture, the Nuxeo Platform and Products provide clear business value to some of the most recognizable brands including Verizon, Electronic Arts, Sharp, FICO, the U.S. Navy, and Boeing. Nuxeo is headquartered in New York and Paris. More information is available at [www.nuxeo.com](http://www.nuxeo.com).

repository: nuxeo/generator-nuxeo

gha_language: JavaScript

gha_license_id: NOASSERTION

repo_name: nuxeo/generator-nuxeo


text:
# Create an Azure IoT Hub, and a device ID, using the Microsoft Azure portal

In this unit, we'll first create an IoT Hub, and add a single device to that hub. Then we record the connection strings we need for the coding sections of this module.

1. Login to [portal.azure.com](https://portal.azure.com) using your Azure account credentials.

    If you have more than one Azure account, be sure that you are logged in with the account that is tied to the subscription that you will be using for this course.

1. Notice that the AZ-220 dashboard that you created in the previous task has been loaded.

    You will be adding resources to your dashboard as the course continues.

1. On the portal menu, click **+ Create a resource**.

    The Azure Marketplace is a collection of all the resources you can create in Azure. The marketplace contains resources from both Microsoft and the community.

1. In the Search textbox, type **IoT Hub** and then press Enter.

1. On the search results blade, click **IoT Hub**.

    Notice the "USEFUL LINKS" displayed on this blade.

1. In the list of links, click **Documentation**.

    The IoT Hub Documentation page is the root page for IoT Hub resources and documentation. You can use this page to explore current documentation and find tutorials and other resources that will help you to explore activities that are outside the scope of this course. We will refer you to the docs.microsoft.com site throughout this course for additional reading on specific topics.

1. Use your browser to navigate back to the Azure portal tab.

1. To begin the process of creating your new IoT Hub, click **Create**.

    Next, you need to specify information about the Hub and your subscription. The following steps walk you through the settings, explaining each of the fields as you fill them in.

1. On the IoT hub blade, on the Basics tab, ensure that the Azure subscription that you intend to use for this course is selected.

1. To the right of Resource Group, open the **Select existing** dropdown, and then click **AZ-220-RG**

    This is the resource group that you created in the previous lab. We will be grouping the resources that we create for this course together in the same resource group. This should help you to clean up your resources when you have completed the course.

1. To the right of Region, open the drop-down list and select the geographic location that is closest to you and also supports Event Grid.

    As we saw previously, Azure is supported by a series of datacenters that are placed in regions all around the world. When you create something in Azure, you deploy it to one of these datacenter locations.

    > [!NOTE] For the current list of Regions that support Event Grid, see the following link: [Products available by region](https://azure.microsoft.com/en-us/global-infrastructure/services/?products=event-grid&regions=all)

    > [!NOTE] When picking a datacenter to host your app, keep in mind that picking a datacenter close to your end users will decrease load/response times. If you are on the other side of the world from your end users, you should not be picking the datacenter nearest you.

1. To the right of IoT Hub Name, enter a globally unique name for your IoT Hub.

    To provide a globally unique name, enter **AZ-220-HUB-** followed by your initials and the current date.

    For example: **AZ-220-HUB-CAH102119**

    The name of your IoT hub must be globally unique because it is a publicly accessible resource that you must be able to access from any IP connected device.

    Consider the following when you specify a unique name for your new IoT Hub:

    * The value that you apply to _IoT Hub Name_ must be unique across all of Azure. This is true because the value assigned to the name will be used in the IoT Hub's connection string. Since Azure enables you to connect devices from anywhere in the world to your hub, it makes sense that all Azure hubs must be accessible from the Internet using the connection string and that connection strings must therefore be unique. We'll explore connection strings later in this lab.

    * The value that you assign to _IoT Hub Name_ cannot be changed once the app service has been created. If you do need to change the name, you'll need to create a new IoT Hub, re-register your devices to it, and delete your old IoT Hub.

    * The _IoT Hub Name_ field is a required field.

    > [!NOTE] Azure will ensure that the name you enter is unique. If the name that you enter is not unique, Azure will display an asterisk at the end of the name field as a warning. You can append the name suggested above with '**-01**' or '**-02**' as necessary to achieve a globally unique name.

1. At the top of the blade, click **Size and scale**.

    Take a minute to review the information presented on this blade.

1. To the right of Pricing and scale tier, open the dropdown and then select **S1: Standard tier**.

    You can choose from several tier options depending on how many features you want and how many messages you send through your solution per day. The free tier is intended for testing and evaluation. It allows 500 devices to be connected to the IoT hub and up to 8,000 messages per day. Each Azure subscription can create one IoT Hub in the free tier.

    The **S1** tier that we are using in this course allows a total of 400,000 messages per unit per day and provides the all of the services that are required in this training. We won't actually need 400,000 messages per unit per day, but we will be using features provided at this tier level, such as Cloud-to-device commands, Device management, and IoT Edge.

    > [!NOTE] The "S1 - Standard" tier has a cost of $25.00 USD per month per unit. We will be specifying 1 unit.

    For details about the other tier options, see [Choosing the right IoT Hub tier for your solution](https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-scaling)).

1. To the right of Number of S1 IoT Hub units, ensure that 1 is selected.

    As mentioned above, the pricing tier that you choose establishes the number of messages that your hub can process per unit per day. To increase the number of messages that you hub can process without moving to a higher pricing tier, you can increase the number of units. For example, if you want the IoT hub to support ingress of 700,000 messages, you choose *two* S1 tier units. For the IoT courses created by Microsoft we will be using just 1 unit.

1. Under Advanced Settings, ensure that Device-to-cloud partitions is set to 4.

    The number of partitions relates the device-to-cloud messages to the number of simultaneous readers of these messages. Most IoT hubs will only need four partitions, which is the default value. For this course we will create our IoT Hub using the default number of partitions.

1. At the top of the blade, click **Review + create**.

1. At the bottom of the blade, to finalize the creation of your IoT Hub, click **Create**.

    Deployment can take a minute or more to complete. You can open the Azure portal Notification pane to monitor progress.

1. Notice that after a couple of minutes you receive a notification stating that your IoT Hub was successfully deployed to your **AZ-220-RG** resource group.

1. On the portal menu, click **Dashboard**, and then click **Refresh**.

    You should see that your Resource group tile lists your new IoT Hub.

gha_language: C#

gha_license_id: MIT


text:
---
layout: default
---

# 1997-11-18 - http://www.cryptography.org - thanks to Bay Area Cypherpunks!

## Header Data

From: Michael Paul Johnson<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 3c729fe14d254b9d52a775d14d50b28a8054647cae061bed010069a58feeaeca

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-11-18 06:25:36 UTC

Raw Date: Tue, 18 Nov 1997 14:25:36 +0800

## Raw message

```
{% raw  %}From: Michael Paul Johnson<EMAIL_ADDRESS>Date: Tue, 18 Nov 1997 14:25:36 +0800
To<EMAIL_ADDRESS>Subject: http://www.cryptography.org - thanks to Bay Area Cypherpunks!
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

A while ago, the Bay Area Cypherpunks took up a collection to help secure
the future of the North American Cryptography Archive. So far, I have used
part of that money to register the cryptography.org domain name and part of
it to partially cover some other expenses. Since the current main host site
is being freely lent to us, that donation should stretch for several years.
:-)

I have just changed jobs, and am working very long hours, but I still
manage to get a little time here and there to maintain the crypto site. If
nothing else, it provides a place for people who are concerned about
possible government persecution to publish their crypto software legally.
(I know that some people may differ with my interpretation of the current
rules, but what do you expect from FUD mud?)

Anyway, THANK YOU for your help. I am honored by your very tangible
expression of appreciation for keeping a crypto site open for years.

The new site is functional, now, and has a new name
(http://www.cryptography.org). I know that it could use some better
indexing, etc., but some of that may come in my spare time. :-)

To guard against various forms of disaster (natural or human), I am
encouraging others to mirror the site. (I claim no "compilation copyright"
- I just want this information to be freely available.) As the regulatory
climate changes, I will be watching for windows of legal opportunity (as we
almost had with the Bernstein case) to tear down the "front door" to the
archive and invite mirroring outside of North America. Until then, of
course, most (if not all) of the data in the archive is available outside
of North America. U. S. and Canadian citizens are clearly not the only ones
who understand and enjoy cryptography!

Note: nothing in this message should be construed as an invitation to
anyone to violate any valid applicable law.  ;-)

Thanks again, my friends.

Michael Paul Johnson<EMAIL_ADDRESS>(aka<EMAIL_ADDRESS>PO Box 1151             http://www.ebible.org/bible     <- Holy Bible
Longmont CO 80502-1151  http://www.cryptography.org     <- Crypto archive
USA

PGP RSA key fingerprint (mpjA): 3E67 A580 0DFB D16A  6D52 D3A9 1C07 4E41
PGP DSS/DH fingerprint: 28AE B775 DD65 62C7 0717  ECDA 448F E0C7 17D7 47BB

{% endraw %}
```

## Thread

+ Return to [November 1997](/archive/1997/11)

+ Return to "[Michael Paul Johnson <mpj@ebible.org>](/authors/michael_paul_johnson_mpj_at_ebible_org_)"

+ 1997-11-18 (Tue, 18 Nov 1997 14:25:36 +0800) - http://www.cryptography.org - thanks to Bay Area Cypherpunks! - _Michael Paul Johnson<EMAIL_ADDRESS>


text:
---
date: "2020-03-21T00:00:00Z"
image: /images/2020-03-terraform-octopus/result.JPG
title: Provision your Azure environment with Terraform and Octopus Deploy
tags:
 - devops
 - octopus deploy
 - terraform
 - azure
slug: azure-terraform-octopus
---

My current project has reached the point where we have to manage our infrastructure in a more organized way rather than ad-hoc manual configurations.

### Current landscape

We use a pretty standard setup for a .NET web application.

We keep our code in one monorepo hosted in internal GitLab. We use TeamCity to build our code and we use Octopus Deploy to run our deployments to Azure.

![Current setup](/images/2020-03-terraform-octopus/current-setup.JPG)

We have several environments (let's call them `feature`, `test`, and `prod`) and they all are different. Each one has a different configuration, different accounts, different topology, different numbers of replicas and shards, you name it.

Things like connection strings, account and passwords are managed by Octopus.

At this point, we would like to utilize the configuration management feature provider by Octopus, and that's why we would have to jump through several hoops to marry terraform configs and Octopus variable substitution mechanism.

### Scope of the problem

We'd like to move to an Infrastructure-as-a-Code approach and provisioning our system automatically as a part of our CI/CD pipeline.

To do that we're going to add [Terraform](https://www.terraform.io/) to the game.

At the time I'm writing this post the versions for the software are the following:

* TeamCity 2019.2.2
* Octopus Deploy v2019.12.0 LTS
* Terraform v0.12.24
* `azurerm` provider 2.2.0

### Repository Setup

This part is not very important, but to provide you with the full picture I'll put it here.

We keep our Terraform files in the same repository alongside the application code and database schemas. Basically, it's just an `\infrastructure` directory in the root of the repo.

### Terraform Setup

We run our application in Azure, hence the choice of Terraform backend and a provider: we keep [Terraform state](https://www.terraform.io/docs/state/index.html) in Azure.

Please refer to [the official documentation](https://docs.microsoft.com/en-us/azure/terraform/terraform-backend) for a detailed step by step guide on setting up storage for Terraform State.

In short, you'd need to run the following:

```bash
#!/bin/bash

RESOURCE_GROUP_NAME=terraformstate-rg
STORAGE_ACCOUNT_NAME=terraformstateci
CONTAINER_NAME=terraformstate

# Create resource group
az group create --name $RESOURCE_GROUP_NAME --location eastus

# Create storage account
az storage account create --resource-group $RESOURCE_GROUP_NAME --name $STORAGE_ACCOUNT_NAME --sku Standard_LRS --encryption-services blob

# Get storage account key
ACCOUNT_KEY=$(az storage account keys list --resource-group $RESOURCE_GROUP_NAME --account-name $STORAGE_ACCOUNT_NAME --query [0].value -o tsv)

# Create blob container
az storage container create --name $CONTAINER_NAME --account-name $STORAGE_ACCOUNT_NAME --account-key $ACCOUNT_KEY

echo "storage_account_name: $STORAGE_ACCOUNT_NAME"
echo "container_name: $CONTAINER_NAME"
echo "access_key: $ACCOUNT_KEY"
```

Once you've successfully created a storage for your state you can update your `main.tf` file with the backend configuration:

{{< gist asizikov 06893cb889d885d7e749a5444fb00b14 >}}

For the purpose of this blog post I'll be creating just a new resource group with one SQL server.

Let's declare our setup in a new `sql.tf` file:

{{< gist asizikov ff7e182aa9ff919b394c22d4dcae6795 >}}

note that I'm using variables in a gist above.

Variables are defined in a `variables.tf` file:

```HCL
variable "sql_server_admin_pwd" {
  type    = string
}
```

This works fine, but for the local testing I keep the `terraform.tfvars` files with the values:

```HCL
resource_group_name  = "test_rg"
sql_server_admin_name = "admin_name"
sql_server_admin_pwd = "P@$$w0rd1!" # dummy pwd used for local tests

```

values are not encrypted, but they are just for the local tests and experiments. They will be replaced with the environment-specific vars by Octopus later.

### TeamCity Setup

Octopus has a specific syntax for variable substitution. Usually, it looks for `#{Variable}` markers in your config files. As you can imagine they are not always valid as resource names.

As I mentioned before our `terraform.tfvars` has realistic values for local tests. It helps our infrastructure engineers verifying their work by running `terraform plan` commands.

However, when we build our packages we want to convert `tfvars` file to replace variable's values with the syntax suitable for Octopus.

I had to invent a convention here.

Every variable declaration `var_name = "abc123"` will be converted to a  `var_name = "#{var_name}"` line.

To do that we've set up a build step with the following PowerShell script:

{{< gist asizikov ff5aa7c6bd6a7f513e84622dc9fcfbea >}}

After that we can build our code and then create a release package with our Terraform config.

A TeamCity build configuration has a custom `%octopus.package.suffix%` variable declared. This is a suffix that is composed of the branch name. It's empty for the master branch build and has something like `feature-AB-123` for a feature branch with an `AB-123` name. Yes, this is a JIRA ticket name :)

With this variable we can prepare a zipped artifacts file:

```
+:infrastructure/** => Terraform.%build.number%%octopus.package.suffix%.zip
```

that would produce a file `Terraform.1.123.9-feature-AB-123` which will later be uploaded to Octopus.

![TeamCity pipeline](/images/2020-03-terraform-octopus/team-city-pipeline.JPG)

### Octopus Setup

Let's create a new Step in Octopus project:

![Octopus Step](/images/2020-03-terraform-octopus/octopus-step.png)

We currently use an official [Apply a Terraform template](https://octopus.com/docs/deployment-examples/terraform-deployments/apply-terraform).

However, there are few things which we had to configure in order to make it work for us.

First of all, Octopus cannot keep up with Terraform development, so you may need to update a `terraform.exe` version yourself. Just grab the latest version from [Terraform Downloads page](https://www.terraform.io/downloads.html) and put it in a folder on your Octopus server. Something like `C:\Program Files\Terraform` would do.

Then you need to provide a path to your custom `terraform.exe` executable. To do that you need to set up a variable: `Octopus.Action.Terraform.CustomTerraformExecutable`. Give it a `C:\Program Files\Terraform\terraform.exe` value.

As you remember the release package contains a `terraform.tfvars` file with templates in it. So don't forget to tick this box:

![Octopus Step](/images/2020-03-terraform-octopus/octopus-replace.png)

And of course, you will have to define your variables for each environment:

![Octopus Step](/images/2020-03-terraform-octopus/octopus-variables.png)

note the variable name format. It should be the same as the variable names in your `terraform.tfvars` file. Here we can have different values for each environment. Also, we store passwords encrypted.

And now we have a new player in our CI/CD pipeline:

![Octopus Step](/images/2020-03-terraform-octopus/result.JPG)

branch_name: refs/heads/main

gha_language: CSS


text:
# Active Heterogeneous Graph Neural Networks with Per-step Meta-Q-Learning

```
@inproceedings{metra_icdm22,
title = {Active Heterogeneous Graph Neural Networks with Per-step Meta-Q-Learning},
author = {Yuheng Zhang and Yinglong Xia and Yan Zhu and Yuejie Chi and Lei Ying and Hanghang Tong},
booktitle = {22nd {IEEE} International Conference on Data Mining (ICDM)},
pages = {1329--1334},
year = {2022}
}
```

links
- [ieee](https://doi.org/10.1109/ICDM54844.2022.00176)

gha_language: Jupyter Notebook


text:
<link rel="stylesheet" href="docbook.css" type="text/css" media="screen" title="no title" charset="utf-8"></link>

HBase Browser
=============

We'll take a look at the new [HBase Browser App](http://gethue.tumblr.com/post/59071544309/the-web-ui-for-hbase-hbase-browser)
added in Hue 2.5 and improved significantly since.

Prerequisites before using the app:

\1. Have HBase and Thrift Service 1 initiated (Thrift can be configured)

\2. Configure your list of HBase Clusters in
[hue.ini](https://github.com/cloudera/hue/blob/master/desktop/conf.dist/hue.ini#L467)
to point to your Thrift IP/Port

SmartView
---------

The smartview is the view that you land on when you first enter a table.
On the left hand side are the row keys and hovering over a row reveals a
list of controls on the right. Click a row to select it, and once
selected you can perform batch operations, sort columns, or do any
amount of standard database operations. To explore a row, simple scroll
to the right. By scrolling, the row should continue to lazily-load cells
until the end.

### Adding Data

To initially populate the table, you can insert a new row or bulk upload
CSV/TSV/etc. type data into your table.

On the right hand side of a row is a '+' sign that lets you insert
columns into your
row

### Mutating Data

To edit a cell, simply click to edit inline.

If you need more control or data about your cell, click “Full Editor” to
edit.

In the full editor, you can view cell history or upload binary data to
the cell. Binary data of certain MIME Types are detected, meaning you
can view and edit images, PDFs, JSON, XML, and other types directly in
your browser!

Hovering over a cell also reveals some more controls (such as the delete
button or the timestamp). Click the title to select a few and do batch
operations:

If you need some sample data to get started and explore, check out this
howto create [HBase table
tutorial](http://gethue.tumblr.com/post/58181985680/hadoop-tutorial-how-to-create-example-tables-in-hbase).

### Smart Searchbar

The "Smart Searchbar" is a sophisticated tool that helps you zero-in on
your data. The smart search supports a number of operations. The most
basic ones include finding and scanning row keys. Here I am selecting
two row keys with:

    domain.100, domain.200

Submitting this query gives me the two rows I was looking for. If I want
to fetch rows after one of these, I have to do a scan. This is as easy
as writing a '+' followed by the number of rows you want to fetch.

    domain.100, domain.200 +5

Fetches domain.100 and domain.200 followed by the next 5 rows. If you're
ever confused about your results, you can look down below and the query
bar and also click in to edit your query.

The Smart Search also supports column filtering. On any row, I can
specify the specific columns or families I want to retrieve. With:

    domain.100[column_family:]

I can select a bare family, or mix columns from different families like
so:

    domain.100[family1:, family2:, family3:column_a]

Doing this will restrict my results from one row key to the columns I
specified. If you want to restrict column families only, the same effect
can be achieved with the filters on the right. Just click to toggle a
filter.

Finally, let's try some more complex column filters. I can query for
bare columns:

    domain.100[column_a]

This will multiply my query over all column families. I can also do
prefixes and scans:

    domain.100[family: prefix* +3]

This will fetch me all columns that start with prefix\* limited to 3
results. Finally, I can filter on range:

    domain.100[family: column1 to column100]

This will fetch me all columns in 'family:' that are lexicographically
\>= column1 but <= column100. The first column ('column1') must be a
valid column, but the second can just be any string for comparison.

The Smart Search also supports prefix filtering on rows. To select a
prefixed row, simply type the row key followed by a star \*. The prefix
should be highlighted like any other searchbar keyword. A prefix scan is
performed exactly like a regular scan, but with a prefixed row.

    domain.10* +10

Finally, as a new feature, you can also take full advantage of the
[HBase filtering](denied:about:blank)language, by typing your filter
string between curly braces.  You can apply
filters to rows or scans.

    domain.1000 {ColumnPrefixFilter('100-') AND ColumnCountGetFilter(3)}

This doc only covers a few basic features of the Smart Search. You can
take advantage of the full querying language by referring to the help
menu when using the app. These include column prefix, bare columns,
column range, etc. Remember that if you ever need help with the
searchbar, you can use the help menu that pops up while typing, which
will suggest next steps to complete your query.

repository: sarvex/hue

gha_language: Python

repo_name: sarvex/hue


text:
This fork has a single modification to the **omnipod-testing** branch in line 410 of **Omnikit/Pumpmanager/PodCommsSession.swift**:

``` let bolusExtraCommand = BolusExtraCommand(acknowledgementBeep: true, completionBeep: true, units: units) ```

This modification makes the pump beep at the start and the end of each bolus.


text:
# Flick

A telegram bot to fetch cricket scores of ongoing live matches.

## Installation

Follow the following guidelines to setup the project.

Clone the repo with the following command   ``` git clone https://github.com/on-drive/flick.git ```

### Setup

Create a vritual enviornement ``` python3 -m venv venv ```

Activate the virtual enviornemnt ``` source venv/bin/activate ```

Install all the required dependencies ```pip install -r requirements.txt```

Run the bot with ```python app.py```

--------------

## Project Structure

The project basically has 3 files the functionaliy of all of them are listed below.

* `cric_info.py` - Fetches all data for us from <https://www.espncricinfo.com/> and gives output in 2 form:
  * `match_list` - a simple string that contains all live matches formatted in a list along with index.
  * `match_dict_list` - a list of dict containing all information about these matches.

* `app.py` - This contains the code for setting up the telegram bot to take command form users and send output acccordingly. All of it's code is refred from [python-telegram-bot Documentation](https://python-telegram-bot.readthedocs.io/en/stable/index.html)
* `constants.py` - This file just contains the API_KEY for our telegram bot.

### Maintainer

@abhinav72610

repository: on-drive/flick

repo_name: on-drive/flick


text:
---
layout: page
title: Finished courses
---

Year One – Bachelor Industrial Design (2017-2018)
First Semester
From Idea to Design (DCB100)
5 ECTS
Ideas are for free; anyone has them. It is the trick of the designer however to transform potentially interesting ideas into viable designs. The main objective of this course is to bring students to look around them, where so much information is accessible, and to seize new ideas towards design. The course addresses the Reflective Transformative Design Process, tools to generate ideas, tools to select ideas and define concepts, presenting ideas and presenting concepts.

Creative Programming (DBB100)
5 ECTS
Creative Programming belongs to the expertise area “Technology and Realization” that enables the students to explore, prototype, create and demonstrate innovative concepts and experiences using technology.
Programming would be the first step towards integrating technology, among other steps, to approach the interactive and intelligent systems, products and related services

Calculus (2WAB0)
5 ECTS
Technical science uses mathematics as a language to describe phenomena and to solve problems. With trigonometry one can describe waves. In many problems an optimal setting of parameters should be found. This can be done with mathematical techniques such as differentiation. Integral calculus is needed for the calculation of a center of gravity. Many models use differential equations. In this course you will learn these and other basic techniques with applications.

User-centred Design (DDB200)
5 ECTS
The user-centred design approach has been developed to supplement the engineer-centered and designer-centred design approaches. Depending on the situation, each approach has its merits. The tenet of the user-centred design philosophy is that, to maximize the likelihood that the outcome of the design process will meet the interests and needs of people, they should be involved in all phases of the design process. Without giving due attention to the user, the engineer-centred design approach may result in featurism and poor usability. And without due attention for the user, the designer-centred design approach may result in nice ideas that make no sense to people.

Socio-cultural Sensitivity (DCB170)
5 ECTS
This course aims to be a broad introduction into the field of socio cultural aspects within the field of design. More specifically, you’ll be introduced to the role of ethics, sustainability, history and interculturality in relation to design. In order to do so, we dedicate two weeks on each of the above mentioned topics. The first week will be of a more theoretical nature. The second week will cover up a practical exploration of the topic.

Applied Physics (3NAB0)
5 ECTS
This course will give future engineers the conceptual basis of a few fundamental concepts of physics, with which they can form a “founded” idea of both scientific and technological developments in the fields of medical, nano and energy technology, climate control etc. The importance of the concepts that will be treated, will be cleared up using engaging demonstrations and examples in which the above named technologies are important.

Total ECTS
30/30

Second Semester
(To be graded) Project 1 Design – Smart and the City (DPB100)
10 ECTS
Our cities are presently undergoing profound transformations. Their borders are expanding, their populations are growing, and the problems that need to be solved are becoming more and more complex. In this context, design flourishes, and new innovative solutions are emerging. Designer can contribute to developing our cities in a thoughtful way and creating a friendly and supportive environment for us to live in.
Think of design solutions which can help us live in a city and enjoy it on a daily basis, improve social relations between citizens, create an innovative approach to pollution and waste management, positively influence greenery to the urban landscape.

Creative Electronics (DBB200)
5 ECTS
This course introduces the basics of electrical engineering, electronics, sensors, actuators and Arduino. Besides that, it enables you to develop practical skills as for designing, building and testing design prototypes integrated with electronics, sensors, actuators, Arduino and communication by working on several practical assignments and a self-defined final project.

Data Analytics for Engineers (2IAB0)
5 ECTS
Learning goals:

Students gain insight in basic techniques for processing large amounts of data in an efficient, reliable, and consistent way.
Students develop skills in understanding, interpreting, and documenting data and information in the context of realistic scenarios.
Students get understanding of the data life cycle and develop skills for structuring their solutions of practical problems along the phases of the data life cycle.
Students apply data analytics techniques to realistic data sets in which they can recognize the demands within their area of specialization.
Students obtain basic knowledge of statistical concepts and techniques and develop skills to apply them in practice.
Students learn to implement their solutions for data analytics problems in a programming language (Python), and apply a structured and systematic approach to data processing.
(To be graded) Creative Mechanical Engineering (DBB110)
5 ECTS
This elective is an introduction into sound Mechanical Design and – Engineering principles. Topics to be discussed will be Mechanical Design principles, material properties and selection, manufacturing processes and basic mechanical calculations. Furthermore, readily available tools like materials databases, solid modelling design tools and Finite Element Analysis tools will be demonstrated.

(To be graded) USE Basics (0SAB0)
5 ECTS
The nature and research agenda of engineering are changing, in response to the challenges and opportunities of our present-day world. The dynamics of Users (U), Society (S) and Enterprise (E) play a key role in this—as they did in defining engineering priorities in the past. This course draws historical and ethical lessons on the role of USE in the grand challenges of present-day and future engineering. In doing so it provides an introduction to the USE course sequences.

Total ECTS
10/30

repository: geik/portfolio

repo_name: geik/portfolio


text:
---
title: Record Tests in Test Studio
page_title: Record Tests in Test Studio
description: "A step by step guide on how you can create and record your first test in Test Studio project. Create a test in Test Studio Project. Start automating with Test Studio."
position: 2
---
# Create Your First Test

Once you have successfully created a project in Test Studio, you can start with recording the automation tests against the application under test. In this article you can find useful hints on the below topics.

1. [Add a Test to the Project](#add-a-test-to-the-project)
2. [Start a Recording Session](#start-a-recording-session)
3. [Recording Toolbar](#recording-toolbar)

Back to Launch Test StudioGo to Execute Your First Test

## Add a Test to the Project

For your first test in this project add a new **Web** test.

1. Go to the *Project* ribbon and click on the **Add Web Test** button.

    ![Add new test Project Ribbon](/img/getting-started/first-project/fig02.png)

2. This automatically adds a web test in the __Project Explorer__ and the test item is in edit mode, which allows you to enter its meaningful name.

    ![Choose name for the new test](/img/getting-started/first-project/fig03.png)

3. Other test types can be selected from the down arrow of the **Add Web Test** button.

    ![Add other test type test Project Ribbon](/img/getting-started/first-project/fig02a.png)

 Use the links below to find more information on all test types you can add in a Test Studio Web&Desktop project:

*	**Web Test**
*	**WPF Test**
*	**Responsive Web Test**
*	**Load Test**
*	**Performance Test**
*	**Manual Test**

## Start a Recording Session

Test Studio allows you to easily record the steps of an automated scenario with its click-and-record functionality. The below steps describes how to trigger a recording session and start recording the steps of your test scenario.

1. Open the newly created test with a double-click on it in the __Project Explorer__. In the opened web test, you can click the ***Record*** button in the *Tests* ribbon or press **CTRL+R** to trigger the recording session.

    ![Hit the record button](/img/getting-started/first-project/fig04.png)

2. In the *Recording* dialog type the URL you want to navigate to, select Internet Explorer (or any of the other browsers supported for recording) and press Enter or click the ***Record*** button. You can choose a URL from your recently used URLs.

    ![Choose browser](/img/getting-started/first-project/fig05.png)

    > **Note!** Selecting the recording browser will be skipped, if you have already set a preferred browser from the Test ribbon.

3. Once the selected browser navigates to the desired page, the **Compact Recording Toolbar** gets attached to it. A navigate step is recorded in the *Steps* pane and you can continue recording the next actions as per the required scenario.

    ![Attached recorder](/img/getting-started/first-project/fig06.png)

    > __Note!__ While recording a test, **do not start another instance of the same browser** until the recording is finished!

4. Lets navigate to the [Test Studio documentation](https://docs.telerik.com/teststudio/) from the Telerik page. Click on **DOCS & SUPPORT** button, click on **Test Studio** link and on the next page click on the **Documentation** link. All of those actions are added as steps in the test.

    ![Step pane](/img/getting-started/first-project/fig07.png)

5. To exit the recording session, close the browser with the attached Recording toolbar.

## Compact Recording Toolbar

Following the above steps, you noticed that starting the recording session attached the __Test Studio Compact Recording Toolbar__ to the browser selected for test recording. Let's check what options provides the __Compact Recording Toolbar__.

![Recorder attached to the browser](/img/general-information/test-recording/overview/fig5.png)

The __Compact Recording Toolbar__ is a useful tool, which allows you to extend the recording experience and add specific steps in between recording actions against the application.

![Recording Toolbar](/img/getting-started/first-project/compact-recording-toolbar.png)

1. __Highlight Element__ - one of the most useful features is the Hover Over Highlighting and the menu with Quick steps to add.
2. __Recording State__ - there is a *Pause* button in case you need to perform any actions against the application, but don't need to record these.
3. __Advanced Recording Tools__ - open the Advanced Recording Tools window to explore the DOM tree of the application and add more steps and verifications.
4. __Rotate Compact Recording Toolbar__ - change the orientation of the Compact Recording Toolbar between vertical and horizontal. You can move it anywhere in the browser/WPF application.
5. __Link to Documentation__ - follow the link to our documentation specifically for the recording process.

Back to Launch Test StudioGo to Execute Your First Test

repository: yordan-mitev/teststudio

gha_language: HTML

repo_name: yordan-mitev/teststudio


text:
# Quo Vadis?

Quo Vadis adds simple username/password authentication to Rails 3 applications.

Why bother with yet another authentication gem?  Well, I find all the others over-engineered.  Code should be easy to use and easy to read.  As far as I'm concerned, none of the others ticks both boxes.

Features:

* Minimal effort to add authentication to your app: get up and running in 5 minutes.
* No surprises: it does what you expect.
* Easy to customise.
* Uses BCrypt to encrypt passwords.
* Sign in, sign out, forgotten password, authenticate actions, remember user between browser sessions, user activation.
* Block accounts.
* Let you choose which model(s) to authenticate (defaults to `User`).

Forthcoming features:

* Generate the views for you (for now, copy the examples given below).
* Let you choose the identification field (currently `username`).
* HTTP basic/digest authentication (probably).
* Generate model plus migration if it doesn't exist.
* Detect presence of `has_secure_password` (see below) and adapt appropriately.

What it doesn't and won't do:

* Authorisation.
* Work outside Rails 3.
* OpenID, OAuth, LDAP, CAS, etc.
* Separate identity from authentication services (cf OmniAuth).
* Allow you to have multiple models/scope signed in simultaneously (cf Devise).
* Offer so much flexibility that it takes more than 10 minutes to wrap your head around it (cf Devise, Authlogic).

## Quick Start

If this takes you more than 5 minutes, you can have your money back ;)

Install and run the generator: add `gem 'quo_vadis'` to your Gemfile, run `bundle install`, then `rails generate quo_vadis:install [MODEL_NAME]` (where model name is optional and defaults to `User`).

Edit and run the generated migration to add the authentication columns: `rake db:migrate`.  Note the migration (currently) assumes you already have a table for your model.

In your `User` (or whichever) model, add `authenticates`:

    class User < ActiveRecord::Base
      authenticates
    end

Note Quo Vadis validates the presence and uniqueness of the username, and the presence of the password, but it's up to you to add any other validations you want.

Use `:authenticate` in a `before_filter` to protect your controllers' actions.  For example:

    class ArticlesController < ActionController::Base
      before_filter :authenticate, :except => [:index, :show]
    end

Write the sign-in view.  Your sign-in form must:

* be in `app/views/sessions/new.html.:format`
* POST the parameters `:username` and `:password` to `sign_in_url`

You have to write the view yourself because you'd inevitably want to change whatever markup I generated for you.  You can find an example in the [test app](https://github.com/airblade/quo_vadis/blob/master/test/dummy/app/views/sessions/new.html.erb).

Remember to serve your sign in form over HTTPS -- to avoid [the credentials being stolen](http://blog.jgc.org/2011/01/code-injected-to-steal-passwords-in.html).

In your layout, use `current_user` to retrieve the signed-in user; and `sign_in_path`, `sign_out_path`, and `forgotten_sign_in_path` as appropriate.  You can also use `authenticated?`.

## Forgotten Password

Here's the workflow:

1. [Sign in page] The user clicks the "I've forgotten my password" link.
2. [Forgotten password page] The user enters their username in the form and submits it.
3. Quo Vadis emails the user a message with a change-password link.  The link is valid for 3 hours.
4. [The email] The user clicks the link.
5. [Change password page] The user types in a new password and saves it.
6. Quo Vadis changes the user's password and signs the user in.

It'll take you about 5 minutes to implement this.

On your sign-in page, link to the forgotten-password view at `forgotten_sign_in_url`.

Write the forgotten-password view ([example](https://github.com/airblade/quo_vadis/blob/master/test/dummy/app/views/sessions/forgotten.html.erb)).  The form must:

* be in `app/views/sessions/forgotten.html.:format`
* POST the parameter `:username` to `forgotten_sign_in_url`

Now write the mailer view, i.e. the email which will be sent to your forgetful users ([example](https://github.com/airblade/quo_vadis/blob/master/test/dummy/app/views/quo_vadis/notifier/change_password.text.erb)).  The view must:

* be at `app/views/quo_vadis/notifier/change_password.text.erb`
* render `@url` somewhere (this is the link the user clicks to go to the change-password page)

You can also refer to `@username` in the email view.

Configure the email's from address in `config/initializers/quo_vadis.rb`.

Configure the default host so ActionMailer can generate the URL.  In `config/environments/<env>.rb`:

    config.action_mailer.default_url_options = {:host => 'yourdomain.com'}

Finally, write the change-password page ([example](https://github.com/airblade/quo_vadis/blob/master/test/dummy/app/views/sessions/edit.html.erb)).  The form must:

* be in `app/views/sessions/edit.html.:format`
* PUT the parameter `:password` to `change_password_url(params[:token])`

## Sign up (directly, without activation)

When you create a user, you need to sign them in.  Do this by calling `sign_in(user)` in your controller.  For example:

    # In your app
    class UsersController < ApplicationController
      def create
        @user = User.new params[:user]
        if @user.save
          sign_in @user    # <-- NOTE: sign in your user here
        else
          render 'new'
        end
      end
    end

The `sign_in(user)` method will redirect the user appropriately (you can configure this in `config/initializers/quo_vadis.rb`), as well as running any sign-in hook you may have defined in the initializer.

## Sign up (with activation)

To create a user who must activate their account (via email) before they can sign in, do this:

    # In your app
    class UsersController < ApplicationController
      def create
        @user = User.new_for_activation params[:user]    # <-- NOTE: different constructor
        if @user.save
          QuoVadis::SessionsController.new.invite_to_activate @user    # <-- NOTE: email user here
          redirect_to root_path, notice: "Emailed sign-in instructions to<EMAIL_ADDRESS># or whatever
        else
          render 'new'
        end
      end
    end

The user will receive an email with a link which takes them to a page (which you must write) where they can choose a username and password for themselves.  When they submit the form their new credentials are stored and they are signed in.

Here's the workflow:

1. [New user page, without username/password fields] You or user fills in and submits form.
2. [Users controller] Create user and invite to activate.  See code snippet above.
3. Quo Vadis emails the user a message with an invitation link.  The link is valid for 3 hours.
4. [The email] The user clicks the link.
5. [Invitation page] The user fills in their new username and password.
6. Quo Vadis sets the user's username and password and signs the user in.

It'll take you about 3 minutes to implement this.

Update your user controller's `create` action as above.

Write the mailer view, i.e. the email which will be sent to your new users ([example](https://github.com/airblade/quo_vadis/blob/master/test/dummy/app/views/quo_vadis/notifier/invite.text.erb)).  The view must:

* be at `app/views/quo_vadis/notifier/invite.text.erb`
* render `@url` somewhere (this is the link the user clicks to go to the invitation page)

You can also refer to `@user` in the email view, as well as any other data you pass to `invite_to_activate`.  Note that passing `:from` and/or `:subject` in the hash to `invite_to_activate` overrides the default `QuoVadis.from` and/or `I18n.t('quo_vadis.notifier.invite.subject')` respectively.

Configure the email's from address in `config/initializers/quo_vadis.rb` (or pass in the data hash to `invite_to_activate`).

Configure the default host so ActionMailer can generate the URL.  In `config/environments/<env>.rb`:

    config.action_mailer.default_url_options = {:host => 'yourdomain.com'}

Finally, write the invitation page ([example](https://github.com/airblade/quo_vadis/blob/master/test/dummy/app/views/sessions/invite.html.erb)).  The form must:

* be in `app/views/sessions/invite.html.:format`
* POST the parameters `:username` and `:password` to `activation_url(params[:token])`

If the token expires and you need to generate a new one, re-invite the user with: `invite_to_activate @user`.

## Customisation

You can customise the flash messages and mailer from/subject in `config/locales/quo_vadis.en.yml`.

You can customise the sign-in and sign-out redirects in `config/initializers/quo_vadis.rb`; they both default to the root route.  You can also hook into the sign-in and sign-out process if you need to run any other code.

If you want to add other session management type features, go right ahead: create a `SessionsController` as normal and carry on.

You can skip the validation of authentication attributes (password etc) by overriding `should_authenticate?` in your model.  Perhaps only some of the users should be able to sign in, so you don't want to force them to have a password.

## See also

* Rails 3 edge's [ActiveModel::SecurePassword](https://github.com/rails/rails/blob/master/activemodel/lib/active_model/secure_password.rb).  It's `has_secure_password` class method is similar to Quo Vadis's `authenticates` class method.
* [RailsCast 250: Authentication from Scratch](http://railscasts.com/episodes/250-authentication-from-scratch).

## What's up with the name?

Roman sentries used to challenge intruders with, "Halt!  Who goes there?"; quo vadis is Latin for "Who goes there?".  At least that's what my Latin teacher told us, but I was 8 years old then so I may not be remembering this entirely accurately.

## Questions, Problems, Feedback

Please use the GitHub [issue tracker](https://github.com/airblade/quo_vadis/issues) or email me.

## Intellectual property

Copyright 2011 Andy Stewart (boss@airbladesoftware.com).

Released under the MIT licence.


text:
# Example app using Photos framework

A basic Photos-like app to demonstrate the Photos framework.

## Overview

- Lists albums and built-in collections (Recently Added, Favorites, etc)
- Displays assets (all photos or those from a collection) in a thumbnail grid
- Displays a single photo, video, looping video, or Live Photo asset
- Allows the following actions:
    * simple edit with canned filters (for still photos, Live Photos, and videos)
    * creating an album and adding assets to it
    * removing assets from an album
    * deleting assets and albums
    * favoriting an asset

## Build Requirements

Xcode 9.0 (iOS 11.0 / tvOS 11.0 SDK) or later

## Runtime Requirements

iOS 11.0, tvOS 11.0, or later

repository: Lax/Learn-iOS-Swift-by-Examples

gha_language: Swift

repo_name: Lax/Learn-iOS-Swift-by-Examples


text:
Checks for the use of local variable names from an outer scope
in block arguments or block-local variables. This mirrors the warning
given by `ruby -cw` prior to Ruby 2.6:
"shadowing outer local variable - foo".

NOTE: Shadowing of variables in block passed to `Ractor.new` is allowed
because `Ractor` should not access outer variables.
eg. following style is encouraged:

  [source,ruby]
  ----
  worker_id, pipe = env
  Ractor.new(worker_id, pipe) do |worker_id, pipe|
  end
  ----

# Examples

```ruby

# bad

def some_method
  foo = 1

  2.times do |foo| # shadowing outer `foo`
    do_something(foo)
  end
end
# good

def some_method
  foo = 1

  2.times do |bar|
    do_something(bar)
  end
end
```

[Source](http://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Lint/ShadowingOuterLocalVariable)

repository: codacy/codacy-rubocop

gha_language: Ruby

repo_name: codacy/codacy-rubocop


text:
# MSI Local

Service to emulate the Azure Managed Service Identity Service locally for local development

To use, in the source of the project you're running it from add msilocal.json in the root of your project with following schema.

```json
{
    "clientId": "<client-id>",
    "clientSecret": "<client-secret>",
    "authURL": "https://login.microsoftonline.com/<tenant-id>/oauth2/token"
}
```

Follow the instructions here [https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal) to get the client id, client secret, and tenant id

ENSURE YOU ADD `msilocal.json` TO YOUR `.gitignore` FILE!!!

Friends don't let friends commit secrets to their repo.

In the future, am looking at adding support for local keychain/password manager.

repository: AzureExpert/msilocal

repo_name: AzureExpert/msilocal


text:
## Rubric

### Functional Expectations

* [ ]  Novice - Application meets all of the basic functional expectations of create, edit, delete, and those changes persist in `localStorage`
* [ ]  Advanced Beginner - Application adds 'Changing the quality of an idea' and enables 'Filtering and Searching by Text' as defined in the spec
* [ ]  Proficient - Applications adds 'Filtering by Importance' and 'Recent Ideas' as outlined in the spec
* [ ]  Exceptional - Application adds all of the extensions

------------------------------------------------------------------

### Comp Recreation

* [ ]  Novice - Application implements all major comp details accurately and correctly on desktop only (colors, fonts, icons, spacing, alignment, etc.)
* [ ]  Advanced Beginner - Application implements all major comp details accurately and correctly on desktop and mobile (colors, fonts, icons,spacing, alignment,  etc.). Transitions between screen sizes may not be smooth
* [ ]  Proficient - Application implements all major comp details accurately and correctly on desktop and mobile (colors, fonts, icons,spacing, alignment,  etc.) with smooth transitions between screen sizes. Additional elements added generally match the visuals established in the comps, but may be slightly awkward
* [ ]  Exceptional - Application implements all major comp details accurately and correctly on desktop and mobile (colors, fonts, icons,spacing, alignment,  etc.) with smooth transitions between screen sizes. Additional elements that have been added match the visuals established in the comps

------------------------------------------------------------------

### HTML - Style and Implementation

* [ ]  Novice - Crafts markup according to the [turing html style guide](https://github.com/turingschool-examples/html)
* [ ]  Advanced Beginner - Application adds to the above by using appropriate semantic elements and using `data-*` attributes for all data related things
* [ ]  Proficient - Applications adds to the above with markup that is easy to read and follow across naming conventions
* [ ]  Exceptional - Application adds to the above by using [BEM](http://getbem.com/), [SMACCS](https://smacss.com/), or another set of naming conventions for classes and:
  * [ ]  Implements html that is accessible for folks with visual disabilities. Reference [this lesson plan](http://frontend.turing.io/lessons/floating/web-accessibility.html)

------------------------------------------------------------------

### CSS - Style and Implementation

* [ ]  Novice - Crafts CSS according to the [turing css style guide](https://github.com/turingschool-examples/css)
* [ ]  Advanced Beginner - Application adds organization for the whole stylesheet and within rules
* [ ]  Proficient - Applications adds to the above by removing repetitive rules and blocks of code according to the DRY principle
* [ ]  Exceptional - Application adds to the above by using [BEM](http://getbem.com/), [SMACCS](https://smacss.com/), or another set of naming conventions for classes

------------------------------------------------------------------

### JAVASCRIPT - Style and Implementation

* [ ]  Novice - Crafts JS according to the [turing js style guide](https://github.com/turingschool-examples/javascript/tree/master/es5)
* [ ]  Advanced Beginner - Application adds to the above by correctly implementing a data model for the `Idea` class including all required methods
* [ ]  Proficient - Application adds readability by incorporating both DRY and SRP practices and students can speak to implementation decisions and:
  * [ ]  Uses event delegation correctly on dynamic elements for deleting and editing an idea (clicking outside of the text field)
  * [ ]  All functions are less than 10 lines
  * [ ]  There are no global variables aside from query selectors and an array for your ideas
  * [ ]  There are no nested if else statements
* [ ]  Exceptional - Application adds to code quality by refactoring all for loops into the proper array prototype iteration methods and:
  * [ ]  Using logical operators instead of if/else statements where applicable
  * [ ]  Application changes anonymous functions to arrow functions and changes all variables to be block scoped (`let` and `const`)
  * [ ]  Application stores all ideas in one array in local storage, instead of individually
  * [ ]  When 'Filtering and Searching by Text' and 'Filtering by Importance', ideas that do not need to be shown on the dom should be completely removed from the dom, instead of only being hidden from view

repository: tiffanybacher/idea-box-triples

repo_name: tiffanybacher/idea-box-triples


text:
# Log Parser
The log parsing command line tool was built to concurrently search for matching patterns or strings within a large file. It then outputs the matched lines to the console. This was created to parse large files that cannot usually be opened by other text editors.

## Run Modes
You can either search for a simple string, or use a more complex regex pattern to look through your file. Below are some examples from the command line. These require that you are located in the root directory of this application.

    // search for a specific string within a file
    go run . -path "<path to input file>" -string "<string to search>"

    // search file for lines that match a given pattern
    go run . -path "<path to input file>" -regex "<regex string>"

repository: spatzlsberger/Log-Parser

repo_name: spatzlsberger/Log-Parser


text:
---
categories:
- til
comments: true
date: "2015-11-08T00:00:00Z"
description: Short how-to about Homebrew and Sublime Text 3, templates in Liquid and
  Jekyll bundle
tags:
- english
- nuget
- software
- homebrew
- sublime
- liquid
- jekyll
title: 'Today I Learned: Homebrew, Jekyll and Liquid'
---

I've decide to start writing in my blog..
And I faced with several issues and strange things in the tools and frameworks.

## How-to install Sublime Text 3 with Homebrew
It's pretty easy to install it but for man who is moving from Windows to Mac OS it is rather hard to change mind.

I did not have brew cask installed so I had to install it first, so these were the steps I followed:

{{< highlight bash >}}
brew install caskroom/cask/brew-cask
brew tap caskroom/versions
brew cask install sublime-text3
{{< / highlight >}}

## Jekyll and Liquid

### How do I chain if statements in Jekyll?
In Jekyll/Liquid else-if is spelt `elsif`, i.e.:
{{< highlight html >}}
{% raw %}
{% if post.category == "speaking" %}

{% elsif post.category == "til" %}

{% else %}

{% endif %}
{% endraw %}
{{< / highlight >}}

### How to use Jekyll code in (inline) code highlighting?
Use `raw` and `endraw` tags in highlighting block.

### Cannot load such file -- jekyll-sitemap (LoadError)
It works using bundle exec. Probably problem described [here](https://github.com/mmistakes/skinny-bones-jekyll/issues/10)
{{< highlight bash >}}
bundle exec jekyll build
bundle exec jekyll serve
{{< / highlight >}}

## Bundle command not found mac
Use `gem install bundler`, Luke

## Reinstall nuget packages in project
Ever been in a situation where you wanted to have all nuget packages of a project to be kind of “refreshed”?
{{< highlight bash >}}
Update-Package –reinstall -project MySuperProject.Web
{{< / highlight >}}

## How I Add a Table of Contents to Jekyll Blog
For my Jekyll blog I want to add a table of contents to some of my larger posts so readers have an overview of the post content and may click links to jump to sections which interest them most. I’d like Jekyll to automatically generate the markup for the table of contents based off the headers in the post.

Here’s how I set up Jekyll to get my table of contents (toc) feature.

By default, Jekyll on Github pages is configured to use Kramdown to parse and convert Markdown1 to html format for blog post pages. Jekyll’s markdown conversion option is set in the `_config.yml` file like this:
{{< highlight yaml >}}
markdown: kramdown
{{< / highlight >}}

Implementing the auto table of contents feature is almost as easy as the necessary configuration.

- Add an ordered or unordered list to the content body at the point you want the table of contents to appear
- Add the following snippet immediately below the list: `{:toc}`
- Jekyll (using Kramdown as its converter) will replace the list with a toc automatically generated from the headings in the content

Here’s the markup I use to add tocs to my posts:
{{< highlight html >}}
* TOC
{:toc}
{{< / highlight >}}


text:
+++
date = "2016-06-22T13:43:28+02:00"
description = "The properties for the definition of an app"
title = "App Properties"
weight = 8
+++

<!--
#data-table /*/*/Description
#column Property: name(..)
#column App Types: value(../App Types)
#column Required: value(../Required)
-->

## ID {#ID}

* Description: The ID of the app
* Data Type: string
* Possible Values: alphanumeric characters, no spaces
* Required: `true`
* App Types: all

## Label {#Label}

* Description: A user friendly name for the app
* Data Type: string
* Required: `false`
* Default: the value of the `ID` property
* App Types: all

## Typ {#Typ}

* Description: The application typ
* Data Type: string
* Possible Values:
    + `default`
    + `meta`
    + `node-package`
    + `python2-package`
    + `python3-package`
    + `ruby-package`
    + `nuget-package`
* Required: `false`
* Default: `default`
* App Types: all

The meaning of the different possible values is explained in [App Types](/ref/app-types).

## Dependencies {#Dependencies}

* Description: A list with the IDs of all apps in this app group
* Data Type: list of strings
* Possible Values: app IDs
* Required: `false`
* Default: empty
* App Types: all

## Website {#Website}

* Description: A URL to the main website of this program
* Data Type: URL
* Required: `false`
* Default: empty
* App Types: all

This URL is used to create an entry in the documentation menu in the
main window of the Bench Dashboard.

## License {#License}

* Description: A SPDX license identifier or `unknown` or `commercial`.
* Data Type: string
* Required: `false`
* Default: `unknown`
* App Types: all

If this value is set to a SPDX identifier listed in the config property
[`KnownLicenses`](/ref/config/#KnownLicenses),
the [`LicenseUrl`](/ref/app-properties/#LicenseUrl) defaults to the associated URL.

## LicenseUrl {#LicenseUrl}

* Description: A URL or a relative path to a document with the license text.
* Data Type: URL
* Required: `false`
* Default: empty or SPDX license URL
* App Types: all

## Docs {#Docs}

* Description: A dictionary with documentation URLs for this program
* Data Type: dictionary of labels and URLs
* Required: `false`
* Default: empty
* App Types: all

This dictionary lists a number of documentation links for this program.
Each entry is a key-value-pair of a label and a URL.
This dictionary is used to create entries in the documentation menu in the
main window of the Bench Dashbaord.

## Force {#Force}

* Description: A boolean, indicating if the package should allways be installed, even if it is already installed
* Data Type: boolean
* Possible Values: `true`, `false`
* Required: `false`
* Default: `false`
* App Types: all

## Dir {#Dir}

* Description: The name of the target directory for the app
* Data Type: string
* Required: `false`
* Default: the value of the `ID` property in lowercase
* App Types: all

For package apps like `node-package` or `python3-package`,
the default value is the directory of the respective interpreter/compiler app.

## Path {#Path}

* Description: A list of relative paths inside the app directory to register in the environment `PATH`
* Data Type: list of strings
* Required: `false`
* Default: `.`
* App Types: `meta`, `default`

This property is only recognized, if `Register` is `true`.
For package apps like `node-package` or `python3-package`,
this property is ignored and implicitly set to the directory
of its interpreter/compiler app where the CLI wrapper scripts are stored.

## Register {#Register}

* Description: A boolean to indicate if the path(s) of the application should be added to the environment `PATH`
* Data Type: boolean
* Possible Values: `true`, `false`
* Required: `false`
* Default: `true`
* App Types: `meta`, `default`

## Environment {#Environment}

* Description: A list of key-value-pairs, describing additional environment variables
* Data Type: dictionary
* Required: `false`
* Default: empty
* Example: `MY_APP_HOME: $:Dir$`, `MY_APP_LOG: D:\logs\myapp.log`
* App Types: all

## Exe {#Exe}

* Description: The path of the main executable for this app
* Data Type: string
* Required: `false`
* Default: `<app ID>.exe`
* App Types: all

The path can be absolute or relative to the target directory of the app.
For package apps like `node-package` or `python3-package`,
the path can be just the name of CLI wrapper script,
given the package provides a CLI.

## ExeTestArguments {#ExeTestArguments}

* Description: A string to pass as command line arguments when the executable is tested.
* Data Type: string
* Default: empty
* App Types: all

To test if an app was installed successfully,
the main executable is run with these arguments.
If the process exit code is `0` the test was successful.

## ExeTest {#ExeTest}

* Description: A flag to prevent the test of the main executable.
* Data Type: boolean
* Default: `true`
* App Types: all

If the main executable of an app can not be tested by executing it with the
[`ExeTestArguments`](#ExeTestArguments), this property must be set to `false`.

## AdornedExecutables {#AdornedExecutables}

* Description: A list of executables, which must be adorned with pre- and post-execution scripts
* Data Type: list of strings
* Required: `false`
* Default: empty
* App Types: all

Every listed path must be relative to the target directory of the app.

## RegistryKeys {#RegistryKeys}

* Description: A list of registry keys to back up and restore for isolation
  during the execution of this app
* Data Type: list of string
* Possible Values: relative key paths in the Windows registry hive `HKEY_CURRENT_USER`
* Required: `false`
* Default: empty
* Example: `Software\Company Foo\Program Bar`
* App Types: all

## Launcher {#Launcher}

* Description: A label for the app launcher
* Data Type: string
* Required: `false`
* Default: empty
* App Types: all

A launcher for the app is created only if this property is set to a non empty string.

## LauncherExecutable {#LauncherExecutable}

* Description: The path to the executable targeted by the app launcher
* Data Type: string
* Required: `false`
* Default: the value of the `Exe` property
* App Types: all

The path can be absolute, or relative to the target directory of the app.

## LauncherArguments {#LauncherArguments}

* Description: A list with arguments to the app executable
* Data Type: list of strings
* Required: `false`
* Default: is `%*`
* App Types: all

To allow arbitrary arguments to be passed from the launcher to the executable,
the last element in the list must be `%*`.
Passing arguments from the launcher to the executable allows drag-and-drop
for files from the Explorer onto the launcher.

## LauncherIcon {#LauncherIcon}

* Description: The path to the icon of the launcher
* Data Type: string
* Possible Values: path to files with the following extension `.ico` and `.exe`
* Required: `false`
* Default: the value of the `Exe` property
* App Types: all

The path can be absolute or relative to the target directory of the app.

## Url {#Url}

* Description: The URL to the file, containing the app resource
* Data Type: string
* Possible Values: an absolute URL with the protocol `http` or `https`
* Required: `true`
* App Types: `default`

## DownloadCookies {#DownloadCookies}

* Description: A dictionary with cookies, to send along with the download request
* Data Type: dictionary
* Required: `false`
* Default: empty
* Example: `cookie-name: cookie-value`
* App Types: `default`

## ResourceName {#ResourceName}

* Description: The name of the downloaded executable file
* Data Type: string
* Possible Values: the name of the executable refered to by `Url`,
  must have a file extension like `*.exe`, `*.bat`, or `*.cmd`
* Required: `true`*
* App Types: `default`

\*) Only one of `ResourceName` or `ArchiveName` must be set.

## ArchiveName {#ArchiveName}

* Description: The name of the downloaded archive
* Data Type: string
* Possible Values: the name of the archive refered to by `Url`,
  must be a supported archive file like `*.zip`, `*.msi`, or a setup programs
* Required: `true`*
* App Types: `default`

\*) Only one of `ResourceName` or `ArchiveName` must be set.

## ArchiveTyp {#ArchiveTyp}

* Description: The archive typ, which controls the extractor selection
* Required: `false`
* Data Type: string
* Possible Values
    + `auto` Try to determine the extractor by the filename extension or use the custom extractor script if it exists
    + `generic` Use 7-Zip to extract
    + `msi` Use LessMSI to extract
    + `inno` Use Inno Setup Unpacker to extract
    + `custom` Use the custom script `auto\apps\<app ID>.extract.ps1`
* Required: `false`
* Default: `auto`
* App Types: `default`

This property is only recognized, if the `ArchiveName` property is set.

## ArchivePath {#ArchivePath}

* Description: A sub folder in the archive to extract
* Data Type: string
* Possible Values: a relative path or empty
* Required: `false`
* Default: empty → the archive root
* App Types: `default`

This property is only recognized, if the property `ArchiveName` is set.

## SetupTestFile {#SetupTestFile}

* Description: The path to a file as part of the app installation
* Data Type: string
* Required: `false`
* Default: the value of the `Exe` property
* App Types: `meta`, `default`

The path is relative to the target directory of the app.
The existence of thdescribed file is used, to determine if the app is already installed.

## PackageName {#PackageName}

* Description: The name of the NPM package to install via NPM
* Data Type: string
* Required: `false`
* Default: the value of the `ID` property in lowercase
* App Types: `*-package`

## Version {#Version}

* Description: The package version or version range to install by the respective package mananer, if empty install latest
* Required: `false`
* Default: empty
* App Types: `*-package`

Version Patterns:

* Node.js: `2.5.0` or `>=1.2.0 <3.0.0`
* Python: `2.5.0` or `>=1.2.0,<3.0.0`
* Ruby: `2.5.0`

[app types]: /ref/app-types/
[meta apps]: /ref/app-types/#meta-apps
[default windows apps]: /ref/app-types/#default-windows-app
[Node.js packages]: /ref/app-types/#node-js-package
[Python packages]: /ref/app-types/#python-package
[Ruby packages]: /ref/app-types/#ruby-package


text:
# 3D printed pneumatic actuator

This repository contains the code and data for the thesis of Eva Zillen.

## Getting Started

The three folders in this repository each contain code (and results) attributing to the research done on 3D printed pneumatic actuators, done by Eva Zillen at [Delft University of Technology](https://www.tudelft.nl/3me/over/afdelingen/biomechanical-engineering).
- [method_dimension-calculations/](method_dimension-calculations/) contains code which calculates the dimensions of the cealing grooves and variables of the non-conventional shapes.
- [results_pneumatic-actuator/](results_pneumatic-actuator/) contains the code and data used to visualize the results from the static leakage, dynamic leakage, and friction tests.
- [appendix_compressed-air_chamber/](appendix_compressed-air_chamber/) contains the code and data used to visualize the leakage in 3D printed compressed-air chambers.

### Prerequisites

Requirements for running all scripts can be found in the [requirements.txt](requirements.txt). Run `pip3 install -r requirements.txt` to install the required packages.

## Built With

  - [Python 3.8.2](https://www.python.org/)
  - [Jupyter notebook](https://jupyter.org/)

## Data collected with

  - [LabView by NI](https://www.ni.com/nl-nl/shop/labview.html)

## Authors

  - **Eva Zillen**
  - [Heike Vallery](https://www.tudelft.nl/3me/over/afdelingen/biomechanical-engineering/people/prof-dr-ing-h-heike-vallery)
  - [Gerwin Smit](https://www.tudelft.nl/staff/g.smit/)

## License

This project is licensed under the [CC0 1.0 Universal](LICENSE) Creative Commons License - see the [LICENSE](LICENSE) file for
details


text:
# Test-Driven Development with Objects

The chapter introduce the concept of **mocking** collaborators during the unit
test of class which need those collaborators.

## The Law of Demeter

They suggest to avoid doing nested calls to different methods of an object,
instead it should be prefered to call a public method in a **declarative** way
which should abstract away the details of what is going on under the hoods.
This introduce also the need of mocking in test, as you may find yourself
wanting to test some behaviour that happen outside the class under test.

repository: glippi/knowledge

repo_name: glippi/knowledge


text:
# ElasticSearch Log4j2 Appender

[![Build Status](https://travis-ci.org/magrossi/es-log4j2-appender.svg?branch=master)](https://travis-ci.org/magrossi/es-log4j2-appender)
[![Code Coverage](https://codecov.io/gh/magrossi/es-log4j2-appender/branch/master/graph/badge.svg)](https://codecov.io/gh/magrossi/es-log4j2-appender)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.magrossi/log4j2-elasticsearch-appender/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.magrossi/log4j2-elasticsearch-appender)

An ElasticSearch REST appender for Log4j2

This is a simple appender that sends your log data JSON formatted directly to ElasticSearch via the REST API. There are options to buffer the logs before sending in bulk. Two options are provided for the buffering of logs.
- **Max Bulk Size:** when set to a value greater than `0` it will buffer messages until `maxBulkSize` is reached, when it will then send the whole lot using ElasticSearch's `_bulk` API (defaults to `200`).
- **Max Delay Time:** similarly to the previous option, `maxDelayTime` will accumulate log messages for up to `maxDelayTime` in milliseconds (counted from the first message received) and it will send the entirety of the accumulated messages in a single bulk (defaults to `2000`ms).

Any combination of the two options can be used. Setting any to `0` effectively disables it, if both are set to `0` logs are sent one by one as soon as they are received.

The appender uses the `JSONLayout` by default, but a custom layout can be provided. The only requirement is that the layout produces an `application/json` content type.

To use it, simply reference this package into your Log4j2 configuration file, and add the appender with as your ElasticSearch nodes as hosts and you're good to go!
```xml
<Configuration status="debug" strict="true" name="ElasticSearchAppenderTest"
               packages="com.github.magrossi.log4j2.elasticsearch">
    <Appenders>
        <!-- Sends logs immediately -->
        <Appender type="ElasticSearch"
                  <!-- Your appender name -->
                  name="ELASTIC"
                  <!-- Accumulate up to "maxBulkSize" before sending the logs -->
                  maxBulkSize="0"
                  <!-- Waits maxDelayTime (in millis) before sending the logs -->
                  maxDelayTime="0"
                  <!-- ElasticSearch index/type configuration -->
                  esIndex="my-index-"
                  esType="logs"
                  <!-- The index name is actually {index}{dateFormat}, so if
                       esIndex="my-index-", and
                       dateFormat="yyyyMMdd" (and the current date is 01/01/2001
                       Then the ElasticSearch index will be resolved to "my-index-20010101" -->
                  dateFormat="yyyyMMdd"
                  <!-- ElasticSearch credentials, if required -->
                  user="${env:myEsUser}"
                  password="${env:myEsPassword}">
            <!-- List of nodes in your ElasticSearch cluster -->
            <Host type="HttpAddress" scheme="http" host="my-node-1" port="9200"/>
            <Host type="HttpAddress" scheme="http" host="my-node-2" port="9200"/>
        </Appender>
    </Appenders>
    <Loggers>
        <Logger name="ELASTIC_LOGGER" level="debug" additivity="false">
            <AppenderRef ref="ELASTIC"/>
        </Logger>
    </Loggers>
</Configuration>
```


text:
# NREL's Reference OpenSource Controller (ROSCO) toolbox for wind turbine applications
This tool-set has been DEPRECATED!

As of version 2.4.0, the ROSCO toolbox has been combined with the ROSCO git repository here:
[ROSCO](https://github.com/NREL/ROSCO)

Please use the combined tool-set going forward. All functionalities of the ROSCO toolbox still preserved (and expanded!), just a slight code restructure was in order. Thank you for understanding, and we hope this does not cause any significant inconvenience.