text:
# cap1-hmac-sha512

_Stability: 1 - [Experimental](https://github.com/tristanls/stability-index#stability-1---experimental)_

[![NPM version](https://badge.fury.io/js/cap1-hmac-sha512.png)](http://npmjs.org/package/cap1-hmac-sha512)

## Contributors

[@tristanls](https://github.com/tristanls)

## Contents

  * [Overview](#overview)
  * [Installation](#installation)
  * [Tests](#tests)
  * [Usage](#usage)
  * [Documentation](#documentation)
  * [Releases](#releases)

## Overview

This module provides specification and reference implementation of Capability Signature Version 1 `CAP1-HMAC-SHA512`.

The signature is based on [AWS Signature Version 4](http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html) with the following modifications:

* Algorithm used is `CAP1-HMAC-SHA512`.
* Credential termination string is `cap1_request` instead of `aws4_request`.
* `sha512` is used throughout instead of `sha256`.
* `X-Cap-Date` header is used instead of `X-Amz-Date` or `Date`.
* Request payload is not used as part of the signature.
* Credential scope uses `host` instead of `region` and `service`.
* Signing key derivation uses `host` instead of `region` and `service`.
* Generated string to sign uses `base64url` encoded `sha512` hash of canonical request instead of `hex` encoded `sha256` hash.
* Signature is `base64url` encoded instead of `hex`.

## Installation

    npm install cap1-hmac-sha512

## Usage

To run the below example run:

    npm run demo

```javascript
"use strict";

const cap1HmacSha512 = require("../index.js");
const http = require("http"); // not https for demo only
const url = require("url");

const secrets = // hardcoded for demo only
{
    "someId": "mySecret"
};

const server = http.createServer((req, resp) =>
    {
        console.log("request received:", req.headers);
        const parsedUrl = url.parse(req.url);
        const verifyParams =
        {
            headers: req.headers,
            httpRequestMethod: req.method,
            path: parsedUrl.pathname,
            queryString: parsedUrl.query,
            secret: (keyId, callback) => callback(undefined, secrets[keyId])
        };
        cap1HmacSha512.verify(verifyParams, (error, authorized) =>
            {
                console.log("request authorized:", authorized);
                if (authorized)
                {
                    resp.statusCode = 200;
                }
                else
                {
                    resp.statusCode = 401;
                }
                resp.end();
            }
        );
        req.on("data", () => {}); // drain request
    }
);

server.listen(8888, () =>
    {
        console.log("server listening");
        const options =
        {
            host: "localhost",
            headers:
            {
                host: "localhost:8888",
                connection: "close"
            },
            method: "GET",
            path: "/somewhere?page=12",
            port: 8888
        };
        const signature = cap1HmacSha512.sign(
            {
                headers: options.headers,
                httpRequestMethod: options.method,
                key: secrets["someId"],
                keyId: "someId",
                path: "/somewhere",
                queryString: "page=12"
            }
        );
        options.headers.authorization = signature.authorization;
        options.headers["x-cap-date"] = signature["x-cap-date"];
        console.log("client request:", options);
        http.request(options, resp =>
            {
                console.log("response status code:", resp.statusCode);
                resp.on("data", () => {}); // drain response
                delete options.headers["x-cap-date"];
                http.request(options, resp =>
                    {
                        console.log("response status code:", resp.statusCode);
                        resp.on("data", () => {}); // drain response
                        process.exit(0);
                    }
                ).end();
            }
        ).end();
    }
);

```

## Tests

    npm test

## Documentation

### Cap1HmacSha512

**Public API**
  * [sign(params)](#signparams)
  * [verify(params, callback)](#verifyparams-callback)

#### sign(params)

  * `params`: _Object_ Signature parameters.
    * `headers`: _Object_ HTTP request headers.
    * `httpRequestMethod`: _String_ _(Default: "GET")_ HTTP request method.
    * `key`: _String_ Secret to sign with corresponding to provided `keyId`.
    * `keyId`: _String_ Id of the secret to sign with.
    * `path`: _String_ _(Default: "/")_ HTTP request path.
    * `queryString`: _String_ _(Default: "")_ HTTP request query string.
  * Return: _Object_ Result.
    * `algorithm`: _String_ Algorithm used, `CAP1-HMAC-SHA512`.
    * `authorization`: _String_ HTTP Authorization header contents.
    * `credential`: _String_ Credential used for signing.
    * `x-cap-date`: _String_ HTTP X-Cap-Date header contents.
    * `signedHeaders`: _String_ List of headers used for signing.
    * `signature`: _String_ base64url encoded signature.

Calculates the `CAP1-HMAC-SHA512` signature given provided `params`. The `authorization` parameter from the result can be used directly as the `Authorization` header in HTTP request.

If `params.headers["X-Cap-Date"]` is not provided, an `X-Cap-Date` header will be generated and used as part of the signature. For the HTTP request to be valid, the `x-cap-date` field from the result must be used as the `X-Cap-Date` header in the HTTP request.

#### verify(params, callback)

  * `params`: _Object_ Verification parameters.
    * `headers`: _Object_ HTTP request headers.
    * `httpRequestMethod`: _String_ HTTP request method.
    * `path`: _String_ HTTP request path.
    * `queryString`: _String_ HTTP request query string.
    * `secret`: _Function_ `(keyId, callback) => {}` Function to retrieve `key` material corresponding to provided `keyId`.
      * `keyId`: _String_ Key id from `CAP1-HMAC-SHA512` signature to retrieve `key` material for.
      * `callback`: _Function_ `(error, key) => {}` Callback to call with error or key material.
  * `callback`: _Function_ `(error, authorized) => {}`
    * `error`: _Error_ Error, if any.
    * `authorized`: _Boolean_ `true` if signature is verified, `false` otherwise.

Extracts `keyId` from `Authorization` header, retrieves corresponding `key` material via `secret` callback, and calculates `CAP1-HMAC-SHA512` signature given provided `params`. If signature is verified, it calls callback with `authorized=true`, otherwise, callback is called with `authorized=false` or an `error`.

## Releases

[Current releases](https://github.com/capabilityio/cap1-hmac-sha512/releases).

### Policy

We follow the semantic versioning policy ([semver.org](http://semver.org/)) with a caveat:

> Given a version number MAJOR.MINOR.PATCH, increment the:
>
>MAJOR version when you make incompatible API changes,

>MINOR version when you add functionality in a backwards-compatible manner, and

>PATCH version when you make backwards-compatible bug fixes.

**caveat**: Major version zero is a special case indicating development version that may make incompatible API changes without incrementing MAJOR version.


text:
# Extension Developers

Extensions are meant to extend the functionality of Archangel. Documentation for theme development is [also available](https://github.com/archangel/archangel/blob/master/docs/Theme/Developers.md).

Bored? Take a look at the [TODO list for Archangel](https://trello.com/b/iAeANJRl).

## Generate an extension

Generate an Archangel extension with `archangel extension NAME`

To generate an extension at `PWD` with the name `archangel_foo`

```
$ archangel extension foo
```

## Best Practices

The following are best practice guides for building and managing Archangel extensions.

* [Controllers](https://github.com/archangel/archangel/blob/master/docs/Extension/Controllers.md)
* [Helpers](https://github.com/archangel/archangel/blob/master/docs/Extension/Helpers.md)
* [Models](https://github.com/archangel/archangel/blob/master/docs/Extension/Models.md)
* [Policies](https://github.com/archangel/archangel/blob/master/docs/Extension/Policies.md)
* [Routes](https://github.com/archangel/archangel/blob/master/docs/Extension/Routes.md)
* [Uploaders](https://github.com/archangel/archangel/blob/master/docs/Extension/Uploaders.md)
* [Views](https://github.com/archangel/archangel/blob/master/docs/Extension/Views.md)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Lightning Web Components Testing Repository

This repository contains the source code of Testing utilities for Lightning Web Components. Additionally, it contains examples, documentation, meeting notes, and discussion notes for developers [contributing](CONTRIBUTING.md) or using Lightning Web Components.

## Getting Started

Read the [Lightning Web Components Dev Guide](https://lwc.dev/guide/introduction).

## Contributing

Please refer to Lightning Web Components contributing guide [here](https://github.com/salesforce/lwc/blob/master/CONTRIBUTING.md).

## License

The [MIT license](LICENSE) governs your use of Lightning Web Components.

repository: salesforce/lwc-test

gha_language: JavaScript

gha_license_id: MIT

repo_name: salesforce/lwc-test


text:
---
path: "/post-two"
date: "2019-06-24"
title: "Working on a CRUD app for my meetup group"
author: "Me"
---

In case you didn't know, well how would you, I recently became a co-host for my city's freeCodeCamp meetup.
We usually get a lot of beginners and newbies that come and go. So the main host, my friend Javier, asked me
to make a small community introduction board. Basically, a sort of RSVP system, where newcomers would post
who they are and their goals with coding.

It's been a good two weeks since I worked on the backend with Node. I've been focusing heavily on SASS, and trying to figure out how to convert a .CSV file to fit in a NoSQL database for another project. So revisiting this backend stuff is actually a little bit more a challenge than I'd like to admit. Specifically, I'm stuck on this `null` duplicate error in the terminal for my register auth route. But I think I've already found the answer on this [stackoverflow post](https://stackoverflow.com/questions/24430220/e11000-duplicate-key-error-index-in-mongodb-mongoose).

Anyways, I'm on the only one working on this right now. I've got tonight and Thursday to work on it. And I've got an ElectronJS meetup Tuesday and a Women in Data meetup Wednesday with some :cool: speakers :woman: (I'm not sure I'm allowed to go to that one, but I got my ticket already :question:). Finally, on Friday I've got my weekly freeCodeCamp meetup. Hopefully, I've got something to show and hopefully, no one asks me to debug their css again.

Got this one off the todo list as well today. :waning_gibbous_moon:

~~make blog mobile responsive~~

repository: Kaleidics/my-blog

repo_name: Kaleidics/my-blog


text:
# Openinghours

Platform to manager opening hours for services and their channels.

[![Build Status][ico-travis]][link-travis]
[![Maintainability][ico-maintainability]][link-maintainability]
[![Test Coverage][ico-test-coverage]][link-test-coverage]

## Installation

### Create config file

Copy the .env.example to .env and

- Fill in the `MySQL` (or MariaDb) database credentials.
- Fill in the `VESTA API` configuration (make sure it's not base64 encoded).
- Fill in the `VESTA_SOURCE_URL` for the links to vesta services (use a
  `${identifier}` placeholder).
- Fill in the Queue driver, for production environments use redis, beanstalkd or
  SQS. DO NOT use sync as a queue, rather use database in testing environments
  (`https://laravel.com/docs/5.4/queues`).
- Fill in the base URI that is used to build the LOD version of the openinghours
  triple (`BASE_URI`).
- Fill in the base URI that is used to link to a data representation of
  something (`DATA_REPRESENTATION_URI`).
- Fill in the `SPARQL` configuration to read data from.
- Fill in the `SPARQL` configuration to write data to, don't forget the name of
  the graph and the specific endpoint of the sparql-graph-crud-auth, which is
  used to write (possibly) larger amounts of triples to.
- Mails are sent through SMTP.
- Set session driver to database (anything but file).
- Set 1 worker in supervisor
  (`https://laravel.com/docs/5.4/queues#supervisor-configuration`) to handle the
  writes to the different systems (VESTA, LOD). Only using 1 will make sure no
  dirty read/writes will happen to the SPARQL endpoint, you can use supervisor
  or a custom system that keeps a Laravel worker up and running. Make sure that
  the worker is restarted after an update on the software
  (`php artisan queue:restart`).

### Build the back & front-end

Build the back & front-end by running following commands:

```bash
composer install
./artisan migrate
./artisan db:seed
./artisan passport:keys
npm install
gulp build
```

The `./artisan db:seed` command will generate an admin user with a random
generated password that's outputted to the command line, the default email is
<EMAIL_ADDRESS>
## Maintenance and deployment

When updating the software the commands you'll want to run are the following:

```bash
composer install
composer update
gulp build
php artisan migrate
php artisan cache:clear
php artisan queue:restart
```

> Caveat: Keep an eye out for the johngrogg/ics-parser releases, currently this
> dependency is set to dev-master, because the branch contains an implementation
> that we use in order to provide correct API responses. This is an actively
> maintained library so (patch) releases are in play.

## Fetch services

In order to fetch a list of services from the SPARQL endpoint you'll need to
configure the SPARQL endpoint (READ). You can then run the following command:

```bash
php artisan openinghours:fetch-services
```

This will fill the services table with the identifiers, labels of the available
services from the SPARQL endpoint.

## Fetch recreatex

In order to add openinghours from the Recreatex application to services that are
present in the Recreatex application, you can command below, after configuring
the Recreatex variables in the .env file.

This command will fetch services that are available in the application and have
a recreatex source, a property fetched during the retrieval of services from the
SPARQL endpoint using the fetch-services command.

The recreatex command will fetch services using the configured recreatex
endpoint and shop-id and will do so, year by year, currently configured to fetch
data from 2017 until 2020. These events will be added to the channel
"Infrastructuur".

Because Recreatex doesn't save it's events in a calendar standard, rather it
saves every single day as an array of 2 events (maximum).

This would result in 365 events per channel, which is far from optimal to work
with without additional tweaking, therefore a small algorithm was written that
parses weekly RRULEs from the yearly event list.

```bash
php artisan openinghours:fetch-recreatex
```

> **Note**: this will import openinghours from 2017 up until 2020, make sure you
> refresh the application in the browser after fetching the recreatex
> openinghours, because the front-end caches responses by default.

## Email

Email is now done through SMTP

## VESTA

Output can be written to VESTA on a weekly basis by using a predefined command.
This will write a weekschedule to VESTA starting on monday of the week that the
timestamp of execution falls in. e.g. If it's called friday at 5PM, the output
will contain the schedule monday-sunday of that week that friday falls into.
Scheduling it monday mornings will produce a schedule for that entire week.

```bash
php artisan openinghours:update-vesta
```

## Usage

Queries - No APIB or Swagger available.

- The serviceUri parameter is required and must be the URI of a service.
- The channel parameter is optional and must be the name of a specific channel
  within the given service.
- The format is optional and by default will return a JSON result, other formats
  can be: html, text, json-ld.

### Get the schedule for the next 7 days

The URI template to get the openinghours for a certain service and a channel
within that service (optional).

If no channel is passed, all channels will be returned with a schedule of the
coming 7 days.

- `{host}/api/query?q=week&serviceUri={serviceUri}&channel={channel}&format={format}`

### Get a week schedule starting on monday

Passing a date is optional and if passed will return the monday-sunday schedule
of the week that the date falls in.

- `{host}/api/query?q=fullWeek&serviceUri={serviceUri}&channel={channel}&date=dd-mm-yyyy&format={format}`

### Is something open right now?

- `{host}/api/query?q=now&serviceUri={serviceUri}&channel={channel}&format={format}`

### Get the openinghours for a specific day

- `{host}/api/query?q=day&date={mm-dd-yyyy}&serviceUri={serviceUri}&channel={channel}&format={format}`

## Contributions

The first iteration codebase has been written by
[weconnectdata](https://github.com/weconnectdata), more specifically by
[@thgh](https://github.com/thgh) and [@coreation](https://github.com/coreation).

The design and functional analysis has been performed by
[@mietcls](https://github.com/mietcls)

Codeclimate set-up, code review and further maintenance will be done by the
Digipolis team.

[ico-travis]: https://img.shields.io/travis/StadGent/laravel_site_opening-hours/develop.svg?style=flat-square
[ico-maintainability]: https://img.shields.io/codeclimate/maintainability/StadGent/laravel_site_opening-hours.svg?style=flat-square
[ico-test-coverage]: https://img.shields.io/codeclimate/c/StadGent/laravel_site_opening-hours.svg?style=flat-square

[link-travis]: https://travis-ci.org/StadGent/laravel_site_opening-hours
[link-maintainability]: https://codeclimate.com/github/StadGent/laravel_site_opening-hours/maintainability
[link-test-coverage]: https://codeclimate.com/github/StadGent/laravel_site_opening-hours/test_coverage

branch_name: refs/heads/develop

gha_language: PHP


text:
# Goal-directed evaluation

By default, Formulog uses a standard bottom-up, saturating evaluation strategy.
However, you can also trigger a form of goal-directed, top-down execution if you
include a query in your Formulog program. A query is a rule with an empty head
and a single (non-negated) body atom; for example, `:- p(X, "a").` is a query.
Each program can only have a single query.

The Formulog runtime will use the query to rewrite your program using the magic
set transformation technique. The rewritten program simulates top-down
evaluation when it is evaluated bottom-up. The rewriting happens after type
checking, but before program validation (i.e., before the checks described in
the "Program safety" section are run). This means that you are allowed to write
"invalid" Formulog programs, so long as that when they are rewritten, they pass
the validation checks. For example, this program is invalid evaluated bottom-up,
since there are unbound variables (in the head of the rules):

```
rel member(i32, i32 list)
member(X, X :: _Xs).
member(X, _Y :: Xs) :- member(X, Xs).
```

However, when we add the query `:- member(_X, [1, 2, 3]).`, the program is
rewritten to a valid program that can be evaluated bottom-up:

```
input_member_fb(Xs) :- sup_0_0(_0, Xs).
input_member_fb([1, 2, 3]).
member(X, X :: Xs) :- input_member_fb(X :: Xs).
member(X, _0 :: Xs) :- sup_0_0(_0, Xs), member(X, Xs).
sup_0_0(_0, Xs) :- input_member_fb(_0 :: Xs).
```

Our magic set transformation technique guarantees that if the original program
meets the requirements of stratified negation, then the rewritten program will
also be stratified. However, the transformation can turn a program that
terminates into a program that does not terminate. Also, it cannot be used with
predicates that are "invoked" from the functional fragment of Formulog.

## Query syntax

Queries are in the form `:- A.` where `A` is a positive (non-negated) atom. The
typical rules about variable usage apply (see the "Anonymous variables" section
of the Program Safety document). If you want to have a query consisting of
multiple atoms, write a rule defining a new relation and then query that
relation. For example, the hypothetical query `:- A, B.` could be rewritten as
the rule `R :- A, B.` and query `:- R.`. There can be only one query per
program.

## Partial goal-directed evaluation

It is also possible to only use goal-directed evaluation for part of a program.
You can control this by annotating IDB relation declarations with
`@bottomup` and `@topdown`:

```
@bottomup
rel foo(i32, string)

@topdown
rel bar(i32, i32, string)
```

A relation annotated as `@bottomup` will always be evaluated bottom-up (i.e., in
an exhaustive fashion), and a relation annotated as `@topdown` will always be
evaluated top-down (i.e., in a goal-directed fashion). These annotations can be
used whether or not a top-level query is supplied, and there are no restrictions
on how bottom-up and top-down relations can interact with each other (outside of
the normal restriction of stratified negation). Furthermore, not every relation
needs to be annotated. An unannotated relation will be evaluated bottom-up in
the absence of a top-level query, and top-down otherwise.

repository: HarvardPL/formulog

gha_language: Java

repo_name: HarvardPL/formulog


text:
# Dracula for [xfce4-terminal](https://docs.xfce.org/apps/terminal/start)

> A dark theme for [xfce4-terminal](https://docs.xfce.org/apps/terminal/start).

![Screenshot](./screenshot.png)

## Install

All instructions can be found at [draculatheme.com/xfce4-terminal](https://draculatheme.com/xfce4-terminal).

## Team

This theme is maintained by the following person(s) and a bunch of [awesome contributors](https://github.com/dracula/xfce4-terminal/graphs/contributors).

| [![Kuangyu Jing](https://github.com/kuangyujing.png?size=100)](https://github.com/kuangyujing) |
| --- |
| [Kuangyu Jing](https://github.com/kuangyujing) |

## License

[MIT License](./LICENSE)


text:
# Sensu Go Ruby Runtime Assets
[![Build Status](https://travis-ci.org/sensu/sensu-ruby-runtime.svg?branch=master)](https://travis-ci.org/sensu/sensu-ruby-runtime)

This project provides [Sensu Go Assets][sensu-assets] containing portable Ruby
runtimes (for various platforms), based on the excellent [ruby-install project
by postmodern][ruby-install]. In practice, this Ruby runtime asset should allow
Ruby-based scripts (e.g. [Sensu Community plugins][sensu-plugins]) to be
packaged as separate assets containing Ruby scripts and any corresponding gem
dependencies. In this way, a single shared Ruby runtime may be delivered to
systems running the new Sensu Go Agent via the new Sensu's new Asset framework
(i.e. avoiding solutions that would require a Ruby runtime to be redundantly
packaged with every ruby-based plugin).

This same project may be used to build Sensu Assets for Ruby-based plugins via
[`bundler`][bundler] or other similar tools. We'll share more information on
building Ruby-based assets with third-party gem depdencies using Bundler soon;
in the interim, please review the instructions below for more information on
how to get started with this project.

[sensu-assets]: https://docs.sensu.io/sensu-go/5.1/reference/assets/
[ruby-install]: https://github.com/postmodern/ruby-install
[sensu-plugins]: https://github.com/sensu-plugins/
[bundler]: https://bundler.io

## Platform Coverage:
 Currently this repository only supports a subset of Linux distribution by making use of Docker containers to build and test.
 If you would like extend the coverage, please take a look at the Github Action integration and associated build scripts. We're happy to take pull requests that extending the platform coverage. Here's the current platform matrix that we are testing for as of the 0.1 release:

| Asset Platform | Tested Operating Systems Docker Images |
|:---------------|:-------------------------|
|  alpine  (based on alpine:3.8)   | Alpine(3, 3.8, latest)                                      |
|  centos7  (based on centos:7)     | Centos(7,8), Debian(8, 9, 10), Ubuntu(14.04, 16.04, 18.04, 20.04)     |
|  centos8 (based on centos:8)     | Centos(8), Debian(10), Ubuntu(20.04)  |
|  debian  (based on debian:9)     | Debian(8, 9, 10), Ubuntu(14.04, 16.04, 18.04, 20.04), Centos(7,8)    |
|  amnz1   (based on amazonlinux:1)     | Debian(8, 9, 10), Ubuntu(14.04, 16.04, 18.04, 20.04), Centos(7,8)    |
|  amnz2   (based on amazonlinux:2)     | Debian(10), Ubuntu(18.04, 20.04), Centos(8)    |

## OpenSSL Cert Dir
Please note that when using the ruby runtime asset built on a target OS that is different from the build platform, you may need to explicitly set the SSL_CERT_DIR environment variable to match the target OS filesystem.  Example: CentOS configures it libssl libraries to look for certs by default in `/etc/pki/tls/certs` and Debian/Ubuntu use `/usr/lib/ssl/certs`. The CentOS runtime asset when used on a Debian system would require the use of SSL_CERT_DIR override in the check command to correctly set the cert path to `/usr/lib/ssl/certs`

## Instructions

Please note the following instructions:

1. Use a Docker container to install `ruby-install`, build a Ruby, and generate
   a local_build Sensu Go Asset.

   ```
   $ docker build --build-arg "RUBY_VERSION=2.4.4" -t sensu-ruby-runtime:2.4.4-alpine -f Dockerfile.alpine .
   $ docker build --build-arg "RUBY_VERSION=2.4.4" -t sensu-ruby-runtime:2.4.4-debian -f Dockerfile.debian .
   ```

2. Extract your new sensu-ruby asset, and get the SHA-512 hash for your
   Sensu asset!

   ```
   $ mkdir assets
   $ docker run -v "$PWD/assets:/assets" sensu-ruby-runtime:2.4.4-debian cp /assets/sensu-ruby-runtime_2.4.4_debian_linux_amd64.tar.gz /assets/
   $ shasum -a 512 assets/sensu-ruby-runtime_2.4.4_debian_linux_amd64.tar.gz
   ```

3. Put that asset somewhere that your Sensu agent can fetch it. Perhaps add it to the Bonsai asset index!

3. Create an asset resource in Sensu Go.

   First, create a configuration file called `sensu-ruby-runtime-2.4.4-debian.json` with
   the following contents:

   ```
   {
     "type": "Asset",
     "api_version": "core/v2",
     "metadata": {
       "name": "sensu-ruby-runtime-2.4.4-debian",
       "namespace": "default",
       "labels": {},
       "annotations": {}
     },
     "spec": {
       "url": "http://your-asset-server-here/assets/sensu-ruby-runtime-2.4.4-debian.tar.gz",
       "sha512": "4f926bf4328fbad2b9cac873d117f771914f4b837c9c85584c38ccf55a3ef3c2e8d154812246e5dda4a87450576b2c58ad9ab40c9e2edc31b288d066b195b21b",
       "filters": [
         "entity.system.os == 'linux'",
         "entity.system.arch == 'amd64'",
         "entity.system.platform == 'debian'"
       ]
     }
   }
   ```

   Then create the asset via:

   ```
   $ sensuctl create -f sensu-ruby-runtime-2.4.4-debian.json
   ```

4. Create a second asset containing a Ruby script.

   To run a simple test using the Ruby runtime asset, create another asset
   called `helloworld-v0.1.tar.gz` with a simple ruby script at
   `bin/helloworld.rb`; e.g.:

   ```ruby
   #!/usr/bin/env ruby

   require "date"

   puts "Hello world! The time is now #{Time.now()}"
   ```

   _NOTE: this is a simple "hello world" example, but it shows that we have
   support for basic stlib gems!_

   Compress this file into a g-zipped tarball and register this asset with
   Sensu, and then you're all ready to run some tests!

5. Create a check resource in Sensu 2.0.

   First, create a configuration file called `helloworld.json` with
   the following contents:

   ```
   {
     "type": "CheckConfig",
     "api_version": "core/v2",
     "metadata": {
       "name": "helloworld",
       "namespace": "default",
       "labels": {},
       "annotations": {}
     },
     "spec": {
       "command": "helloworld.rb",
       "runtime_assets": ["sensu-ruby-runtime-2.4.4-debian", "helloworld-v0.1"],
       "publish": true,
       "interval": 10,
       "subscriptions": ["docker"]
     }
   }
   ```

   Then create the asset via:

   ```
   $ sensuctl create -f helloworld.json
   ```

   At this point, the `sensu-backend` should begin publishing your check
   request. Any `sensu-agent` member of the "docker" subscription should
   receive the request, fetch the Ruby runtime and helloworld assets,
   unpack them, and successfully execute the `helloworld.rb` command by
   resolving the Ruby shebang (`#!/usr/bin/env ruby`) to the Ruby runtime
   on the Sensu agent `$PATH`.:wq

repository: sensu/sensu-ruby-runtime

branch_name: refs/heads/main

gha_language: Shell

repo_name: sensu/sensu-ruby-runtime


text:
# Test repository description for custom integration branch tests

Related to [JENKINS-28596 Hardcoded branch name when resolving commit messages](https://issues.jenkins-ci.org/browse/JENKINS-28596) we have created the _customIntegrationBranch_ test repository for testing the use case where the plugin is configured to integrate development branch changed on the custom integration branch - that is something else than master.

See the log-file `customIntegrationBranch-repo_description.log` for details on the repository.

repository: jenkinsci/pretested-integration-plugin

repo_name: jenkinsci/pretested-integration-plugin


text:
# Airena
Write & edit AI code on the fly to fight in the arena!

This was an experiment that won 1st place at CarlHacks 2016. You can read more about that [here](http://devpost.com/software/airena).

**Current status**: Code is still messy and with a couple of bugs. Trying to clean it up and document it.

### What is it?

It's a very basic multiplayer space shooter. Turn right/left with arrow keys. Up to thrust. Gameplay](http://i.imgur.com/Umh1XM2.gif)

At any point in the game, you can open up the console to write an AI bot that will control your player in real time!

![AI Control](http://i.imgur.com/QFCeb4A.gif)

### How to run
The game is written in [NodeJS](https://nodejs.org/en/), so make sure you have that installed.
* Clone/download this repository
* Run `npm install` to install dependencies
* Run `node airena.js` to initiate the server
* Open http://localhost:5000 in your browser *(this will automatically create a room)*
* Copy the URL with the room ID into a new tab to see the multiplayer in action!

### Vision
I'd love to decouple the "code and run" mechanic from the game itself, so it can be used as a module to drop in in any other game or simulation.

The reason I do this is because I think the process of writing a piece of awesome or elegant code is usually obscured, especially for beginners. Watching people play this game would be **highlighting rather than hiding** the act of writing code.

### Contributing

I welcome any and all contributions! Feel free to fork this repository or do whatever you like. If you have ideas or suggestions, feel free to open an issue!

My (rough) current to do:
* Clean up and document the code
* Create save slots for code in-game
* Create more interesting AI examples to run in the game as examples
* Decouple the code running mechanic from the actual game
* ~~Create rooms/id's so not everyone gets dropped in the same room when they open the link~~ Completed by [SnoopJeDi](https://github.com/SnoopJeDi)

### Project Setup
All of the server logic and the code that runs the Javascript code in a sandbox is in **airena.js**. The client side game logic is in **src/init.js**

This project uses [CreateJS](http://createjs.com/) for canvas rendering, and [CodeMirror](https://codemirror.net/) for the in-game code editor.

repository: ishutinov/Airena

repo_name: ishutinov/Airena


text:
# JSP Autocomplete package
[![Build Status](https://travis-ci.org/MoritzKn/atom-autocomplete-jsp.svg?branch=master)](https://travis-ci.org/MoritzKn/atom-autocomplete-jsp)

This [Atom](https://atom.io) package adds autocompletion support for JSP with focus on it's subset JSPX.  Uses the [autocomplete-plus](https://github.com/atom-community/autocomplete-plus) package.

See [setup][setup] and [changelog][changelog].

## Features
### Autocompletion for implicit objects
![Screenshot of autocompletion for implicit objects][screenshot-implicit-objects]

### Autocompletion for EL keywords
![Screenshot of autocompletion for keywords][screenshot-keywords]

### Autocompletion for variables defined in tags
![Screenshot of autocompletion for variables][screenshot-tags-set]

### Autocompletion for variables from `<jsp:useBean>` tags
![Screenshot of autocompletion for variables][screenshot-tags-use-bean]

### Autocompletion of tag functions from `.tld` files
![Screenshot of autocompletion for el-functions][screenshot-tag-functions]

See [setup][setup] for an explanation how to get autocompletion based on `.tld` files to work.

### Abbreviations
![Autocompletion for abbreviations][screenshot-abbreviations]

### Autocompletion for tags from `.tld` files
![Autocompletion for tag][screenshot-tag]

### Autocompletion for attributes from `.tld` files
![Autocompletion for tag attributes][screenshot-tag-attributes]

### Autocompletion for attributes values (`scope`, `var`)
![Autocompletion for var attribute][screenshot-var-attribute]
![Autocompletion for scope attribute][screenshot-scope-attribute]

### Follows include directives to find taglib declarations
To find all taglib declarations the package crawls the file system by following include directives.

## Goals
- EL autocompletion for properties

## What this package won't do
- Autocomplete embedded Java code

## Config
- `tldSources`: array of directories containing tld files

## Setup
* Install this package
```sh
apm install autocomplete-jsp
```

* Set the configuration `autocomplete-jsp.tldSources` to a directory of your choice, for example `~/tlds` and make sure this directory exist.
```sh
mkdir ~/tlds
```

* Make sure all [JSTL][jstl] TLDs are in this directory
```sh
cd ~/tlds
wget https://raw.githubusercontent.com/javaee/jstl-api/master/impl/src/main/resources/META-INF/c.tld
wget https://raw.githubusercontent.com/javaee/jstl-api/master/impl/src/main/resources/META-INF/fmt.tld
wget https://raw.githubusercontent.com/javaee/jstl-api/master/impl/src/main/resources/META-INF/fn.tld
wget https://raw.githubusercontent.com/javaee/jstl-api/master/impl/src/main/resources/META-INF/sql.tld
wget https://raw.githubusercontent.com/javaee/jstl-api/master/impl/src/main/resources/META-INF/x.tld
```

* Copy all of your custom `.tld` files into this directory
```sh
cp ~/workspace/someProject/src/main/resources/WEB-INF/*.tld ~/tlds
# or perhaps even
cp ~/workspace/*/src/**.tld ~/tlds/
```

## License
This project is licensed under the terms of the MIT license. A copy of the license can be found
in the root directory of the project in the file [LICENSE.md](./LICENSE.md).

[setup]: https://github.com/MoritzKn/atom-autocomplete-jsp/blob/master/README.md#setup
[changelog]: https://github.com/MoritzKn/atom-autocomplete-jsp/blob/master/CHANGELOG.md
[jstl]: https://jstl.java.net/

[screenshot-implicit-objects]: https://raw.githubusercontent.com/MoritzKn/atom-autocomplete-jsp/master/doc/img/screenshot-implicit-objects.png
[screenshot-keywords]:         https://raw.githubusercontent.com/MoritzKn/atom-autocomplete-jsp/master/doc/img/screenshot-keywords.png
[screenshot-tags-set]:         https://raw.githubusercontent.com/MoritzKn/atom-autocomplete-jsp/master/doc/img/screenshot-tags-set.png
[screenshot-tags-use-bean]:    https://raw.githubusercontent.com/MoritzKn/atom-autocomplete-jsp/master/doc/img/screenshot-tags-use-bean.png
[screenshot-tag-functions]:    https://raw.githubusercontent.com/MoritzKn/atom-autocomplete-jsp/master/doc/img/screenshot-tag-functions.png
[screenshot-abbreviations]:    https://raw.githubusercontent.com/MoritzKn/atom-autocomplete-jsp/master/doc/img/screenshot-abbreviations.png
[screenshot-tag]:              https://raw.githubusercontent.com/MoritzKn/atom-autocomplete-jsp/master/doc/img/screenshot-tag.png
[screenshot-tag-attributes]:   https://raw.githubusercontent.com/MoritzKn/atom-autocomplete-jsp/master/doc/img/screenshot-tag-attributes.png
[screenshot-var-attribute]:    https://raw.githubusercontent.com/MoritzKn/atom-autocomplete-jsp/master/doc/img/screenshot-var-attribute.png
[screenshot-scope-attribute]:  https://raw.githubusercontent.com/MoritzKn/atom-autocomplete-jsp/master/doc/img/screenshot-scope-attribute.png

repository: MoritzKn/atom-autocomplete-jsp

repo_name: MoritzKn/atom-autocomplete-jsp


text:
Since the compiler will automatically invoke the base type’s no-argument constructor, there’s no need to specify its invocation explicitly. Also, when only a single `public` parameterless constructor is defined in a class, then that constructor can be removed because the compiler would generate it automatically. Similarly, empty `static` constructors and empty destructors are also wasted keystrokes.

## Noncompliant Code Example

    class X
    {
      public X() { } // Noncompliant
      static X() { }  // Noncompliant
      ~X() { } // Noncompliant

      ...
    }

    class Y : X
    {
      public Y(int parameter) : base() // Noncompliant
      {
        /* does something with the parameter */
      }
    }

## Compliant Solution

    class X
    {
      ...
    }

    class Y : X
    {
      public Y(int parameter)
      {
        /* does something with the parameter */
      }
    }

repository: codacy/codacy-sonar-csharp

gha_language: C#

gha_license_id: NOASSERTION

repo_name: codacy/codacy-sonar-csharp


text:
# @oatcoder/jefe
a small library with potential.

## Bad Words
Helps check if string contains bad words.

#### findBadWords(string)
Will return bad words found in string.

#### hasBadWords(string)
Checks if string has bad words.

#### addBadWords(string)
Adds bad words to check against.

repository: oatcoder/jefe

repo_name: oatcoder/jefe


text:
---
build: 151207
---

* [conemu#438](https://github.com/Maximus5/ConEmu/issues/438): No newlines in log files after prompts (cygwin/msys).
  Cygwin/msys shells do not write LF to screen unless they
  were started from ConEmu's cygwin/msys connector.
  Therefore we have to do some magic to ‘detect’ line feeds...
* Update terminals module to v0.7
* In some cases PID of terminal-connector was not shown in the StatusBar.
* Xterm's alternative screen was not cleared on activating.
* [conemu#351](https://github.com/Maximus5/ConEmu/issues/351): Allow changing URL for retrieving version location on Settings/Update.
* [conemu#351](https://github.com/Maximus5/ConEmu/issues/351): Use `https://conemu.github.io/version.ini` by default.
* Changes in processing of default hotkey `Win+X`.
  * It runs whole task contents, but not only first ‘tab’ from task;
  * If no one task was marked as ‘Default shell’, run default `COMSPEC`
    with arguments ` /k "%ConEmuBaseDir%\CmdInit.cmd"`.

gha_language: HTML


text:
# Examples

These examples demonstrate the main features of Vncserver and how to use them.
To run an example, use the command `cargo run --example <Example>`, e.g.

```sh
# Runs the "sample" example
cargo run --example sample
```

When you clone the repo locally to run the examples, use `git checkout` to get the correct version:

```bash
# use a specific version
git checkout <version>
```

repository: rayylee/libvnc-rs

repo_name: rayylee/libvnc-rs


text:
# git2consul Change Log

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).

## 0.0.2

### Added
- operator register and deregister git2consul
- Docker publish process via azure pipelines
- add Makefile to build images locally through Docker


text:
---
title: clock
category: Commands
---

Returns the current clock value for a watched root.

_Since 3.9._

_The [capability](capabilities.md) name associated with this enhanced
functionality is `clock-sync-timeout`._

`sync_timeout` specifies the number of milliseconds that you want to wait to
observe a synchronization cookie. The synchronization cookie is created at the
start of your clock call and, once the cookie is observed, means that the clock
value returned by this command is at least as current as the time of your clock
call.

If no `sync_timeout` is specified, the returned clock value is the instantaneous
value of the clock associated with the watched root, and may be almost
immediately invalidated if there are any filesystem notifications that are yet
to be processed.

```bash
$ watchman clock /path/to/dir
```

JSON:

Note the third options argument is optional.

```json
["clock", "/path/to/dir", {"sync_timeout": 100}]
```

repository: facebook/watchman

repo_name: facebook/watchman


text:
embedding
=========

The Odin Project - Embedding Images and Video

http://www.theodinproject.com/html5-and-css3/embedding-images-and-video

The purpose of this project is to gain the skills necessary to embed a YouTube video into an HTML document. Links will not be functional and the page will not exactly replicate a YouTube page, as I am only practicing my HTML and CSS skills in this project. Following are the "Steps to Victory" taken directly from http://www.theodinproject.com/html5-and-css3/embedding-images-and-video:

Steps to Victory
Follow the instructions atop the Google Homepage project to set up a Github repository for this project (of course you'll need to change the title).
Create a blank HTML document.
Come up with a plan -- which sections of the page should be grouped together (e.g. the navigation bar vs the video vs the sidebar etc)?
Create empty <div> tags to enclose those sections.
Use basic CSS to size and position them appropriately on the page. It may be helpful to make their backgrounds different colors so you can see the different sections. Don't forget to use your browser's developer tools (right click on the page, click "inspect element")!
Now let's start filling in those divs with content. Creating the navbar.

Next, build the sidebar section where previews of suggested videos show up. Obviously don't worry about generating those previews... just grab some thumbnail-sized images and plug them in.
Next, finish up by filling in some of the elements below the video -- the title, description and number of views. Ignore the icons (many of them are produced using sprites or more advanced techniques so you won't be able to just grab them by copying them).
Push your solution up to Github.


text:
# Introduction

This book describes how to use the Matrix IRC bridge, giving an overview of functions for users and server administrators. If you
believe there are errors or omissions in the book, please open an issue on [GitHub](https://github.com/matrix-org/matrix-appservice-irc/issues)
or create a PR.

For an overview of the bridge, see the [README.md](https://github.com/matrix-org/matrix-appservice-irc).

A community maintained wiki also exists which can be found [here](https://github.com/matrix-org/matrix-appservice-irc/wiki).

The documentation is built from source and can be found in [the GitHub repo](https://github.com/matrix-org/matrix-appservice-irc/tree/develop/docs).

repository: matrix-org/matrix-appservice-irc

gha_language: TypeScript

repo_name: matrix-org/matrix-appservice-irc


text:
---
layout: page
title: "Syllabus"
date: 2011-09-09 09:56
comments: true
sharing: true
footer: true
---

## Computer Science + Web

|:-----------|:---------------------------------------------------------------|
|Instructor  |Mr. Robbins                                                     |
|<EMAIL_ADDRESS>                                       |
|            |Skype: robbins.david                                            |
|Meeting Time|1:40-2:30 (lectures M,W,F; lab T,Th)                            |
|            |Charger Hall 1                                                  |
|Course Site |(https://sites.google.com/site/ccsrobbins/computer-science-web) |
|Texts       |[Eloquent Javascript](http://eloquentjavascript.net)            |
|            |[jQuery Fundamentals](http://jqfundamentals.com/book/index.html)|

### Course Introduction

This class is about what you want to learn. Specifically, what you want to learn about computers, the Internet, programming, and how to tie them all together. If you don't want to learn about those things, don't take this class.
Goals

Since this class is about what you want to learn, you choose the goal. Since this class is part of your high school experience, your instructor gets to make sure your goal is hard enough that you'll learn something interesting, but not so hard that you have no hope of finishing.

Your goal must include making something. Sometimes this is called a project, but in this case you're (hopefully) making something you want to use. Impress me.

### Grading

|----------+--------------+------------------------------|
| Letter   | Percentage   | Total Points (out of 1000)   |
|:---------|:-------------|:-----------------------------|
| A        | 90+          | 900                          |
| B        | 89-80        | 890-80                       |
| C        | 79-70        | 790-70                       |
| D        | 69-60        | 690-60                       |
| F        | 59-          | 590                          |

Weekly Assignments (20) : 25 pts (2.5%) each
Project                 : 500 pts (50%)
Total Points            : 1000 (100%)

Bonus points may be offered if the instructor is merciful. If offered, bonuses will be announced and offered to the entire class.

You can earn up to an additional 50% extra credit on any coding assignment by completing it in multiple programming languages, where possible (e.g. Ruby and Javascript, Python and Javascript, etc.) You will find it much easier to understand the fundamental concepts of programming if you take advantage of this extra credit.

### General Instruction

For each week, create a sub-folder in your main Github repository. In that weekly folder, create additional sub-folders as needed containing the examples, exercises, and extensions you've completed while reading (see below)

When you a reading, do the examples and exercises. Better yet, extend the examples and make them your own. You have two class periods a week to work on them, use them wisely.

Don't be afraid to learn more than one computer language at a time. Instead, think about how something you saw in one language could be expressed in another. There usually isn't much difference.

Keep in mind that if you put something on the web, it's probably not private anymore. Use wisdom, especially when posting info about someone else.

Your feedback and input is very welcome, especially where it leads to improvement of this course. Keep in mind, however, that the instructor has the final say in all things course related.
Lab Hours

Class meeting times on Tuesday and Thursday are labs. That means you are responsible to use the time wisely, either completing reading and assignments or working on your project.

I expect that you will commit something to Github by the end of each lab. Your submission may not be working, but it should indicate that you were.

During lab hours, I will most likely be online on Skype and Google+. Feel free to ask me things.

### Things you Might Choose to Learn

#### Seeds

* Write an app for Chrome or Facebook
* Write a SMART Platforms app
* Become a contributor to an open source project
  * or start one (e.g. a jQuery plugin)
* Build your own web page (at your own domain)
* Learn a programming language your instructor doesn't know
  * e.g. [Learn you a Haskell](http://learnyouahaskell.com/chapters)
* Respond to a [request for startup](http://ycombinator.com/rfs.html)
* Build that website or app you always wish existed
* Read and understand [SCIP](http://mitpress.mit.edu/sicp/full-text/book/book.html)

#### Default Goals

These are what you have to do if you can't think of anything better that interests you. Please realize you are probably wasting your time and mine if you don't get any further than this list; ideally as you progress through this material you'll think of something cool to make, and that will become your new project.

* Familiarity with Javascript, HTML5, CSS, and jQuery
* Ability to discover new knowledge required to accomplish a web development task using web-available documentation.
* Creation of 2-5 page portfolio demonstrating learning in this class and others.
* Ability to independently create modern (i.e. interactive) web content.
* Ability to discuss fundamental programming concepts, and use them in several languages
    * Literal Values
    * Types
    * Variables
    * Functions
    * Objects
    * Arrays
    * Control Structures (e.g. if, while, for)

repository: drobbins/cpw

extension: markdown

repo_name: drobbins/cpw


text:
So far we've only been working on files present on our own computer, *i.e.*
locally. While git is an amazing tool for reproducibility even if you're
working alone, it really starts to shine in collaborative work. This entails
working with *remote* repositories, *i.e.* repositories that are stored
somewhere online; some of the most common places to store your repositories are
[GitHub](https://github.com), [BitBucket](https://bitbucket.org) and
[GitLab](https://about.gitlab.com/). GitHub is the most popular of these, and is
what we'll be using for this tutorial.

An important thing to keep in mind here is the difference between *git* (the
version control system) and online hosting of *git repositories* (such as
GitHub): the former is the core of keeping track of your code's history, while
the latter is how to store and share that history with others.

## Create an account at GitHub

If you have not done so already, go to [github.com](https://github.com/join)
and create an account. You can also create an account on another online hosting
service for version control, *e.g.* [Bitbucket](https://bitbucket.org) or
[GitLab](https://about.gitlab.com/). The exercises below are written with
examples from GitHub (as that is the most popular platform with the most
extensive features), but the same thing can be done on alternative services,
although the exact menu structure and link placements differ a bit.

## Create a remote repository

Log in to your GitHub account and press the *New* button on the left:

* Make sure you are listed as the owner
* Add a repository name, *e.g.* `git_tutorial`
* You can keep the repo private or make it public, as you wish
* Skip including a README, a `.gitignore` and licence

> ![](images/github_new_repo.png){ width=600px }

You will now be redirected to the repository page which will list several ways
for you to start adding content (files) to the repository. What we will do is to
connect the local repository we've been working on so far to the remote GitHub
server:

* Add a remote address to your local repository (make sure you change `user` to
  your GitHub username and `git_tutorial` to your repository name):

```bash
git remote add origin https://github.com/user/git_tutorial.git
```

* Run `git remote -v`. This will show you what remote location is connected to
  your local git clone. The short name of the default remote is usually
  "*origin*" by convention.

* We have not yet synced the local and remote repositories, though, we've simply
  connected them. Let's sync them now:

```bash
git push origin main
```

The `push` command sends our local history of the `main` branch to the same
branch on the remote (`origin`). Our git repository is now stored on GitHub!

* Run `git status`. This should tell you that *"Your branch is up-to-date with
  'origin/main'."*.

If you go to the repository's GitHub page you should now be able to see all your
files and your code there! It should look something like this:

> ![](images/github_repo_overview.png){ width=600px }

You can see a lot of things there, such as each file and the latest commit that
changed them, the repository's branches and a message from GitHub at the bottom:
*"Help people interested in this repository understand your project by adding
a README."* This refers to GitHub's built-in functionality of automatically
rendering any *markdown* document named `README` or `README.md` in the
repository's root directory and displaying it along with what you can already
see.

* Let's create a `README.md` file and fill it with the following text:

```markdown
# A Git tutorial

This repository contains tutorial information related to the **NBIS** course
*Tools for Reproducible Research*, specifically the session on using the `git`
software for version control.

## Links

You can find the latest stable version of the Git tutorial for the course
[here](https://nbis-reproducible-research.readthedocs.io/en/latest/git/).
```

* Add, commit and push these changes to GitHub.

```bash
git add README.md
git commit -m "Add README.md"
git push origin main
```

You should now be able to see the rendered markdown document, which looks a bit
different from the text you copied in from above. Note that there are two
different header levels, which come from the number of hash signs (`#`) used.
You can also see bold text (which was surrounded by two asterisks), italic
text (surrounded by one asterisk), in-line code (surrounded by acute accents)
and a link (link text inside square brackets followed by link address inside
parentheses).

It is important to add README-files to your repositories so that they are more
documented and easily understood by others and, more likely, your future self.
In fact, documentation is an important part of reproducible research! While the
tools that you are introduced to by this course are all directly related to
making science reproducible, you will *also* need good documentation. Make it
a habit of always adding README-files for your repositories, fully explaining
the ideas and rationale behind the project. You can even add README-files to
sub-directories as well, giving you the opportunity to go more in-depth where
you so desire.

> **Tip**

> There are a lot more things you can do with markdown than what we show here.
> Indeed, this entire course is mostly written in markdown! You can read
> more about markdown [here](https://www.markdownguide.org/getting-started/).

> **Quick recap**

> We learned how to connect local git repositories to remote locations such as
> GitHub and how to upload commits using `git push`. We also learned the
> basics of *markdown* and how it can be used to document git repositories.

## Browsing GitHub

GitHub and the rest of the websites that offer remote hosting of git
repositories all have numerous features, which can be somewhat difficult to
navigate in the beginning. We here go through some of the basics of what you can
do with GitHub.

 Click on `config.yml`. You will see the contents of the file. Notice
  that it is the latest version, where we previously changed the `genome_id`
  variable:

> ![](images/github_config_yml.png){ width=600px }

* Click on *History*. You will see an overview of the commits involving changes
  made to this file:

> ![](images/github_config_yml_history.png){ width=600px }

* Click on the `Change to ST398 for alignment` commit. You will see the changes
  made to `config.yml` file compared to the previous commit.

> ![](images/github_config_yml_diff.png){ width=600px }

* Go back to the repository's main page and click on the commit tracker on the
  right above the list of files, which will give you an overview of all commits
  made. Clicking on a specific commit lets you see the changes introduced by
  that commit. Click on the commit that was the initial commit, where we added
  all the files.

> ![](images/github_initial_commit.png){ width=600px }

You will now see the files as they were when we first added them. Specifically
you can see that the `Dockerfile` is back, even though we deleted it! Click on
the *Code* tab to the left to return to the overview of the latest repository
version.

> **Quick recap**

> We learned some of the most important features of the GitHub interface and
> how repositories can be viewed online.

## Working with remote repositories

While remote repositories are extremely useful as backups and for collaborating
with others, that's not their only use: remotes also help when you are working
from different computers, a computer cluster or a cloud service.

* Let's pretend that you want to work on this repository from a different
  computer. First, create a different directory (*e.g.* `git_remote_tutorial`)
  in a separate location that is not already tracked by git and `cd` into it.
  Now we can download the repository we just uploaded using the following:

```bash
git clone<EMAIL_ADDRESS>.
```

Notice the dot at the end of the command above, which will put the clone into
the current directory, instead of creating a new directory with the same name as
the remote repository. You will see that all your files are here, identical to
the original `git_tutorial` repository!

* Since you already gave the address to git when you cloned the repository, you
  don't have to add it manually as before. Verify this with `git remote -v`.

* Let's say that we now want to change the `multiqc` software to an earlier
  version: open the `environment.yml` file in the second local repo and change
  `multiqc=1.7` to `multiqc=1.2`; add and commit the change.

* We can now use `push` again to sync our remote repository with the new local
  changes. Refresh your web page again and see that the changes have taken
  effect.

> **Tip**

> You always need to specify `git push origin main` by default, but you can
> circumvent this by telling git that you always want to push to
> `origin/main` when you're on your local `main` branch. To do this, use
> the command `git branch --set-upstream-to origin/main`. Another way to
> achieve the same effect is use the `--set-upstream` flag for the very first
> push.

Since we have now updated the remote repository with code that came from the
second local repository, the first local repository is now outdated. We thus
need to update the first local repo with the new changes. This can be done with
the `pull` command.

* `cd` back into the first local repository (*e.g.* `git_tutorial`) and run the
  `git pull` command. This will download the newest changes from the remote
  repository and merge them locally automatically.

* Check that everything is up-to-date with `git status`.

Another command is `git fetch`, which will download remote changes *without*
merging them. This can be useful when you want to see if there are any remote
changes that you *may* want to merge, without actually doing it, such as in
a collaborative setting. In fact, `git pull` in its default mode is just
a shorthand for `git fetch` followed by `git merge FETCH_HEAD` (where
`FETCH_HEAD` points to the tip of the branch that was just fetched).

That's quite a few concepts and commands you've just learnt! It can be a bit
hard to keep track of everything and the connections between local and remote
Git repositories and how you work with them, but hopefully the following figure
will give you a short visual summary:

![](images/git_overview_remote.png){ width=600px }

> **Quick recap**

> We have learnt the difference between local and remote copies of git
> repositories and how to sync them:
>
> - `git push` uploads commits to a remote repository
> - `git pull` downloads commits from a remote repository and merges them
>   to the local branch
> - `git fetch` downloads commits from a remote repository without merging
>   them to the local branch
> - `git clone` makes a local copy of a remote repository

## Remote branches

Remote branches work much in the same way a local branches, but you have to
push them separately; you might have noticed that GitHub only listed our
repository as having one branch (you can see this by going to the *Code* tab).
This is because we only pushed our `main` branch to the remote. Let's create
a new local branch and add some changes that we'll push as a separate branch to
our remote - you should do this in the original `git_tutorial` repository, so
move back into that directory.

* Create a new branch named `trimming` and add the `--trim5 5` flag to the
  bowtie2-command part of the `Snakefile`, which should now look like this:

```bash
shell("bowtie2 --very-sensitive-local --trim5 5 -x " + indexBase + " \
    -U {input.fastq} > {output} 2> {log}")
```

* Add and commit the change to your local repository.

* Instead of doing what we previously did, *i.e.* merge the `trimming` branch
  into the `main` branch, we'll push `trimming` straight to our remote:

```bash
git push origin trimming
```

* Go the repository at GitHub and see if the new branch has appeared. Just above
  the file listing click the *Branch* drop-down and select the new branch to
  view it. Can you see the difference in the `Snakefile` depending on which
  branch you choose?

We now have two branches both locally and remotely: `main` and `trimming`. We
can continue working on our `trimming` branch until we're satisfied (all the
while pushing to the remote branch with the same name), at which point we want
to merge it into `main`.

* Checkout your local `main` branch and merge it with the `trimming` branch.

* Push your `main` branch to your remote and subsequently delete your local
  `trimming` branch.

The above command only deleted the local branch. If you want to remove the
branch from the remote repository as well, run:

```bash
git push origin --delete trimming
```

> **Quick recap**

> We learned how to push local branches to a remote with `git push origin
> <branch>` and how to delete remote branches with `git push origin --delete
> <branch>`.

## Sharing tags

Your local repository tags are not included when you do a normal push. To push
tags to the remote you need to supply the `--tags` flag to the `git push`
command:

```bash
git push --tags
```

* Go to the repository overview page on GitHub. You will see that the repository
  now has three tags! If you click on *Tags* you will be given an overview of
  the existing tags for your repository - if you click *Releases* you will see
  more or less the same information. Confusing? Well, a *tag* is a git concept
  while a *release* is a GitHub concept that is based on git tags. Releases add
  some extra features that can be useful for distributing software and are done
  manually from the repository's GitHub page.

* Click on one of the tags. Here users can download a compressed file
  containing the repository at the version specified by the tags.

> ![](images/github_tags_list.png){ width=600px }

Alternatively, git users who want to reproduce your analysis with the code used
for the publication can clone the GitHub repository and then run `git checkout
publication`.

> **Quick recap**

> We learned how to push git tags to a remote by using the `--tags` flag.

repository: rekren/workshop-reproducible-research

repo_name: rekren/workshop-reproducible-research


text:
# Parameter Optimization for the PID controller
The PID controller in the repo is set with a default parameter of `Kp=0.165`, `Ki=0.001`, and `Kd=1.358`. These parameters are obtained via a manual tuning following mostly the twiddle algorithm.

## Effects of the parameters
I have the following observations from tuning the controller. T
* The `Kp` parameter mainly controls how much the car responds to an error in the position. A larger Kp leads to a more "responsive" steering.
* The `Kd` parameter reduces overshoot in the response. A larger `Kd` leads to less overshoot if there is a overshoot. When the car travels a zig-zag pattern, increasing `Kp` would reduces the amoutn of zig-zag.
* The `Ki` parameter reduces long term drift. If `Ki` is zero, then the car tends to be a bit off-centered for a long time. If `Ki` is large, the car would quickly moves towards the edge.

## Optimization procedure
The optimization mostly follows the twiddle algorithm, except in the case of `Ki`, I use the intuition above to significantly reduces `Ki` from an intermediate value of 0.06 (which does not work) to 0.01 and then 0.001. The optimization procedure is described as follows:

* The error criterion used in the twiddle is defined as follows: If the car has not been able to finish the trip, then it is defined as (minus) the total number of calls to the PID controller before the car touches the shoulders of the road; If the car has finished the whole trip without getting stuck, we define the total criterion as the the average error during the trip until the car has reached the beginning of the bridge the second time.
* We initialize with 0, 0, 0 and use dPp=dPi=dPd=0.01
* We update the parameters following the twiddle procedure.

Below is a list of parameter settings (`[Kp, Ki, Kd]`) that had the **best** error before another parameter settings achieve a better one:
* `[0.1, 0, 0]`
* `[0.1, 0, 0.1]`
* `[0.1, 0, 0.21]`
* `[0.1, 0, 0.331]`
* `[0.1, 0, 0.464]`
* `[0.1, 0, 0.464]` which achieves a full trip
* `[0.1, 0, 0.61]`
* `[0.1, 0, 0.771]`
* `[0.1, 0.001, 0.771]` before this, `dPi` is approximately 0.059. When setting `Ki` to between 0.59 and 1, the car would very quickly go off the road. Therefore, I then decided to significatly reduces the value of `Ki`, first to 0.01 and then to 0.001.
* `[0.165, 0.001, 0.771]`
* `[0.165, 0.001, 0.948]`
* `[0.165, 0.001, 1.143]`


text:
## Conditional blink example.

Blink LED connected to GPIO2 only if GPIO3 is HIGH.

Demonstrates how to:
- set pin state to LOW or HIGH,
- read pin state,
- use RX pin as GPIO3,
- use of SDK timers.

## Flashing.

```
$ cd build
$ cmake ..
$ make blink_cond_ex_flash
$ miniterm.py /dev/ttyUSB0 74880
```

repository: rzajac/esp-ecl

repo_name: rzajac/esp-ecl


text:
# thomas-blog
A blogging and portfolio website made with Jekyll, host using docker.

www.thomasmtran.com

# How to build site

    docker-compose run --rm build

# How to test site on local server

    docker-compose up test

Visit http://localhost:4000 to see test site

Use `ctrl-c` to stop local server

Finally kill the test container

    docker-compose down

# How to host static website behind a reverse proxy

Use linuxserver's `swag` docker image

https://fleet.linuxserver.io/

Follow site instructions to properly setup `swag` container.

e.g. domain name, subdomains

Clone the repo into `<bind-mounted-swag-config-folder>/www/`

    git clone https://github.com/thomastran8/thomas-blog.git

Copy `thomasblog.subdomain.conf` to subdomain folder

    cp thomasblog.subdomain.conf <bind-mounted-swag-config-folder>/nginx/proxy-confs

Restart swag docker container

    docker restart swag


text:
---
layout: single-card
title: Cloud
image: /craft-challenges/assets/images/dev/cloud.png
category: dev
description: Cloud computing is the delivery of computing services/servers, storage, databases, networking, software, analytics and more—over the Internet (“the cloud”).
---

## What ?
Cloud computing is the delivery of computing services/servers, storage, databases, networking, software, analytics and more—over the Internet (“the cloud”).
Companies offering these computing services are called cloud providers and typically charge for cloud computing services based on usage, similar to how you are billed for water or electricity at home.

### Different types of cloud services
Most cloud computing services fall into three broad categories. These are sometimes called the cloud computing stack, because they build on top of one another.

#### Infrastructure-as-a-service (IaaS)
The most **basic** category of cloud computing services.
With IaaS, you rent :
* IT infrastructure—servers and virtual machines (VMs)
* Storage
* Networks
* Operating systems—from a cloud provider

#### Platform as a service (PaaS)
Platform-as-a-service (PaaS) refers to cloud computing services that supply an **on-demand environment for developing, testing, delivering and managing software applications**.
PaaS is designed to make it easier for developers to quickly create web or mobile apps, without worrying about setting up or managing the underlying infrastructure of servers, storage, network and databases needed for development.

#### Software as a service (SaaS)
Software-as-a-service (SaaS) is a method for **delivering software applications over the Internet**, on demand and typically on a subscription basis.
With SaaS, cloud providers host and manage the software application and underlying infrastructure and handle any maintenance, like software upgrades and security patching. Users connect to the application over the Internet, usually with a web browser on their phone, tablet or PC.

![Cloud]({{ site.baseurl }}/assets/images/cloud2.jpg)

## Why ?
Cloud computing has a major impact in our industry. It has been a big shift from the traditional way businesses think about IT resources.
It has a lot of benefits :
* Cost reduction : eliminates the capital expense of buying hardware and software
* Speed : provision resources in a few minutes
* Global scale : ability to scale elastically
* Improved productivity : IT teams can spend time on achieving more important business goals than provisioning servers
* Performance : services run on a worldwide network of secure datacenters, which are regularly upgraded to the latest generation of fast and efficient computing hardware.
* Reliability : Cloud computing makes data backup, disaster recovery and business continuity easier and less expensive

## How ?
* Choose a cloud provider, here are the 3 most used at the moment :
    * Amazon Web Services
    * Azure
    * Google Cloud
* Deploy an application in the cloud
    * A simple web app for example

## Resources
* [Create a web app and deploy it in Azure](https://azure.microsoft.com/en-us/get-started/web-app/)
* [Deploying Applications to AWS Elastic Beanstalk Environments](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.deploy-existing-version.html)
* [Google Cloud Getting started](https://cloud.google.com/getting-started/)

## Main cloud providers documentations
* [Amazon web services](https://aws.amazon.com/fr/documentation/)
* [Azure](https://docs.microsoft.com/en-us/azure/index)
* [Google cloud](https://cloud.google.com/docs/)

![Cloud]({{ site.baseurl }}/assets/images/cloud1.png)

repository: stephanhuez/craft-challenges

repo_name: stephanhuez/craft-challenges


text:
# Intro to XCode and Autolayout

## Objectives

- Position UI elements using autolayout
- Describe autolayout's relational properties
- Learn about debugging features of XCode

## Vocabulary

- Constraints
- Frame
- UIView
- Origin
- Child view
- Superview
- Center
- Position(x, y)

## Constraints

![Constraints](apple-constraint.png)

## Class Material

Watch:

[UIViews](https://www.youtube.com/watch?v=t_lmUi_E-70&feature=youtu.be)

[Positioning UIViews](https://www.youtube.com/watch?v=3GPnG5jsKS8&feature=youtu.be)

[Autolayout - Interface Builder](https://www.youtube.com/watch?v=PYqaVQlKT0A)

Read:

[Apple Documentation](https://developer.apple.com/library/content/documentation/UserExperience/Conceptual/AutolayoutPG/index.html)

## Challenges

Build the following in interface builder in Xcode

1. Place 2 UIViews in interface builder that each take 50% of the viewcontrollers space.

![50/50](5050.png)

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

2. Place 2 UIViews in interface builder, one takes twice the space of the other, i.e. 2 to 1 ratio.

![2 to 1](2to1.png)

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

3. Place two views side by side equally

![Two Blocks](twoBlocks.png)

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

4. Place a UIView and 2 labels

![User layout](userLayout.png)


text:
# Bayesian time-difference-of-arrival positioning using pymc3

This code carries out Bayesian time-difference-of-arrival positioning using pymc3 (https://docs.pymc.io/).

See my blog post here: https://benmoseley.blog/my-research/bayesian-positioning-with-pymc3/

### Task

**Multilateration** is a classic positioning problem where given the arrival times at a set of receivers from a source of energy waves propagating outwards one tries to infer the location of the source.

The simplest way to solve this problem is to draw the locus of possible source locations for each receiver and search for where they overlap. However, when the time of arrival measurements are noisy and the wave speed is uncertain, the loci will not always overlap and this method becomes ambiguous. This method also assumes we know the wave speed and the time at which the source was emitted, which are not always known.

Hyperbolic time-difference-of-arrival (TDOA) methods are a different in that they do not need to know the source emission time, but can still **suffer from ambiguity in the presence of noise**.

### Workflow

Here we treat the problem by writing a **fully probabilistic model in pymc3** and sample over its posterior distribution to infer the source location. We define the source location, observed arrival times and wave speed as random variables and assert priors over them, allowing us to solve the multilateration problem without knowing the source emission time and the wave speed and to quantify our uncertainty.

### Installation

bayesian-time-difference-of-arrival-positioning only requires Python libraries to run. We recommend setting up an new environment, for example:
```bash
conda create -n position python=3.7  # Use Anaconda package manager
conda activate position
```
and then installing the following dependencies:
```bash
conda install scipy matplotlib jupyter
pip install pymc3
```

### Getting started

Below is an example use of `BayesianTDOAPositioner`, which is the main class.

For more help please see the [Jupyter notebook](https://github.com/benmoseley/bayesian-time-difference-of-arrival-positioning/blob/master/Bayesian%20time-difference-of-arrival%20positioning%20with%20pymc3.ipynb) or my [blog post](https://benmoseley.blog/my-research/bayesian-positioning-with-pymc3/).

```python
# generate some test data
N_STATIONS = 4
stations = np.random.randint(250,750, size=(N_STATIONS,2))# station positions (m)
x_true = np.array([500,500])# true source position (m)
v_true = 346.# speed of sound (m/s)
t1_true = 0.5*(np.sqrt(2)*500/346)# can be any constant, as long as it is within the uniform distribution prior on t1
d_true = np.linalg.norm(stations-x_true, axis=1)
t0_true = d_true/v_true# true time of flight values
t_obs = t0_true-t1_true# true time difference of arrival values
t_obs = t_obs+0.05*np.random.randn(*t_obs.shape)# noisy observations

# define a forward probabilistic model and sample the posterior
B = BayesianTDOAPositioner(# defines a pymc3 forward model
                 stations,
                 x_lim=1000,# maximum box size (m)
                 v_mu=346,# mean of velocity prior (m/s)
                 v_sd=20,# standard deviation of velocity prior (m/s)
                 t_sd=0.05)# standard deviation of observed values (s)
trace, summary, _, _ = B.sample(t_obs)
```

Estimated location of source:

Posterior samples generated by `pymc3`:


text:
# Mapbender3 icon library

The Mapbender3 - IconSet was created and produced with the [IcoMoon](https://icomoon.io/) web app.

These icons are used by many GIS projects, such as [mapbender](http://mapbender3.org/).
By vector icons the resolution of the display on each platform is adapted to the circumstances of the screen.

## Preview
It's posible to see live example of the icons [here](http://rawgit.com/mapbender/icons/master/demo.html)

## Integration

### Composer

Add the requirement parameter to the [composer](https://getcomposer.org/) configuration.

Configure the path where font files should be copied in the "component-dir" parameter.
```javascript
{
  "require": {
    "mapbender/icons",: "*"
  },
  "config": {
       "component-dir": "web/components"
  }
}
```

Update and install the requirements.

```sh
composer update
```

## Change font

To change the icons to use the [IcoMoon](https://icomoon.io/app/#/select) site.

* Click on Import Icons on the toolbar
* Select and load the [selection.json](selection.json) project file.
* Edit the existing mapbender-icons "Selection"
* Click "Generate Font" on the bottom panel
* Click "Download" on the bottom panel to extract the ZIP into this GIT project folder
* Commit, Push/Pull-request


text:
---
layout: single
title: Idea 041 - BioPunks Garden
date: '2023-03-09 00:41'
categories: ideas YearOfIdeas
tags: games projects ideas
excerpt: Youre a Biopunk building their garden by selectively breeding for DNA markers in plants
---

> This post is part of [the 100 project ideas](/projects/2023-100-ideas/) project. [#The100DayProject](https://www.the100dayproject.org/). I am looking for feedback. Comment below or DM me via social media Instagram, Twitter.

## Description

The theme of this game is longevity. It's part of a thought experiment on how you could get a person to play the game over an entire year. I also wanted a game that wasn't violent or competitive.

Part [Crypto Kitties](https://www.cryptokitties.co/), part [Tamagotchi](https://en.wikipedia.org/wiki/Tamagotchi), part [ScreenSaver](https://en.wikipedia.org/wiki/Screensaver)

In this game you are a [biopunk](https://en.wikipedia.org/wiki/Biopunk) gardener building their [genetically engineered](https://en.wikipedia.org/wiki/Genetic_engineering) garden of super plants. You can create new species of plants by combining DNA from several species together to create new species. These plants fill in your garden and grow over time.

### Plant Genes

Each plant has its own set of [genes](https://en.wikipedia.org/wiki/Gene) that dictate how the plant looks and its characteristics. This is heavily based on [Crypto Kitties genes](https://guide.cryptokitties.co/guide/cat-features/genes), this video gives a good description of [how the genes work in Crypto Kitty](https://www.youtube.com/watch?v=MtTyStoOLqo)

For example the genes could represent the following attributes: base color, highlight color, accent color, flower color, flower shape, stem type, accessory type, etc…

For each gene there are 26 possible attributes (a-Z)

For each gene there are dominant (D) and recessive (R) genes. (We could have multiple regressive genes to make this much more complex)

- ```[(A),(Y)]``` =  Base color, has a dominant color of (A), with a recessive color of (Y)
- ```[(D),(K)]``` =  Highlight color, has a dominant color of (D), with a recessive color of (K)
- ```[(G),(B)]``` =  Accent color, has a dominant color of (G), with a recessive color of (B)
Etc…

This plants genes could be represented with this sequence: “AYDKGB”

The dominant gene for each attribute of the plant will be visible. In this case Base color (A), Highlight color (D), Accent color (G). The recessive gene is not used.

### Plant Breeding

A more random version of [Punnett_square](https://en.wikipedia.org/wiki/Punnett_square)

When breeding the plants, you take two plants and combine them together. The combination of their parents' genes will produce a new plant with a unique gene sequence.

The dominant gene for each attribute from each parent is worth 30%. The recessive genes from each parent is worth 15%, the last 10% is random mutation.

For example:

- Parent 1: ```[AY][DK][GB]```
- Parent 2: ```[AR][TD][XY]```

The child has the following percentage change for the dominant gene of each trait.

- **Base color**: A=60% (2x Dominant), R=15% (1x Recessive), Y=15% (1x Recessive), ?=10% (Random mutation)
- **Highlight color**: D=45% (Dominant + Recessive), K=15% (1x Recessive), T=30% (1x Dominant), ?=10% (Random mutation)
- **Accent color**: G=30% (1x Dominant), X=30% (1x Dominant), B=15% (1x Recessive), Y=15% (1x Recessive), ?=10% (Random mutation)

The recessive gene can’t be the same as the Dominant. So the same calculation is done with the dominant gene removed as an option.

Child: ```[AR][DJ][BX]``` - This child has the same base color (A), and highlight color (D) as parent 1, but the accent color (B) doesn’t match the physical appearance of either parent. A new random mutation has also occurred adding “J” regressive to the highlight color.

If you want to breed for specific traits, look for parents that have the traits genes in their DNA. You have a better chance to produce a child with this trait if their parents have it as their dominant/physical traits, but there is still a chance if it's regressive.

If people don’t want to do all the work learning about the genes or trying to breed for certain traits, they can just breed the plants and make a pretty garden. It doesn’t have to be more complex than that. But for people who want to deep dive into it they can.

### Real time

The game is played in real time. We expect players to log in and play the game for 20-30 mins performing a few actions then log off for the day. All actions are time locked to the plant.

- Each plant can only breed every 24 hours.
- A new plant can’t be bred until it's 3 days old.
- Etc…

Each day the plant will grow until it reaches maturity. Afterwards the plant will gain and lose leaves, the flowers will come and go with the seasons, it will act like a real plant.

The user has a max amount of space in the gardens. They may need to toss old plants to make room for new plants. This could be visualized by using pots that the plants need to be potted into.

We need some reward for people who “tend” their plants, and return each day to make slight adjustments to the garden. Think feeding the Tamagotchi. Maybe happy plants do something special that tired unhappy plants don’t. Or they gain more pots the more time they spend in the garden allowing them to have more plants.

There should be something to do with the seasons. Spring, Summer, Fall, Winter. Maybe some plants are bloom in different seasons, etc..

We do not want to punish people for not logging in. If they go on vacation that is okay. We don’t want to add stress to peoples lives about their virtual garden.

### Lock screen and viewing your garden

The garden should look beautiful, in a way that people will just want to watch it. There should be small animations that each plant does, or it should react to its environment. Maybe little birds and bees come by or ants crawl up the stocks. Some way of showing life.

It should be relaxing and enjoyable just to watch your garden grow.

The garden should be available to view from your computer's screensaver or lock screen or your phone's lock screen. We want some way of reminding people of their plants.

### Visuals

I would love for this to be 3D but I don’t know how to do it in 3D maybe in the future. For the first version it will be.

Stackable SVG images for with different attributes, CSS classes for colors,

### Unsorted ideas

- The gene order could be randomized on start up. This means the user will need to breed to figure out what gene connects with what physical trait. This might be too advanced for most people.
- Radiation, you can scramble the regressive gene. Randomizing it.
- A gene that prevents the plant from breeding.
- If people really don’t want to wait on the time lock for the plants, let them pay us money to speed things up.
- It would be cool if there was some sort of trading mechanism that allowed people to trade plants with each other. This would allow more genetic diversity to your garden.
- Allow people to buy new plants from the store (insert of genetic diversity). This should be hard or expensive to do. Instead we want people to breed traits instead of buying traits.
- Adding in a harvest mechanic. If you find a certain gene sequence that you really love you can splice the gene sequence up and sell it at the market. or buy new gene sequence from the market.  (Harvest moon style)
- Maybe a mini game for doing the gene splicing, like match-3, or tetris or something

## Prior art

- [Crypto Kitties](https://www.cryptokitties.co/) - CryptoKitties is a game centered around breedable, collectible, and oh-so-adorable creatures we call CryptoKitties! Each cat is one-of-a-kind and 100% owned by you; it cannot be replicated, taken away, or destroyed.
- [Tamagotchi](https://en.wikipedia.org/wiki/Tamagotchi) - Tamagotchi Is a handheld digital pet that was created in Japan by Akihiro Yokoi of WiZ and Aki Maita of Bandai.
- [Harvest Moon](https://en.wikipedia.org/wiki/Harvest_Moon_(video_game)) - Farming game from SNES.

## Market

People who want to learn about genes and DNA, people who want a relaxing game, gardeners, biopunks

gha_language: SCSS


text:
# simon

This document will provide details regarding the web application simon, providing details on the application summary, details of files, terminology, as well as technical details regarding the development of the application.

## Getting Started
simon can be cloned using both HTTPS and SSH via git commands.

### Prerequisites

To download and be able to make edits to the simon project you will need to install git [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).

### HTTPS

Navigate in your terminal/command-prompt to the folder in which you would like to store the application.

In your terminal/command-prompt type in `git clone https://github.com/jkys/simon.git` and press `enter` or `return` to start downloading all the files into the select folder.

### SSH

Navigate in your terminal/command-prompt to the folder in which you would like to store the application.

In your terminal/command-prompt type in `git clone git@github.com:jkys/simon.git` and press `enter` or `return` to start downloading all the files into the select folder.

## Summary

Simon is an old game created by Hasbro and this is an digital abstraction of that same game. It is entirely written in x64 Assembly and a fully working game with a high score tracker and music.

## Built With

* [Irvine 32](http://kipirvine.com/asm/gettingstartedvs2015/index.htm) - For a general library to be able to implement more features using Assembly

## Built In

* x64 Assembly

## Authors

* [Jonathan Keys](https://github.com/jkys) - Initial work/maintenance
* [Maya Bloom](https://github.com/bloomm601) - Initial work
* [Christopher Potter](https://github.com/potterc1) - Initial work

See also the list of [contributors](https://github.com/jkys/simon/graphs/contributors) who participated in this project.

## License

This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/jkys/simon/blob/master/LICENSE.md) file for details

## Acknowledgments

* Thank you for the wonderful developers at Irvine for the library to be able to use most of the feature of assembly which we would not have been able to implement ourselves.

repository: jkys/simon

repo_name: jkys/simon


text:
# Minecraft Servers

## Java Edition

The Minecraft Java Edition client knows how to communicate with any TCP server that follows the [Minecraft server protocol](https://wiki.vg/Protocol). Servers that conform to this are called "Notchian" servers. While there is an [official implementation](https://www.minecraft.net/en-us/download/server) of this server provided by Mojang, there are re-implementations and modifications of it.

### Modifications

Below you can see a hierarchy of the most popular server software based on the official server.

- [Vanilla Server](https://www.minecraft.net/en-us/download/server)
  - [CraftBukkit](https://bukkit.org)
    - [Spigot](https://spigotmc.org)
      - [Cheetah](https://hub.spigotmc.org/stash/projects/CHEETAH)
      - [PaperMC](https://papermc.io)
        - [Nyper](https://github.com/NyCodeGHG/Nyper)
        - [TacoSpigot](https://tacospigot.github.io)
        - [Tuinity](https://github.com/Spottedleaf/Tuinity)
          - [Akarin](https://github.com/Akarin-project/Akarin)
          - [Airplane](https://github.com/TECHNOVE/Airplane)
          - [Purpur](https://github.com/pl3xgaming/Purpur)
            - [Yatopia](https://github.com/YatopiaMC/Yatopia)
  - [Sponge](https://spongepowered.org)
  - [Forge](https://minecraftforge.net)
  - [Fabric](https://fabricmc.net)
    - [Woven](https://www.wovenmc.net/)

#### CraftBukkit

[CraftBukkit](https://bukkit.org/) is the most commonly known modification of the vanilla server. It doesn't change or modify the protocol, but it provides an API (Bukkit) for server-side modifications called plugins. CraftBukkit and Bukkit themselves have in turn be forked and modified multiple times. The most popular CraftBukkit fork nowadays is Spigot, which also has several popular forks.

CraftBukkit and most of its descendants are compatible with each other for the most part, meaning that you can often write a plugin for one of them and it will work on all of them.

See [the API repository](./api-repository.md) for a list of tools for Bukkit-based plugin development.

#### Sponge

[Sponge](https://spongepowered.org) is another modified vanilla server independent of CraftBukkit. It also has a plugin system with an API to create server-side mods, but additionally, it's commonly used as a server for the [Forge](http://files.minecraftforge.net) modding platform.

#### Cheetah
[Cheetah](https://hub.spigotmc.org/stash/projects/CHEETAH) is a Spigot fork by the SpigotMC Team. It allows you to disable entities and block ticking.

[Source](https://www.spigotmc.org/threads/cheetah.38095/)

#### TacoSpigot
[TacoSpigot](https://tacospigot.github.io) is a even higher performance fork of [Paper](https://papermc.io). (Not maintained anymore)

#### Tuinity
[Tuinity](https://github.com/Spottedleaf/Tuinity) is a Fork of [Paper](https://github.com/PaperMC/Paper) aimed to improve performance at high playercounts.

#### Akarin
[Akarin](https://github.com/Akarin-project/Akarin) is a powerful Minecraft Server Software based on [Tuinity](https://github.com/SpottedLeaf/Tuinity) by [@akarin-project](https://github.com/Akarin-project/)

#### Purpur
[Purpur](https://github.com/pl3xgaming/Purpur) is a fork of [Paper](https://github.com/PaperMC/Paper), [Tuinity](https://github.com/SpottedLeaf/Tuinity), Airplane with the goal of providing new and interesting configuration options, which allow for creating a unique gameplay experience not seen anywhere else.

#### Airplane
[Airplane](https://github.com/TECHNOVE/Airplane) is a Performance orientated Bukkit implementation based off [Tuinity](https://github.com/SpottedLeaf/Tuinity).

#### Yatopia
[Yatopia](https://github.com/YatopiaMC/Yatopia) combines the code from many Paper forks and optimization mods, as well as many unique optimizations.

#### Nyper
[Nyper](https://github.com/NyCodeGHG/Nyper) is a fork of [Paper](https://github.com/PaperMC/Paper) which forces you to use Java 11 and makes the **/reload** command nicer with better tab completion.

#### Forge

[Forge](https://minecraftforge.net) is a modified version of the vanilla server (& client) just like CraftBukkit, but it's not only for server side modding, it also has a client version that must be installed to work.

#### Fabric

[Fabric](https://fabricmc.net) is an alternative to Forge which aims to be more modular and with a more modern api than forge. It also has native support for [Kotlin](https://kotlinlang.org), [Scala](https://www.scala-lang.org/) and [Groovy](https://groovy-lang.org/).

### Re-Implementations

There is a number of reasons why it may be beneficial to use a server that does not depend on the official vanilla server at all. First, it prevents the [licensing issues that occur when redistributing proprietary code](https://blog.jwf.io/2020/04/open-source-minecraft-bukkit-gpl/). Second of all, it gives you a lot more freedom in how to structure the server, which systems to use etc.

There are many independent Notchian server implementations and you can find [unofficial lists](https://wiki.vg/Server_List) on the internet. Below, we list a couple of Java-based servers that we find interesting.

- [Cleanstone](https://github.com/CleanstoneMC/Cleanstone) by [@Fionera](https://github.com/Fionera) and [@MyzelYam](https://github.com/MyzelYam)

  > Cleanstone is an alternative server software that is based on Spring and Multi-Threading.

- [MCHPRS](https://github.com/MCHPR/MCHPRS) by [@MCHPR](https://github.com/MCHPR)

  > A Minecraft creative server built for redstone. Each 256x256 plot runs on a separate thread, allowing for less lag, more concurrency, and many awesome extra features.

- [Minestom](https://github.com/Minestom/Minestom) by [@Minestom](https://github.com/Minestom/)

  > Minestom is an alternative server software that aims to improve the performance.

   __Main features__:
  - Remove the overhead of vanilla features
  - Multi-threaded (Chunks & Entities)
  - Instance system which is much more scalable than worlds
  - Modern API

In case you want to play around with the protocol in Java yourself, this may be of use:

- [MCProtocolLib](https://github.com/Steveice10/MCProtocolLib) by [@Steveice10](https://github.com/Steveice10/MCProtocolLib)

  > MCProtocolLib provides a protocol library to send and receive packets without using Spigot as dependency.

- [minecraft-server](https://github.com/NyCodeGHG/minecraft-server) by [@NyCodeGHG](https://github.com/NyCodeGHG)

  > This is a small project by me experimenting with the minecraft protocol.

### Proxies

Reverse proxies can be used to coordinate connections between different servers.

- [BungeeCord](https://github.com/SpigotMC/BungeeCord)
  - [Waterfall](https://github.com/PaperMC/Waterfall)
    - [Travertine](https://github.com/PaperMC/Travertine)
- [Velocity](https://velocitypowered.com)

#### BungeeCord

BungeeCord is the de-facto standard for Minecraft Networks. You can link multiple servers together and dynamically switch between them. Most Networks use [Waterfall](https://github.com/PaperMC/Waterfall) by the PaperMC team. It's like Paper for spigot, but for bungeecord.

#### Velocity

Velocity is a modern alternative to BungeeCord which is faster and more secure than BungeeCord. It also has a nice [Plugin API](https://docs.velocitypowered.com/en/latest/developers/creating-your-first-plugin.html). Also it provides some compatibility stuff, so it can handle the BungeeCord Plugin Messaging Channel.

####

## Bedrock Edition

- [Cloudburst](https://github.com/CloudburstMC/Server) by [@CloudburstMC](https://github.com/CloudburstMC)

  > Cloudburst is a server software for Minecraft: Bedrock Edition. It has a few key advantages: written in Java and friendly structure.

## Bridges

There are attempts to construct bridges between the Bedrock and the Java edition protocols, so that players from both editions can play together. Note that none is fully production ready or 100% functional yet.

- [Geyser](https://github.com/GeyserMC/Geyser/) by [@GeyserMC](https://github.com/GeyserMC/), a proxy allowing Bedrock players to join Java servers

- [Waterdog](https://github.com/yesdog/Waterdog) by [@yesdog](https://github.com/yesdog), a fork of Waterfall/BungeeCord adding Bedrock protocol support

repository: NyCodeGHG/spigot-plugin-resources

repo_name: NyCodeGHG/spigot-plugin-resources


text:
#3D Geometries in Gibber#

The 3D capabilities in Gibber are built around the excellent [Three.js library](http://threejs.org). Gibber provides 3D geometries (with more to come) that take advantage of Gibber's sequencing and mapping abstractions. Below is a list of the current geometries in Gibber and the default values used in their constructors:

```js
Cube:  { width:50, height:50, depth:50 },

Sphere: { radius:50, segments:16, rings: 16 },

Tetrahedron: { radius:50, detail: 0 },

Octahedron: { radius:50, detail: 0 },

Icosahedron: { radius:50, detail: 0 },

Cylinder: { radiusTop:20, radiusBottom:20, height:100, radiusSegments:8, heightSegments:1, openEnded:false},

Torus:  { radius:50, tube:10, radialSegments:8, tubularSegments:8, arc:Math.PI * 2 },

Knot: { radius: 50, tube:5, radialSegments:64, tubularSegments: 8, p:5, q:3, heightScale:1 },

Plane: { width:1, height:1, segmentsWidth:1, segmentsHeight:1 }

Parametric: { func: parametricFunc, slices:8, stacks:8 },
```

The properties outlined above can only be set upon instantiation, as changing them requires an expensive recalculation of the entire underlying mesh. However, all 3D geometries share properties that can be manipulated dynamically, including `scale`, `rotation`, and `position`.

```js
a = Cube({ width:25, height:25, depth:75 })
  .rotation.seq( Rndf(0, Math.PI), ms(250) )
  .scale.seq( Rndf(.5,2), ms(500) )
  .position.x.seq( [-50,0,50], ms(1000) )
```

Note that you can refer to the individual x,y and z components of these properties (as in `.position.x.seq` above) or change the value of all three results simultaneously. For example:

```js
a = Knot({ tube:10 })

// change the scale of all three dimensions
a.scale = .5

// change the scale on the y-axis
a.scale.y = 1.5
```

The ability to selectively target x,y and z components applies to Gibber's sequencing and mapping abstractions as well.

###Color###
Color is not (currently) tied into Gibber's mapping and sequencing abstractions. It is fairly easy to set and manipulate though. The colors consist of three components, `r`,`g`, and `b`. These components all have a value in the range `{0,1}` and can be changed individually.

You can also assign any valid CSS color to a geometry; these values will be converted to the range `{0,1}`.

```js
a = Octahedron() // default color is white, or {r:1, g:1, b:1}
a.color.r = 0    // color is {r:0, g:1, b:1}
a.color.b = 0    // color is {r:0, g:1, b:0}

a.color = '#f00' // color is {r:1, g:0, b:0}
a.color = 'rgb(127,127,0)' // color is {r:.5, g:.5, b:0}
```

##Parametric##

![Parametric geometry in Gibber](../images/parametric.png)
The `Parametric` object in Gibber allows you to define a function that will determine all points in the mesh. By default, Gibber uses a simple noise function:

```js
var parametricFunc = function(u,v) {
  var points = rndf(-50,50,3)

  return Vec3( points[0], points[1], points[2] )
}
```

`Vec3` is a constructor for a three-component vector. This function will be called for every pair `u,v`; `u` is determined by the number of slices in the geometry along the horizontal axis (this can be set upon instantiation) while `v` is set according to the number of stacks along the vertical axis. Below is a function that outputs an approximation of a sphere:

```js
var size = 50
function sphere(u, v) {
  var x,y,z

  u *= Math.PI
  v *= 2 * Math.PI

  x = size * Math.sin( u ) * Math.cos( v )
  y = size * Math.sin( u ) * Math.sin( v )
  z = size * Math.cos( u )

  return Vec3( x,y,z )
}

p = Parametric({ func: sphere }).spin(.0005)
```

##Spinning##
All geometries have a `spin` method that allows them to spin along all three axes. The amount of spin is passed in radians.

```js
// spin .005 radians on each axis per-frame
a = Cube().spin(.005)

// spin only on the y-axis
b = Cube().spin( 0, .005, 0 )

// end spinning
a.spin( 0 ); b.spin( 0 );
```

##Video Textures##
Very simple video texturing can be performed... hassle me if you want more options for this (or if you want options for regular image texturing).

```js
a = Video() // Chrome only

b = Cube({ texture: a }).spin(.005)
```

repository: charlieroberts/Gibber-Manual

repo_name: charlieroberts/Gibber-Manual