text:
# Variables

A variable is a place where you can store and retrieve data. Variables have a name, a [type](/types), and value:

* *name* is how you'll refer to the variable
* *type* refers to the kind of data a variable can store
* *value* refers to what's stored in the variable

### ~ hint

You can use the default variable names given in the blocks if you'd like. However, it's best to use descriptive variable names. To change a variable name in the editor, select the down arrow next to the variable and then click "new variable".

### ~

## ``let`` statement

Use the Block Editor variable statement to create a variable
and the [assignment operator](/blocks/variables/assign)
to store something in the variable. This is called _declaring_ the variable.

For example, this code stores the number `2` in the `x` variable:

```block
let x = 2;
```
Here's how to make a variable in the Block Editor:

1. Click `variables`.

2. Change the default variable name if you like.

3. Drag a block type on the right-side of the [assignment operator](/blocks/variables/assign) and click the down arrow to change the variable name.

When you make, or declare, a variable in code, you'll use the ```let``` statement. It looks like this:

```typescript
let percent = 50;
```

### #letexample

### Reading variable values

Once you've declared a variable, just use the variable's name whenever you need what's stored in the variable.

#### #readvariableexample

```block
let count = 10
let half = count / 2
```

### Updating variable values

To change the contents of a variable use the assignment operator.

#### #updatevariableexample
```block
let count = 10
if (count < 20) {
    count = 20
}
```
### Why use variables?

If you want to remember and modify data somewhere in your program later, you'll need a variable.

#### #whyusevariablesexample

### Local variables

Local variables exist only within the function or block of code where they're declared.

Here, the variable `index` only exists inside the **for** block. The `looping` variable exists both
outside and inside the **for** block.

#### #localvariableexample

```block
let looping = true;
for (let index = 0; index <= 10; index++) {
    if (index == 10) {
        looping = false;
    }
}
```

## See also

[Assignment operator](/blocks/variables/assign), [Change operator](/blocks/variables/change)

repository: krishanViduranga/pxt

repo_name: krishanViduranga/pxt


text:
# listview-and-colors
Testbed of having colors on listviewitems
Simple program that colors `ListViewSubItem`s, left-click to color foreground, right-click for background.

![screenshot of tool](screenshot.png?raw=true)

# Key learning
By default `ListViewItem`s are colored by setting `ForeColor`/`BackColor` on the `ListViewItem` itself. If you want to color the sub-items individually, you need to set `ListViewItem.UseItemStyleForSubItems = false`, otherwise setting the color is just silently ignored.

license: Unlicense

repository: leiflundgren/listview-and-colors

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: leiflundgren/listview-and-colors


text:
# Smart Package Carbon Angular

## Prerequisites

