text:
# ChangeDetector

Easily detect differences between objects.

Download using NuGet: [ChangeDetector](http://nuget.org/packages/ChangeDetector)

## Overview
ChangeDetector will take two objects of the same type and determine if they differ. It also lets you take snapshots of an object over its lifetime to see if and how it has changed. This is useful in scenarios where you need to track changes but do not want to complicate your business logic with recording every little update. Instead, you simply define which properties you want to track and register the entity with a tracker. After your business logic has run through, you can ask the tracker if any of those properties changed. You could use this to determine if an external system needs updated or even use it build up SQL commands inside of a homespun ORM -- there are many applications.

In order to track changes, you must create an `EntityConfiguration` for each entity you wish to track. This class will indicate which entity properties are of interest and how you wish to display them. You can define an entity configuration by simply creating a subclass of `EntityConfiguration<TEntity>`:

    public class TestEntityChangeDetector : EntityConfiguration<TestEntity>
    {
        public TestEntityChangeDetector()
        {
            Add(x => x.StringValue, "String", Formatters.FormatString);
            Add(x => x.DateTimeValue, "DateTime", Formatters.FormatDateTime);
            Add(x => x.MoneyValue, "Money", Formatters.FormatMoney);
            Add(x => x.IntValue, "Int", Formatters.FormatInt32);
            Add(x => x.BooleanValue, "Boolean", Formatters.FormatBoolean);
            Add(x => x.PercentValue, "Percent", Formatters.FormatPercent);
            Add(x => x.GuidValue, "Guid", Formatters.FormatGuid);
        }
    }

Within the constructor, you call `Add` for each property you wish to track. The first argument to `Add` is a lambda to get at the property you're tracking. The next argument is the human-friendly name you want to give the column. The third argument is a delegate to convert the value to a human-friendly string. The `Formatters` static class provides formatters for common values. There is also a fourth `IEqualityComparer` argument, in cases where you are not working with simple types. Only the first argument is required; by default the display name will default to the property name and the formatter will simply call `ToString()`.

## Detecting Changes
If all you want to do is compare two objects, you can work with the `EntityConfiguration` directly. You can get the list of changes for two objects by calling `GetChanges`.

    TestEntityChangeDetector detector = new TestEntityChangeDetector();
    TestEntity entity1 = new TestEntity() { StringValue = "ABC" };
    TestEntity entity2 = new TestEntity() { StringValue = "DEF" };
    IEnumerable<IPropertyChange> changes = detector.GetChanges(entity1, entity2);
    // String: ABC -> DEF

Or, if you just need to know if a value changed:

    bool hasChanged = detector.HasChange(x => x.StringValue, entity1, entity2);

The `IPropertyChange` interface has the following members:
* Property - The `System.Reflection.PropertyInfo` object for the property that changed.
* DisplayName - The human-friendly name of the property passed to the `Add` method.
* OriginalValue - The value found in the first entity, as an `object`.
* UpdatedValue - The value found in the second entity, as an `object`.
* FormatOriginalValue - A method to get the formatted value of the first entity, using the supplied formatter.
* FormatUpdatedValue - A method to get the formatted value of the second entity, using the supplied formatter.

`OriginalValue` and `UpdatedValue` are `object`s. If the property could not be found in an entity, it is set to `null`, even for primitive properties. Be sure to check for `null`s if you plan to work directly with these properties. The `Format*` methods will account for `null`s on your behalf.

## Change Tracker
Most of the time, you will want to track the state of a single object throughout it's lifetime. The `EntityChangeTracker` class provides methods to register an object and later ask what changed. The `EntityChangeTracker` constructor takes an `EntityConfiguration` -- this tells the tracker how to detect changes to the objects it manages. As soon as your entity comes into life, register it with the tracker using the `Attach` method. At the end of your code, you can simply ask the tracker for the status of the entity.

    TestEntityChangeDetector detector = new TestEntityChangeDetector();
    EntityChangeTracker tracker = new EntityChangeTracker(detector);
    TestEntity entity = new TestEntity() { IntValue = 123 };
    tracker.Attach(entity);
    // ... some business logic here ...
    IEntityChange<TestEntity> changes = tracker.DetectChanges(entity);
    tracker.CommitChanges();

The `IEntityChange` interface gives a summary of what changed on the entity. It has the following members:
* Entity - The object that was being tracked
* State - Says whether the object is `Unmodified`, `Modified`, `Added`, `Removed` or `Detached`.
* Data - Arbitrary data associated with the entity (see below).
* GetChanges - Gets the individual properties that were changed.
* GetChange - Gets the `IPropertyChange` for a property, or `null` if the property isn't changed or tracked.
* HasChange - Determines whether there was a change for a property.
* As<TDerived> - Makes it easier to detect changes on sub-classes (see below)

There are three overloads of `DetectChanges`. The first takes no arguments and returns an `IEntityChange` for each entity that was `Modified`, `Added` or `Removed`. If you only want to get back entities with certain states or include `Unmodified` entities, you can use the second overload that accepts an `EntityState` flag enum. Finally, you can retrieve the state of a single entity using the third overload. In the case that the entity is not being tracked, its state will be `Detached`.

Once you have finished processing the changes, you can commit the changes to the tracker, via `CommitChanges`. This will ensure the next time you call `DetectChanges` you will not get the same changes back again. `Modified` and `Added` entities will become `Unmodified`, and `Removed` entities will no longer be tracked.

### Arbitrary Data
Often, along with tracking changes, it is useful to associate an entity with some additional data. `EntityChangeTracker` supplies two simple methods `GetData` and `SetData` that will return and accept an `object`, respectively, for a given entity. When retrieving data back using `GetData`, you will need to cast it back. Any data associated to an entity will also get returned when `DetectChanges` is called.

## Inheritance
If you are dealing with a class hierarchy, you can specify how to detect changes whenever the entity is of a particular type, using the `When<TDerived>` method.

    public class TestEntityChangeDetector : EntityConfiguration<TestEntity>
    {
        public TestEntityChangeDetector()
        {
            Add(x => x.StringValue, "String", Formatters.FormatString);

            When<DerivedA>()
                .Add(x => x.A1, "A1", Formatters.FormatString)
                .Add(x => x.A2, "A2", Formatters.FormatString);

            When<DerivedB>()
                .Add(x => x.B1, "B1", Formatters.FormatString)
                .Add(x => x.B2, "B2", Formatters.FormatString);
        }
    }

You can chain as many properties after calling `When` as you need.

If you need to detect whether a property changed for a particular derived instance, you can use the `As<Derived>` method. This will expose two overloads of the `HasChange` method, either taking two base class objects or two derived class objects. In the overload accepting the base class, `HasChange` will return `false` if either object is not an instance of the derived class.

    var detector = new TestEntityChangeDetector();
    TestEntity original = new DerivedA() { A1 = "Hello" };
    TestEntity updated = new DerivedA() { A1 = "Goodbye" };

    bool hasChange = detector.As<DerivedA>().HasChange(x => x.A1, original, updated);

## Nulls
The change detector is smart enough to handle `null`s on your behalf. If one of the entities is `null`, the property values of the other entity are compared to `null`. If both entities are `null`, they are considered the equal. Be aware that `null`s will not be passed to the formatter, so you can't customize their format. However, you can simply check the result for `null` and replace it with a placeholder string.

## Collection Detection
There is also support for detecting changes between collections, via the `CollectionChangeDetector`. This class will take two collections (`ICollection<TElement>`) and see what elements are added or removed. You can pass an optional `IEqualityComparer<TElement>` to the constructor if the element type is not a simple type. `CollectionChangeDetector` has a  `GetChanges` method that returns an `IElementChangeCollection`, which allows you to see which elements were `Added` or `Removed`. There is an overload of the `GetChanges` method to explicitly search for `Added`, `Removed` or `Unmodified` elements.

    CollectionChangeDetector<int> detector = new CollectionChangeDetector<int>();
    var changes = detector.GetChanges(new int[] { 1, 2, 3 }, new int[] { 2, 4 });
    // Removed: 1, 3. Added: 4.

### Tracking Collection Changes
If you have an entity with a collection property, you can track how that collection changes throughout the lifetime of the entity, using the `EntityChangeTracker`. When initializing the `EntityConfiguration`, call `AddCollection` to register the collection. The `EntityChangeTracker` will automatically track the related collection along with the entity.

**Note** - *The state of an entity is not affected by its collections. In other words, an entity will remain `Unmodified` even if one of its collections is modified.*

Detecting changes for every collection in every entity could be very time consuming. You must request to see changes to an entity's collections, explicitly. To do this, call `DetectCollectionChanges` on the tracker. `DetectCollectionChanges` accepts the entity and a delegate to specify which collection you're checking. You can optionally specify whether you are looking for `Added`, `Removed` and/or `Unmodified` elements. Just like with entities, calling `CommitChanges` will prevent the same changes from being returned for the collection.

## License
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to <http://unlicense.org>

license: Unlicense

repository: doctorcode-org/ChangeDetector

repo_name: doctorcode-org/ChangeDetector


text:
# chaos-monitor
This is a placeholder repo. No significant work has been done on this project yet.

**KEY NOTES**

Refactoring of the project is upcoming. Initial design of error code emphasis is being changed to exceptions. We are not writing critical code and this is not C/C++, there is no good reason not to use exceptions.

If you run the chaos monitor, be sure to stop it shortly after or it will continually write to its log and hog resources.

We try to follow PEP8 style convention. We have relaxed the rules on 80 character limit because line wraps always look ugly and most people have large monitors.

Test functions should be as descriptive as possible. Functions with 10+ words are totally fine as long as they describe the specific functionality they are testing.

Use 4 spaces, not tabs for indents. This is important.

Tests should leave the system in the same state they found it.

No coypyleft license software can be used.

Untested code is broken code. Testing is the most important task and should be done before anything else.

Any code to be checked in has to pass all tests run by Travis-CI. Tests that have been written for unimplemented functionality need to be put in /tests/tmp until the code has written. This is to stop from breaking the build.

**Problem**

Consider the case where the user is victim of a buffer overflow attack. An attacker is able to override the buffer and cause the stack pointer to jump to a piece of malicious code he has written. This code can then replace files on the user's system, including important binary files and dynamic link libraries which are likely to be executed by the user. The new binary code injected by the hacker can be used to wreck a user’s computer. Or more insidiously, the new binary code can replicate the functionality of the replaced file but with malicious side effects like sending user data back to the attacker, preventing the user from ever knowing that something is wrong.

Also consider the case where a user wants to guarantee the integrity of his data over a long period of time. How does he know that the hardware has not deteriorated, causing random bits to change? How does he know a random cosmic ray has not hit his server memory and altered a critical piece of data? This is less of an issue because most backup systems have RAID and parity checkers, but a stored checksum backup provides additional insurance for file integrity.

**Objective**

Chaos monitor is a monitoring tool that checks its user's data for alterations, malicious or otherwise.

Chaos monitor provides an interface that allows the user to specify which files they want to have monitored. When a file is added, the chaos monitor calculates the checksum of that file, using sha1 by default. It then stores the checksum of that file alongside the filename in a remote database.

To continually verify the integrity of the data, the chaos monitor creates a daemon which periodically wakes up, gets all the checksum/filename pairs from the database, recalculates the checksum of the filename, and compares it to the checksum fetched from the database. If the checksums match, then there is no issue as the data is unchanged. If the checksums are mismatched, then the chaos monitor logs the mismatch, sends out a notification, and responds in some fashion.

**Status**

This tool is currently in an early development stage. The current version allows the user to add and remove files from being tracked as well as add and remove emails from the list of notification recipients. It does not currently send out a notification if there is a mismatch, it only reports the error in a log file. Currently, the user is limited to using local databases to store the recipient's emails and the checksum/filename pairs.

**In Progress**

- Remote database support
- Notifications
- Automatic deployment and configuration of database server
- Automatic system response to mismatched checksums
- Versioning of files
- Automatic addition of common/important static files to database server
- GUI
- Automatic install using pip
- Rebuild changed files using version control system. Par files?
- Better tutorials and documentation
- Analysis of the problem space and comparison to other tools.
- Automatic update of checksum with scheduled file changes

**Tentative Roadmap**

Version 0.0 - Anticipated Release January 15, 2017 - Initial Release
Local Database Access for Recipients and ChecksumTuples
Automatic Installation of Dependencies
Full Unit and Integration Testing Completed
Full tutorial explaining basic functionality
Notifications

Version 1.0 - Anticipated Release February 1, 2017 - First Serious Release
Remote Database Support
Automatic system response to mismatched checksums
Automatic deployment and configuration of database server
Development and design document to help new developers understand system.

Version 2.0 - Anticipated Release March 1, 2017
Automatic Addition of System Files

Version 3.0 - Anticipated Release May 1, 2017
Automatic update of checksum with scheduled file changes. Note: Coordinate with package manager
Versioning of files
Rebuild changed files using version control system. Par files?

Version 4.0 - Anticipated Release June 1, 2017
GUI - Subset of Chaos Command Center

**Installation**

All the dependencies listed have to be manually installed. Mysql 5.6 already has to be installed and running.

Install with setup.py:   _python setup.py install_

After installation, you can control the chaos monitor through the binary file cmon.

To get options:   _cmon -h_

Options implemented so far:
- cmon -af _filename_
- cmon -rf _filename_
- cmon -ar _email_
- cmon -rr _email_
- cmon -lr
- cmon -lf
- cmon --start
- cmon --stop
- cmon --Status
- cmo --restart

**Dependencies**

- MySQL Database
- MySQL Python Connectors
- rsfile (Required to install PyDaemon)
- PyDaemon
- validate_email
- pydns

**Misc**

This project is part of a larger project we are designing. The link to that project is here: https://github.com/mikefeneley/chaos-command-center

If you are interested in helping with either this project or the chaos command center, email<EMAIL_ADDRESS>

We don't just need people who are interested in technology, we are also looking for people who are talented writers, artists designers, or any combination of useful skills.

**Design Notes**

The target audience of our flagship project, the chaos command center, is your average computer user. Anything overly technical needs to be abstracted away.

Form is liberating. While it is possible to add endless customization to tools, doing so increases the complexity of the tool and increases the risk of bugs. We reject addtional, noncritical functionality at the cost of addtional complexity and security risk.

For example, we could add functionality which would let the user change the name of the tables in the database used to store the checksum pairs. But to what end? If an attacker were to use that option to change the table name, the daemon would no longer be able to pull the checksum data it is supposed to be testing. It is an unnecessary feature that adds nothing while increasing the attack surface.

We want this tool to be capable of automatically seting up a remote database on an EC2 server or other AWS service. Possibly using SaltStack. Think about information required by the program to do this, i.e. AWS credentials and keys.

More design notes/brainstorms are in stratchpad.md.

Contact:

Michael Feneley: mfeneley(at)vt.edu

Anshul Basia: anshul7(at)vt.edu

license: MIT

repository: AnshulBasia/chaos-monitor

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: AnshulBasia/chaos-monitor


text:
# _Tamagotchi_

#### _A game for people who wish they had real pets, February 7th, 2017_

#### By _**Keith Evans & Brynna Klamkin-McCarter**_

## Description

_Tamagotchis are a small alien species that deposited an egg on Earth to see what life was like, and it is up to the player to raise the egg into an adult creature. The creature goes through several stages of growth, and will develop differently depending on the care the player provides, with better care resulting in an adult creature that is smarter, happier, and requires less attention._

## Setup/Installation Requirements

* _Clone this repository_
* _In the main project folder, run composer install to install program dependencies_
* _From the web folder, start local server by entering `php -S localhost:8000`_
* _In your preferred web browser, navigate to localhost:8000_

_Make sure to have composer installed before running this app._

## Specifications

* _Spec 1: Create Tamagotchi object in php_
* _Spec 2: Users can create a Tamagotchi object and give it a name_
* _Spec 3: Clicking the Feed, Nap, or Play button will decrement the associated value by 10_
* _Spec 4: Values will constantly increase by one and post to the page_
* _Spec 5: Upon reaching 100 in any category the tamagotchi will die_
* _Spec 6: When a tamagotchi dies, a game over screen appears, with a button linked to the homepage_
* _Spec 7: When users click a button, a unique gif will play_
* _Spec 8: Users will be locked out of clicking buttons for several seconds_

## Known Bugs

_No known bugs_

## Support and contact details

_Any questions, comments, or bug reports can be directed to the repository administrator._

## Technologies Used

_PHP/Silex/Twig/Bootstrap/jQuery_

### License

*This app is under the MIT license.*

Copyright (c) 2017 **_Brynna Klamkin-McCarter and Keith Evans_**

repository: brynnacodes/tamagotchi

repo_name: brynnacodes/tamagotchi


text:
## WS2812 NeoPixel

The WS2812/NeoPixel (Adafruit's name) class of RGB (Red, Green, Blue) or RGBW (Red, Green, Blue, White) LEDs that can be used with microcontrollers and only need ground, power and a single wire to control as many LEDs as you want, where each LED is individually addressable.

The NeoPixels work well with the ESP32 with no additional software needed. And while the ESP32 has limited power available, it can support a 10-20 pixels okay, especially if you specify colors that are not full brightness. E.g. 128,0,0 for red instead of 255,0,0.

More info about NeoPixels:
* [Adafruit NeoPixel Überguide](https://learn.adafruit.com/adafruit-neopixel-uberguide)
* [Micropython Documentation](https://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/neopixel.html)

### How To

* **Define a NeoPixel chain** - You need to identify which GPIO pin is used to communicate with the NeoPixel chain, as well as define the number of pixels on the chain. Optionally, you can let the Micropython library know that you are using a 4 color NeoPixel - see the "bpp" parameter in the [Micropython docs](https://docs.micropython.org/en/latest/esp8266/esp8266/tutorial/neopixel.html) for more info on this.

```np = neopixel.NeoPixel(machine.Pin(neopin), number_pixels)```

* **Set the colors of each pixel** - Using three or four parameters (3-Tuple or 4-Tuple), depending on the type of NeoPixel, set the color for specific pixels.

```np[0] = (255,0,0)```

* **Write the new values to the LEDs** - Only when you use the write() function do the LEDs actually change color with the new values you've set.

```np.write()```

### [neopixel_simple.py](../examples/neopixel_simple.py)

This is a basic example that sets the color of the first three pixels in a NeoPixel chain of 10.

    import machine
    import neopixel
    import time

    neopin = 4
    number_pixels = 10

    red = (255,0,0)
    green = (0,255,0)
    blue = (0,0,255)

    np = neopixel.NeoPixel(machine.Pin(neopin), number_pixels)

    np[0] = red
    np[1] = green
    np[2] = blue

    np.write()

### [neopixel_chase.py](../examples/neopixel_chase.py)

This example creates a chase effect where a red pixel seems to move from the beginning to the end of the chain. The code uses nested for loops to make the chase run four times.


text:
# Policies
---
## DynamicProgramming

## Class Members:

### grid:

(2D) representing the map.

Ex: [[1, 1, 1, 0, 0, 0],
     [1, 1, 1, 0, 1, 0],
     [0, 0, 0, 0, 0, 0],
     [1, 1, 1, 0, 1, 1],
     [1, 1, 1, 0, 1, 1]]

grid format:
0 = navigable space
1 = unnavigable space

### init:

(Point) representing the start.
Given in the form [row,col,direction]
direction = 0: up
            1: left
            2: down
            3: right

Ex: [4, 3, 0]

### goal:

(Point) representing the goal.
Given in the form [row,col]

Ex: [2, 0]

### cost:

(1D) representing the cost associated with moving from a cell to an adjacent one
Given in the form [right,straight,left]
cost has 3 values, corresponding to making
a right turn, no turn, and a left turn
Ex: [2, 1, 20]

### forward:

Direction of movement
[[-1,  0], # go up
 [ 0, -1], # go left
 [ 1,  0], # go down
 [ 0,  1]] # go right

### forward_name:

Direction name
['up', 'left', 'down', 'right']

### action:

Action performed by robot
action has 3 values: right turn, no turn, left turn
[-1, 0, 1]

### action_name:

Name of the action.
['R', '#', 'L']

### optimum_policy2D():

Calculates 2D policy

[[' ', ' ', ' ', 'R', '#', 'R'],
 [' ', ' ', ' ', '#', ' ', '#'],
 ['*', '#', '#', '#', '#', 'R'],
 [' ', ' ', ' ', '#', ' ', ' '],
 [' ', ' ', ' ', '#', ' ', ' ']]

repository: praveenbandaru/grid-navigation

repo_name: praveenbandaru/grid-navigation


text:
# Evil-Kitty-Navigator

This package was modified from [evil-tmux-navigator](https://github.com/keith/evil-tmux-navigator) to make Vim-like navigation keys work seemlesly inside of [Kitty](https://github.com/kovidgoyal/kitty) when using Emacs evil mode

Install this package with your favourite Emacs package manager. Then require it in your `~/.emacs` with:

```lisp
(require 'navigate)
```

In addition to that, follow the instructions in [vim-kitty-navigator](https://github.com/knubie/vim-kitty-navigator) to install the required kittens. You will also need to modify the [`pass_key.py`](https://github.com/knubie/vim-kitty-navigator/blob/8d9af030c8a74cdda6ab9a510d9a13bca80e8f9b/pass_keys.py#L40) such that it can recognize when you are inside of an Emacs session:

```python
# pass_keys.py#L40
-  vim_id = args[4] if len(args) > 4 else "n?vim"
+  vim_id = args[4] if len(args) > 4 else "(n?vim|emacs)"
```

repository: gzagatti/evil-kitty-navigator

repo_name: gzagatti/evil-kitty-navigator


text:
# Proxy

If changing proxy.conf for a cluster, reupload the configs for the proxy pod then rerun the proxy pod.

As for now the proxy pod uses a prototype JavaScript natively compiled version of the proxy executable.
This is intended to be replaced with the Golang version.

repository: simplenetes-io/proxy

repo_name: simplenetes-io/proxy


text:
# GitHub Actions for Docker

This repository contains GitHub Actions for [Docker](https://docker.com/), for performing common tasks such as authorizing and tagging containers, as well as a generic `cli` for doing arbitrary actions with the Docker commandline client.

## Usage

Usage information for individual commands can be found in their respective directories.

## License

[MIT](LICENSE). Please see additional information in each subdirectory.

repository: kevinsimper/docker

gha_license_id: MIT

repo_name: kevinsimper/docker


text:
## Installation

Add this line to your application's Gemfile:

    gem 'acheron'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install acheron

## Usage

Run

    acheron

## Configuration

Acheron reads configuration options from multiple locations. The
following sections list all of those locations, later superseeds the
prior ones.

### Defaults

Acheron comes with reasonable defaults

    slack:
      channel: '#acheron'
      username: Acheron
      icon_emoji: ':space_invader:'
    rabbitmq:
      exchange: acheron

### Config file

The defaults above are given in YAML, which is also the format of the
config file. By default Acheron The Salcker attempts to read a config
file named `acheron.yml` from the current working
directory. You can provide an alternate location either via
environment variable or with a command line argument.

### Environment

All environment variables are prefixed with `ACHERON` and the nesting is
reflected by an underscore separated list of names. E.g.

    export ACHERON_SLACK_CHANNEL='#set_by_env'

### Command line arguments

Run the following command to get a list of all arguments:

    acheron --help

### Use with Docker

TODO

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## Trivia

In ancient Greek mythology, Acheron was known as the "river of woe",
and was one of the five rivers of the Greek underworld. In the Homeric
poems the Acheron was described as a river of Hades, into which
Cocytus and [Phlegethon](http://github.com/branch14/phlegethon) both
flowed. The Roman poet Virgil called it the principal river of
Tartarus, from which the Styx and Cocytus both sprang. The newly dead
would be ferried across the Acheron by Charon in order to enter the
Underworld. [Wikipedia](https://en.wikipedia.org/wiki/Acheron)

## References

* [1] https://www.rabbitmq.com/tutorials/tutorial-three-python.html
* [2] https://www.rabbitmq.com/
* [3] http://slack.com/
docker run -e ARCHERON_RABBITMQ_HOST=rabbitmq -e ACHERON_SLACK_TOKEN=asdf -e ACHERON_SLACK_CHANNEL=@branch14 branch14/acheron


text:
This folder is not part of the build but exists to facilitate making Docker images containing Brooklyn.

To use, with `docker` tools installed, run `make all` after the Brooklyn `dist` has been built.
Then do `make run` to see the options (or look in [brooklyn-docker-start]()).

When building, you can use:

* `--build-arg debug=true` to install extra tools on the VM and show debug output from our script when booting the container
* `--build-arg application=my-app` to create a container which boots `my-app` by default
* `--build-arg install_boms="http://path/to/file.bom http://path/to/another.bom"` to replace the default catalog with one or more BOM files (useful with `application` above)
* `--build-arg dropins_jars="http://path/to/file.jar http://path/to/another.jar"` to add JARs in the dropins dir (useful with `application` and `install_boms` above)

See examples in the `Makefile`.

repository: apache/brooklyn-dist

gha_language: Shell

repo_name: apache/brooklyn-dist


text:
# TellStickR

This is a Gem for communicating with the Telldus TellStick and TellStick Duo through the official telldus-core C library in Ruby.

It also includes device and sensor helper classes for easy communication with various devices and sensors.

If you didn't know, TellSticks are USB radio frequency transmitters which turns any computer into a wireless home automation center (switch on/off electronic devices, read values from sensors, etc).

So far, version 2.1.0 of the telldus-core API is supported.

If you would like to contribute to this code, you are more than welcome to do so!

## Installation
```gem install tellstickr```

## Usage

### TellStickR::Core
This is the binding to the telldus-core C library, with all functions and statics defined.
Documentation on these can be found here: http://developer.telldus.se/doxygen/group__core.html

### TellStickR::Device
Class for easy discovery and manipulation of devices.

```
devices = TellStickR::Device.discover
device = devices.first
# Turn it on
device.on
# Turn if off
device.off
# Make it ring (if supported)
device.bell
```

### TellStickR::Sensor
Class for easy discovery and reading sensors.

```
sensors = TellStickR::Sensor.discover
sensor = sensors.first

# Poll temperature
sensor.temperature

# Poll humidity
sensor.humidtity

# Register a callback that will be called when the sensor receives new data:
callback_id = sensor.register_callback(lambda{|data| puts data.inspect})

# Unregister a spesific callback:
sensor.unregister_callback(callback_id)

# Unregister all callbacks:
sensor.unregister_callbacks

# If you know the make and sensor id, you can do this
# (as long as it's defined in TellStickR::Sensor::PREDEFINED_SENSORS):
sensor = TellStickR::Sensor.from_predefined(:wt450h, 11)
```

## Links

* http://www.telldus.se/products/tellstick
* http://developer.telldus.se/

## Yos and tnx:

- Virus84 for the nice telldus-core on Raspberry Pi guide (https://blogg.itslav.nu/?p=875) which led to this project.
- Hallvar Helleseth for pointing out the Ruby FFI route.
- Kristoffer Sivertsen for introducing me to Tellsticks in the first place :)
- Telldus for a awesome, cheap and trouble-free product!

## Legal
Copyright (c) 2013 Per-Kristian Nordnes. Released under the MIT license. See the file LICENSE.

repository: skogsmaskin/tellstickr

gha_language: Ruby

repo_name: skogsmaskin/tellstickr


text:
---
version: 1.0.2
title: Date and Time
---

Working with time in Elixir.

{% include toc.html %}

## Time

Elixir has some modules which work with time.
Though it needs to be noted that this functionality is limited to working with UTC timezone.

Let's start with getting the current time:

```elixir
iex> Time.utc_now
~T[19:39:31.056226]
```

Note that we have a sigil which can be used to create a `Time` struct as well:

```elixir
iex> ~T[19:39:31.056226]
~T[19:39:31.056226]
```

You can learn more about sigils in the [lesson about sigils](../sigils).
It is easy to access parts of this struct:

```elixir
iex> t = ~T[19:39:31.056226]
~T[19:39:31.056226]
iex> t.hour
19
iex> t.minute
39
iex> t.day
** (KeyError) key :day not found in: ~T[19:39:31.056226]
```

But there is a catch: as you may have noticed, this struct only contains the time within a day, no day/month/year data is present.

## Date

Contary to `Time`, a `Date` struct has info about the current date, without any info about current time.

```elixir
iex> Date.utc_today
~D[2028-10-21]
```

And it has some useful functions to work with dates:

```elixir
iex> {:ok, date} = Date.new(2020, 12,12)
{:ok, ~D[2020-12-12]}
iex> Date.day_of_week date
6
iex> Date.leap_year? date
true
```

`day_of_week/1` calculates which day of the week a given date is on.
In this case it's Saturday.
`leap_year?/1` checks whether this is a leap year.
Other functions can be found in [doc](https://hexdocs.pm/elixir/Date.html).

## NaiveDateTime

There are two kinds of structs which contain both date and time at once in Elixir.
The first is `NaiveDateTime`.
Its disadvantage is lack of timezone support:

```elixir
iex(15)> NaiveDateTime.utc_now
~N[2029-01-21 19:55:10.008965]
```

But it has both the current time and date, so you can play with adding time, for example:

```elixir
iex> NaiveDateTime.add(~N[2018-10-01 00:00:14], 30)
~N[2018-10-01 00:00:44]
```

## DateTime

The second, as you may have guessed from title of this section, is `DateTime`.
It does not have the limitations noted in `NaiveDateTime`: it has both time and date, and supports timezones.
But be aware about timezones. The official docs state:

```
You will notice this module only contains conversion functions as well as functions that work on UTC.
This is because a proper DateTime implementation requires a time zone database which currently is not provided as part of Elixir.
```

Also, note that you can create a DateTime instance from the NaiveDateTime, just by providing the timezone:

```
iex> DateTime.from_naive(~N[2016-05-24 13:26:08.003], "Etc/UTC")
{:ok, #DateTime<2016-05-24 13:26:08.003Z>}
```

This is it! If you want to work with other advanced functions you may want to consider looking futher into docs for [Time](https://hexdocs.pm/elixir/Time.html), [Date](https://hexdocs.pm/elixir/Date.html), [DateTime](https://hexdocs.pm/elixir/DateTime.html) and [NaiveDateTime](https://hexdocs.pm/elixir/NaiveDateTime.html)
You should also consider [Timex](https://github.com/bitwalker/timex) and [Calendar](https://github.com/lau/calendar) which are powerful libraries to work with time in Elixir.

repository: trenchmortar/elixirschool

repo_name: trenchmortar/elixirschool


text:
# _Think With Google Mock Up_

#### _A re-build of a section of a thinkwithgoogle.com page, utilizing Bootstrap 3, June 2, 2017_

#### By _**Brendan Hanna**_

## Description

_This web page combines Bootstrap's grids with floats and custom media queries to create a responsive mock up of the "Latest trends and stories" section of the landing page of www.thinkwithgoogle.com (as the page looked on June 2nd, 2017). _

## Setup/Installation Requirements_

* _Clone project folder down from https://github.com/gepetto503/think-with-google _
* _open index.html in any browser_

## Known Bugs

_Not a bug per se but the featured images currently scale down on both axes by percentage, as opposed to the thinkwithgoogle section where they maintain a constant height but are cropped horizontally as they size down._

_Also, the images featured images are not intentionally positioned within their frames, they just fall where they lay.  Ultimately I would like to be able to center them within their frames_

_Additionally, I would like to apply a gradient over the images that darkens at the bottom so the white text is easier to read._

## Support and contact details

_If you run into any issues or have questions, ideas or concerns, contact me at<EMAIL_ADDRESS>or make a contribution to the code!}_

## Technologies Used

_Just used Bootstrap's grid system, although the content inside of the articles (with the white backgrounds) are arranged with floats, etc., instead of nested grid elements._

### License

*This software is licensed under the MIT license*

Copyright (c) 2017 **_Brendan Hanna_**


text:
---
title: Sobandari*
slug: sobandali
category: peach-blossom-dream
images:
  - SOBAN-L1.jpg
  - SOBAN-L2.jpg
---

I purchased a number of small dining tables while I was engaged in the antique business after I was drawn to the woodenware of Joseon. There was one time when I bought many small dining tables with their legs separated, the beautiful lines of the legs scattered around the floor caught my eyes while carpenters were working on them.

I took pictures of them, arranged the photos repeatedly, extracted silhouettes and created patterns. Eventually, it turned into a pattern that looks like an abstract painting, and the original design motif is not easy to recognize.

* Small Dining Table Legs

repository: monocollection/monocollection

repo_name: monocollection/monocollection


text:
# Tasks Here

Load VSCode Tasks to Status Bar

This extension evolved from *extension:actboy168.tasks*

## Preview

![preview](resource/image/preview.png)

## Settings

We do some general configuration through the **settings.json**, as most extensions do.And also, for ease of configuration,we do some special configuration through the **tasks.json** for each task.If the configuration is done in the tasks.json, I will identify it above the code or image

This extension will show all vscode-tasks on the status bar.If you want to hide a task, add an configuration like this:

[*tasks.json*]

```json
        {
            "type":"shell",
            "label":"test",
            "command": "echo",
            "args": [
                "arg1"
            ],
            "options": {
                "tasksHereDisplay": "hide"
            }
        }
```

This extension uses the label of the task as the display name on the status bar. How ever, if the task name is too long to fit for display and you don't want to change it, you can customize the task name by add an configuration like this:

[*tasks.json*]

```json
        {
            "type":"shell",
            "label":"g++.exe build active file",
            "command": "g++",
            "args": [
                "-g",
                "${file}",
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe"
            ],
            "options": {
                "tasksHereName": "g++"
            }
        }
```

You can "add" a built-in icon to the task name with a special syntax, which will appear as an icon on the status bar

[*tasks.json*]

```json
        {
            "type":"shell",
            "label":"test",
            "command": "echo",
            "args": [
                "arg1"
            ],
            "options": {
                "tasksHereName": "$(squirrel) test"
            }
        }
```

![icon-in-label](resource/image/text+icon.png)

You can find a list of built-in icons provided by VSCode on this page: [icons-in-labels](https://code.visualstudio.com/api/references/icons-in-labels)

Specify the color of the task name.You can use legal color expressions supported by CSS. For example: "DeepPink", "#00f", "#adff2f". If you are not sure, you can use the search engine to search for the keyword "CSS color".Note that the color of the icon will change as well.

[*tasks.json*]

```json
       {
            "type": "shell",
            "label": "cpp.exe build active file",
            "command": "C:\\MinGW64\\x86_64-8.1.0-release-win32-seh-rt_v6-rev0\\mingw64\\bin\\cpp.exe",
            "args": [
                "-g",
                "${file}",
                "-o",
                "${fileDirname}\\${fileBasenameNoExtension}.exe"
            ],
            "options": {
                "cwd": "C:\\MinGW64\\x86_64-8.1.0-release-win32-seh-rt_v6-rev0\\mingw64\\bin",
                "tasksHereName": "cpp",
                "tasksHereColor": "DeepPink"
            }
        }
```

![label_color](resource/image/label_color.png)

repository: alexzshl/vscode-taskshere

gha_language: TypeScript

repo_name: alexzshl/vscode-taskshere


text:
# Grid

A grid holds the connections between the cells and their configuration.

- [Grid](#grid)
  - [Orthogonal](#orthogonal)
  - [Hexagonal](#hexagonal)
  - [Triangular](#triangular)
  - [Octagonal and Square](#octagonal-and-square)
  - [Pentagonal Cairo](#pentagonal-cairo)
  - [Brick](#brick)
  - [Polar](#polar)

## Orthogonal

Classic grid where every cell has four neighbors (except on the edge)

`g-ortho`

```
  -e, --empty    (Default: false) If true, the grid will have no internal connections

  -s, --seed     RNG seed, if none is provided a random one is chosen

  -w, --weave    (Default: 0.0) Value between 0.0 and 1.0 to generate 'bridges' / weave the maze
```

## Hexagonal

Hexagonal grid where every cell has six neighbors (except on the edge)

`g-hex`

```
  -e, --empty    (Default: false) If true, the grid will have no internal connections

  -s, --seed     RNG seed, if none is provided a random one is chosen

  -w, --weave    (Default: 0.0) Value between 0.0 and 1.0 to generate 'bridges' / weave the maze
```

## Triangular

Triangular grid where every cell has three neighbors (except on the edge)

`g-tri`

```
  -e, --empty    (Default: false) If true, the grid will have no internal connections

  -s, --seed     RNG seed, if none is provided a random one is chosen

  -w, --weave    (Default: 0.0) Value between 0.0 and 1.0 to generate 'bridges' / weave the maze
```

## Octagonal and Square

Octagonal and square grid where every cell has eight or four neighbors (except on the edge)

`g-octas`

```
  -e, --empty    (Default: false) If true, the grid will have no internal connections

  -s, --seed     RNG seed, if none is provided a random one is chosen

  -w, --weave    (Default: 0.0) Value between 0.0 and 1.0 to generate 'bridges' / weave the maze
```

## Pentagonal Cairo

Pentagon 'Cairo' grid where every cell has five neighbors (except on the edge)

`g-pentac`

```
  -e, --empty    (Default: false) If true, the grid will have no internal connections

  -s, --seed     RNG seed, if none is provided a random one is chosen

  -w, --weave    (Default: 0.0) Value between 0.0 and 1.0 to generate 'bridges' / weave the maze
```

## Brick

Brick grid where every cell has six neighbors (except on the edge). Same as the hexagonal grid but the connections between the cells is different.

`g-brick`

```
  -e, --empty    (Default: false) If true, the grid will have no internal connections

  -s, --seed     RNG seed, if none is provided a random one is chosen

  -w, --weave    (Default: 0.0) Value between 0.0 and 1.0 to generate 'bridges' / weave the maze
```

## Polar

Polar grid where every cell has a number of neighbors that expand toward the edge.

`g-polar`

```
  -e, --empty    (Default: false) If true, the grid will have no internal connections

  -s, --seed     RNG seed, if none is provided a random one is chosen

  -w, --weave    (Default: 0.0) Value between 0.0 and 1.0 to generate 'bridges' / weave the maze
```

repository: evilz/F-a-maze-ing

branch_name: refs/heads/next

repo_name: evilz/F-a-maze-ing


text:
---
layout: song
has_video_lesson: true
title: Guitar lesson for "Harvest Moon" by Neil Young
song_title:  Harvest Moon
artist: Neil Young
year: 1992
categories: guitar
---

## Video lesson

## PDF print-out of this lesson

If you'd like a print-friendly PDF of this lesson for offline use, view my downloads page. You'll find it there!

## Drop-D tuning

The tabs below assume you've tuned your low-E string down to a "D" note (aka drop-D tuning). See my video lesson for reference here. A quick cheat to do this: use your 4th string (which is also D, though an octave higher) as a reference note. Lower the low-E string until the 6th string sounds the same as the 4th string. Then, you can play a D chord with all six strings (i.e., 000232) and it sounds great!

## My approach to these tabs

The tabs below aren't going to attempt to capture the timing, individual down-strums & up-strums, and other such subtleties. If you're looking for that type of tab, search and you'll likely find what you're looking for ([example](https://tabs.ultimate-guitar.com/n/neil_young/harvest_moon_ver2_tab.htm)). In my opinion, you have to learn the chord shapes (below) and trust your ear. Practice. Listen to Neil Young play this (album version, and live versions). Listen to covers of it. Find a groove and style that works for you.

Ultimately, there are only four main guitar sections needed – and they overlap quite a bit with the chord shapes needed. While it is hard to execute with Neil Young precision, it isn't a lot to memorize. So print this out, write it down, memorize it, take it slow, work out a version that works for you – and most importantly, have fun! For this is a beautiful song and we're lucky to have it.

## Song structure

Sequence #1:

    (Song intro and after each chorus)

    e ––––0–––––––0–––––––9–––––
    B ––––10––––––12––––––10––––
    G ––––11––––––11––––––11––––
    D ––––0–––––––0–––––––0–––––
    A –––(0)––––––––––––––––––––
    D –––(0)––––––––––––––––––––
          D-riff #1

Sequence #2:

    "Come a little bit closer... hear what I have to say..."

    e ––––0––––   –––(2)––––––––––––––––––––––––
    B ––––0––––   ––––3––––––2––––––2––––––3––––
    G ––––0––––   ––––2––––––2––––––2––––––2––––
    D ––––2––––   ––––0––––––0––––––2––––––4––––
    A ––––2––––   ––––0––––––0––––––0––––––0––––
    D ––––2––––   ––––0–––––––––––––––––––––––––
          Em          D-riff #2

Sequence #3:

    "But there's a full moon rising, let's go dancing in the light..."

    e ––––0––––   ––––0––––
    B ––––3––––   ––––2––––
    G ––––0––––   ––––0––––
    D ––––2––––   ––––2––––
    A ––––0––––   ––––0––––
    D –––––––––   –––––––––
        A7sus4        A7

## Diving into the two main guitar riffs

So, I want to flesh these out a bit to aid you with strumming help. Shown below is how each riff aligns with the rhythmic counting -- mainly, noting where the accented strums should be. Note, you can feel free to insert additional strums as you wish! My advice is to take things gentle, subtle, and conservatively -- this song is one where you don't want to over-do it.

### D-riff #1

This is heard during the intro, during sequence #3, and after each chorus.

    v = down strum
    ^ = up strum

    e ––––––––0–––––0––––––––––––––9–––––9–––––9–––––9–––
    B ––––––––10––––12–––––––––––––10––––10––––10––––10––
    G ––––––––11––––11–––––––––––––11––––11––––11––––11––
    D ––––––––0–––––0––––––––––––––0–––––0–––––0–––––0–––
    A –––––––––––––––––––––––––––––––––––––––––––––––––––
    D ––0––––––––––––––––––––––––––––––––––––––––––––––––
        v     v     v              ^     ^     ^     ^
        1  +  2  +  3  +  4  +  1  +  2  +  3  +  4  +

### D-riff #2

This is heard within sequence #2.

    v = down strum
    ^ = up strum

    e –––––––(2)––––––––––––––––––(2)––––––––––––––––––––
    B ––––––––3––3––3––3–––––3–––––2–––––2–––––2––3––2–––
    G ––––––––2––2––2––2–––––2–––––2–––––2–––––2––2––2–––
    D ––––––––0––0––0––0–––––0–––––0–––––2–––––2––4––2–––
    A –––––––––––––––––––––––––––––––––––0–––––0––0––0–––
    D ––0––––––––––––––––––––––––––––––––––––––––––––––––
        v     v  ^  v  ^     ^     ^     ^     ^  v  ^
        1  +  2  +  3  +  4  +  1  +  2  +  3  +  4  +

## Lyrics w/ chords

    Intro: D (riff #1)

    Em
    ...Come a little bit closer
                        D (riff #2)
    Hear what I have to say
    Em
    ...Just like children sleepin'
                               D (riff #2)
    We could dream this night away

    G
    ...But there's a full moon risin'
                            D (riff #1)
    Let's go dancin' in the light
    G
    ...We know where the music's playin'
                              D (riff #1)
    Let's go out and feel the night

    A7sus4                                 A7
    ........Because I'm still in love with you
    (A7)
    .....I want to see you dance again
    A7sus4                                 A7
    ........Because I'm still in love with you
    (A7)            D (riff #1)
    On this harvest moon

    When we were strangers
    I watched you from afar
    When we were lovers
    I loved you with all my heart

    But now it's gettin' late
    And the moon is climbin' high
    I want to celebrate
    See it shinin' in your eye

    Because I'm still in love with you
    I want to see you dance again
    Because I'm still in love with you
    On this harvest moon

## Good luck!

Thanks for reading! I hope this helped you.

repository: madflow/playsongnotes

path: /_songs/[Neil Young] Harvest Moon.md

filename: [Neil Young] Harvest Moon.md

repo_name: madflow/playsongnotes


text:
# Intel GPU Device Plugin for Kubernetes

## QuickStart: build and run plugin on the host

### Prerequisites

- Computer with supported Intel GPU device running Linux
- Fully configured kubernetes node joined to the cluster
- Working [Go environment]
- Read access to the [Intel device plugins] git repository

### Get source code
```
$ mkdir -p $GOPATH/src/github.com/intel/
$ cd $GOPATH/src/github.com/intel/
$ git clone https://github.com/intel/intel-device-plugins-for-kubernetes.git
```

### Build device plugin
```
$ cd $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes
$ make
```

The result plugin executable is **cmd/gpu_plugin/gpu_plugin**

### Configure kubelet

This instruction has been written with the assumption that the target
Kubernetes cluster is installed and configured with the `kubeadm` toolkit
from the official packages from http://kubernetes.io and the latest
tested version of Kubernetes is 1.9.

- Add DevicePlugins=true to the kubelet command line option --feature-gates

This can be done by creating a systemd drop-in for kubelet service in /etc/systemd/system/kubelet.service.d/
with the following content:
```
[Service]
Environment="KUBELET_EXTRA_ARGS=--feature-gates='DevicePlugins=true,HugePages=true'"
```

Check the man page for `systemd.unit` for more details on systemd drop-ins.

- Restart kubelet service with the new options
```
$ systemctl restart kubelet
```

- Make sure kubelet socket exists in /var/lib/kubelet/device-plugins/
```
$ ls /var/lib/kubelet/device-plugins/kubelet.sock
/var/lib/kubelet/device-plugins/kubelet.sock
```

### Run the plugin as administrator
```
$ sudo $GOPATH/src/github.com/intel/intel-device-plugins-for-kubernetes/cmd/gpu_plugin/gpu_plugin
GPU device plugin started
Adding '/dev/dri/card0' to GPU 'card0'
Adding '/dev/dri/controlD64' to GPU 'card0'
Adding '/dev/dri/renderD128' to GPU 'card0'
device-plugin start server at: /var/lib/kubelet/device-plugins/intelGPU.sock
device-plugin registered
device-plugin: ListAndWatch start
ListAndWatch: send devices &ListAndWatchResponse{Devices:[&Device{ID:card0,Health:Healthy,}],}
```

### Check if the plugin is registered on master
```
$ kubectl describe node <node name> | grep intel.com/gpu
 intel.com/gpu:  1
 intel.com/gpu:  1
```

There are more sophisticated ways to run device plugins. Please, consider reading [Device plugin deployment] to understand how to do it.

### Testing

1. Build a Docker image with beignet unit tests:

   ```
   $ cd demo
   $ ./build-image.sh ubuntu-demo-opencl
   ```

   This command will produce a Docker image named `ubuntu-demo-opencl`.

2. Create a pod running unit tests off the local Docker image:
   ```
   $ kubectl apply -f demo/intelgpu_pod.yaml
   ```

3. Observe the pod's logs:
   ```
   $ kubectl logs intelgpu-demo-pod
   ```

[Go environment]: https://golang.org/doc/install
[Intel device plugins]: https://github.com/intel/intel-device-plugins-for-kubernetes
[Device plugin deployment]: https://kubernetes.io/docs/concepts/cluster-administration/device-plugins/#device-plugin-deployment


text:
## Simple scripts for routine actions

### check_replication_lag.pl
Check replication lag of the specified list of replicas.
By default, script will list all replicas and their current lag.
There is also cron-mode, that will be silent unless specified lag threshold is
reached.

Check help output of the script for more details.

### generate_pgbouncer_userlist.sh
Straightforward script to dump role into `userlist.txt` file of pgbouncer.

### slony_extract_schema_to_file.sh
Get schema dump without all the Slony-specific stuff.
Temporary database will be created to clean up Slony belongings.

### stuff-update.sh
This script updates your copy of pg_utils to the actual state. There are two ways for cloning the repository:
* `git pull` - just pulls new changes into the local directory
* wget/curl - downloads repository as the zip archive and unpacks it into the local directory.

### offlag.sh
Script to check lag of the local _running_ but  _offline_ (not available for
queries) database against the provided source:
- master_host, should be reachable for postgres@postgres
- WAL segment name as found in the pg_wal directory
- LSN, as reported by the pg_current_wal_lsn/pg_last_wal_replay_lsn functions.


text:
---
title: utils.stretchToScale()
---

The `utils.stretchToScale()` function calculates the scale for a given amount of
stretch.

## Signature

```js
float utils.stretchToScale(float stretch)
```

## Notes

The way people measure stretch intuitively is different from the way we handle stretch in code.

When people say fabric has _25% stretch_ they mean that 10 cm of fabric can
stretch to 12.5 cm.
In code that means we would need to scale non-stretch lengths by 80%
to get the correct lengths to use in patterns with 25% stretch fabric.

Pattern designers need a way to calculate the scaling factor to use for
their pattern part lengths, given a fabric stretch percentage.
This function does that by returning:

```js
1 / (1 + parseFloat(stretch))
```

repository: freesewing/freesewing

branch_name: refs/heads/develop

gha_language: JavaScript

repo_name: freesewing/freesewing


text:
# BRANCHING, MERGING AND PULL REQUEST WITH GIT

In this exercise, we will see how we can create branches for Git repositories, create pull requests and also configure continuous integrations.

## Setting up continuous integration

Having seen how to run a build with unit tests and code coverage, let’s change our build definition to a continuous integration build.

1.  Go to the **Build** hub, click on Explorer link and select **Manual Build** the build definition we created earlier

1. Right-select or click on the down arrow before the build definition and select **Clone**

1. Select the cloned build definition and select **Triggers**. Check the **Continuous Integration (CI)** check box. That’s it! – we have
    changed our build to trigger everytime there is a change pushed to the code repository.

1. Click Save to save the build definition. You may want to provide a different name to the build – say **Myshuttle.CI**

    > Before we test this build run, let’s see how to isolate our code changes with branching and collaborate on the changes with pull requests.

## Creating a new branch

There are multiple entry points to creating branches in VSTS and TFS – from the work item editor, boards, or from the code hub. Here we will try branching from the work item editor.

1.  In your VSTS account, open the work item **Site Fit & Finish.**

1.  Click the **Actions (…)** menu and select **New Branch**

1.  In the **New Branch** dialog, enter **addmasterbranding** for the
    branch name and select the **Add Master Branding** task from the
    **Work items to link** drop-down

1.  Return back to Eclipse. Select **Git** and open the **Jdev** repo

1.  This should open the **Git repositories** window. Right-select the
    **Jdev** repository and choose **Pull** to pull the changes from the
    server.  Click **OK** when **Pull Result for jdev** window pops up.

1.  You will notice the branch we just created listed under **Branches |
    Remote Tracking**

1.  Right-click the **origin/addmasterbranding** branch and select
    **Checkout**

1.  When you checkout, you will prompted to create a new local branch.

1.  Select **Checkout as New Local Branch**, then click **Finish** in the **Create Branch** window.

1.  You will now notice the project in the project explorer tagged with the branch name.

1.  Right-click on the **jdev/src/main/webapp** project node and select **Import**.

1. Select **File System** under **General** and click **Next**.

1.  Click the **Browse** button. Access your home folder and open the
    **myshuttle.extras** folder and then the **webapp** folder and
    click OK. In this folder you’ll find CSS, images, and updated JSP
    pages to give you the previous displayed images.

1.  Select the **webapp** folder and click **Finish.** You will be warned about overwrite to the JSP files. You can ignore the warnings and select to overwrite.

1.  Now, right-click on the **jdev** root and select **Team | Commit**.

    Enter a comment **Adding master branding** followed by \#123 (#123 is work item Id of *Add master branding* task) then select **Commit and Push**. This will commit the
    changes to the ***addmasterbranding*** branch. Then click OK.

1.  Now return back to the browser and check the **Code** hub if the commits have been successful.

## Using pull requests for code review

Pull request is a great way for developers to get team review and collaborate on code changes. When a developer changes a code in a topic branch, he or she can create a pull request to get feedback from the
team before merging the code into the master branch. It can also be enforced through branch policies. Anyone participating in the pull request can see the code changed in the branch, leave comments, and give
an approval if they're satisfied with the changes.

1.  Select the branch ***addmasterbranding*** branch and click on **Pull Request**

1.  This should take you to the Pull Request tab.

1.  Now click on  , here you can specify the
    name, description and the reviewers for the pull request. Reviewers
    can be either individuals or groups

    > Pull requests will automatically link in work items when a commits
    in the branch or the entire branch are linked to a work item. You
    can also manually link work items into the pull request in the
    **Related Work Items** field when you finish creating the
    pull request. Typing in a number or work item title text into the
    work item field will search the work items and return a list that
    you can quickly pick from to add to the pull request. You can add
    any number of work items to a pull request in this way.

1.  Click **New pull request** to create it.

1.  The left navigation panel shows by default the files changed in the
    pull request along with the comments reviewers have associated with
    those file changes.

1.  Select the **Files** link to show all of the file changes that has
    been made. You will notice how many files were
    changed (added/changed/removed) from the top summary tab just below
    the Files link

1.  You can add comments to the pull request as both author and as a
    reviewer of the pull request. Comments can be associated with a
    specific code change or at a general discussion level of the
    pull request. You can reply to comments and mention others using
    *@username* or discuss work items using *\#workitem* in
    your remarks.

    > You can mark comments that are made in response to a reviewer feedback
    as:

    > -   ***Active***: Comment is still under review or active discussion.
    > -   ***Resolved***: The issue brought up in this comment has been addressed.
    > -   ***Won't Fix***: The suggestion in the comment is noted and is actionable, but no changes will be made in this pull request.
    > -   ***Closed***: The remark is no longer a pending action item for the pull request.

    > Usually closed comments are for items that turned out to not have any actions after the finishing the discussion

1.  When the pull request owner and the reviewers are satisfied that the
    pull request is ready to merge, you can do it from the web browser
    by clicking on the **Complete pull request** button.

    > Completing the pull request will merge the changes in the topic
    branch into the main branch. If you have no further use for the
    topic branch, you can choose to delete it when you complete the
    pull request. Deleting the branch is safe because all of its changes
    are now included in the main branch.

    > You can also abandon pull requests if the development in the topic
    branch needs more work before reviewing again. The abandoned pull
    request will still be viewable in the web interface and linked in from
    any associated work items. You can reactivate the pull request at any
    time using the Reactivate button in the pull request.

url: https://raw.githubusercontent.com/pike-christopher/DevOps-Immersion-Labs/f76dad3b92da834b32b6ddae4144ef9eb084f538/labs/08.cross platform/07.Branches, Pull Requests and CI.md

repository: pike-christopher/DevOps-Immersion-Labs

filename: 07.Branches, Pull Requests and CI.md

repo_name: pike-christopher/DevOps-Immersion-Labs


text:
% GNTP-REGISTER(1) GNTP User Manuals | Version 1.0
% Al Payne
% October 12, 2011

# NAME

gntp-register - send Growl Notification Transport Protocol register requests

# SYNOPSIS

gntp-notify [-s] [-H _host_[:_port_]] [-P _password_] [-p _priority_] -a _application_ -n _notification_ -t _title_ -m _message_

# DESCRIPTION

gntp-register registers applications and notifications with Growl to enable gntp-notify messages to be displayed.

Applications are message source.  Typically they are identified in Growl by the application's common name.  Since gntp-notify sends notifications on behalf of other processes, this name can be any descriptive name identifying the message source.

Notifications in Growl identify the class of message being sent.  They are short names such as "File updated", or "New message".  From a Growl user perspective, notifications allow more granular format control for messages.  Multiple notification names can be registered.

# OPTIONS

-a _application_
:   Name of the application to register.

-H _host_[:_port_]
:	Host to send the notification message to.  Defaults to localhost if blank.  Port may also be defined if using a non-standard listening port on the client.

-n _notification_
:   Name of the notification to register.  Multiple notifications may be registered using multiple -n options.

-P _password_
:   Password of the receiving Growl client.

# STANDARDS

gntp-register sends Growl Notification Transfer Protocol version 1.0 transactions.

# SECURITY CONSIDERATIONS

gntp-register does not used GNTP encryption.  Users should be aware that any information sent in the notification is transmitted in the clear.

# AUTHOR

Al Payne<EMAIL_ADDRESS>
# COPYRIGHT

BSD license

# SEE ALSO

gntp-notify

repository: alpayne/GNTP-Tools

repo_name: alpayne/GNTP-Tools


text:
---
layout: post
title: sphinx documentation and github
author: brant
categories:
    - python
---

So, there's tools out there to get your documentation up on github ([github-tools][1], [sphinx-to-github][2]), but neither totally jive with how I want to do things.  So, I went searching long and hard for a way to:

* keep the document-generating source in `master`
* place the generated html in `gh-pages`, so it's served as static html
* have everything just "work"

Luckily, I came across this post which gets you most of the way there (but assumes you're using jekyll, which isn't the case for me/us).

So…

<script src="http://gist.github.com/301301.js?file=gistfile1.sh"></script>

[1]: http://github.com/dinoboff/github-tools
[2]: http://github.com/michaeljones/sphinx-to-github

repository: faircloth-lab/blog-theme

extension: markdown

repo_name: faircloth-lab/blog-theme


text:
# Homebrew user tap
it's my personal repository
## Installation

Run the following in your command-line:
```sh
$ brew tap hukendo/tap
```

repository: hukendo/homebrew-tap

repo_name: hukendo/homebrew-tap


text:
# Commands

Most commands available by default are provided by SOMA so please refer to its [documentation](https://soma-php.github.io/) for more information.

## content:compile

```text
php appctrl content:compile {page?} {--force}
```

A page can be specified using a content directory relative path or if none are provided then all files in the content directory will be cache validated and recompiled if required.

The *force* flag forces a recompilation.

## content:routes

```text
php appctrl content:routes
```

The command presents a formatted list of all publicy available route end-points. Route handles that are reserved by an external handler are marked with an appended ellipsis.

repository: soma-php/papyrus

repo_name: soma-php/papyrus


text:
---
title: What is Flextype?
breadcrumbs:
  0:
    title: "Documentation"
    link: "[url]/en/"
  1:
    title: "Getting Started"
    link: "[url]/en/getting-started/"
txt:
  common:
    edit_this_page: Improve this page
    language: Language
    on_this_page: On this page
  categories:
    getting_started:
      title: Getting Started
      what_is_flextype: What is Flextype?
      requirements: Requirements
      installation: Installation
      configuration: Configuration
      folder_structure: Folder Structure
      php_constants: PHP Constants
      coc: Code of Conduct
      getting_help: Getting Help
      license: License
    concepts:
      title: Concepts
      entries: Entries
      plugins: Plugins
      parsers: Parsers
      serializers: Serializers
      content_apis: Content APIs
      perfomance: Performance
    api:
     title: API Reference
     delivery: Content Delivery API
     management: Content Management API
     images: Images API
     authentication: Authentication
     http_details: HTTP Details
     errors: Errors
    content:
      title: Content
      entries: Entries
      markdown: Markdown
      media: Media
      fieldsets: Fieldsets
      snippets: Snippets
      shortcodes: Shortcodes
    themes:
      title: Themes
      theme_installation: Theme Installation
      twig_filters_functions: Twig Filters & Functions
      theme_variables: Theme Variables
      theme_configuration: Theme Configuration
      entries_fetch: Entries Fetch
    plugins:
      title: Plugins
      configuration: Plugin Configuration
      event_hooks: "Event Hooks"
      toasts_notifications: Toast Notifications
      installation: Plugin Installation
      navigation: Navigation
    cookbook:
      title: Cookbook
      tutorials:
        title: Tutorials
        blog: Blog
        team_members: Team Members
      setup:
        title: Setup
      templating:
        title: Templating
    advanced:
      title: Advanced
      performance_and_caching: Performance & Caching
      password_recovery: Password recovery
      yaml_syntax: YAML Syntax
      api: Flextype API's
---

Flextype is an open-source self-hosted **Data-First Headless CMS & API**. It is was **founded in March 2018** as lightweight alternative to other heavy and outdated CMS. Many people use complex solutions for simple pages, unnecessarily. Building this content management system, we focused on simplicity - even novice webmaster adapt his template and writes his own plugin. To achieve this, we implemented a simple but powerful API's.

 Design your data structure the way you want. Update and share your data with others and teams using version control. Flextype does not require MySQL database, because all the data are collected in a simple files. Perfect portability when changing your hosting provider. Just copy all the files from one account to another.

The underlying architecture of Flextype is built using well established and best-in-class technologies. This is to ensure that Flextype is simple to use and easy to extend. Some of these key technologies include:

* [Slim PHP](http://www.slimframework.com): Framework for powerful web applications and APIs.
* [Doctrine Project](https://www.doctrine-project.org): A set of decoupled and reusable PHP libraries for powerful web applications.
* [The PHP League](https://thephpleague.com): The League of Extraordinary PHP Packages well tested and using modern coding standards.
* [Respect Validation](https://respect-validation.readthedocs.io/): The most awesome validation engine ever created for PHP.
* [Thunderer Shortcode](https://github.com/thunderer/Shortcode): Advanced shortcode (BBCode) parser and engine for PHP.
* [Markdown & Parsedown](https://github.com/erusev/parsedown): Easy content creation using Markdown Syntax.
* [YAML](https://yaml.org): Human friendly data serialization format for simple configuration.

### Supporting Flextype

Flextype is an open source project and community contributions are essential to its growing and success. Contributing to the Flextype is easy and you can give as little or as much time as you want.

##### Financial support FINANCIAL SUPPORT
Flextype is an MIT-licensed open source project and completely free to use.
However, the amount of effort needed to maintain and develop new features for the project is not sustainable without proper financial backing.

 You can support it's ongoing development by being a project backer or a sponsor:

Become a backer or sponsor on Patreon,
One-time donation via PayPal, QIWI, Sberbank, Yandex,
Visit our Sponsors & Backers page

##### International translator team
We are on a mission to build high quality platform to develop fast, flexible, easier to manage websites with Flextype!

If you wish to participate in the translation of Flextype, please Join Flextype International Translator Team and start translating!

Our crowdin projects:

Flextype Admin Panel Plugin, Flextype Form Admin Plugin, Flextype Themes Admin Plugin, Flextype Website, Flextype Documentation

### Flextype Press kit

You can find a summary about Flextype, including Flextype logos and press information, on our [press kit page.](https://flextype.org/en/press-kit)


text:
# AWS Service Catalog ECS Reference architecture

This reference architecture creates an AWS Service Catalog Portfolio called "Service Catalog Containers Reference Architecture"
The Portfolio provides 4 products which will create a full DevOps deployment pipeline from code to container deployment in Fargate.

![SC-Devops-ECS.png](SC-Devops-ECS.png)

[![HowToVideo](https://img.youtube.com/vi/zMAbVbIB9TY/0.jpg)](https://www.youtube.com/watch?v=zMAbVbIB9TY&list=PLhr1KZpdzukcaA06WloeNmGlnM_f1LrdP)

See the blog about this solution:
[Launch a standardized DevOps pipeline to deploy containerized applications using AWS Service Catalog](https://aws.amazon.com/blogs/mt/launch-a-standardized-devops-pipeline-to-deploy-containerized-applications-using-aws-service-catalog/)

1. Create the portfolio using the Launchstack:
[![CreateStack](https://s3.amazonaws.com/cloudformation-examples/cloudformation-launch-stack.png)](https://console.aws.amazon.com/cloudformation/#/stacks/new?stackName=SC-RA-ECS-Portfolio&templateURL=https://aws-service-catalog-reference-architectures.s3.amazonaws.com/ecs/sc-portfolio-ecs.json)
2. Provision the cluster and codepipeline products from Service Catalog.
3. The provisioned codepipeline product will create a new CodeCommit repo.
	a. Add your code, docker file, and tests.
    a. Adjust the skeleton builspecs in the codepipeline/ subfolder to fit your project tests and build commands.
    b. Check-in the code to the new codecommit repo. CodePipeline will validate, build according to the buildspec files.
	c. If all stages complete then CodePipeline will push the container to ECR.
3. Once the container is in ECR you can provision the supplied Fargate Service product in Service Catalog.
  This will create an ECS Service which is launched in the previously provisioned Fargate Cluster.  You may then view your new service using the ExternalUrl
  output parameter from the ECS Cluster product.

Be aware, running this service as demonstrated here is non-SSL http.  In production you must protect all web traffic with SSL.
The example templates here cannot create and manage SSL for you, so it must be done as an additional task in your account.

For more example ECS tamplates and to see the original source of the provided templates see this [repo](https://github.com/awslabs/aws-cloudformation-templates/tree/master/aws/services/ECS)


text:
# Item-display

An item display factory to produce different display depending on item type.
The following types: Book, Video, Audio.

## Install

If you are starting a blank project from a clean composer.json
```angular2html

{
   "require":{
      "sugarfixx/item-display":"0.1"
   },
   "repositories":[
      {
         "type":"vcs",
         "url":"git@github.com:sugarfixx/item-display.git"
      }
   ]
}
```

## Assignment

Using the factory method pattern, create an Item Display factory processing books, video and audio items and outputting them as uniform Items. A fallback to Default item should be included.

The factory has defined both Item Creator and Items Interface.
All creators are extending the Item creator, all Item Displays implement Items Interface and return an instance of Item.

repository: sugarfixx/item-display

branch_name: refs/heads/main

repo_name: sugarfixx/item-display