1. Install [NodeJS](https://nodejs.org/en/download/)
2. Install [Angular](https://cli.angular.io/)
   ```bash
   npm install -g @angular/cli
   ```
   or with permissions if needed
   ```bash
   sudo npm install -g @angular/cli
   ```
3. Install [Swagger Codegen](https://swagger.io/docs/open-source-tools/swagger-codegen/)

## Run Locally
#### Install packages

```bash
cd frontend
npm install
```

## Development server
Run `npm start` or `ng serve` for a dev server. Navigate to [http://localhost:4200/](http://localhost:4200/). The app will automatically reload if you change any of the source files.

## How to use components

Look at the [component library](https://angular.carbondesignsystem.com/) and [developer documentation](https://angular.carbondesignsystem.com/documentation/).

## Create new angular components

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive/pipe/service/class/module`.

## Connecting backend swagger to frontend using services

Run `npm run swagger-generate` to update the services. Your new API connector will be found in `frontend/src/services/backend`

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
Before running the tests make sure you are serving the app via `ng serve`.

## Further help

### Angular
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).

### Carbon
https://www.carbondesignsystem.com/tutorial/angular/overview

https://github.com/carbon-design-system/carbon-angular-starter

## PWA ready

Carbon Angular Starter was built with offline and progressive web app in mind.

It provides [`manifest.json`](src/manifest.json) and service worker ([`sw.js`](src/sw.js)).

In order to simplify development, service worker is not activated by default as this may get in the way of your workflow.
If you're actively working on customizing your service worker or doing testing, remember to activate it by uncommeting the script tag content in index.html.

repository: kyleni/smart-package

repo_name: kyleni/smart-package


text:
---
heading: Service
title: Tools and Services to structure the Data Jungle for plant researchers
bg-color: olive
emphasis-color: darkblue
image: ../../images/Learn-more/Service/Service.svg
layout: text-top-image-bottom

---

As a simple structural scaffold that should greatly facilitate efforts of proper research data management, the Annotated Research Context is introduced, which intrinsically follows FAIR requirements.
But all beginnings are difficult, especially when looking at a blank screen. Dedicated to help handling the Annotated Research Context, the DataPLANT consortium started its operation by assembling a suite of tools.

license: MIT

branch_name: refs/heads/main

gha_license_id: MIT


text:
SignalSlotExample
=================

Use Qt signals and slots in native extensions for BB10 HTML5 apps

- Triggers NotifyEvent to JNEXT context when receiving the activeChanged signal from bb::device:Led
- Assumes you know how to generate moc files

```
moc -o moc_class.cpp class.hpp
```

- Import existing project into workspace, build
- Copy built .so file into a JavaScript extension project, (I haven't written a JavaScript part to this extension yet)

repository: haahmad/SignalSlotExample

repo_name: haahmad/SignalSlotExample


text:
## Installation

### Install Node.js

From [nodejs.org](https://nodejs.org/):

> "Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices."

There are installation packages and instructions for most major Operating systems on its website [nodejs.org](https://nodejs.org/). Remember to install also the **npm** tool, which is the node package manager and is distributed with the Node.js installer.

### Install Nightwatch
To install the latest version using the npm command line tool, run the following:

npm install nightwatch

add **`-g`** option to make `nightwatch` runner available globally in your system.

add **`--save-dev`** option to save `nightwatch` as a `devDependency` in your package.json.

### WebDriver Service

Depending on your target browser, you will need a specific WebDriver server. You will need to download and configure one (or more) of the following services:

   WebDriver Binary
   Browser
   Description

    GeckoDriver

    Standalone server which implements the [W3C WebDriver protocol](https://w3c.github.io/webdriver/#protocol) to communicate with Gecko browsers, such as Firefox.

    ChromeDriver

    Standalone server which implements the [JSON Wire Protocol](https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol) for Chromium, however it is currently in the process of transitioning to the W3C WebDriver spec.

Available for Chrome on Android and Chrome on Desktop (Mac, Linux, Windows and ChromeOS).

     Microsoft WebDriver

     Windows executable which supports both the W3C WebDriver spec and JSON Wire Protocol for running tests against Microsoft Edge.

    SafariDriver

    The `/usr/bin/safaridriver` binary comes pre-installed with recent versions of Mac OS and it's available to use following the instructions on [Apple Developer website](https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari).

More information is available on About WebDriver for Safari page.

### Installing WebDriver

Installing the WebDriver services can be done either by downloading the binary directly or by using an NPM package.

GeckoDriver

GeckoDriver can be downloaded from the [Releases page](https://github.com/mozilla/geckodriver/releases) on GitHub. Release notes are also available there. Or you can use the [geckodriver](https://www.npmjs.com/package/geckodriver) NPM package as a dependency in your project:

npm install geckodriver --save-dev

ChromeDriver

ChromeDriver can be downloaded from the [ChromeDriver Downloads](https://chromedriver.chromium.org/downloads) page. Or you can use the [chromedriver](https://www.npmjs.com/package/chromedriver) NPM package as a dependency in your project:

npm install chromedriver --save-dev

Microsoft WebDriver

WebDriver for Microsoft Edge is now a Windows Feature on Demand. To install run the following in an elevated command prompt:

DISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~<IP_ADDRESS>

More details about installation and usage documentation are available on the official [Microsoft WebDriver homepage](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/).

SafariDriver

The `safaridriver` binary is already installed on recent versions of Mac OS, however some manual configuration is needed before tests can be run against Safari.

You will need to run the following once, before using the safaridriver:

safaridriver --enable

More details are available on the [Apple Developer website](https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari).

### Using Selenium Server

Using Selenium Standalone Server used to be the de facto standard for managing the various browser drivers and services, but starting with Nightwatch 1.0 is no longer required, nor is it recommended, unless you are testing against legacy browsers, such as Internet Explorer.

It might be required if you have a [Selenium Grid](https://github.com/SeleniumHQ/selenium/wiki/Grid2) environment.

#### Download Java
Selenium Server is a Java application, which means you will also need to have the [Java Development Kit (JDK)](https://www.oracle.com/technetwork/java/javase/downloads/index.html) installed, minimum required version is 7. You can check this by running `java -version` from the command line.

#### Download Selenium

Download the latest version of the `selenium-server-standalone-{VERSION}.jar` file from the [Selenium downloads page](https://selenium-release.storage.googleapis.com/index.html) and place it on the computer with the browser you want to test.
In most cases this will be on your local machine and typically inside your project's source folder.

A good practice is to create a separate subfolder (e.g. `bin`) and place it there as you might have to download other driver binaries if you want to test multiple browsers.

##### Running Selenium Automatically

If the server is on the same machine where Nightwatch is running, it can be started/stopped directly by the [Nightwatch Test Runner](https://nightwatchjs.org/guide#test-runner).

##### Running Selenium Manually

To run the Selenium Server manually, from the directory with the jar run the following:

java -jar selenium-server-standalone-{VERSION}.jar

#### Using Selenium Standalone Server
For viewing all the run-time options, run the previous command adding the `-help`:

java -jar selenium-server-standalone-{VERSION}.jar -help

Starting with Selenium 3, FirefoxDriver is no longer included in the package. Also, starting with version 48, Firefox is no longer compatible with FirefoxDriver which is shipped with Selenium 2.x. Firefox users are advised to use GeckoDriver for their testing. For more info, refer to the browser setup section.

More info about running the Selenium Server can be found here: https://github.com/SeleniumHQ/selenium/wiki/RemoteWebDriverServer

repository: effafinette/nightwatch-docs

repo_name: effafinette/nightwatch-docs


text:
tf_example2 example
=====================

Step-by-Step
============

This is Hello World to demonstrate how to quick start with Intel® Neural Compressor. It is a Keras model on mnist dataset defined by helloworld/train.py, we will implement a customized metric and a customized dataloader for quantization and evaluation.

## Prerequisite

### 1. Installation
```shell
# Install Intel® Neural Compressor
pip install neural-compressor
```
### 2. Install Intel Tensorflow
```shell
pip install intel-tensorflow==2.3.0
```

### 3. Prepare FP32 model
```shell
cd <WORK_DIR>/examples/helloworld
python train.py
```
## Run Command
  # The cmd of quantization and predict with the quantized model
  ```shell
  python test.py
  ```
## Introduction
This example can demonstrate the steps to do quantization on Keras generated saved model with customized dataloader and metric.
### 1.Add inputs and outputs information into conf.yaml, to get the input and output tensor name please refer to helloworld/train.py.

### 2.Define a customer dataloader for mnist

```python
class Dataset(object):
  def __init__(self):
      (train_images, train_labels), (test_images,
                 test_labels) = keras.datasets.fashion_mnist.load_data()
      self.test_images = test_images.astype(np.float32) / 255.0
      self.labels = test_labels
      pass

  def __getitem__(self, index):
      return self.test_images[index], self.labels[index]

  def __len__(self):
      return len(self.test_images)

```

### 3.Define a customized metric
This customized metric will calculate accuracy.
```python
class MyMetric(object):
  def __init__(self, *args):
      self.pred_list = []
      self.label_list = []
      self.samples = 0
      pass

  def update(self, predict, label):
      self.pred_list.extend(np.argmax(predict, axis=1))
      self.label_list.extend(label)
      self.samples += len(label)
      pass

  def reset(self):
      self.pred_list = []
      self.label_list = []
      self.samples = 0
      pass

  def result(self):
      correct_num = np.sum(
            np.array(self.pred_list) == np.array(self.label_list))
      return correct_num / self.samples

```
### 4.Use the customized data loader and metric for quantization
```python
quantizer = Quantization('./conf.yaml')
dataset = Dataset()
quantizer.metric = common.Metric(MyMetric, 'hello_metric')
quantizer.calib_dataloader = common.DataLoader(dataset, batch_size=1)
quantizer.eval_dataloader = common.DataLoader(dataset, batch_size=1)
quantizer.model = common.Model('../models/saved_model')
q_model = quantizer()

```

### 5. Run quantized model
please get the input and output op name from nc_workspace/tensorflow/hello_world/deploy.yaml
```yaml
model:
  name: hello_world
  framework: tensorflow
  inputs:
  - input
  outputs:
  - output
```
Run inference on the quantized model
```python
import tensorflow as tf
with tf.compat.v1.Graph().as_default(), tf.compat.v1.Session() as sess:
     tf.compat.v1.import_graph_def(q_model.graph_def, name='')
     styled_image = sess.run(['output:0'], feed_dict={'input:0':dataset.test_images})
     print("Inference is done.")
```

detected_licenses: MIT Intel Apache-2.0


text:
# Deployment

## Dokku

If you deploy this app via Dokku, you'll need to add some environment variables (via `dokku config:set`)

- `GRADLE_TASK=assemble`
  - By default, the Gradle buildpack tries to execute a Gradle task called `stage`, and fails if it can't find it.
  - The [Heroku documentation](https://devcenter.heroku.com/articles/deploying-gradle-apps-on-heroku#using-webapp-runner-to-deploy-war-files) suggests adding this `stage` task, whereas the [Grails documentation](https://docs.grails.org/latest/guide/deployment.html) suggests executing the Gradle task `assemble`.
  - I tried the “Heroku way” first, but encountered serious issues (see below) which I could not solve, so I went the “Grails way”.
  Therefore, we need to set the `GRADLE_TASK` environment variable.
- `GRADLE_OPTS=-Dfile.encoding=UTF-8`
  - `.properties` files with `UTF-8` characters work in Java 9+, but we still need to tell Gradle that the files are encoding in `UTF-8` ([source](https://stackoverflow.com/questions/21267234/show-utf-8-text-properly-in-gradle)).
- `JDBC_DATABASE_URL="jdbc:postgres://<host>:5432/<database>?user=<username>&password=<password>"`
  - Even though Dokku automatically sets the `DATABASE_URL` env variable, it's not in the right format (`postgres://<username>:<password>@<host>:5432/<database>`).
- If you get the error _Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory()_ during the build, try removing the folder `/home/dokku/covers/cache/`.
  - Since I moved from Grails 3 / Gradle 3.5 to Grails 4 / Gradle 5, it's possible that the old files interfered with the new ones.
  - In my case, it was _not_ a permissions problem [as described here](https://stackoverflow.com/questions/30840526/gradle-could-not-create-service-of-type-initscripthandler-using-buildscopeservic), so setting `GRADLE_USER_HOME` was useless.

### Webapp-Runner issues
- https://stackoverflow.com/questions/54702195/heroku-wardeploy-java-util-concurrent-executionexception
- https://github.com/heroku/webapp-runner/issues/133
- https://github.com/grails/grails-core/issues/11289

repository: Poitrin/covers

repo_name: Poitrin/covers


text:
### [CVE-2017-20159](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-20159)
![](https://img.shields.io/static/v1?label=Product&message=Keynote&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=%3D%200.x%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-79%20Cross%20Site%20Scripting&color=brighgreen)

### Description

A vulnerability was found in rf Keynote up to 0.x. It has been rated as problematic. Affected by this issue is some unknown functionality of the file lib/keynote/rumble.rb. The manipulation of the argument value leads to cross site scripting. The attack may be launched remotely. Upgrading to version 1.0.0 is able to address this issue. The name of the patch is 05be4356b0a6ca7de48da926a9b997beb5ffeb4a. It is recommended to upgrade the affected component. VDB-217142 is the identifier assigned to this vulnerability.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/Live-Hack-CVE/CVE-2017-20159

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
In the project directory, you can run:

### `npm install`
### `npm start`

Runs the app in the development mode.

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

The page will reload if you make edits.

You will also see any lint errors in the console.

repository: fusionat/ReactPomodoro

repo_name: fusionat/ReactPomodoro


text:
# fuzzy-select

Like [selecta][1], but uses dynamic programming and written in JS

## Installation

Download node at [nodejs.org](http://nodejs.org) and install it, if you haven't already.

```sh
[sudo] npm install fuzzy-select -g
```

## Usage example

find . | fuzzy-select > result.txt

## License

ISC

[1]: https://github.com/garybernhardt/selecta

license: ISC

repository: spion/fuzzy-select

repo_name: spion/fuzzy-select


text:
# generator-microservice-catalog

> A [Yeoman](http://yeoman.io) generator for spinning up Express web-server projects, specifically scaffolding microservice endpoints that can then be hooked up to real back-end systems.

## Getting Started

You'll need NodeJS installed before you can install/run this project. Head over to XYZ and install NodeJS if you don't have it already.

With NodeJS installed, run the following to install Yeoman:

```bash
npm install -g yo
```

Next, run the following to install generator-microservice-catalog from npm:

```bash
npm install -g generator-microservice-catalog
```

## Runnning generator-microservice-catalog

Simple - initiate the generator:

```bash
yo microservice-catalog
```

To generate new endpoints:

```bash
yo microservice-catalog:endpoint <NAME>
```

Where <NAME> is the name of the endpoint. You'll be asked what methods to create (GET/POST/DELETE/etc)

### Running the project in your browser

From the directory in which you've run `yo`, run `node app` to fire up the microservice catalog you've created. Next, open up a web browser to `localhost:8080`

### Getting To Know Yeoman

If you'd like to get to know Yeoman better, check out the complete [Getting Started Guide](https://github.com/yeoman/yeoman/wiki/Getting-Started).

## License

MIT


text:
---
layout: post
title:  "HTTPS for Multiple domains using GitHub pages"
date:   2021-02-22 15:00:00 -0600
category: Blog
tags: [web, github, nginx]
excerpt: "In today's modern Internet, nearly all browsers show a big warning when viewing an insecure/non-ssl site. If you own a single domain name and use [GitHub Pages](https://pages.github.com/) to host your site, this is a simple matter to resolve. So what happens if you own multiple domains that point to the same site?"
---
## Summary

***UPDATE:3/16/2021*** I found a very annoying bug with this deployment pattern. See the update here: [Rewriting URLs with Nginx]({% post_url 2021-03-16-nginx-url-rewrites %})

In today's modern Internet, nearly all browsers show a big warning when viewing an insecure/non-ssl site. If you own a single domain name and use [GitHub Pages](https://pages.github.com/) to host your site, this is a simple matter to resolve. One can easily navigate to the project settings (`https://github.com/<USERNAME>/<USERNAME>.github.io/`) and tick the `Enforce HTTPS` setting.

So what happens if you own multiple domains that point to the same site? Now we have a bit of a mess to untangle.

If this was a high volume or mission-critical site, I would use fit-for-purpose tooling with load balancers, CDNs, geo-redundant hosts, etc. But what about a simple page that doesn't get a lot of traffic?

How can we do it on the cheap?

## Problem

Let's take a look at my needs:

* My primary site, [dxrf.com](https://dxrf.com), is [Jekyll](https://jekyllrb.com/) based and is hosted as a [GitHub Pages](https://pages.github.com/) site.
* I own 4 different domains that have served in various capacities over the years. As it stands right now, I want all 4 to redirect to my primary site.
* I want SSL certificates in place so HTTPS requests are redirected without warning/errors
* Low cost. I don't mind paying a few bucks for my needs but I don't want any expensive load balancers, app gateways, or CDN subscriptions.
* I want to learn something through the process.

## Solution

I settled on running a micro VM in a cloud subscription with [Nginx](https://www.nginx.com) serving redirects. The VM is super cheap, can handle multiple domains, and Nginx is compatible with [Certbot](https://certbot.eff.org/) so I automate the SSL enrollment/renewal process.

Let's look at the high level steps needed. This assumes you have GitHub pages working with your primary custom domain.

1. Provision VM with public IP address and ports 80-443 open
1. Install Nginx and provision virtual hosts for each domain name ([Virtual Server How-to](https://linuxize.com/post/how-to-set-up-nginx-server-blocks-on-ubuntu-18-04/))
1. ~~in the virtual host root directory `/var/www/domain.tld/html`, create an `index.html` page with a meta-refresh (see example below)~~ - Don't do this...
1. Update apex and `www` DNS records to point to VM's public IP.
1. Run [Certbot](https://certbot.eff.org/lets-encrypt/ubuntubionic-nginx) to generate SSL certificates

***Don't use this refresh, use the url rewrite from the link above***

Example `index.html`

```html
<!DOCTYPE html>
<html>
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Redirecting to https://dxrf.com</title>
    <meta http-equiv="refresh" content="0; URL=https://dxrf.com">
  </head>

  <link rel="canonical" href="https://dxrf.com">
</html>
```

## Notes/To-do's

There are a few caveats to this pattern a few things I still need to iron out.

* If the VM goes down, all but the primary domain will stop working as there's nothing to redirect the request. If downtime isn't something your site can tolerate, consider other hosting methods/patterns.
* [Let's Encrypt](https://letsencrypt.org/) certificates are only good for 90 days so we'll need something to auto-renew
* Since this is a single VM exposed to the Internet, make sure it stays up to date to reduce the risk of someone hijacking your server and sending your traffic elsewhere (or worse, making your site serve malware).

To-do List

* Automate VM and cloud infra provisioning (e.g. terraform)
* Automate Nginx config (e.g. chef/ansible)
* Automate certbot auto-renewal
* ~~Add Nginx config to redirect 404's to primary site (e.g. `http://www.otherdomain.com/FileThatDoesntExist.html` -> `https://dxrf.com`)~~ - DONE

## Closing

While these aren't step-by-step directions, hopefully it's enough for someone else to solve the same problem I had. If you have any questions or feedback, please feel free to contact me: [@jamesmassardo](https://twitter.com/jamesmassardo)

gha_language: SCSS

gha_license_id: NOASSERTION


text:
# Contributing

Want to contribute? Here are some ideas:

 - write faster and more robust chord identification algorithms;
 - come up with some amazing new functionality;
 - test, test, test, report issues, and write more tests!

Pull requests are always welcome!

## Guidelines

### Testing

Make sure you didn't break existing tests:

```
python3 -m unittest tests.tests
```

Make sure you write tests for newly added features.
You can use a coverage tool to see if there's some untested code, e.g.:

```
coverage run -m unittest tests.tests

# generate report:
coverage report

# generate html report:
coverage html
```

### Style

Use `flake8` to make sure code style conforms to PEP 8.

repository: fferri/musthe

repo_name: fferri/musthe


text:
# Add Mapzen Turn-by-Turn routing to a map

Mapzen Turn-by-Turn, which is a routing service powered by the Valhalla engine, adds routing and navigation to web or mobile applications. The service works globally, and provides dynamic and customizable routing by driving, walking, using multimodal and transit options, or bicycling, with clear directions for maneuvers along the route. In this walkthrough, you will learn how to make a map featuring Mapzen Turn-by-Turn. The map you create will provide:

- a route line between map locations (also known as waypoints)
- a text narrative of maneuvers to perform on the route
- distances along your route and estimated travel times
- functionality to drag the route start and endpoints to get a different path
- the ability change the mode of transportation, such as automobile, bicycle, pedestrian, or multimodal

## Get ready for the tutorial

In this tutorial, you will be planning a family [vacation](https://en.wikipedia.org/wiki/National_Lampoon%27s_Vacation) for travel by car from your home of Chicago, Illinois to visit a popular theme park in Anaheim, California. In your code, you will enter the start and end points of your trip and Mapzen Turn-by-Turn will calculate the route.

To complete the tutorial, you should have some familiarity with HTML and JavaScript, although all the source code is provided. You also need a Mapzen API key, which you can get by following the steps in the Mapzen [developer overview](https://mapzen.com/documentation/overview/).

You can use any text editor and operating system, but must maintain an Internet connection while you are working. The [Mapzen developer guide](https://mapzen.com/documentation/guides/install-text-editor/) has recommendations for text editors. The tutorial should take about an hour to complete.

## Create an index page

You are ready to start building your map.

1. Start your text editor with a blank document and copy and paste the following HTML. (Note: If the text editor you are using requires you to name and save a document at the time when it is first created, call the file `index.html`.)
2. Add the basic HTML tags, including `<!DOCTYPE HTML>`, `<html>`, `<head>`, and `<body>`. Your HTML might look like this:

    ```html
    <!DOCTYPE html>
    <html>
    <head>
    </head>
    <body>
    </body>
    </html>
    ```

    These form the basic structure of an HTML document. `<!DOCTYPE html>` goes at the top of every HTML page and indicates that it is written for HTML5, and the `<html>` tags tell your browser that the content is HTML. The `<head>` tag contains the title for the page and other metadata about the page, while the `<body>` is where you add the code and the rest of the content on your page. There are many [web tutorials](http://www.w3schools.com/html/default.asp) available to help you experiment with and learn more about HTML documents and the tags in them.

3. In the `<head>` tag, add a title, such as `<title>My Routing Map</title>`.
4. On the next line, add a metadata tag so you can properly display diacritics and characters from different languages.

    ```html
    <meta charset="utf-8">
    ```

5. Name your the document `index.html` (where the file name is `index` and the type is `.html`) and save it.

 Drag your index.html file onto a web browser tab. It should show your title, `My Routing Map`, but the web page canvas will be blank.

![Browser tab with title](images/local-browser.png)

## Add references to CSS and JavaScript files

A cascading style sheet (CSS) is used to style a webpage, including layout and fonts, and JavaScript adds functionality to the page. In your `index.html` file, you need to list the CSS and JavaScript files needed to build your page.

When you request a route from Mapzen Turn-by-Turn, you are sending and receiving [JSON](https://en.wikipedia.org/wiki/JSON), which is a human-readable text format. This JSON can then be drawn on a map and shown as instructions for maneuvers along the route. The [Leaflet JavaScript library](http://leafletjs.com/) provides tools for building an interactive map for web and mobile devices. Leaflet is extensible, and developers have built additional tools for Leaflet maps.

Because you are working with several external cascading style sheet (CSS) and JavaScript files, you need to add references to them in your index.html file. You will need to add these into the `<head>` and `<body>` sections of the index.html. In addition, you will reference the [mapzen.js library](https://www.mapzen.com/documentation/mapzen-js/), which simplifies the process of using Mapzen's maps within Leaflet. Mapzen.js contains all the Leaflet functionality, as well as additional tools for working with Mapzen maps.

You are linking to these CSS and JS files from a remote website, rather than from a file on your machine. You can also download the source files or install them through a package manager if you prefer to use a local copy.

1. In index.html, in the `<head>` section, add a reference to the Mapzen CSS file.

    ```html
    <link rel="stylesheet" href="https://mapzen.com/js/mapzen.css">
    ```

2. In the `<head>` section, add a reference to the Mapzen CSS file.

    ```html
    <link rel="stylesheet"<EMAIL_ADDRESS>    ```

3. In the `<body>` section, add the mapzen.js JavaScript file.

    ```html
    <script src="https://mapzen.com/js/mapzen.js"></script>
    ```

5. In the `<body>` section, add the Leaflet Routing Machine JavaScript file. This is a plug-in to Leaflet to add routing functionality.

    ```html
    <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-routing-machine/3.2.5/leaflet-routing-machine.min.js"></script>
    ```

6. In the `<body>` section, add the Mapzen routing JavaScript file, which extends the Leaflet Routing Machine to support Mapzen Turn-by-Turn.

    ```html
    <script<EMAIL_ADDRESS>    ```

7. Save your edits and refresh the browser.

After adding these, your index.html file should look something like this. Note that JavaScript can be inserted in either the `<head>` or the `<body>`, but the `<body>` may improve loading of the page.

```html
<!DOCTYPE html>
<html>
<head>
  <title>My Routing Map</title>
  <meta charset="utf-8">
  <link rel="stylesheet" href="https://mapzen.com/js/mapzen.css">
  <link rel="stylesheet"<EMAIL_ADDRESS></head>
<body>
  <script src="https://mapzen.com/js/mapzen.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-routing-machine/3.2.5/leaflet-routing-machine.min.js"></script>
  <script<EMAIL_ADDRESS></body>
</html>
```

At this point, your browser page is still empty. As you are working, it’s a good idea to save your edits and periodically reload the browser page. This helps you identify problems quicker and trace them back to your most recent changes. If you open the developer tools console in your browser and see a 404 error, it often means that the file cannot be found. You should make sure the paths in your HTML are correct before you continue further.

## Add a map to the page

To display a map on a page, you need a `<div>` element with an ID value, as well as a size for the box containing the map. If you want to know more about initializing a map, see the [mapzen.js documentation](https://mapzen.com/documentation/mapzen-js/get-started/).

1. At the bottom of the `<head>` section, add a `<style>` tag and the following size attributes to set the size of the map.

    ```html
    <style>
      #map {
        height: 100%;
        width: 100%;
        position: absolute;
      }
    </style>
    ```

2. At the top of the `<body>` section, add the `<div>`.

    ```html
    <div id="map"></div>
    ```

3. Directly after the other `<script>` references, add this JavaScript code within a `<script>` tag to initialize a map. The `"your-mapzen-api-key"` text is a placeholder for your actual Mapzen API key; paste your own API key inside the quotation marks. You can get an API key by following the steps in the Mapzen [developer overview](https://mapzen.com/documentation/overview/).

  ```html
  <script>
    L.Mapzen.apiKey = "your-mapzen-api-key"; // paste your actual API key here

    var map = L.Mapzen.map("map", {
      center: [41.8758,-87.6189],
      zoom: 16
    });
  </script>
  ```

`L.xxxxx` is a convention used with the Leaflet API. To make sure the scripts load in the proper order, this code must be placed after the dependencies.

The `center: [41.8758,-87.6189]` parameter sets the center point of the map, in decimal degrees, in Chicago, Illinois.

The next line sets the `zoom` level, which is like a map scale or resolution, where a smaller value shows a larger area in less detail, and a larger zoom level value depicts smaller area in great detail.

4. Save your edits and refresh the browser. You should see a gray canvas with zoom controls and a Leaflet attribution in the bottom corner.

    ![Initial map showing Chicago area](images/browser-initial-map.png)

Your `<body>` section should look like this:

```html
[...]
<body>
  <div id="map"></div>
  <script src="https://mapzen.com/js/mapzen.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-routing-machine/3.2.5/leaflet-routing-machine.min.js"></script>
  <script<EMAIL_ADDRESS>  <script>
    L.Mapzen.apiKey = "your-mapzen-api-key"; // paste your actual API key here

    var map = L.Mapzen.map("map", {
      center: [41.8758,-87.6189],
      zoom: 16
    });
  </script>
</body>
[...]
```

If your map is not loading properly, first check the browser console for status messages and resolve any 404 errors. You can also copy the example source code at the end of the section in case you mistyped any of the steps. If your project worked until now, ensure that your browser has WebGL support enabled (although it is unusual for it to be turned off) or turn on the developer tools in your browser to see if you can debug further. If you are still having trouble, add an issue to the [documentation GitHub repository](https://github.com/valhalla/valhalla-docs/issues) so it can be investigated.

## Add waypoints for routing

So far, you have referenced the necessary files and initialized a map on the page. Now, you are ready to add the routing code to your page.

In the simplest implementation, your map will not provide the ability to search for places through geocoding or inputting coordinates otherwise. Therefore, you need to set the waypoints in your code. As you add functionality to your web page, you can set the initial coordinates through user interaction.

1. Add `//` at the beginning of the `center: [41.8758,-87.6189],` line to comment out that code. You no longer need to set the extent manually like this because the routing environment will be specifying it.

    ```js
    //center: [41.8758,-87.6189],
    ```

2. Inside the `<script>` tag, but after the closing `});` you added in the previous section, initialize routing with the following code. You can substitute your own coordinates for the start and end locations of the routing. These coordinates take you from Chicago, Illinois, to the entrance gates of the theme park in Anaheim, California.

    ```js
    L.Routing.control({
      waypoints: [
        L.latLng(41.8758,-87.6189),
        L.latLng(33.8128,-117.9259)
      ],
      router: L.Routing.mapzen("your-mapzen-api-key", {costing:"your-routing-mode"}),
      formatter: new L.Routing.mapzenFormatter(),
      summaryTemplate:'<div class="start">{name}</div><div class="info {costing}">{distance}, {time}</div>',
      routeWhileDragging: false
    }).addTo(map);
    ```

You are using Mapzen Turn-by-Turn as the routing engine by setting the `router:` to Mapzen and initializing a `formatter:` with functions for units and other conversions. By including a `summaryTemplate`, the directions can include totals of the length and expected time en route. Note that the `router:` has two items with placeholders; you will update these in the next steps.

3. Change the options for `"your-mapzen-api-key"` to your actual API key, and update the transportation mode `{costing:"your-routing-mode"}` to `{costing:"auto"}` to perform routing by automobile, again maintaining the quotation marks.

    ```js
    router: L.Routing.mapzen("your-mapzen-api-key", {costing:"auto"}),
    ```

5. Save your edits and refresh the browser. You should see a map, the route line, and icons and summary text in the narration box.

    ![Map showing Mapzen Turn-by-Turn route and directions](images/route-map-valhalla.png)

The `<body>` section should look something like this, but with your own API key for the `router`:

```html
[...]
<body>
  <div id="map"></div>
  <script src="https://mapzen.com/js/mapzen.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-routing-machine/3.2.5/leaflet-routing-machine.min.js"></script>
  <script<EMAIL_ADDRESS>  <script>
    L.Mapzen.apiKey = "your-mapzen-api-key"; // paste your actual API key here

    var map = L.Mapzen.map("map", {
      // center: [41.8758,-87.6189],
      zoom: 16
    });

    L.Routing.control({
      waypoints: [
        L.latLng(41.8758,-87.6189),
        L.latLng(33.8128,-117.9259)
      ],
      router: L.Routing.mapzen("your-mapzen-api-key", {costing:"your-routing-mode"}), //paste your actual API key here and update the costing to "auto"
      formatter: new L.Routing.mapzenFormatter(),
      summaryTemplate:'<div class="start">{name}</div><div class="info {costing}">{distance}, {time}</div>',
      routeWhileDragging: false
    }).addTo(map);
  </script>
</body>
[...]
```

Mapzen Turn-by-Turn also provides the ability to specify additional waypoints through which your route should pass, such as visiting family in Kansas and Arizona and bobbing your head at Grand Canyon National Park. Currently, you can drag the start and end points (and add waypoints in between) to update the routing, but the route will not be recalculated until you drop the points. On your own, you can set the option for `routeWhileDragging` to `true` if you want to update the route while moving points on the map, although this can be slow and costly to make many queries. You can read more about the options available for `L.Routing.control` in the [Leaflet Routing Machine API documentation](http://www.liedman.net/leaflet-routing-machine/api/).

## Change the route line color

The symbols for the map are defined in the basemap, but the route line may be hard to distinguish from the roads in your map. You can use `L.routing.control` to update the color of the route line.

1. After the closing line of the `waypoints:` block and immediately before the `router:` block, insert the following source code:

    ```js
    lineOptions: {
      styles: [ {color: "white",opacity: 0.8, weight: 12},
              {color: "#2676C6", opacity: 1, weight: 6}
    ]},
    ```

2. Save your edits and refresh the browser. The line should change to blue and look thicker than before.

    ![Map showing updated route line color](images/route-map-valhalla-line-color.png)

3. Click through the points in the directions list to pan and zoom the map to the location of each maneuver, including your destination.

    ![Arrival at your destination](images/route-map-valhalla-destination.png)

The `<body>` section should look something like this, but with your own API key for the `router`:

```html
<!DOCTYPE html>
<html>
<head>
  <title>My Routing Map</title>
  <meta charset="utf-8">
  <link rel="stylesheet" href="https://mapzen.com/js/mapzen.css">
  <link rel="stylesheet"<EMAIL_ADDRESS>  <style>
    #map {
      height: 100%;
      width: 100%;
      position: absolute;
    }
  </style>
</head>
<body>
  <div id="map"></div>
  <script src="https://mapzen.com/js/mapzen.js"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet-routing-machine/3.2.5/leaflet-routing-machine.min.js"></script>
  <script<EMAIL_ADDRESS>  <script>
    L.Mapzen.apiKey = "your-mapzen-api-key"; // paste your actual API key here

    var map = L.Mapzen.map("map", {
      // center: [41.8758,-87.6189],
      zoom: 16
    });

    L.Routing.control({
      waypoints: [
        L.latLng(41.8758,-87.6189),
        L.latLng(33.8128,-117.9259)
      ],
      lineOptions: {
        styles: [ {color: "white",opacity: 0.8, weight: 12},
                {color: "#2676C6", opacity: 1, weight: 6}
      ]},
      router: L.Routing.mapzen("your-mapzen-api-key", {costing:"auto"}), // paste your actual API key here
      formatter: new L.Routing.mapzenFormatter(),
      summaryTemplate:'<div class="start">{name}</div><div class="info {costing}">{distance}, {time}</div>',
      routeWhileDragging: false
    }).addTo(map);
  </script>
</body>
</html>
```

## Tutorial summary and next steps

In this tutorial, you learned the basics of making a map with Mapzen Turn-by-Turn routing. You can now take what you have learned and add more functionality to your map and embed it in your own projects. For example, you may want to add code to allow the user to pick routing locations with a button, change the costing mode used for routing, or set other options. Each of the routing modes Mapzen Turn-by-Turn supports has many options that can be used to influence the output route and estimated time. For example, automobile routing allows you to set penalties and costs to avoid toll roads or crossing international borders, and bicycle routing allows you to specify the category of bicycle so you are routed on appropriate paths for your equipment.

You can review the [documentation](https://mapzen.com/documentation/turn-by-turn/) to learn more about routing with Mapzen Turn-by-Turn.

repository: mxndrwgrdnr/valhalla-docs

repo_name: mxndrwgrdnr/valhalla-docs


text:
---
date: 2010-07-29 11:44:44+00:00
excerpt: None
slug: using-photoshop-like-a-real-web-design
template: single.html
title: Photoshop like a Real Designer
---

There has been a lot of debate recently in the web design social networks about whether a web designer should be able to code. I didn't contribute much to the question because the answer is **obviously yes**, but I did think long and hard about my own practices.

Today Smashing Magazine published a great article by Thomas Giannattasio, [*"In Defense of Photoshop"*](http://www.smashingmagazine.com/2010/07/29/in-defense-of-photoshop/). He raises the point that:

Photoshop can be used to create impeccable designs, but after hours of hard work, you end up with a static mock-up that is incapable of emulating the experience one gets when the design is converted to mark-up and viewed in the browser.

And this would be my main point if I were to articulate an argument on why web designers should be able to code. Simply put, if you can't code and don't understand HTML and CSS - **you are not designing a website**.

In the article linked above Giannattasio makes an excellent feature suggestion for Photoshop allowing users to *'shop* semantically closer to the DOM and CSS properties available. I don't know why Adobe haven't been innovating features like this for years. It would definitely aid those '*web designers*' who can't code. It would simplfy things for pros too but in truth a professional web designer should be able to:

* Keep a running mental visualisation of the DOM as the design evolves.
* Understand the limitations of HTML/CSS and browser quirks.
* Know exactly what mark-up and styling will be needed to create each element.
* Know exactly how raster images will be implemented.
* Know exactly how the page is going to flow and transform at different resolutions.

If you can't do these things you are not designing a website. **Don't blame the tools.** While the CSS idea in Photoshop could be helpful it isn't necessary (or relevant to the software). You should already know what techniques to use to mimic CSS (hint: *blending options*, not *filters*).

There are many comments on Giannattasio's article suggesting that 'design' should be an entirely different step to 'development'. From the clients point of view this is true but from a production point of view it doesn't really matter. If you know how to build a website you can design one freely in whatever software suits you.

**Understand development and you can realise greater potential with design.**

repository: tied/DevArtifacts

repo_name: tied/DevArtifacts


text:
---
layout:     post
title:      "Rules I follow to write good code"
date:       2020-11-17 12:58:51 -0300
comments:   true
---

What is good code? To me, good code is code that's simple; easy to understand, follow
and change if required. And so, how can we write "good code"? Let's see some of
the basics.

## Names

Naming is one of the most important aspects of good code and it's hard. Let's
see an example:

```c
int valid(int n)
{
    int x = 18;
    return n > x;
}
```

Ok, so we got a function that by just looking at the name it doesn't tell us
much, and this to me is a red flag. A function should be able to tell me
exactly what it does. I do want to want to empathize on "what", not "how". As
an example, if I got a function `walk`, I don't wanna know the details, I don't
wanna know the inner details you do, I'm just interested in the action itself.

Going back to the previous example, let's see how can we improve it.

```c
int can_drive(int age)
{
    int min_legal_age = 18;
    return age > min_legal_age;
}
```

Perfect, short and sweet. I can tell exactly what this function is for without
even having to look at the function's body. And if I do, if I do check into the
inner details it's quite easy to understand the criteria.

## Comments

I used to believe on "good code doesn't need comments; the code itself is
the documentation". And, well as you probably guest, it's not how the world works.
Comments are a must, but you have to know what type of comments you need.

```c
// defines variable life and assigns the value 42
int life_meaning = 42;
```

This comment, doesn't serve any purpose at all. But what about the next one?

```c
// The value 42 was calculated to be
// the meaning of life. Read more on
// www.google.com/meaning/of/life
int life_meaning = 42;
```

## Short functions and single responsibility?

Short functions are nice when they improve readability. But, single
responsibility is a must for good code. It's what allows you to build
complex systems using understandable blocks of code, almost like if you
were writing a recipe or a list of actions.

```c
void do_fry_egg(int how_many)
{
    int gas_off = 0;
    int gas_on = 1;
    int five_minutes = 300;

    turn_gas(gas_on);
    place_pan_on_gas();
    add_oil();
    break_eggs_in_pan(how_many);
    wait_for(five_minutes);
    remove_pan_from_gas();
    serve_eggs();
    turn_gas(gas_off);
}
```

Notice how each function seems to do one thing and only one thing. And that
allows us to build the entire function using blocks; predictable and understandable
blocks without surprises in the middle. What I mean by this is, imagine if,
`turn_gas(on)` not only turns the gas but also places a pan on it. That's the kind
of surprise I'm referring to. Don't think I'm crazy, these types of scenarios are quite
common in the real world.

## Using parameters correctly

Usually, functions need external values and we tend to send those using parameters.
But, have you thought on what's the minimum you need for a function to
do it's job? because that's exactly what you should be sending and nothing more.

```c
int transfer_money(struct User* from, struct User* to, int amount)
{
    if (!has_enough_money(from->bank_account, amount)) {
        return 0;
    }

    transfer(from->bank_account, to->bank_account, amount);
}
```

Notice how in this function we are only using the property `bank_account` from
the users, so, why are we passing or requesting the entire `User` struct? wouldn't
it be better to just send the bank account numbers?

```c
int transfer_money(int bank_account_from, int bank_account_to, int amount)
{
    if (!has_enough_money(bank_account_from, amount)) {
        return 0;
    }

    transfer(bank_account_from, bank_account_to, amount);
}
```

There. Just think about the minimum you need for the function to do its job.
Don't over-analyze it and don't fall for traps such as, "well, what if tomorrow
I need to log what's user sends the transaction?" because that's a rabbit hole.
There will always be a "what if". If you need to pass too much data, it may mean
you are doing too much in a single function.

Now, just for fun, let's go to the previous example, what if I do really need to log
transfers. The client sent a new requirement and now, we need to log it. Well,
block by block you can build complex systems :)

```c
int transfer_money(int bank_account_from, int bank_account_to, int amount)
{
    ...
}

int log_transfer_money(char *from, char *to, int amount)
{
    log("Customer %s has transferred to %s the amount of %d", from, to, amount);
}

int transfer_money_logging_operation(struct User *from, struct User *to, int amount)
{
    int transfer_succeed = transfer_money(from->bank_account, to->bank_account, amount);

    if (!transfer_succeed) {
        return 0;
    }

    log_transfer_money(from->name, to->name, amount);

    return 1;
}
```

This seems like a good chunk of code to practice our documentation skills.

```c
/**
 * Transfer money from customer to another customer.
 * It will return 1 if the operation succeed.
 * If the operation fails (maybe the customer doesn't have sufficient funds), 0 will be returned
 * This function shouldn't be used directly since it won't leave any
 * logs of the operation in the system, instead, use @transfer_money_logging_operation
 */
int transfer_money(int bank_account_from, int bank_account_to, int amount);

/**
 * Log money transfer operation.
 * In this application, it is required that every single money transaction
 * must be logged so make good use of this function
 */
int log_transfer_money(char *from, char *to, int amount);

/**
 * Helper function to transfer money and log the operation if it succeed.
 * It will return 1 if the operation succeed, 0 otherwise.
 * Check @transfer_money for possible failure cases
 */
int transfer_money_logging_operation(struct User *from, struct User *to, int amount);
```

## Using data structures

You need to know your data structures to be able to choose the right one for
the proper job. If you do so, you will find out your job gets easier and, it
may even perform better than expected. Choose the wrong data structure and
it will quite likely be hell.

Thinking in data structures can also help you to solve problems. When you are
stuck in a problem think, what data structure could be good here? it may
give you an insight into the problem.

## That's it for today

In the next article I would love to touch on some design patterns but time will
tell. I hope some of these basics tips were useful to you!


text:
# PolyBot
Poly bot is a discord bot that provides all type of conversions (I.E. language, measurements, etc)

Poly bot aims to allow users in a discord server to convert any values into a desired type of measurement!

Hosted via AWS:
[Invite the bot to your server!](https://discord.com/oauth2/authorize?client_id=619763426402631700&scope=bot&permissions=8&response_type=code)

## Features
- Currency Conversion
- Hexadecimal Conversion
- Binary Conversion
- Translations
- Eight ball
- Coin Flip
- Dice roll
- Roll Command

## Gallery
![gallery](https://media.discordapp.net/attachments/631249406775132182/799770724591468604/3443bba7bace8052f9f17eeabf15d653.png)

![help_command](https://cdn.discordapp.com/attachments/631249406775132182/799771101143498752/8fe54bc717cdd0cd489f164f149ac32f.png)

## Set-up For Testing
Windows:
1. Install Python 3.6+
2. Run `setup.bat`
    - This creates a local virtual environment, and adds the required dependencies
3. Either run `src/main.py` manually, or use `start.bat`

## About Commit 334c4f1
[CVE-2021-21330 - GitHub Advisory Database](https://github.com/advisories/GHSA-v6wp-4m6f-gcjg)
Following the release of the advisory (see above), we have updated dependencies to include the security patch(es).

#### If you cloned/downloaded PolyBot prior to this commit, please update ASAP!

*Note: `aiohttp` is a library used by `discord.py`, which is the basis for most Python-based bots for Discord, including `PolyBot`*.
### To grab the updates (Applicable for all kinds of dependency updates)
1. Perform `git pull`
2. Grab the new dependencies
    - For Global Environment:
      - `pip install -r requirements.txt`
    - For Virtual Environment:
      - `venv/scripts/activate`
      - `pip install -r requirements.txt`

repository: Descended/PolyBot

gha_language: Python

repo_name: Descended/PolyBot


text:
# ⚡ NeoDash - Neo4j Dashboard Builder
NeoDash is a lightweight web app to create Neo4j dashboards.
Writing Cypher is all that's required to build your first dashboard in minutes. Want to give NeoDash a spin right away? Try it [online](https://neodash.graphapp.io/).

You can also install NeoDash on Neo4j Desktop from the [Graph App Gallery](https://install.graphapp.io/).

```
Note: NeoDash is currently being reworked internally to use a modern React architecture. Big code changes coming soon...
```

### Features
- Live reporting on a Neo4j database with a table, graph view, bar chart or line chart.
- Interactively select parameters to be used as query parameters.
- Native support for reporting on Neo4j data types, including nodes, edges, paths, as well as aggregate types.
- Setting auto-refresh intervals for each report.
- Customizing your dashboard layout with a variety of report sizes.
- Saving/loading dashboards as a JSON file.

### Requirements
- Neo4j 4.0 or later
- A modern web-browser / a Neo4j Desktop installation
### Documentation
- For users, see [user-guide.md](./doc/user-guide.md).
- Extending NeoDash? See [developer-guide.md](./doc/developer-guide.md).

repository: saschamcdonald/neodash

repo_name: saschamcdonald/neodash


text:
# Common Information

In addition to the finite-element mesh, PyLith requires files to specify the simulation parameters.
We specify parameters common to all simulations in a directory in `pylithapp.cfg`, which contains numerous comments, so we only summarize the parameters here.

## Metadata, Mesh, and Output

The `pylithapp.metadata` section specifies metadata common to all simulations in the directory.
We control the verbosity of the output written to stdout using `journal.info`.
We set the parameters for importing the finite-element mesh in `pylithapp.mesh_generator`.

## Physics

These quasi-static simulations solve the elasticity equation and include a fault, so we have a solution field with both displacement and Lagrange multiplier subfields.
%
\begin{gather}
\vec{s} = \left(\begin{array}{c} \vec{u} \quad \vec{\lambda} \end{array}\right)^T \\
\boldsymbol{\nabla} \cdot \boldsymbol{\sigma}(\vec{u}) = \vec{0}
\end{gather}
%
We use the default `TimeDependent` problem and solution field with a single displacement subfield of basis order 1.
In addition to output of the solution over the domain, we output the solution over the -y and +y boundaries.

```{code-block} cfg
---
caption: Parameters for the solution and output of the solution on the -y and +y boundaries.
---
[pylithapp.problem]
solution = pylith.problems.SolnDispLagrange

[pylithapp.problem]
solution_observers = [domain, top_boundary, bot_boundary]
solution_observers.top_boundary = pylith.meshio.OutputSolnBoundary
solution_observers.bot_boundary = pylith.meshio.OutputSolnBoundary

[pylithapp.problem.solution_observers.top_boundary]
label = boundary_ypos
label_value = 13

[pylithapp.problem.solution_observers.bot_boundary]
label = boundary_yneg
label_value = 12
```

We use the same material properties in all of the simulations in this directory, so we specify them in `pylithapp.cfg` to avoid repeating the information in the file with parameters for each simulation.
We have two materials with a contrast in the shear modulus across the fault.

```{code-block} cfg
---
caption: Material parameters common to all simulations in this directory.
---
[pylithapp.problem]
materials = [elastic_xneg, elastic_xpos]

[pylithapp.problem.materials.elastic_xneg]
description = Material to on the -x side of the fault
label_value = 1

db_auxiliary_field = spatialdata.spatialdb.UniformDB
db_auxiliary_field.description = Elastic properties xneg
db_auxiliary_field.values = [density, vs, vp]
db_auxiliary_field.data = [2500.0*kg/m**3, 3.00*km/s, 5.29*km/s]

auxiliary_subfields.density.basis_order = 0
bulk_rheology.auxiliary_subfields.bulk_modulus.basis_order = 0
bulk_rheology.auxiliary_subfields.shear_modulus.basis_order = 0

derived_subfields.cauchy_strain.basis_order = 0
derived_subfields.cauchy_stress.basis_order = 0

[pylithapp.problem.materials.elastic_xpos]
description = Material to on the +x side of the fault
label_value = 2

db_auxiliary_field = spatialdata.spatialdb.UniformDB
db_auxiliary_field.description = Elastic properties xpos
db_auxiliary_field.values = [density, vs, vp]
db_auxiliary_field.data = [2500.0*kg/m**3, 4.24*km/s, 5.29*km/s]

auxiliary_subfields.density.basis_order = 0
bulk_rheology.auxiliary_subfields.bulk_modulus.basis_order = 0
bulk_rheology.auxiliary_subfields.shear_modulus.basis_order = 0

derived_subfields.cauchy_strain.basis_order = 0
derived_subfields.cauchy_stress.basis_order = 0
```

Similarly, we set the general fault parameters common to all simulations in the directory.

```{code-block} cfg
---
caption: General fault parameters common to all simulations in this directory.
---
[pylithapp.problem]
interfaces = [fault]

[pylithapp.problem.interfaces.fault]
label = fault
label_value = 20

# Output `slip` on the fault.
observers.observer.data_fields = [slip]
```

All simulations in this directory use Dirichlet boundary conditions on the -x and +x boundaries with zero displacements,
%
\begin{gather}
u_x(-50km,y) = 0,\\
u_y(-50km,y) = 0,\\
u_x(+50km,y) = 0,\\
u_y(+50km,y) = 0.
\end{gather}

```{code-block} cfg
---
caption: Dirichlet boundary conditions common to all simulations in this directory.
---
[pylithapp.problem]
bc = [bc_xneg, bc_xpos]
bc.bc_xneg = pylith.bc.DirichletTimeDependent
bc.bc_xpos = pylith.bc.DirichletTimeDependent

[pylithapp.problem.bc.bc_xpos]
label = boundary_xpos
label_value = 11
constrained_dof = [0, 1]
db_auxiliary_field = pylith.bc.ZeroDB
db_auxiliary_field.description = Dirichlet BC +x boundary

[pylithapp.problem.bc.bc_xneg]
label = boundary_xneg
label_value = 10
constrained_dof = [0, 1]
db_auxiliary_field = pylith.bc.ZeroDB
db_auxiliary_field.description = Dirichlet BC -x boundary
```

repository: rwalkerlewis/pylith

repo_name: rwalkerlewis/pylith


text:
# Custom Scripts

We will create some custom scripts that will help us with certain tasks. For this, we'll create the following folder:

```bash
mkdir -p ~/.local/bin
```

Then inside this folder we'll insert all the scripts that we'll add here. Make sure to make them executable with:

```bash
chmod +x <file>
```

## `docker-update`

We'll use this script to manually update *docker-compose* containers.

!!! info "Usage"
    Run `docker-update` inside the folder where `docker-compose.yml` is located to update the container images used.

```bash
#!/bin/bash

echo "Stopping containers..."
docker-compose stop

echo "Removing containers..."
docker-compose rm -f

echo "Pulling images..."
docker-compose pull

echo "Restarting containers..."
docker-compose up -d
```

repository: moonstar-x/server-setup

repo_name: moonstar-x/server-setup


text:
# Sandbox

Starter library for Node.js applications using a flexible Gulp/Babel build system.

## Actively Seeking Beta Tester and Contributors

Try it out and let us know where you run into confusion or problems. Contribute to the [Issues Page](https://github.com/bishopZ/Sandbox/issues), or hit us up to become a code contributor. There are many small improvements you could make that would get your name added to the project!

## File Notes

There are a number of configutation files in the root director.

- `package.json` is the main configuration file
- `Procfile` sets the Heroku startup script
- `app.yaml` configures a basic GCP deploy
- `gulpfile.js` is the flexible Gulp build system
- `.eslintrc` configures what ESLint reports on

The build system is divided into an `application` folder for all your development files, and a `distribution` folder that gets deleted and rebuilt every time you run the development environment.

There is also a `server` folder which holds files for the gulp configuration and Node.js server. All the magic happens in the `/server/gulpConfiguration.js` file.

## Running the Development Environment

Two npm commands are available `npm run dev` will run the development environment, or `npm start` to run the server environment. On your local machine, both will bind to port 8080. This can be changed in the `server/server.js` file.

You must run the development environment to create the distribution files prior to deploying. The application does not build the distribution files on server startup. This creates an extra deploy step, but significantly reduces the servercode footprint.

### [Gulp](https://gulpjs.com/) and [Webpack](https://webpack.github.io/)

With this build system we opted to use Gulp instead of Webpack. [Technically, they do different things](https://stackoverflow.com/questions/33561272/task-runners-gulp-grunt-etc-and-bundlers-webpack-browserify-why-use-toge). Gulp is a task runner that can run multiple build systems such as Babel, Webpack and Browserify. This starter package does not yet include an example of running Webpack with Gulp, but there are [plenty of those available elsewhere](https://webpack.github.io/docs/usage-with-gulp.html).

We like Webpack, but it can be very restrictive and the documentation is [frequently out of date](https://github.com/webpack/webpack/issues/2101). On the other hand, Gulp also comes with some disadvantages. At this point in development, the included Gulp environment will frequently stop running and need to be restarted. Also, becuase of the way the `watch` tasks are setup, the development environment needs to be restarted whenever a new file is added to the application.

In future versions we hope to combine the best of both the Webpack and Gulp worlds.

## Example Projects

Three example projects are included. Project 1 is set as the default project that is shown when the site's root directory is requested (http://localhost:8080/). This can be changed in the `/server/server.js` file.

Each example has a corrisponding object in the `server/gulpConfiguration.js` file. To create a new project folder, create the folder in the `application` folder add a build task to this `gulpConfiguration.js`.

### Example 1: Simple ES6 with EJS and Sass

ES6 build with Babel, which does not support `import` statements. Indead librariesare bundled in with Gulp.

### Example 2: ES6 with Imports

Full ES6 build with support for import statements.

### Example 3: React

An examples of React, Redux, and React Router v4.

## Deploy to [Google Cloud Platform](https://cloud.google.com/)

1.  Install [Node.js](https://nodejs.org/en/).
1.  Install [git](https://git-scm.com/).
1.  Create a [Google Cloud Platform project](https://console.cloud.google.com).
1.  Install the [Google Cloud SDK](https://cloud.google.com/sdk/).

1.  After downloading the SDK, initialize it:

        gcloud init
        git clone https://github.com/bishopZ/Sandbox
        cd Sandbox
        npm install
        npm run dev

1.  View the app at [http://localhost:8080](http://localhost:8080).
1.  Stop the app by pressing `Ctrl+C`.
1.  Deploy the app:

        gcloud app deploy

1.  View the deployed app at [https://YOUR_PROJECT_ID.appspot.com](https://YOUR_PROJECT_ID.appspot.com).

## Deploy to [Heroku](https://www.heroku.com/)

1.  Install [git](https://git-scm.com/).
1.  Install [Heroku Toolbelt](https://devcenter.heroku.com/articles/heroku-cli).
1.  Initialize the Heroku app:

        git clone https://github.com/bishopZ/Sandbox/
        cd Sandbox
        heroku create
        npm install
        npm run dev

1.  View the app at [http://localhost:8080](http://localhost:8080).
1.  Stop the app by pressing `Ctrl+C`.
1.    View the deployed app:

        heroku open

## Contributors

- [Bishop Zareh](http://bishopz.com) http://bishopz.com

repository: bishopZ/Sandbox

gha_language: JavaScript

repo_name: bishopZ/Sandbox


text:
# Enum Processor Plugin

The Enum Processor allows the configuration of value mappings for metric tags or
fields.  The main use-case for this is to rewrite status codes such as _red_,
_amber_ and _green_ by numeric values such as 0, 1, 2. The plugin supports
string, int, float64 and bool types for the field values. Multiple tags or
fields can be configured with separate value mappings for each. Default mapping
values can be configured to be used for all values, which are not contained in
the value_mappings. The processor supports explicit configuration of a
destination tag or field. By default the source tag or field is overwritten.

## Global configuration options <!-- @/docs/includes/plugin_config.md -->

In addition to the plugin-specific configuration settings, plugins support
additional global and plugin configuration settings. These settings are used to
modify metrics, tags, and field or create aliases and configure ordering, etc.
See the [CONFIGURATION.md][CONFIGURATION.md] for more details.

[CONFIGURATION.md]: ../../../docs/CONFIGURATION.md#plugins

## Configuration

```toml @sample.conf
# Map enum values according to given table.
[[processors.enum]]
  [[processors.enum.mapping]]
    ## Name of the field to map. Globs accepted.
    field = "status"

    ## Name of the tag to map. Globs accepted.
    # tag = "status"

    ## Destination tag or field to be used for the mapped value.  By default the
    ## source tag or field is used, overwriting the original value.
    dest = "status_code"

    ## Default value to be used for all values not contained in the mapping
    ## table.  When unset and no match is found, the original field will remain
    ## unmodified and the destination tag or field will not be created.
    # default = 0

    ## Table of mappings
    [processors.enum.mapping.value_mappings]
      green = 1
      amber = 2
      red = 3
```

## Example

```diff
- xyzzy status="green"<PHONE_NUMBER>000000000
+ xyzzy status="green",status_code=1i<PHONE_NUMBER>000000000
```

With unknown value and no default set:

```diff
- xyzzy status="black"<PHONE_NUMBER>000000000
+ xyzzy status="black"<PHONE_NUMBER>000000000
```

repository: influxdata/telegraf

gha_language: Go

repo_name: influxdata/telegraf


text:
# curriculy
 Application in **Kotlin** made for a recruitment task.

 App uses **Picasso** library, **Firebase Realtime Database** and **Android resources** to provide content to show.

To use it, you will need to modify resources in the app.
Create file ```stringsPersonal.xml``` in the ```res/values/``` catalogue.
It should contain ```string``` fields called:
* phone_number
* email_address
* author_name
* summary_info

filled with appropriate for you data.
Change the values inside ```strings.xml``` and ```arrays.xml``` to reflect your own experiences.

You should also provide your own photos and images for logos of the technologies you used and of your own face. All of these files should be added to ```res/drawables/``` folder and the names and references in ```values/arrays.xml``` should be modified accordingly.

Paste your ```google-services.json``` file from Firebase console into the main ```app/``` folder.
In file ```FirebaseHelper.kt``` change the URL in the line:

```val myRef = database.getReferenceFromUrl("https://example.firebaseio.com/experiences")```

to URL of your Realtime Database.

Realtime Database structure is as follows:
```
{
  "experiences" : [
  {
    "company_logo" : "http://example.com/company_logo_1.png",
    "company_name" : "First Company",
    "end_year" : 2018,
    "position_name" : "Position At Company",
    "responsibilities" : [
     "Example responsibility 1",
     "Example responsibility 2"
    ],
    "start_year" : 2016
   },
   {
    "company_logo" : "http://example.com/company_logo_2.png",
    "company_name" : "Second Company",
    "end_year" : 2020,
    "position_name" : "Position At Second Company",
    "responsibilities" : [
      "Responsibility 1",
      "Responisbility 2",
      "Responsibility 3",
      "Responsibility 4"
    ],
    "start_year" : 2018
  }
 ]
}
```

repository: mazabin/curriculy

repo_name: mazabin/curriculy


text:
Introduction
============
This program is a command line utility that can backup Evernote notes and notebooks.

The program is licensed under the MIT license.

Installation
============
## Dependencies (FreeBSD pkg names):
* py27-evernote
* py27-html2text
* py27-beautifulsoup

Usage
=====
```shell
usage: enote [-h] {init,list-notebooks,list-tags,list-notes,download} ...

Command line utility to backup Evernote notes and notebooks.

positional arguments:
  {init,list-notebooks,list-tags,list-notes,download}
    init                Initialize directory and authenticate user
    list-notebooks      List available notebooks
    list-tags           List available tags
    list-notes          List notes
    download            Download notes

optional arguments:
  -h, --help            show this help message and exit
```

## list-notes command
```shell
usage: enote list-notes [-h] [--notebook NOTEBOOK] [--tags TAGS]

optional arguments:
  -h, --help           show this help message and exit
  --notebook NOTEBOOK  Limit search to specified notebook
  --tags TAGS          Limit search to specified tags (comma separated list)
```

## download command
```shell
usage: enote download [-h] [--notebook NOTEBOOK] [--tags TAGS] [--delete]
                      [--incremental]

optional arguments:
  -h, --help           show this help message and exit
  --notebook NOTEBOOK  Limit search to specified notebook
  --tags TAGS          Limit search to specified tags (comma separated list)
  --delete             Delete extraneous files
  --incremental        Only download new notes
```

Contributing
============
Pull requests and issues are welcome. I would specifically like support on implementing a proper OAuth flow.

Know limitations
================
* A maximum of 250 notes per notebook is currently supported

repository: semtle/enote

repo_name: semtle/enote


text:
# Contributing to fklearn

Hello and Welcome to fklearn!

We love pull requests from everyone.
By participating in this project, you agree to abide by our [code of conduct](CODE-OF-CONDUCT.md).

Follow this guide to start contribute to our project [guide](https://fklearn.readthedocs.io/en/latest/contributing.html).

repository: nubank/fklearn

gha_language: Jupyter Notebook

repo_name: nubank/fklearn


text:
---
layout: for-developers
title: "Using NGINX as a reverse proxy"
permalink: self-hosting/css/nginx
tags: [pod-server]

exclude: true
redirect_from:
  - /for-developers/pod-server/nginx
  - /self-hosting/nss/nginx
redirect_to:
  - https://github.com/solid/solidproject.org/wiki/Using-NGINX-as-a-reverse-proxy
---

# Using NGINX as a Reverse Proxy

A reverse proxy allows you to run a Solid server on an internal port
and let the proxy handle traffic to public HTTP and HTTPS ports.
This example below shows one way to achieve this
for the [Community Solid Server](/self-hosting/css).

In the code snippet, we assume that:

- your public URL is `https://solid.example/`
- your server is running on `http://localhost:3000/`
- you have [installed NGINX](https://www.nginx.com/resources/wiki/start/topics/tutorials/install/)
  and its configuration folder is `/etc/nginx/`
- your TLS certificates are stored at `/etc/letsencrypt/live/solid.example/`
  - you can obtain free ones with [Let's Encrypt](https://certbot.eff.org/)

You can replace these values with those of your configuration.

## Configuration

Add a new site to your NGINX configuration
by creating a file
`/etc/nginx/sites-available/solid.example`
with the following contents:

```nginx
# Your local Solid server instance
upstream community-solid-server {
  server <IP_ADDRESS>:3000;
}

# Redirect HTTP to HTTPS
server {
  server_name solid.example;
  listen 80;
  return 301 https://$host$request_uri;
}

# Proxy traffic for https://solid.example/ to http://localhost:3000/
server {
  server_name solid.example;

  # HTTPS certificate setup (can be autogenerated by tools such as certbot)
  listen 443 ssl http2;
  ssl_certificate         /etc/letsencrypt/live/solid.example/fullchain.pem;
  ssl_certificate_key     /etc/letsencrypt/live/solid.example/privkey.pem;
  ssl_trusted_certificate /etc/letsencrypt/live/solid.example/chain.pem;
  include snippets/https.conf;

  # Include this for certificate renewal if you are using Let's Encrypt
  location ^~ /.well-known/acme-challenge/ {
    root /var/www/solid.example; # or a folder of your choice
  }

  # Proxy all other traffic to the Solid server
  location / {
    # Delegate to the Solid server, passing the original host and protocol
    proxy_pass http://community-solid-server$request_uri;
    proxy_set_header X-Forwarded-Host  $host;
    proxy_set_header X-Forwarded-Proto $scheme;

    # Pass these headers from the Solid server back to the client
    proxy_pass_header Server;
    proxy_pass_header Set-Cookie;

    # Enable Websocket support
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";

    # Prevent ETag modification (https://github.com/solid/community-server/issues/1036)
    gzip off;
  }
}
```

We are reusing an HTTPS configuration file at `/etc/nginx/snippets/https.conf`,
which you should [create](https://ssl-config.mozilla.org/) if it does not exist.

# Activating the configuration

Don't forget to restart NGINX to activate the new configuration:

```shell
sudo systemctl restart nginx
```


text:
---
layout: home
header:
  overlay_image: "/assets/img/Irithyll.jpg"

author_profile: true
comments: false
---
Hey, I'm Charles!

I usually go by the handle `serach` or `Corbe4u`.

I'm in my 3rd year studying **Computer Science** (Specialist in Software Engineering) and **Math** major at [**University of Toronto**](https://www.utoronto.ca/).

My major interests are algorithms, software engineering, systems and compilers.
If you're interested, you can check my [projects](/project/).


text:
# Linked data model for EMPlaces

This directory contains [diagrams](PDFs) and [documentation](20180405-EMPlaces-data-model-notes.md) and [sample data](20180410-opole-example-data.ttl) for a proposed linked data model for EMPlaces.

See also [links](Links.md) for related information.

NOTE: this is WORK-IN-PROGRESS, and NOT FINAL.

(In due course, the documentation itself may be moved into this page)

# TODO

- [x] Finalize some URIs to be used
- [x] Finalize prefixes
- [x] Finish assembling example data for Opole
    - [x] Fix structure and vocabulary for bibliography (using BIBO)
    - [x] Historical hierarchies
    - [x] Fix vocabularies for timespans (PeriodO?)
    - [x] Uncertainties, approximations, etc
    - [x] Related resource, include optional license (see LPiF proposal)
        - also, type of resource?
- [x] Pin down location/timespan vocabularies (the structure here follows ideas from Topotime/GeoJSON-LDT (also a work-in-progress?) but the vocabularies haven't yet been checked.)
- [x] Review format for timespan data; align with emerging LPiF activity (loosely aliogned, but not same vocabulary for now)
- [x] Update [Data model notes](./20180405-EMPlaces-data-model-notes.md); resolve remaining TODOs there, as far as possible.
- [x] Generate data from EMLO data
    - first 500 done; awaiting feedback

- [x] note 2 kinds of Julian calendars
    - currently using "Old style" and "New style", but this is probably not enough.
    - suggestion that we might add start-of-year date to calendar details, but even that isn't always enough: in some cases 25 Dec start of year occurs in the year BEFORE that indicated?
    - currently handled in Annalist definitions.  Can revisit later if needed.
- [ ] Review handling of date uncertainty/aprroximation, and how it relates to PGiF proposal to use ISO 8601-2 (https://github.com/LinkedPasts/lpif)
    - currently using LPiF-related structures, rather than ISO date formats
- [ ] Type URIs for places that don't have same kind of info (cf. "related places", 20180726-St-Adalbert-example.ttl)
- [ ] Record metadata design (creator, contributor, license, etc.)
    - waiting to see what Timbuctoo provides
- [ ] Record time periods as identified resources (rather than inline blank nodes)
    - Handled in Annalist data; not yet in Opole example
- [x] URIs for language codes (consider lexvo?)
    - holding pattern in place, and Annalist data. Revisit later.
- [ ] ...

- [x] Decide how to flag "core data" in structures used for both core and additional data (needed for refresh of core data from source).  It seems what is really needed is a reference source indication.
    - A declared set of properties of the central em:Place resource are always core data: see em:Place class declaration.
    - Qualified relations, settings and annotation resources have (optional) em:source properties: the corresponding values are considered to be core data if the `em:source/em:link` value is the same as the place's `em:coreDataRef/em:link` value.
    - Note that the place's `em:coreDataRef/em:link` and corresponding `em:source/em:link` values refer to the gazeteer defining document, not the gazetteer place Id.
- [x] Decide on structure for place categories and annotation types (using skos:Concepts)
- [x] Check that proposed Web Annotation extensions don't break anything (email with Robert Sanderson)
- [x] Update [diagrams](./PDFs/)
- [x] Crosswalk between UI and data model
- [x] Dealing with uncertainty
    - See example, em:competence
    - How to represent?
       - Confidence flag (high/medium/low)? Not really going to work for us?
       - Permutation of (Uncertain, Inferred, Approximate) per EMLO.  But be explicit in all cases.
    - Where to represent: calendars, date of hierarchical relations
    - For places: Uncertain, Inferred
    - For dates: Uncertain, Inferred, Approximate (implicit the timespan value)
- [x] Characterize calendars (inherited calendars; need to materialize for indexing; need source indication that it is inherited)
    - Handled by em:competence
    - general issue here about materialization of inferred/implied/deduced information.
    - note that name attestations are *additions* to the primary info; no such for calendars.
- [x] Review the way that core data is represented

# Notes (questions and ideas)

@@TODO: allocate URIs for attestations (where for our purposes, the oa:Annotation denotes the attestation)?

# Priorities (2018-08-01, 2018-08-14)

1. Modelling of core data to deal with multiple core data sources
    - [x] update diagrams
    - [x] update sample data
2. Need to start getting data into RDF and/or Timbuctoo
    - e.g. 4 more towns like Opole to comparable detail
    - [x] Create Annalist definitions for data entry
3. Bulk data into RDF/Timbuctoo
    - e.g. 2000 places core data from GeoNames
    - [x] update core data extractor to generate multi-source structure
    - [ ] Wikidata cross-referencing for alternate authorities
4. Loose ends
    - [x] Modelling and Opole data
    - [x] Related places
    - [ ] Historical place record: minimum viable information
       - differs from current place
       - discuss with Arno
5. Generate EMPlaces data mapped from Annalist
    - [x] Basic mapping seems to work
    - [x] Figure how to handle local URIs (which are roughly blank nodes) [Note: depends on Annalist code updates in 0.5.13 in development branch]
6. Annalist data
    - [ ] Generate Annalist data from geonames; get full update data
    - [ ] Review Annalist definitions with Arno

- Sample bibliographies to enter
- Dealing with sources (see issues #19, #13, #7 ?)
- Integration of date conversions

## Actions

repository: culturesofknowledge/emplaces

repo_name: culturesofknowledge/emplaces


text:
# MeterBusLibrary
Simple M-Bus connect and parse C# .NET library

Implementation of protocol described on http://www.m-bus.com/

Usage:

Main (and most complex) kind of data from device is VariableData. This data type consisyts of single FixedDataHeader and many VariableData.Item. According to M-Bus protocol documentation this type consists of single data value (of variable length and type) and set of units which describes and specify value units. Direct usage of these data is not easy, so library normalizes most of data with NormalizedValue property.

repository: HiCharlie/MeterBusLibrary

repo_name: HiCharlie/MeterBusLibrary


text:
# postfix-admin

[![version][release-badge]][release]
[![license][license-badge]][license]
[![Scrutinizer Code Quality][scrutinizer-ci-badge]][scrutinizer-ci]
[![composer.lock available][composer-lock-badge]][packagist]
[![build-status][travis-build-badge]][travis-history]

Basic admin interface for postfix service with settings hosted in mysql

http://www.postfix.org/MYSQL_README.html

## Installation

### Development Environment

* install vendor libs: `composer install`
* edit .env file manually
* run migrations: `console/yii migrate`
* run inernal server: `console/yii serve`

### Production Environment

* install vendor libs: `composer install --no-dev`
* register your [environments] in the web server
* run migrations: `console/yii migrate --interactive=0`

## Environments
* Debug settings:
  * YII_DEBUG - (true|false)
  * YII_ENV - system environment (dev|prod)
* Request parameters
  * COOKIE_VALIDATION_KEY - random string, cookie salt
* Uncomment to change site root
  * BASE_URL (optional) - change if admin rood different from the document root
* Database settings
  * DB_DSN - database DSN (e.g. mysql:host=<IP_ADDRESS>;port=3306;dbname=postfix_mailer)
  * DB_USERNAME - database user name
  * DB_PASSWORD - database user password
  * DB_TABLE_PREFIX (optional)

## Command line routines

* `console/yii migrate` - Upgrades the application by applying new migrations
* `console/yii users` - List users
* `console/yii users/disable` - Disable user
* `console/yii users/enable` - Enable user
* `console/yii users/passwd` - Change password

## Development routines
* `vendor/bin/phpcs --ignore=vendor --extensions=php --standard=PSR2 .` - Run PSR checks

[release]: https://github.com/svyatoslav-kubakh/postfix-admin/releases
[release-badge]: https://img.shields.io/github/release/svyatoslav-kubakh/postfix-admin.svg
[license]: ./LICENSE
[license-badge]: https://img.shields.io/badge/license-BSD%202--Clause-lightgrey.svg
[packagist]: https://packagist.org/packages/ksar/postfix-admin
[composer-lock-badge]: https://poser.pugx.org/ksar/postfix-admin/composerlock
[travis-history]: https://travis-ci.org/svyatoslav-kubakh/postfix-admin
[travis-build-badge]: https://travis-ci.org/svyatoslav-kubakh/postfix-admin.svg?branch=master
[scrutinizer-ci-badge]: https://scrutinizer-ci.com/g/svyatoslav-kubakh/postfix-admin/badges/quality-score.png?b=master
[scrutinizer-ci]: https://scrutinizer-ci.com/g/svyatoslav-kubakh/postfix-admin/?branch=master

repository: extrawest/postfix-admin

repo_name: extrawest/postfix-admin