text:
# [Archived] svelte-navaid-filebased
# Important:
I will no longer support this as there is no use for this anymore, as Sveltekit brings it's own router.

Is a really basic file-based router. Uses [Navaid](https://github.com/lukeed/navaid) as one of the smallest available routers. Currently only works with pure svelte (no sapper), but should easily be converted to whatever you want.

## Get started
```
npm i svelte-navaid-filebased
```

In your `src/` folder create a folder called routes. This is where this package will start putting the routes together.

Put this in your `package.json`
```
"generate": "svelte-navaid-filebased"
```
and run
```
npm run generate
```

You should see that in the folder you just created (`src/routes`) a new file called `Routes.svelte` will be created.

In your `App.svelte`:
```HTML
<script>
    .... <!-- Other imports -->

    import Routes from './Routes.svelte'
</script>

<!-- Maybe put your navbar here -->

<!-- Create your site layout -->
<main>
	<Routes /> <!-- This is where your different pages will be displayed-->
</main>
```

Thats it! All the configuration we need is done. So lets start creating our first page!

In `src/routes` create a file `index.svelte` and put in some text. Rerun `npm run generate` to update the routes, and start your dev server. You should already see the text you tiped in.

## How it works
All files called `index.svelte` will be mapped to the route `/` of the current directory. So if you have a file `pages/edit/index.svelte` the route for this file will be `pages/edit`

Can I have access to the url params? Sure. Just create a file `pages/edit/[pageid].svelte` (where `[...]` are important). The in your component write
```HTML
<script>
    ..... <!-- Imports -->
    export let params;
    ..... <!-- other code -->
</script>
```
With `params.pageid` you will get access to the urlparam.

## Dev-mode
With the option `-D` the package will start in dev mode. This means, that every time you create / move / remove a file in `src/routes` it will automatically generate the new routes. In most of the cases you do not even need to restart your server.
But i know, you don't like to start your server and this package one after the other. So lets make a few modifications to our `package.json`:
First lets install `npm install npm-run-all`
Now paste this into your `package.json`
```
"dev": "run-p dev:routes dev:svelte",
"dev:svelte": "rollup -c -w",
"dev:routes": "svelte-navaid-filebased -D",
```
and run `npm run dev`.
Done! your Routes will autogenrate when you make changes to your files.

## Options
Here are the few available options:
```
svelte-navaid-filebased -h

  Description
    Generates a Router based on a folder-structure

  Usage
    $ genrate [dir] [options]

  Options
    -d, --dir         the location of the routes directory  (default src/routes/)
    -b, --basepath    the location of the routes directory  (default /)
    -o, --output      the file where the routes should be written to  (default src/Routes.svelte)
    -D, --dev         enable dev mode and watch dir
    -v, --version     Displays current version
    -h, --help        Displays this message
```

## Contributions
Contributions welcome. Just open a Pull-Request or Issue!

## License
MIT


text:
# Distributed `kvstore` Load Test Collection Executor

This scenario allows one to automatically execute multiple distributed load
tests (`003-kvstore-loadtest-distributed`) while varying the `NUM_CLIENTS` and
`HATCH_RATE` parameters, as well as whether or not to redeploy the relevant
Tendermint network between each load test.

repository: thanethomson/networks

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: thanethomson/networks


text:
# PROBABALLISTIQ_DRUMMER

musical Artificial Agents as Teensy audio devices

A generative HipHop drum machine with endless variations on funk grooves.

Parameters controllable via MIDI;
HW box in progress.

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

<EMAIL_ADDRESS>- Spring 2021

## SW

All made in Teensyduino; Audio with the Teensy Audio design tool.

- core: internal probaballistiq pattern generator
- internal, sample based 4 track audio seq: {kick, snr, clap, hats}.
- USB MIDI note out
- USB MIDI cc in for all params - currently mapped to KORG Nanokontrol2, easily repatched to other CCnums.
- ToDo later:
	- test USB MIDI host for nanoKontrol etc faderboxes.
	- MIDI clock sync in/out
	- DIN MIDI I/O
	- 4 track cv out

### Library dependencies:

##### Timing
- include "TeensyTimerTool.h" // https://github.com/luni64/TeensyTimerTool
- include <Chrono.h> // http://github.com/SofaPirate/Chrono

##### HW I/F

- include <Bounce.h>  // Teensy common Library
- include <Encoder.h> // Teensy common Library
- https://github.com/tttapa/Control-Surface // for analog input filtering
- https://github.com/gavinlyonsrepo/TM1638plus // LED/Button I/F
	- We use "Model 1" as defined in TM1638plus.h. The library support ASCII, text, Hex and allows for setting individual segments, and the decimal point of segment. The TM1638plus_TEST.ino contains a set of tests demonstrating library functions. For more information see the commented headers in header file.
	- User may have to debounce buttons depending on application. > Teensy Bounce Class
	- String conversion using snprintf:
	   - printf ("Preceding with blanks: %10d \n", 1977);
	   - printf ("Preceding with blanks: %4d \n", 127);
	   https://www.cplusplus.com/reference/cstdio/snprintf/
	   https://www.cplusplus.com/reference/cstdio/printf/
	   - https://www.nutsvolts.com/uploads/wygwam/NV_0501_Marston_Figure02.jpg

##### Audio
- Audio libs are automatically included by the Teensy Audio Design tool

license: MIT

repository: aiberlin/AAT

branch_name: refs/heads/main

repo_name: aiberlin/AAT


text:
---
title: Twitter Bootstrap Dropdown Button
author: Damien
layout: post
comments: true
permalink: /2011/10/31/twitter-bootstrap-dropdown-button/
geo_latitude:
  - 48.21272
geo_longitude:
  - 13.492719999999963
geo_address:
  - Ried im Innkreis, Upper Austria, Austria
geo_enabled:
  - 1
geo_public:
  - 1
categories:
  - web development
tags:
  - Bootstrap
  - Twitter
  - Web application
---
If you like the [Twitter Bootstrap][1], check out this [pull][2] in their github repository. You might like to see that they are still adding new UI elements to their framework.

[<img class="aligncenter size-medium wp-image-94" title="bootstrap-dropdown-buttons" src="http://damien.antipa.at/wp-content/uploads/2011/10/bootstrap-dropdown-buttons-300x101.png" alt="" width="300" height="101" />][3]

 [1]: http://twitter.github.com/bootstrap/
 [2]: https://github.com/twitter/bootstrap/pull/192
 [3]: http://damien.antipa.at/wp-content/uploads/2011/10/bootstrap-dropdown-buttons.png

repository: visiongeist/blog

repo_name: visiongeist/blog


text:
# QCivic 2.0
Qt Creator syntax theme inspired by Xcode 8's Civic theme.

# Support
If you like this theme, you can use it for free appreciate your support to have more themes :)

![Support](https://www.buymeacoffee.com/assets/img/custom_images/black_img.png)

* * *
# Screenshots

### QML Dark theme
![QML](https://raw.githubusercontent.com/foxoman/qcivic/master/QCivic-QML2.png)

### Qt C++ Dark theme
![Qt](https://raw.githubusercontent.com/foxoman/qcivic/master/QCivic-CPP2.png)

### QML light theme
![QML](https://raw.githubusercontent.com/foxoman/qcivic/master/QtCivic_light_QML2.png)

### Qt C++ light theme
![Qt](https://raw.githubusercontent.com/foxoman/qcivic/master/QtCivic_light_CPP2.png)

# Install
### Dark Theme
## Windows
`xcopy qcivic.xml %APPDATA%\QtProject\qtcreator\styles`

## MacOS
`cp qcivic.xml ~/.config/QtProject/qtcreator/styles/`

## Linux
`cp qcivic.xml ~/.config/QtProject/qtcreator/styles/`

### Light Theme
## Windows
`xcopy qcivic_light.xml %APPDATA%\QtProject\qtcreator\styles`

## MacOS
`cp qcivic_light.xml ~/.config/QtProject/qtcreator/styles/`

## Linux
`cp qcivic_light.xml ~/.config/QtProject/qtcreator/styles/`

repository: emotionSky/qcivic

repo_name: emotionSky/qcivic


text:
# News

## Release v0.1

Release v0.1 includes an initial version of every step in the SemanticModels pipeline.
Users can now extract information, build knowledge graphs, and generate new models.

The following is a summary of the most important new features and updates:

- New submodules
  - Dubstep
    - [`SemanticModels.Dubstep.TraceCtx`](@ref) builds dynamic analysis traces of a model for information extraction.
    - [`SemanticModels.Dubstep.LPCtx`](@ref) allows you to modify the norms used in a model.
    - [`SemanticModels.Dubstep.GraftCtx`](@ref) allows grafting components of one model onto another.
  - Parsers
    - [`Parsers.parsefile`](@ref) reads in a julia source file as an expression.
    - [`Parsers.defs`](@ref) extracts  all of the code definitions from a module definition expression.
    - [`Parsers.edges`](@ref) extracts edges for the knowledge graph from code.
  - Graphs
    - A knowledge graph schema [Knowledge Graphs](@ref).
    - [`Graphs.insert_edges_from_jl`](@ref) builds a knowledge graph from extracted edges.
- Examples
  - `test/transform/ode.jl` shows how to perturb an ODE with overdub.
  - `test/transform/varextract.jl` shows how to use a compiler pass to extract dynamic analysis information.
- Scripts
  - `bin/extract.jl` extracts knowledge elements from parsed markdown and source code files.
  - `bin/graft.jl` performs metamodeling by grafting a component of one model onto another.

- New docs pages
  - [Intended Use Cases](@ref)
  - [Dubstep](@ref)
  - [Knowledge Graphs](@ref)
  - [Knowledge Extraction](@ref)
  - [Model Validation with Dynamic Analysis](@ref)
  - [Semantic Modeling Theory](@ref)
  - [Developer Guidelines](@ref)

## Release v0.0.1

Initial release with documentation and some examples designed to illustrate the inteded scope of the software.


text:
molbox
==============================
[//]: # (Badges)
[![CI](https://github.com/mosdef-hub/molbox/actions/workflows/CI.yaml/badge.svg)](https://github.com/mosdef-hub/molbox/actions/workflows/CI.yaml)
[![codecov](https://codecov.io/gh/REPLACE_WITH_OWNER_ACCOUNT/molbox/branch/master/graph/badge.svg)](https://codecov.io/gh/mosdef-hub/molbox/branch/master)

A generic Box implementation for molecular simulation objects.

This project is a fork of [`mbuild`](https://github.com/mosdef-hub/mbuild) providing a generic `Box` object to be used with molecular simulation objects.

## Usage
This package provides a single `Box` class:
```python
from molbox import Box
# Create a box using lengths and angles
box = Box(lengths=[2, 3, 4], angles=[90, 90, 120], precision=5)
print("Box Attributes:")
print(f"Lengths(x, y, z): ({box.Lx}, {box.Ly}, {box.Lz})")
print(f"Tilt Factors(xy, yz, xz): ({box.xy}, {box.yz}, {box.xz}")
print(f"Vectors: {box.vectors}")
# Create a box from box vectors
from_vec_box = Box.from_vectors([[2, 0, 0], [-1.5, 2.59808, 0], [0, 0, 4]])
```

### API
Full documentation can be accessed [here](API.md).

## Copyright

Copyright (c) 2021, Vanderbilt University

## Acknowledgements

Project based on the
[Computational Molecular Science Python Cookiecutter](https://github.com/molssi/cookiecutter-cms) version 1.5.


text:
# trixelator
A desktop application to create photo mosaics with triangular pixels

![trixelation example](https://raw.githubusercontent.com/scanton/trixelator/master/images/adam.jpg "Trixelatemd Adam")

## Installation Instructions

You will need to install the latest version of [Node.js](https://nodejs.org/en/) to install this project.  If you are new to Node.js, you can download the most recent Node installer from the home page of their website.

Once Node.js is installed, clone this repository to your local machine.  If you are new to Git and aren't sure how to 'clone' this repository, you can click on the green "Clone or download" button on top of this page and/or use [GitHub Desktop](https://desktop.github.com/).

Once you have cloned this project to your local machine, open a Terminal/Command window and navigate to the directory you cloned this project to.  Then enter this command in the Terminal (note, on Windows you won't need 'sudo' but you will need to run the command prompt as Admin):

```bash
sudo npm install
```

This should install the node dependencies for this project.

To run the application, just type the following into the console:

```bash
npm start
```

## Using Trixelator

Trixelator is currently in active development.  The application works, click "Select Image" to choose an image from your local machine.  Once loaded, you can resize the window to scale teh image.  Choose the 'Base Width' for all triangles (expressed in pixels) and the 'Sample Size' is how many pixels should be used (square) to define the final color of the triangle.

For example, a Trixelation with a "Base Width" of 40 and a "Sample Size" of 15 will result in a mosaic of equlateral triangles of 40px length on each side.  The color of the triangle will be an average of the 15 (centermost) pixels inside the triangle.

You can play with the Base Width and Sample Size to create Trixelations with large triangular pixels.  A smaller sample size will make your colors more vivid (based on a few pixels) as opposed to a large sample size which can sometime expose more detail, while going too far will result in gray/grey/muted colors.

repository: scanton/trixelator

gha_language: JavaScript

gha_license_id: MIT

repo_name: scanton/trixelator


text:
# RSS Feed as Feedly Stream Content #

Provides a project that returns a RSS Feed result from the Feedly Stream Content API.

The feed can be customized with

* client-side URL to the RSS Feed
* [not yet implemented] client-side custom title (overrides the `title` returned by the Feedly API)

repository: MikeStrad/digital-signage-samples

repo_name: MikeStrad/digital-signage-samples


text:
# Temporal 3D ConvNet (T3D)

Temporal 3D ConvNet

This is the code for the paper entitled: [_Temporal 3D ConvNets: New Architecture and Transfer Learning for Video Classification_,
Ali Diba, Mohsen Fayyaz, Vivek Sharma, Amir Hossein Karami, Mohammad Mahdi Arzani, Rahman Yousefzadeh, Luc Van Gool](https://arxiv.org/abs/1711.08200).

In fact, In this work we have introduced new 3D convolutional neural network architectures for video classification named DenseNet3D and T3D.

### Citation:
If you use this code, please cite the following:
```
Diba, Ali, Mohsen Fayyaz, Vivek Sharma, Amir Hossein Karami, Mohammad Mahdi Arzani, Rahman Yousefzadeh, and Luc Van Gool. "Temporal 3D ConvNets: New Architecture and Transfer Learning for Video Classification." arXiv preprint arXiv:1711.08200 (2017).
```

Other codes will be available soon.

_Sensifai Vision Group_

Last Update: 6 December 2017


text:
[![Build Status](https://travis-ci.org/our-energy/eiep.svg?branch=master)](https://travis-ci.org/our-energy/eiep)
[![Latest Stable Version](https://poser.pugx.org/ourenergy/eiep/v/stable?format=flat)](https://packagist.org/packages/ourenergy/eiep)

# Electricity Information Exchange Protocol (EIEP)

A PHP library for working with the Electricity Authority's EIEP data files. Supports PHP 7.1+.

Uses [league/csv](https://github.com/thephpleague/csv) for reading and writing CSV files.

Currently supported protocols and versions;

| Protocol  | Version(s) |
| ------------- | ------------- |
| EIEP3  | 10.0, 11.0  |
| EIEP13a  | 1.1  |

## Installation

```
composer require ourenergy/eiep
```

## Reading from a file

```php
use Eiep\Eiep3\Report;
use Eiep\Eiep3\DetailRecord;

$report = new Report();

$report->streamFromFile("eiep3.csv", function(DetailRecord $record)  {
    echo $record->getActiveEnergy() . PHP_EOL;
});

```

## Working with an existing stream

```php
use Eiep\Eiep3\Report;
use Eiep\Eiep3\DetailRecord;

$report = new Report();

$handle = fopen("eiep3.csv", "r");

$report->readFromStream($handle, function(DetailRecord $record)  {
    echo $record->getActiveEnergy() . PHP_EOL;
});

```

## Writing a new report

```php
use Eiep\Eiep3\Report;
use Eiep\Eiep3\DetailRecord;

// Create the report
$report = new Report();
$report
    ->setReportDate(new \DateTime("2019-01-01 00:00:00"))
    ->setUtilityType(Report::UTILITY_TYPE_ELECTRICITY)
    ->setFileStatus(Report::FILE_STATUS_REPLACEMENT)
    ->setNumRecords(1);

// Create records
$record = new DetailRecord();

$record
    ->setIcpIdentifier("1234567890")
    ->setStreamIdentifier("ABCDEFG")
    ->setReadingType(DetailRecord::READING_TYPE_FINAL)
    ->setDate(new \DateTime("2019-01-01 00:00:00"))
    ->setTradingPeriod(48)
    ->setActiveEnergy(1)
    ->setReactiveEnergy(2)
    ->setApparentEnergy(3)
    ->setFlowDirection(DetailRecord::FLOW_DIRECTION_EXTRACT);

// Write everything to a file
$records = [
    $record
];

$report->writeRecords("eiep3.csv", $records);

```

## Creating a write stream

```php
use Eiep\Eiep3\Report;
use Eiep\Eiep3\DetailRecord;

// ... prepare your report and records as above ...

// Create a writer
$writer = $report->createWriter("eiep3.csv");

// Write one record
$writer->insertOne($record->toArray());

// Write multiple records
$rows = array_map(function (DetailRecord $record) {
    return $record->toArray();
}, $records);

$writer->insertAll($rows);

```

repository: our-energy/eiep

repo_name: our-energy/eiep


text:
# Laravel UDS

[![Latest Version on Packagist](https://img.shields.io/packagist/v/altynbek07/laravel-uds.svg?style=flat-square)](https://packagist.org/packages/altynbek07/laravel-uds)
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/altynbek07/laravel-uds/run-tests?label=tests)](https://github.com/altynbek07/laravel-uds/actions?query=workflow%3Arun-tests+branch%3Amaster)
[![Total Downloads](https://img.shields.io/packagist/dt/altynbek07/laravel-uds.svg?style=flat-square)](https://packagist.org/packages/altynbek07/laravel-uds)

UDS integration for Laravel. This package is the bridge between UDS and Laravel.

## Installation

You can install the package via composer:

```bash
composer require altynbek07/laravel-uds
```

You should set these environment variables in your `.env` file:

```env
UDS_ID=YourCompanyId
UDS_KEY=YourApiKey
```

You can publish the config file with:

```bash
php artisan vendor:publish --provider="Altynbek07\Uds\UdsServiceProvider" --tag="config"
```

This is the contents of the published config file:

```php
<?php

return [
    /**
     * Your company ID from UDS
     */
    'id' => env('UDS_ID'),
    /**
     * Your API Key from UDS
     */
    'key' => env('UDS_KEY'),
    /**
     * This is the API URI path where Uds will be accessible from. Feel free
     * to change this path to anything you like.
     */
    'path' => env('UDS_PATH', 'api/uds'),
    /**
     * These middleware will be assigned to every Uds route, giving you
     * the chance to add your own middleware to this list or change any of
     * the existing middleware. Or, you can simply stick with this list.
     */
    'middleware' => [
        'api',
        // 'auth:api'
    ],
];
```

## Usage

You can use the methods from `\Altynbek07\Uds\Facades\Uds` anywhere you want, or you can send a request to the API routes from anywhere you want (for example, from the front via axios).

### Available Methods

#### Get company settings

Docs: https://docs.uds.app/#tag/Settings

```php
<?php

namespace Altynbek07\Uds\Facades\Uds;

$settings = Uds::settings();
```

#### Create transaction

Docs: https://docs.uds.app/#tag/Operations/paths/~1operations/post

```php
<?php

namespace Altynbek07\Uds\Facades\Uds;

$data = [
    'code' => '3485bf3c-5f9b-42a7-9f25-f102fe464256',
    'receipt' => [
        'total' => 900,
        'cash' => 600,
        'points' => 300
    ]
];

$transaction = Uds::createTransaction($data);
```

#### Refund transaction

Docs: https://docs.uds.app/#tag/Operations/paths/~1operations~1{id}~1refund/post

```php
<?php

namespace Altynbek07\Uds\Facades\Uds;

$id = 113327216;

$transaction = Uds::refundTransaction($id);
```

#### Get transaction information

Docs: https://docs.uds.app/#tag/Operations/paths/~1operations~1calc/post

```php
<?php

namespace Altynbek07\Uds\Facades\Uds;

$data = [
    'code' => '123456',
    'receipt' => [
        'total' => 900,
        'points' => 0
    ]
];

$transaction = Uds::getTransactionInformation($data);
```

#### Find customer

Docs: https://docs.uds.app/#tag/Customers/paths/~1customers~1find/get

```php
<?php

namespace Altynbek07\Uds\Facades\Uds;

$data = [
    'code' => '123456',
    'exchangeCode' => true
    'total' => 900
];

$customer = Uds::customersFind($data);
```

#### Get customer information

Docs: https://docs.uds.app/#tag/Customers/paths/~1customers~1{id}/get

```php
<?php

namespace Altynbek07\Uds\Facades\Uds;

$id =<PHONE_NUMBER>450;

$customer = Uds::customers($id);
```

### Available API Routes

#### Get company settings

Docs: https://docs.uds.app/#tag/Settings

```
# GET
/api/uds/settings
```

#### Create transaction

Docs: https://docs.uds.app/#tag/Operations/paths/~1operations/post

```
# POST
/api/uds/operations
```

#### Refund transaction

Docs: https://docs.uds.app/#tag/Operations/paths/~1operations~1{id}~1refund/post

```
# POST
/api/uds/operations/{id}/refund
```

#### Get transaction information

Docs: https://docs.uds.app/#tag/Operations/paths/~1operations~1calc/post

```
# POST
/api/uds/operations/calc
```

#### Find customer

Docs: https://docs.uds.app/#tag/Customers/paths/~1customers~1find/get

```
# GET
/api/uds/customers/find?code=123456&exchangeCode=true
```

#### Get customer information

Docs: https://docs.uds.app/#tag/Customers/paths/~1customers~1{id}/get

```
# GET
/api/uds/customers/{id}
```

## Testing

```bash
composer test
```

## Changelog

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## Security

If you discover any security related issues, please email<EMAIL_ADDRESS>instead of using the issue tracker.

## Credits

-   [Altynbek](https://github.com/altynbek07)
-   [All Contributors](../../contributors)

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.


text:
gethosts-foreman
================

Bash auto completion of ssh hosts from foreman

 1. Define GOPATH environment variable (if not already defined)
 1. $ go get github.com/tsliwowicz/gethosts-foreman
 1. $ cp $GOPATH/bin/gethosts-foreman /usr/local/bin (or some other directory in your search path)
 1. $ vi $GOPATH/src/github.com/tsliwowicz/gethosts-foreman/foreman-completion.sh-template (replace the placeholders and save)
 1. $ cp $GOPATH/src/github.com/tsliwowicz/gethosts-foreman/foreman-completion.sh-template /etc/profile.d/foreman-completion.sh
 1. $ source /etc/profile.d/foreman-completion.sh (required only if you want the automcomplete to be active in the existing session)


text:
---
title : VT
layout : datapage
permalink : /states/VT/
---

[Project Homepage]({{ site.baseurl}}/)

[VT-00](#VT-00)

# VT -- Sen. Bernard Sanders (I) and  Sen. Patrick J. Leahy (D)
## Committees
Bernard Sanders is the #4 Independent on the Senate Energy Subcommittee on Energy

Bernard Sanders is the #4 Independent on the Senate Committee on Energy and Natural Resources

Patrick J. Leahy is the #2 Democrat on the Senate Appropriations Subcommittee on Commerce, Justice, Science, and Related Agencies

Patrick J. Leahy is the #1 Democrat on the Senate Committee on Appropriations

Patrick J. Leahy is the #9 Democrat on the Senate Appropriations Subcommittee on Energy and Water Development

## HEP Grants
```
This state received no SC HEP grants from 2012-2019
```
## SC Contracts
```
This state received no SC contracts from 2012-2019
```
## NSF MPS Grants
In the past 8 years, this state has received:
60 NSF MPS grants, totalling  $10,242,268
```
Institution                                           Amount ($)
--------------------------------------------------  ------------
UNIVERSITY OF VERMONT & STATE AGRICULTURAL CO          5,349,891
UNIVERSITY OF VERMONT & STATE AGRICULTURAL COLLEGE     3,390,125
PRESIDENT AND FELLOWS OF MIDDLEBURY COLLEGE            1,244,481
SAINT MICHAEL'S COLLEGE, INC.                            182,771
U OF VERMONT & ST AGR COLL                                75,000
```
## SULI/CCI Interns

![VT SULI/CCI image]({{ site.baseurl }}/img/VT.png)

From 2014-2016 (only years available), this state had 4 SULI/CCI interns
```
  # Interns  Program    College
-----------  ---------  ----------------------
          2  SULI       Middlebury College
          1  SULI       Green Mountain College
          1  SULI       University of Vermont
```
---
---

[Back to top](#top)
## VT-00 -- Rep. Peter Welch (D) -- [Wikipedia](https://en.wikipedia.org/wiki/VT-00)
## Committees
Peter Welch is the #13 Democrat on the House Committee on Energy and Commerce

## HEP Grants
```
This district received no SC HEP grants from 2012-2019
```
## SC Contracts
```
This district received no SC contracts from 2012-2019
```
## NSF MPS Grants
In the past 8 years, this district has received: $10,242,268 in NSF MPS grants.
```
  Year  Institution                                           Amount ($)
------  --------------------------------------------------  ------------
  2018  UNIVERSITY OF VERMONT & STATE AGRICULTURAL COLLEGE     1,383,732
  2018  SAINT MICHAEL'S COLLEGE, INC.                            164,750
  2018  PRESIDENT AND FELLOWS OF MIDDLEBURY COLLEGE              197,200
  2017  UNIVERSITY OF VERMONT & STATE AGRICULTURAL COLLEGE     2,006,393
  2017  SAINT MICHAEL'S COLLEGE, INC.                             16,771
  2017  PRESIDENT AND FELLOWS OF MIDDLEBURY COLLEGE               64,760
  2016  PRESIDENT AND FELLOWS OF MIDDLEBURY COLLEGE              180,000
  2016  UNIVERSITY OF VERMONT & STATE AGRICULTURAL CO          1,067,126
  2015  UNIVERSITY OF VERMONT & STATE AGRICULTURAL CO            692,380
  2015  U OF VERMONT & ST AGR COLL                                75,000
  2015  SAINT MICHAEL'S COLLEGE, INC.                              1,250
  2015  PRESIDENT AND FELLOWS OF MIDDLEBURY COLLEGE              241,418
  2014  UNIVERSITY OF VERMONT & STATE AGRICULTURAL CO            700,000
  2013  UNIVERSITY OF VERMONT & STATE AGRICULTURAL CO          1,260,592
  2013  PRESIDENT AND FELLOWS OF MIDDLEBURY COLLEGE              277,590
  2012  UNIVERSITY OF VERMONT & STATE AGRICULTURAL CO          1,629,793
  2012  PRESIDENT AND FELLOWS OF MIDDLEBURY COLLEGE              283,513
```
## SULI/CCI Interns
From 2014-2016 (only years available), this district had 4 SULI/CCI interns
```
Term         Name                 College                 Host Lab                               Program
-----------  -------------------  ----------------------  -------------------------------------  ---------
Summer 2015  Thomas John Hobbs    University of Vermont   Brookhaven National Laboratory         SULI
Spring 2015  Corinna Phelps West  Middlebury College      Lawrence Berkeley National Laboratory  SULI
Spring 2015  Amanda Louise Ross   Green Mountain College  Lawrence Berkeley National Laboratory  SULI
Fall 2014    Corinna Phelps West  Middlebury College      Lawrence Berkeley National Laboratory  SULI
```
---


text:
{
"title"       : "[MEW ➡ Parity] Access your MyEtherWallet account in Parity",
"sort"        : "03",
"category"    : "Migrating to/from MyEtherWallet",
"description" : "Migrating to/from MyEtherWallet",
"date_published" : "2017-07-05T08:00:00+08:00",
"date_modified"  : "2017-09-26T08:00:00+08:00"
}

---%

### Place your Keystore file in the following locations:

*  `C:\Users\You\AppData\Roaming\Parity\Ethereum`

*  `/Users/you/Library/Application Support/io.parity.ethereum`

*  `/home/you/.local/share/io.parity.ethereum`

### [How to get your keystore fille](https://kb.myetherwallet.com/migration/location-of-mist-geth-wallet-files.html)


text:
# rkt architecture

## Overview

rkt's primary interface is a command-line tool, `rkt`, which does not require a long running daemon.
This architecture allows rkt to be updated in-place without affecting application containers which are currently running.
It also means that levels of privilege can be separated out between different operations.

All state in rkt is communicated via the filesystem.
Facilities like file-locking are used to ensure co-operation and mutual exclusion between concurrent invocations of the `rkt` command.

## Stages

Execution with rkt is divided into several distinct stages.

**NB** The goal is for the ABI between stages to be relatively fixed, but while rkt is still under heavy development this is still evolving.

After calling `rkt` the execution chain follows the numbering of stages, having the following general order:

![execution-flow](execution-flow.png)

1. invoking process -> stage0:
The invoking process uses its own mechanism to invoke the rkt binary (stage0). When started via a regular shell or a supervisor, stage0 is usually forked and exec'ed becoming a child process of the invoking shell or supervisor.

2. stage0 -> stage1:
An ordinary [`exec(3)`][man-exec] is being used to replace the stage0 process with the stage1 entrypoint. The entrypoint is referenced by the `coreos.com/rkt/stage1/run` annotation in the stage1 image manifest.

3. stage1 -> stage2:
The stage1 entrypoint uses its mechanism to invoke the stage2 app executables. The app executables are referenced by the `apps.app.exec` settings in the stage2 image manifest.

The details of the execution flow varies across the different stage1 implementations.

### Stage 0

The first stage is the actual `rkt` binary itself.
When running a pod, this binary is responsible for performing a number of initial preparatory tasks:

- Fetching the specified ACIs, including the stage1 ACI of --stage1-{url,path,name,hash,from-dir} if specified.
- Generating a Pod UUID
- Generating a Pod Manifest
- Creating a filesystem for the pod
- Setting up stage1 and stage2 directories in the filesystem
- Unpacking the stage1 ACI into the pod filesystem
- Unpacking the ACIs and copying each app into the stage2 directories

Given a run command such as:

```
# rkt run app1.aci app2.aci
```

a pod manifest compliant with the ACE spec will be generated, and the filesystem created by stage0 should be:

```
/pod
/stage1
/stage1/manifest
/stage1/rootfs/init
/stage1/rootfs/opt
/stage1/rootfs/opt/stage2/${app1-name}
/stage1/rootfs/opt/stage2/${app2-name}
```

where:

- `pod` is the pod manifest file
- `stage1` is a copy of the stage1 ACI that is safe for read/write
- `stage1/manifest` is the manifest of the stage1 ACI
- `stage1/rootfs` is the rootfs of the stage1 ACI
- `stage1/rootfs/init` is the actual stage1 binary to be executed (this path may vary according to the `coreos.com/rkt/stage1/run` annotation of the stage1 ACI)
- `stage1/rootfs/opt/stage2` are copies of the unpacked ACIs

At this point the stage0 execs `/stage1/rootfs/init` with the current working directory set to the root of the new filesystem.

### Stage 1

The next stage is a binary that the user trusts, and has the responsibility of taking the pod filesystem that was created by stage0, create the necessary container isolation, network, and mounts to launch the pod.
Specifically, it must:

- Read the Image and Pod Manifests. The Image Manifest defines the default `exec` specifications of each application; the Pod Manifest defines the ordering of the units, as well as any overrides.
- Set up/execute the actual isolation environment for the target pod, called the "stage1 flavor". Currently there are three flavors implemented:
  - fly: a simple chroot only environment.
  - systemd/nspawn: a cgroup/namespace based isolation environment using systemd, and systemd-nspawn.
  - kvm: a fully isolated kvm environment.

### Stage 2

The final stage, stage2, is the actual environment in which the applications run, as launched by stage1.

## Flavors
### systemd/nspawn flavors

The "host", "src", and "coreos" flavors (referenced to as systemd/nspawn flavors) use  `systemd-nspawn`, and `systemd` to set up the execution chain.
They include a very minimal systemd that takes care of launching the apps in each pod, apply per-app resource isolators and makes sure the apps finish in an orderly manner.

These flavors will:
- Read the image and pod manifests
- Generate systemd unit files from those Manifests
- Create and enter network namespace if rkt is not started with `--net=host`
- Start systemd-nspawn (which takes care of the following steps)
    - Set up any external volumes
    - Launch systemd as PID 1 in the pod within the appropriate cgroups and namespaces
    - Have systemd inside the pod launch the app(s).

This process is slightly different for the qemu-kvm stage1 but a similar workflow starting at `exec()`'ing kvm instead of an nspawn.

We will now detail how the starting, shutdown, and exit status collection of the apps in a pod are implemented internally.

### Immutable vs. mutable pods

rkt supports two kinds of pod runtime environments: an _immutable pod_ runtime environment, and a new, experimental _mutable pod_ runtime environment.

The immutable runtime environment is currently the default, i.e. when executing any `rkt prepare` or `rkt run` command.
Once a pod has been created in this mode, no modifications can be applied.

Conversely, the mutable runtime environment allows users to add, remove, start, and stop applications after a pod has been started.
Currently this mode is only available in the experimental `rkt app` family of subcommands; see the [app pod lifecycle documentation](pod-lifecycle.md#app) for a more detailed description.

Both runtime environments are supervised internally by systemd, using a custom dependency graph.
The differences between both dependency graphs are described below.

#### Immutable runtime environment

![rkt-systemd](rkt-systemd.png)

There's a systemd rkt apps target (`default.target`) which has a [*Wants*][systemd-wants] and [*After*][systemd-beforeafter] dependency on each app's service file, making sure they all start.
Once this target is reached, the pod is in its steady-state. This is signaled by the pod supervisor via a dedicated `supervisor-ready.service`, which is triggered by `default.target` with a [*Wants*][systemd-wants] dependency on it.

Each app's service has a *Wants* dependency on an associated reaper service that deals with writing the app's status exit.
Each reaper service has a *Wants* and *After* dependency with `shutdown.service` that simply shuts down the pod.

The reaper services and the `shutdown.service` all start at the beginning but do nothing and remain after exit (with the [*RemainAfterExit*][systemd-remainafterexit] flag).
By using the [*StopWhenUnneeded*][systemd-stopwhenunneeded] flag, whenever they stop being referenced, they'll do the actual work via the *ExecStop* command.

This means that when an app service is stopped, its associated reaper will run and will write its exit status to `/rkt/status/${app}` and the other apps will continue running.
When all apps' services stop, their associated reaper services will also stop and will cease referencing `shutdown.service` causing the pod to exit.
Every app service has an [*OnFailure*][systemd-onfailure] flag that starts the `halt.target`.
This means that if any app in the pod exits with a failed status, the systemd shutdown process will start, the other apps' services will automatically stop and the pod will exit.
In this case, the failed app's exit status will get propagated to rkt.

A [*Conflicts*][systemd-conflicts] dependency was also added between each reaper service and the halt and poweroff targets (they are triggered when the pod is stopped from the outside when rkt receives `SIGINT`).
This will activate all the reaper services when one of the targets is activated, causing the exit statuses to be saved and the pod to finish like it was described in the previous paragraph.

#### Mutable runtime environment

The initial mutable runtime environment is very simple and resembles a minimal systemd system without any applications installed.
Once `default.target` has been reached, apps can be added/removed.
Unlike the immutable runtime environment, the `default.target` has no dependencies on any apps, but only on `supervisor-ready.service` and `systemd-journald.service`, to ensure the journald daemon is started before apps are added.

In order for the pod to not shut down immediately on its creation, the `default.target` has `Before` and `Conflicts` dependencies on `halt.target`.
This "deadlock" state between `default.target` and `halt.target` keeps the mutable pod alive.
`halt.target` has `After` and `Requires` dependencies on `shutdown.service`.

![rkt-mutable](mutable.png)

When adding an app, the corresponding application service units `[app].service` and `reaper-[app].service` are generated (where `[app]` is the actual app name).
In order for the pod to not shut down when all apps stop, there is no dependency on `shutdown.service`.
The `OnFailure` behavior is the same as in an immutable environment.
When an app fails, `halt.target`, and `shutdown.service` will be started, and `default.target` will be stopped.

![rkt-mutable-app](mutable-app.png)

The following table enumerates the service unit behavior differences in the two environments:

 Unit | Immutable | Mutable
------|-----------|--------
`shutdown.service`  | In **Started** state when the pod starts. *Stopped*, when there is no dependency on it (`StopWhenUnneeded`) or `OnFailure` of any app. | In **Stopped** state when the pod starts. *Started* at explicit shutdown or `OnFailure` of any app. |
`reaper-app.service` | `Wants`, and `After` dependency on `shutdown.service`. `Conflicts`, and `Before` dependency on `halt.target`. | `Conflicts`, and `Before` dependency on `halt.target`. |

#### Execution chain

We will now detail the execution chain for the stage1 systemd/nspawn flavors. The entrypoint is implemented in the `stage1/init/init.go` binary and sets up the following execution chain:

1. "ld-linux-*.so.*": Depending on the architecture the appropriate loader helper in the stage1 rootfs is invoked using "exec". This makes sure that subsequent binaries load shared libraries from the stage1 rootfs and not from the host file system.

2. "systemd-nspawn": Used for starting the actual container. systemd-nspawn registers the started container in "systemd-machined" on the host, if available. It is parametrized with the `--boot` option to instruct it to "fork+exec" systemd as the supervisor in the started container.

3. "systemd": Used as the supervisor in the started container. Similar as on a regular host system, it uses "fork+exec" to execute the child app processes.

The following diagram illustrates the execution chain:

![execution-flow-systemd](execution-flow-systemd.png)

The resulting process tree reveals the parent-child relationships. Note that "exec"ing processes do not appear in the tree:

```
$ ps auxf
...
\_ -bash
    \_ stage1/rootfs/usr/lib/ld-linux-x86-64.so.2 stage1/rootfs/usr/bin/systemd-nspawn
        \_ /usr/lib/systemd/systemd
            \_ /usr/lib/systemd/systemd-journald
            \_ nginx
```

### fly flavor

The "fly" flavor uses a very simple mechanism being limited to only execute one child app process. The entrypoint is implemented in `stage1_fly/run/main.go`. After setting up a chroot'ed environment it simply exec's the target app without any further internal supervision:

![execution-flow-fly](execution-flow-fly.png)

The resulting example process tree shows the target process as a direct child of the invoking process:

```
$ ps auxf
...
\_ -bash
    \_ nginx
```

## Image lifecycle

rkt commands like prepare and run, as a first step, need to retrieve all the images requested in the command line and prepare the stage2 directories with the application contents.

This is done with the following chain:

![image-chain](image-chain.png)

* Fetch: in the fetch phase rkt retrieves the requested images. The fetching implementation depends on the provided image argument such as an image string/hash/https URL/file (e.g. `example.com/app:v1.0`).
* Store: in the store phase the fetched images are saved to the local store. The local store is a cache for fetched images and related data.
* Render: in the render phase, a renderer pulls the required images from the store and renders them so they can be easily used as stage2 content.

These three logical blocks are implemented inside rkt in this way:

![image-logical-blocks](image-logical-blocks.png)

Currently rkt implements the [appc][appc-spec] internally, converting to it from other container image formats for compatibility. In the future, additional formats like the [OCI image spec][oci-img-spec] may be added to rkt, keeping the same basic scheme for fetching, storing, and rendering application container images.

* Fetchers: Fetchers retrieve images from either a provided URL, or a URL found by [image discovery][appc-discovery] on a given image string. Fetchers read data from the Image Store to check if an image is already present. Once fetched, images are verified with their signatures, then saved in the Image Store. An image's [dependencies][appc-dependencies] are also discovered and fetched. For details, see the [image fetching][rkt-image-fetching] documentation.
* Image Store: the Image Store is used to store images (currently ACIs) and their related information.
* The render phase can be done in different ways:
 * Directly render the stage1-2 contents inside a pod. This will require more disk space and more stage1-2 preparation time.
 * Render in the treestore. The treestore is a cache of rendered images (currently ACIs). When using the treestore, rkt mounts an overlayfs with the treestore rendered image as its lower directory.

When using stage1-2 with overlayfs a pod will contain references to the required treestore rendered images. So there's an hard connection between pods and the treestore.

*Aci Renderer*

Both stage1-2 render modes internally uses the [aci renderer][acirenderer].
Since an ACI may depend on other ones the acirenderer may require other ACIs.
The acirenderer only relies on the ACIStore, so all the required ACIs must already be available in the store.
Additionally, since appc dependencies can be found only via discovery, a dependency may be updated and so there can be multiple rendered images for the same ACI.

Given this 1:N relation between an ACI and their rendered images, the ACIStore and TreeStore are decoupled.

## Logging and attaching

Applications running inside a rkt pod can produce output on stdout/stderr, which can be redirected at runtime. Optionally, they can receive input on stdin from an external component that can be attached/detached during execution.

The internal architecture for attaching (TTY and single streams) and logging is described in full details in the [Logging and attaching design document][attach-design].

For each application, rkt support separately configuring stdin/stdout/stderr via runtime command-line flags. The following modes are available:
 * interactive: application will be run under the TTY of the parent process. A single application is allowed in the pod, which is tied to the lifetime of the parent terminal and cannot be later re-attached.
 * TTY: selected I/O streams will be run under a newly allocated TTY, which can be later used for external attaching.
 * streaming: selected I/O streams will be supervised by a separate multiplexing process (running in the pod context). They can be later externally attached.
 * logging: selected output streams will be supervised by a separate logging process (running in the pod context). Output entries will be handled as log entries, and the application cannot be later re-attached.
 * null: selected I/O streams will be closed. Application will not received the file-descriptor for the corresponding stream, and it cannot be later re-attached.

From a UI perspective, main consumers of the logging and attaching subsystem are the `rkt attach` subcommand and the `--stdin`, `--stdout`, `--stderr` runtime options.

[acirenderer]: https://github.com/appc/spec/tree/master/pkg/acirenderer
[attach-design]: ./log-attach-design.md
[appc-spec]: https://github.com/appc/spec
[appc-dependencies]: https://github.com/appc/spec/blob/master/spec/aci.md#image-manifest-schema
[appc-discovery]: https://github.com/appc/spec/blob/master/spec/discovery.md
[man-exec]: http://man7.org/linux/man-pages/man3/exec.3.html
[oci-img-spec]: https://github.com/opencontainers/image-spec
[rkt-image-fetching]: ../image-fetching-behavior.md
[systemd-beforeafter]: http://www.freedesktop.org/software/systemd/man/systemd.unit.html#Before=
[systemd-conflicts]: http://www.freedesktop.org/software/systemd/man/systemd.unit.html#Conflicts=
[systemd-wants]: http://www.freedesktop.org/software/systemd/man/systemd.unit.html#Wants=
[systemd-onfailure]: http://www.freedesktop.org/software/systemd/man/systemd.unit.html#OnFailure=
[systemd-remainafterexit]: http://www.freedesktop.org/software/systemd/man/systemd.service.html#RemainAfterExit=
[systemd-stopwhenunneeded]: http://www.freedesktop.org/software/systemd/man/systemd.unit.html#StopWhenUnneeded=

repository: blablacar/dgr

gha_language: Go

repo_name: blablacar/dgr


text:
# MyKeep

![Build and Deploy](https://github.com/viniciusgerevini/my-keep/workflows/Build%20and%20Deploy/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/viniciusgerevini/my-keep/badge.svg?branch=master)](https://coveralls.io/github/viniciusgerevini/my-keep?branch=master)

A note taking app inspired by Google Keep.

__Still a work in progress.__

Automatically deployed to Github Pages using Github Actions: [demo](https://viniciusgerevini.github.io/my-keep/)

## Features:

- //TODO

## Tech used:
- [create-react-app](./)
- [Draft.js](./)
- [React.js](./)
- [Redux](./)
- //TODO

repository: viniciusgerevini/my-keep

repo_name: viniciusgerevini/my-keep


text:
---
layout: post
title: Don't Redux All The Things
---

Redux is a library and a pattern for managing state in front-end applications.  It is typically associated with React but it can be used with other frameworks as well.
Instead of directly modifying state, components dispatch actions, which are then handled by reducers.  Reducers take current (immutable) state plus the action to produce a new state.  The new state is then wired into React component properties, which triggers re-rendering.  This interaction is shown in the diagram below:

![diagram of Redux flow](https://cdn-images-1.medium.com/max/800/1*MKL1Im4ElgB38_MsubiMjw.png)

The value in Redux is there is a clear, consistent way to manage state shared between components.  Redux is a good solution for reacting to global state changes, or for reacting to state shared between components that are not connected by parent-child relationships.  On the downside, the extra layers of indirection -- triggering an action, handling that action in a reducer, then updating state – make it more complex than just setting component state directly.

Take this simple example of displaying a counter with a button to increment the counter:

```jsx
class RegularCounter extends React.Component {
  state = {counter: 0}

  increment = () => {
    this.setState({counter: this.state.counter + 1})
  }

  render() {
    return (
      <div>
      <h2>Regular counter</h2>
      <div>current value: {this.state.counter}</div>
      <div><button onClick={this.increment}>increment</button></div>
      </div>
      )
  }
}
```

You have a component that encapsulates some mutable state, plus some action to change the state, and presentation.  It's clear what the `increment` function does when you click the
button.  Now consider a Redux version:

```jsx
class _ReduxCounter extends React.Component {
  render() {
    return (
      <div>
      <h2>Redux counter</h2>
      <div>current value: {this.props.counter}</div>
      <div><button onClick={this.props.increment}>increment</button></div>
      </div>
      )
  }
}

const ReduxCounter = connect(
  (state) => {return {counter: state}}, /* mapStateToProps */
  (dispatch) => {return {increment: () => dispatch({type: 'INCREMENT'})}} /*mapDispatchToProps*/
)(_ReduxCounter)

const counterReducer = (counter = 0, action) => {
  switch (action.type) {
    case 'INCREMENT': return counter + 1
    default: return counter
  }
}
```

Now, when I look at the component it's not immediately obvious what `increment` does because it's passed in as a prop.  When I go look at the injected prop,
that still doesn't tell me what happens when you click the button--`increment` dispatches an action, which is like publishing a message.  You have to go look at the reducer separately
to see what happens to the state when the action is received.  Why should I consider the Redux version an improvement?

My point is not that Redux is bad, only that it doesn't necessarily add value in every use case, especially if you're using React for reusable view components without
building a true full-blown SPA.  Also, the Redux docs don't have a good explanation of why a particular use case would be harder or more complex without Redux, or how to tell the difference between when it will add value and when it won't.

So, when to use Redux?  Let's hear what one of the original React creators has to say:

> Flux should only be added once many components have already been built. ... You’ll know when you need Flux. If you aren’t sure if you need it, you don’t need it.
> (source: [https://github.com/petehunt/react-howto](https://github.com/petehunt/react-howto))

It's debatable whether Redux is a Flux implementation, but it fills the same niche of state management.

Another good rule of thumb is ["do whatever is less awkward."](https://github.com/reactjs/redux/issues/1287)  Don't rush to Redux All The
 Things.  Instead, introduce Redux gradually, when it solves a specific problem--you can even mix local state and Redux on the same component.


text:
# Updating StartSharp

This document outlines steps required to update an existing StartSharp project to the latest Serenity / Serenity.Pro version.

> ### Warning
>
> It is possible to upgrade your existing StartSharp based project, by updating its Serenity NuGet packages using guides here.
>
> But, some of our users ask us how to update their *existing project* to *latest StartSharp template*. The short answer to this question is *you can't*.
>
>Your existing project which is created using StartSharp template is a modifiable copy. Thus, it can not be seamlessly updated to latest StartSharp version as that would mean losing your changes.
>
>Of course, it doesn't mean you can't update your existing project to use latest StartSharp features, but it requires some manual and tedious work.
>
>If you would like to avoid any such work and have newest features / samples in StartSharp template easily, you would need to create a new project based on latest StartSharp template.
>
>To manually update your existing StartSharp based application by transferring code from a new StartSharp project, it is useful to create the new project with the same name as your existing one. This will make it easier to copy / merge changes between them.
>
>Even though we try to list steps you need to perform under Upgrade Guides and Breaking Changes, it may not always work as expected. In that case, please create a new StartSharp project and try to transfer your existing custom code into the new project.

## Step 1 - Backup Existing Project

To be safe in case of an error during update process, first backup your project. You might ZIP your entire solution directory, or if you are using some source control system like Git, you may commit pending changes if any.

> This step is optional, you may skip it at your own risk.

## Step 2 - Update Prerequisites

Applying latest Visual Studio patches, updating latest TypeScript / Node / NPM versions is usually a good idea.

We list the minimum requirements in this document:

https://github.com/volkanceylan/Serenity/blob/master/INSTALL.md

> Versions listed there might be lower than latest TypeScript / Node versions but more recent versions would probably work.

## Step 2 - Update Serenity NuGet Packages

### Applying Changes in Upgrade Guides

> While updating Serenity packages, there may be cases where you would need do some changes to your existing project based on your prior Serenity version. See Upgrade Guides and Breaking Changes section for more information.

Updating NuGet packages in a StartSharp project has some differences for ASP.NET MVC / ASP.NET Core.

### Serenity Update on ASP.NET MVC

Using package manager console, update following packages:

```
Update-Package Serenity.Web
Update-Package Serenity.Web.Assets
Update-Package Serenity.Scripts
Update-Package Serenity.CodeGenerator
Update-Package Serenity.Web.Tooling
```

Build and make sure that there are no errors / warnings.

### Serenity Update on ASP.NET Core

Using package manager console, update following package:

```
Update-Package Serenity.Web
Update-Package Serenity.Scripts
Update-Package Serenity.Web.Assets
```

Edit *YourProject.Web.csproj* by right clicking on project name in VS, and choosing edit.

Find these lines:

```
<PackageReference Include="Serenity.Web" Version="x.y.z" />
<PackageReference Include="Serenity.Web.AspNetCore" Version="..." />
<DotNetCliToolReference Include="Serenity.CodeGenerator" Version="..." />
```

Take a note of *Serenity.Web* package version (x.y.z), and change versions of
Serenity.Web.AspNetCore and Serenity.CodeGenerator to the same value.

## Step 3 - Update Serenity.Pro NuGet Package(s)

Next step is updating *Serenity.Pro.Scripts* package, which contains scripts for premium StartSharp features.

As this package is premium only, it is not available from public NuGet repository and its update process works differently than other packages.

We distribute a **pro-packages.zip** file in StartSharp GitHub repository Releases tab. Grab the latest one from there:

> It's next to StartSharp.Template.vsix file.

[https://github.com/volkanceylan/StartSharp/releases](https://github.com/volkanceylan/StartSharp/releases)

> You may also extract it from the VSIX file, just download latest *StartSharp.Template.vsix*, rename it to *StartSharp.Template.vsix.zip* using file explorer, double click to open, copy the *pro-packages.zip* from *Assets* folder inside VSIX, and paste it to your solution folder.

Extract contents of *pro-packages.zip* file into the *pro-packages* folder in your solution directory (where YourProject.sln file and *packages* folder exists), e.g:

```
C:\..\YourSolutionDirectory\pro-packages\
```

> If you don't have a *pro-packages* folder inside your solution directory please see upgrade guide for [StartSharp v<IP_ADDRESS>](#startsharp-v3602)

Now you should have a *serenity.pro.scripts* folder inside *pro-packages* and a version folder like *3.7.6* inside that. Please make sure the version matches the one in *pro-packages.zip* file.

```
C:\..\YourSolutionDirectory\pro-packages\serenity.pro.scripts\3.7.6\
```

> The version of the *Serenity.Pro.Scripts* package doesn't always match *Serenity* or *StartSharp* version, as it has a different release cycle.

Using package manager console, update following package:

```
Update-Package Serenity.Pro.Scripts
```

## Step 4 - Restoring Static Content in .NET Core Version

If you are using ASP.NET Core version, open a command prompt in project directory (where YourProject.Web.csproj is) and type these commands:

```cmd
dotnet restore
dotnet sergen restore
```

*dotnet sergen restore* is critical as in .NET Core, NuGet can't install any static content, e.g. scripts, css, image etc into a .NET Core project. We worked around this by writing our own restore command. If you don't run this command, you'll have older versions of Serenity scripts.

## Step 5 - Transferring Samples / Features

So far we've updated NuGet packages. Some features are already contained in NuGet packages so you don't have to do anything other than looking at related sample source code and applying similar code lines to your project.

But if you need a new sample or feature that is contained directly in StartSharp, it might need a bit extra work.

You would need to copy / paste a sample page / module and related files from a new StartSharp project to your existing project.

In some cases, samples require some extra *CSS* too. In that case, transfer changes in *site.premium.less*, *site.theme.less*, *site.advancedsamples.less* etc. files to the same file in your project.

A sample might also require additional scripts as well. Check *Scripts* folder, and *ScriptBundles.json* to see if a sample has extra entries there. Add missing entries to your project and copy relevant files.

Upgrade Guides and Breaking Changes might sometimes contain useful information on what you should do to enable a new feature / sample.

## Step 6 - Rebuild and Check for Errors

Build and make sure that there are no errors / warnings.

## Upgrade Guides and Breaking Changes

We try to keep Serenity / StartSharp backward compatible as much as possible.

In rare cases where we can't avoid breaking changes, we list them here so that you can safely upgrade your existing project.

You should apply changes listed here *for versions greater than* your existing one in order from *lowest to highest*.

For example, if your existing Serenity / StartSharp version is 3.5.0 and updating to 3.9.0, then you should apply upgrade guide for 3.6.0, 3.7.5, 3.8.4 etc. if any in increasing order.

## Serenity 3.6.0

Serenity 3.6.0 comes with React integration but it is currently activated in StartSharp only. Once you update to Serenity 3.6.0, you may get some errors about React, as Serenity.CoreLib scripts has references to it.

```txt
Cannot find type definition file for 'react'.
Cannot find name 'React'.
...
```

> Serenity itself doesn't require React, it is just a TypeScript warning, so, you don't actually need to include React scripts in your site, just need typings.

To resolve such errors, you'll need to include typing for React in your package.json:

```json
  "dependencies": {
    //...
    "@types/react": "^16.1.0",
  }
```

After that save the file and make sure there is a **react** folder at *YourProject.Web\node_modules\@types*. If not, you might have some configuration error with NodeJS integration in Visual Studio.^

If you are still seeing warnings in Visual Studio errors tab about React, you might need to restart Visual Studio.

## Serenity 3.8.0

### Important Security Notice!

During testing we found out that handlers defined in your web.config files also applies to sub folders. This might lead to some problems / security issues, especially for error log. Please put a slash in PATH attribute of these handlers. E.g. if you have these in your web.config:

> This only applies to Asp.Net MVC version, not .NET Core version.

```xml
<handlers>
<add name="ErrorLog" path="errorlog.axd" verb="POST,GET,HEAD"
  type="StackExchange.Exceptional.HandlerFactory, StackExchange.Exceptional" preCondition="integratedMode" />
<add name="DynamicScriptHandler" verb="POST,GET,HEAD" path="DynJS.axd"
  type="Serenity.Web.HttpHandlers.DynamicScriptHandler, Serenity.Web" />
<add name="SkipStaticFileForUploadFolder" verb="GET" path="upload/*"
  type="System.Web.Handlers.TransferRequestHandler"/>
</handlers>
```

Replace them with

```xml
<handlers>
  <add name="ErrorLog" path="/errorlog.axd" verb="POST,GET,HEAD"
    type="StackExchange.Exceptional.HandlerFactory, StackExchange.Exceptional" preCondition="integratedMode" />
  <add name="DynamicScriptHandler" verb="POST,GET,HEAD" path="/DynJS.axd"
    type="Serenity.Web.HttpHandlers.DynamicScriptHandler, Serenity.Web" />
  <add name="SkipStaticFileForUploadFolder" verb="GET" path="/upload/*"
    type="System.Web.Handlers.TransferRequestHandler"/>
</handlers>
```

So that these handlers only apply to web root folder.

## Serenity 3.8.2

After you upgrade from < 3.8.2 version to 3.8.2+, you might lose DynamicScriptHandler entry in your web.config file and start to get script errors.

> We had to this change as NuGet creates duplicate handler entries in web.config after doing modifications to handlers sections as shown in 3.8.0 upgrade information.

> This only applies to Asp.Net MVC version, not .NET Core version.

Make sure you have following DynamicScriptHandler entry in your web.config:

```xml
<handlers>
    //...
    <add name="DynamicScriptHandler" verb="POST,GET,HEAD" path="DynJS.axd"
       type="Serenity.Web.HttpHandlers.DynamicScriptHandler, Serenity.Web" />
    //...
</handlers>
```

## Serenity 3.8.5

This is not actually an issue about Serenity itself, but you might have this problem if you choose to update Microsoft.TypeScript.MsBuild in your Serene/StartSharp project.

TypeScript no longer has a tsc.exe file and it uses NodeJS instead of Chakra (Edge) so you need to update your .CSPROJ file, find CompileTSC section in your project file and replace it like below:

```xml
<Exec Command=""$(NodePath)\node" "$(TSJavaScriptFile.Replace('build\\..\tools\', 'tools\'))" -p ./tsconfig.json" ContinueOnError="true" />
```

## Serenity 3.9.0

Serenity.Web NuGet package no longer contains / has reference to Serenity script, css and image files, so you need to install Serenity.Scripts package after updating to 3.9.0. Serenity.Web.Assets package now contains some static files so also need to update/install this package.

If using ASP.NET MVC, run following in the package manager console:

```ps
Install-Package Serenity.Scripts
Update-Package Serenity.Web.Assets
```

If using ASP.NET Core, add following two lines in your CSPROJ next to line containing reference to **Serenity.Web**:

```xml
<PackageReference Include="Serenity.Web" Version="3.8.6"
    Condition="!Exists('..\..\Serenity\Serenity.Core\Serenity.Core.csproj')" />
<PackageReference Include="Serenity.Web.Assets" Version="3.9.0" />
<PackageReference Include="Serenity.Scripts" Version="3.9.0" />
```

Make sure you write latest versions of Serenity.Web.Assets and Serenity.Scripts in Version attribute.

## StartSharp v<IP_ADDRESS>

Starting with StartSharp <IP_ADDRESS>, we have a new *Serenity.Pro.Scripts* NuGet package which contains some features which is only available for StartSharp customers.

As this package is premium only, it is not available from public NuGet repository and its update process works differently than other packages.

We distribute a **pro-packages.zip** file in StartSharp GitHub repository Releases tab. Grab the latest one from there:

> It's next to StartSharp.Template.vsix file.

[https://github.com/volkanceylan/StartSharp/releases](https://github.com/volkanceylan/StartSharp/releases)

> You may also extract it from the VSIX file, just download latest *StartSharp.Template.vsix*, rename it to *StartSharp.Template.vsix.zip* using file explorer, double click to open, copy the *pro-packages.zip* from *Assets* folder inside VSIX, and paste it to your solution folder.

Create a *pro-packages* folder inside your solution directory (where YourProject.sln file and *packages* folder exists).

Extract contents of *pro-packages.zip* file into the *pro-packages* folder, e.g:

```
C:\..\YourSolutionDirectory\pro-packages\
```

Now you should have a *serenity.pro.scripts* folder inside *pro-packages* and a version folder like *3.7.6* inside that:

```
C:\..\YourSolutionDirectory\pro-packages\serenity.pro.scripts\3.7.6\
```

Next, create a *NuGet.config* file in your solution directory with contents below:

```xml
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <packageSources>
        <add key="SerenityPro" value="pro-packages" />
    </packageSources>
</configuration>
```

Restart Visual Studio if it is running, so that it can see this new *NuGet.config* file and use *pro-packages* folder as a package source.

Using package manager console, install *Serenity.Pro.Scripts* package:

```
Install-Package Serenity.Pro.Scripts
```

Edit your *ScriptBundles.json* file (under *wwwroot/Scripts/site* or *Scripts/site* based on ASP.NET Core/MVC)

Find the line with *Serenity.CoreLib.js* and replace it with below lines:

```
    "~/Scripts/react.{REACT}.js",
    "~/Scripts/react-dom.{REACT}.js",
    "~/Scripts/serenity/Serenity.CoreLib.js",
    "~/Scripts/serenity/Serenity.Pro.UI.js",
    "~/Scripts/serenity/Serenity.Pro.App.js"
```

Edit your *web.config* file and insert *Replacements* part to ScriptBundling setting that is shown below:

```xml
<add key="ScriptBundling" value="{
    Enabled: false,
    Minimize: true,
    UseMinJS: true,
    NoMinimize: ['~/Scripts/ckeditor/ckeditor.js'],
    Replacements: { REACT: 'development' }
}" />
```

> Insert "`, Replacements: { REACT: 'development' }`" before last "`}`"

This makes sure that react.development.js is used during development. You may change it to `production` in your live environment.

As some script features and widgets like CardViewMixin, FavoriteViewsMixin etc. are moved into Serenity.Pro.Scripts for easier update, you'll need to remove them from your project.

Delete the following files from your project:

```
Modules/Common/GridMixins/CardViewMixin.ts
Modules/Common/GridMixins/FavoriteViewsMixin.ts
Modules/Common/Premium/SingleLineTextFormatter.ts
Modules/Common/Premium/WizardDialog.ts
```

Remove this line from `Modules/AdvancedSamples/Forms/OrderWizard/OrderWizard.ts`:

```xml
/// <reference path="../../../Common/Premium/WizardDialog.ts" />
```

Also, as your project doesn't have *EmailClient* sample, you'll need to exclude its typings file. Edit tsconfig.json and add a *exclude* setting under *include*:

```json
  "include": [
    "./Imports/",
    "./Modules/",
    "./Scripts/typings/"
  ],
  "exclude": [
    "./Scripts/serenity/Serenity.Pro.EmailClient.d.ts"
  ]
```

If you are using .NET Core version, you should write `"./wwwroot/Scripts/serenity/Serenity.Pro.EmailClient.d.ts"` instead.

> If you need *EmailClient* functionality, create a new StartSharp project and merge changes to your existing project.

You might also need to change *Build Action* of *Serenity.Pro.EmailClient.d.ts* file to *None* using *Visual Studio Properties* window as TypeScript language service in Visual Studio sometimes fails to use *tsconfig.json* properly.

Changing build action of *tsconfig.json* to *Content* is also recommended.

As we have switched from VueJS to React for card view templates, you'll need to modify *Modules/Northwind/Customer/CustomerGrid.ts* file and replace lines starting with *new Serenity.CardViewMixin* with:

```ts
            var editItem = this.editItem.bind(this);

            new Serenity.CardViewMixin({
                grid: this,
                renderItem: (item, index) => React.createElement(CustomerCard, {
                    item: item,
                    editItem: editItem
                })
            });
```

Edit *tsconfig.json* file again and add setting for *JSX* under *compilerOptions*:

```json
    //...
    "target": "es5",
    "jsx": "react",
    "typeRoots": [
    //...
```

Edit *YourProject.Web.csproj* file and add this line before **TypeScriptCompileBlocked**:

```
<TypeScriptJSXEmit>React</TypeScriptJSXEmit>
<TypeScriptCompileBlocked>True</TypeScriptCompileBlocked>
```

Also create a file named *CustomerCard.tsx* next to *CustomerGrid.ts*:

```tsx
// replace *StartSharp* with your project name
namespace StartSharp.Northwind {

    var randomImages = [
        "avatar.png",
        "avatar04.png",
        "avatar2.png",
        "avatar3.png",
        "avatar5.png"
    ];

    function getRandomImage(item: CustomerRow) {
        return Q.resolveUrl("~/Content/adminlte/img/" +
            randomImages[Math.floor(Math.random() * randomImages.length)]);
    }

    export interface CustomerCardProps {
        item: CustomerRow;
        editItem: (item: CustomerRow) => void;
    }

    export class CustomerCard extends React.Component<CustomerCardProps> {
        render(): React.ReactNode {
            var item = this.props.item;
            return (
                <table>
                    <tbody>
                        <tr>
                            <td rowSpan={4} className="img">
                                <img src={getRandomImage(item)} />
                            </td>
                        </tr>
                        <tr>
                            <td className="name">
                                <a href="javascript:;" onClick={e => this.props.editItem(item)}>
                                    {item.CustomerID} - {item.CompanyName}
                                </a>
                            </td>
                        </tr>
                        <tr>
                            <td className="contact">{item.ContactName}, {item.ContactTitle}</td>
                        </tr>
                        <tr>
                            <td className="country">{item.City}, {item.Country}</td>
                        </tr>
                    </tbody>
                </table>
            );
        }
    }
}
```

Restart Visual Studio, rebuild and run your project to ensure that there are no script errors.

### StartSharp v<IP_ADDRESS>

In this version an idle timeout sample is added. To enable it for your site, add these lines to your ScriptInitialization.ts:

```ts
    $(() => {
        // let demo page use its own settings for idle timeout
        if (window.location.pathname.indexOf('Samples/IdleTimeout') > 0)
            return;

        var meta = $('meta[name=username]');
        if ((meta.length && meta.attr('content')) ||
            (!meta.length && Q.Authorization.isLoggedIn)) {

            new Serenity.IdleTimeout({
                activityTimeout: 15 * 60,
                warningDuration: 2 * 60
            });
        }
    });
```

> Make sure you update Serenity and Serenity.Pro.Scripts packages first, and don't forget to run `dotnet sergen restore` if using .NET Core.

### StartSharp v<IP_ADDRESS>

This version comes with some modern flat design improvements for grids, forms and toolbars. To apply these changes into your project, after updating Serenity and Serenity.Pro.Scripts packages (and don't forget to run `dotnet sergen restore` if using .NET Core), edit your ScriptInitialization.ts add add this line inside namespace braces:

```ts
Serenity.setupUIOverrides();
```

Also please take changes from site.premium.less, minimum between these two lines:

```css
// --- Start of UI Overrides ---

... copy paste everything between

// --- End of UI Overrides ---
```

You may get these lines by creating a new StartSharp project, or using the following link:

https://github.com/volkanceylan/StartSharp/blob/master/StartSharp/StartSharp.Web/Content/site/site.premium.less

There are some minor changes in skins.azure.less file so it is a good idea to update that too:

https://github.com/volkanceylan/StartSharp/blob/master/StartSharp/StartSharp.Web/Content/skins/azure.less

### StartSharp v<IP_ADDRESS>

An issue related to ASP.NET Antiforgery protection in ASP.NET Core and StackExchange.Exceptional is found that causes errors when you try to delete / protect errors. To ignore anti forgery for Exceptional, edit UserPage.cs and add following [IgnoreAntiforgeryToken] attribute:

```
[Route("Administration/ExceptionLog/{*pathInfo}"), IgnoreAntiforgeryToken]
public async Task ExceptionLog()
{
    await ExceptionalMiddleware.HandleRequestAsync(HttpContext).ConfigureAwait(false);
}
```

repository: BionStt/serenity-guide

repo_name: BionStt/serenity-guide


text:
# KiQted

> A fast, interactive football fixture viewer

## Table of Contents

- [Requirement](#requirement)
- [Dependency](#dependency)
- [Features](#features)
- [Planned Updates](#updates)
- [License](#license)

---

## Requirement

- Qt 5.14.0
- MSVC 19.24.28316

---

## Dependency

- libcurl 7.51.0-DEV
- OpenSSL 1.1.0c
- libssh2 1.8.0
- zlib 1.2.8

---

## Features

KiQted is a fast, online football fixture calender. It uses libcurl in the backend to retrieve the fixture information from football-data.org in JSON format. For the rest of the GUI and data manipulation operations, it uses Qt. The main interface of the application is heavily influenced by Qt's pre-existing [Calender example](https://doc.qt.io/qt-5/qtwidgets-richtext-calendar-example.html). Currently it supports only the English Premier League.

I've used this python notebook for preparing the spritesheet. Prior to using the notebook, I resized each of the team logos to make the longer side to be 200 pixels wide while preserving the aspect ratio.

---

## Planned Updates

- Reduce the overall latency by dividing the operations over multiple threads.
- Support multiple leagues.
- Make the interface more user-friendly and less of an eyesore. ;)

---

## License

MIT


text:
# striptxt
A simple python script to extract strings with length equal or greater to a certain value. The purpose of the script is to shorten wordlists that have values shorter than the password length. Some dictionary attack software doesn't have the option, so this script will shorten the wordlist in seconds.

It's a small script for personal use that can work with big files, tested on wordlist rockyou.txt

Designed for linux, in python3.
Any help or suggestions are appreciated.

# Available commands
`-i <input file>`

`-o <output file>`

`-l <string length>`

`-v display additional info`

`-h show help`

# Usage example
`striptxt.py -i dictionary.txt -l 10`

repository: pombredanne/striptxt

repo_name: pombredanne/striptxt


text:
Source files for the Ithaca Free Science Workshop's vending machine project.

Hardware configuration consists of the following:

* first Arduino - "Coin Handler" - running VendingMachineMain
* second Arduino- "Motor Controller" - running MotorControllerMain
* electronic Coin Acceptor ( DG600F ) communicating in serial mode at 4800 baud
* 8 buttons for product selection ( pass thru 5v to to Coin Handler )
* "TIP 120 array" custom perfboard for motor control of product dispensers, connected "Motor Controller"
* 8 vending machine motors with swirly spirals attached connected to "TIP 120 Array"

BASIC LOGIC
-----------

* "Coin Handler" receives button presses from end user who desires a product.
* If user adds coins before selecting a product TODO_FEEDBACK_CHOOSE_PRODUCT_FIRST
* If there is no more of the product TODO_FEEDBACK_NO_MORE_GOODY
* If there are not enough credits recorded for a product TODO_FEEDBACK_ADD_MORE_COINS
* If there are enough credits DISPENSE_PRODUCT and REJECT_MORE_COINS

* TODO establish timeouts for when to resume waiting for new request
* TODO establish way for unused coins to be returned

PSEUDOCODE
----------------

```
If a product is chosen by one of the 8 buttons,
  and there are still some of that product left,
    and enough coins have been added to purchase it,

      "Coin Handler" sends a serial message at 4800 baud to "Motor Controller"
      the message will specify which product shall be dispensed

      "Motor Controller", when it receives a command to dispense a product, will set a pin HIGH
      corresponding to the motor it needs to activate for a set amount of timeouts
```

TODO - programming the boards should be easy!  ensure that the boards are clearly labeled
and that convenient USB cords are made available.

TODO - consider and attempt to account for edgecases for product dispense fail, etc.


text:
# Tabular MaxEnt IRL

This folder contains a self-enclosed version of tabular maximum entropy (MaxEnt) IRL.

To run on a randomly generated MDP:
```
python maxent_irl.py
```


text:
# kubetools

Kubernetes helpers for troubleshooting and administration.

## Commands

Display allocated resources around all kubernetes minions...
```
$ kubetools top nodes
Allocated resources around all 80 minions:
  CPU Requests: 209351m (50%)
  CPU Limits: 193151m (49%)
  Memory Requests: 273217396Ki (19%)
  Memory Limits: 281708404Ki (20%)
```

repository: ederavilaprado/kubetools

repo_name: ederavilaprado/kubetools


text:
[![Homepage Image](http://i.imgur.com/mojqDRG.png)](http://imgur.com/a/5GFME)

caketop-theater
=============

This is a simple rails app I built to allow my media server to make my movie library available over LAN. Essentially, it's like a personal netflix, it shares your movie, tv, and music library in an easy to use web interface with an HTML5 player.

[Here is what it looks like.](http://imgur.com/a/5GFME)

[![Circle CI](https://circleci.com/gh/XanderStrike/caketop-theater/tree/master.svg?style=svg)](https://circleci.com/gh/XanderStrike/caketop-theater/tree/master) [![Test Coverage](https://codeclimate.com/github/XanderStrike/caketop-theater/badges/coverage.svg)](https://codeclimate.com/github/XanderStrike/caketop-theater) [![Code Climate](https://codeclimate.com/github/XanderStrike/caketop-theater/badges/gpa.svg)](https://codeclimate.com/github/XanderStrike/caketop-theater)

installation
-----

This is the simple installation, suitable for home servers with a dozen or less users at any given time. For high traffic servers and many simultaneous clients (20+) see the [advanced setup](https://github.com/XanderStrike/caketop-theater/blob/master/doc/advanced-installation.md).

Easy setup on Ubuntu 14.04 and above machines (server, desktop, kodibuntu, and other variants):

    wget 'https://raw.githubusercontent.com/XanderStrike/caketop-theater/master/lib/setup.sh'
    chmod +x setup.sh
    bash setup.sh

usage
-----

Start and stop the app by running `./start.sh` and `./stop.sh`. Visit the web interface on `http://<server-ip>:3131`

Once you're installed and running populate your DB by calling the rake scan tasks in the directory of the app:

    rake scan:movies
    rake scan:tv
    rake scan:music

Or more simply:

    rake scan:all

The first time it will take a while, but once they're done you will be able to see your library when you visit the application.

automated scanning
------------------

This app uses the 'whenever' gem to handle your crontab, you can edit `config/schedule.rb` to determine how often you want to run scans, and simply run `whenever` in the app directory to get the lines you need to copy and paste into your cron. This step is highly recommended, especially if you're using something like CouchPotato's renamer to manage your movie folder.

automated conversion
--------------------

Rake tasks are available to perform background conversion of your media to make it compatible with the HTML5 player (Advanced Video Codec and Advanced Audio Codec). The tasks available are:

    rake convert:movies
    rake convert:tv
    rake convert:all

Automated conversion is not for everyone. It is a perminant change to your media, the old file is replaced with the converted one. Also, conversion from one format to another causes reduction in quality, sometimes noticeable. It is always best to find media already in AVC/AAC format.

contributing
------------

Please do! I'd love to see your pull requests. Check the issues if you'd like some ideas. If you've got a feature idea, feel free to submit an issue.

license and attribution
-----------------------

MIT License

This product uses the TMDb API but is not endorsed or certified by [TMDb](http://www.themoviedb.org).

Icons: [Television](http://thenounproject.com/term/television/416/prev), [Film](http://thenounproject.com/term/reel-to-reel/1895/), [Music](http://thenounproject.com/term/radio/2013/)

repository: XanderStrike/caketop-theater

gha_language: Ruby

repo_name: XanderStrike/caketop-theater


text:
# Git Clone
https://devconnected.com/how-to-clone-a-git-repository/

### clone all the repository with all the versions and branches
`git clone <remote_repo>`

### Git clone a specific branch
notice that you are fetching all the branches but you are checking out the branch you chose

`git clone -b <branch_or_tag_name> <remote_repo>`

### Git clone exclusively one branch
`git clone --single-branch --branch <branch_or_tag_name> <remote_repo>`

repository: ipetel/code-snippets

repo_name: ipetel/code-snippets


text:
# EBAZ4205

This development board was the control card of Ebit E9+ BTC miner. In mainland China, it cost about 5 dollars (<35 CNY) on the secondhand market.

## Resources

- [Telegram group](https://t.me/ebaz4205) general chat, quick Q&A
- [Wiki](https://github.com/xjtuecho/EBAZ4205/wiki) FAQ, tutorials
- [Github discussions](https://github.com/xjtuecho/EBAZ4205/discussions) troubleshooting help, projects, development

## Hardware summary

Hardware:
- [PDF Schematic](/HW/ebaz4205/EBAZ4205-SCH.pdf)
- [Altium Designer design files](/HW/ebaz4205/altium/)
- [KiCad design files](/HW/ebaz4205/kicad/)
- [CPU info](proc/cpuinfo)

On-board linux
- [Kernel cmdline](proc/cmdline)
- [NAND Memory Map](proc/mtd)
- [Linux Version](proc/version)

The TF card socket is absent by default, you can buy and solder it by yourself if necessary. So do the UART port `J7`and the JTAG port `J8`.
![Top layer of the board](image/01-PCB-TL.jpg)

On the bottom layer of the board, diode `D24` is absent by default, which you need if you want to power the board via `J3 J4 J5`. Solder a SMC schottky diode there.
![Bottom layer of the board](image/02-PCB-BL.jpg)

XC7Z010CLG400, Dual Core Cortex A9 @ 666.66MHz and Artix-7 FPGA with 28k LEs.
![ZYNQ](image/03-ZYNQ.jpg)

256MB DDR3 Dynamic Memory.
![DDR3](image/04-DDR3.jpg)

128MB SLC NAND FLASH.
![NAND](image/05-NAND.jpg)

10/100Mbps Ethernet transceiver: IP101GA
![PHY](image/06-PHY.jpg)

BOOT Select Resistor: `R2577 and R2584`. The resistor is on `R2584` by default, which indicates boot from NAND. If you want to boot from TF card, **move** `R2584` to `R2577`.
![BOOT](image/07-BOOT.jpg)

## Powering the board

If the Schottky Diode `D24` was not mounted, you can only power the board by `DATA1` `DATA2` and `DATA3` port. Voltage 5V~12V is OK, 400mA and above is necessary. The pin distance of these three ports is 2.0mm, which is not common as 2.54mm.

After `D24` was mounted, we can power the board by J3 J4 J5. For convenience, J3 or J5 is recommended, which was originally for FAN power.

## Reset the root password of built-in linux

Use HyperTerminal or Putty to connect the TTL port, TXD RXD and GND is enough, VCC is not necessary. Power the Board, Hit `d` to enter the u-boot shell.

```
setenv nandboot "echo Copying Linux from NAND flash to RAM... && nand info && run nandroot;nand read 0x100000 0x2220000 0x300000 && fpga loadb 0 0x100000 0x300000 && nand read ${kernel_load_address} 0x300000 ${kernel_size} && nand read ${devicetree_load_address} 0x800000 ${devicetree_size}"
run nandboot
setenv bootargs 'console=ttyPS0,115200 root=/dev/mtdblock6 rootfstype=jffs2 noinitrd rw rootwait reboot=cold,hard emergency init=/bin/sh'
bootm ${kernel_load_address} - ${devicetree_load_address} init=/bin/sh
passwd
```

Use the commands above to reset the root password.

## Shut down the BTC miner program

After logging on with root, execute commands below to disable the BTC miner program.

```
mv /etc/rcS.d/S95cgminer.sh /etc/rcS.d/K95cgminer.sh
reboot
```

## Set static IP address

Edit configuration file: `/etc/network/interfaces`, add contents below.

```
auto eth0
iface eth0 inet static
address <IP_ADDRESS>
netmask <IP_ADDRESS>
gateway <IP_ADDRESS>
dns-nameservers <IP_ADDRESS>
```

Enable ethernet: `ifup eth0`.
Check ethernet status: `ethtool eth0`
Now you can use `ssh<EMAIL_ADDRESS>to connect the built-in linux.
Of course, you can use other IP address according to your network configuration.


text:
This example shows how you can use triple protocol with pure Java interface and pojos.

As described in [the Triple protocol documentation](https://dubbo.apache.org/zh-cn/overview/reference/protocols/triple/), Dubbo triple protocol is a better gRPC implementation which can be accessed by cURL and web browsers directly.

The Java implementation gives you the option of using Triple and HTTP/2 RPC without the need of caring about Protocol Buffers, no IDL, just standard java interface and pojos.

## Run The Demo
Detailed explanation of this demo can be found [here](https://dubbo.apache.org/zh-cn/overview/quickstart/rpc/java/).

Make sure you are in `dubbo-samples-triple-no-idl` before running the following commands

```shell
mvn clean compile #Compile and generate code
```

### Start server
```shell
$ mvn compile exec:java -Dexec.mainClass="org.apache.dubbo.samples.tri.noidl.TriPojoServer"
```

### Start Client

There are two ways to test the server works as expected:
* For unary rpc, you can use any standard HTTP tools like cURL.
* Dubbo sdk client.

#### cURL
```shell
curl \
    --header "Content-Type: application/json" \
    --data '["Dubbo"]' \
    http://localhost:50052/org.apache.dubbo.samples.tri.noidl.api.PojoGreeter/greet/
```

#### Start client
```shell
$ mvn compile exec:java -Dexec.mainClass="org.apache.dubbo.samples.tri.noidl.TriPojoClient"
```

repository: apache/dubbo-samples

gha_language: Java

repo_name: apache/dubbo-samples


text:
# express-mvc-ts
.NET MVC-like controller structure for Express.js in Typescript

### Word of advice
Since this project is fairly new and it changes alot even between minor versions, it's recommended that you set a specific version as dependency in your project.json.

## Purpose
Brings the familiarity of .NET MVC Controllers to Express.js - with the help of Typescript - with some limitations.

## Why?
Because for people accustomed to MVC frameworks, this:
```javascript
app.get('/', function (req, res) {
    res.render('home/index');
});

app.get('/about', function (req, res) {
    res.render('home/about');
});

app.get('/contact(/:reason)?', function (req, res) {
    res.render('home/index', { reason: req.params.reason });
});

app.post('/contact', function (req, res) {
    myDataStore.saveContactRequest(req.body)
        .then(() => res.render('contact', { success: true }))
        .catch(() => res.render('contact', { success: false }));
});

```

 doesn't look as nice as this:
 ```javascript
@Route('')
export class HomeController extends Controller {

    private dataStore: MyCoolDataStore = new MyCoolDataStore();

    @HttpGet
    public index() {
        return this.view();
    }

    @HttpGet
    public about() {
        return this.view('about');
    }

    @HttpGet('contact(/:reason)?')
    public contact() {
        return this.view('contact', { reason: this.request.params.reason });
    }

    @HttpPost
    public contactPost() {
        return this.dataStore.saveContactRequest(this.request.body)
            .then(() => this.view('contact', { success: true }))
            .catch(() => this.view('contact', { success: false }));
    }

}
 ```

## How?
This can be done thanks to the magic of Typescript decorators and reflection metadata.
So this is quite unusable in simple javascript scenarios, hence the name suffix: -ts;

## Usage
 - Add this package to your dependencies.
 - Grab the typescript definition file from the github page and put it in your projects definition folder( or however you manage your definitions). Not definitelytype/tsd support yet.
 - Create your controller classes in a `controllers` folder (configurable). They should look like this:

```javascript
import {Controller, HttpGet, HttpPost} from 'express-mvc-ts';

export class MyCoolController extends Controller {

    @HttpGet
    public index() {
        return this.view();
    }

    @HttpGet
    public posted() {
        return this.view();
    }
}
```
The above example will bind the routes `get('/mycool',...)` and `post('/mycool/posted',...)`.
For more route annotations check out the definition file.
 - In your app.ts call:
```javascript
import * as mvc from 'express-mvc-ts';
//initialize app
mvc.setup(app);
app.listn();
```

## Caveats / Todos
 - The default value for the `view` response is always `index`, this should be the name of the method, like in .NET MVC.
 - In case async work is done inside a method, the `this.request` and `this.response` values need to be cached before doing any async calls, as simultaneous request will overwrite the values.
 - There is currently no point specifying method parameters as they will not be populated. The plan is to ultimately have request parameters bound to method parameters like `?name=John` => `public profile(name: string) { this.request.query.name === name; }`
 - Probably a bunch of other things...

repository: cybermonks/node-tea

repo_name: cybermonks/node-tea


text:
# Docker Images for Laravel builds
This repository contains a docker image for laravel builds. Php, fpm, mysql, redis installed.

## Installation

1. Install [docker](https://docs.docker.com/engine/installation/) and [docker-compose](https://docs.docker.com/compose/install/) ;

2. Copy `docker-compose.yml` file to your project root path, and edit it according to your needs ;

3. From your project directory, start up your application by running:

```sh
docker-compose up
```
4. If you want, you can run composer or artisan through docker. For instance:

```sh
docker-compose exec php composer install
docker-compose exec php php artisan migrate
docker-compose exec php $yourCommandHere
```

## Docker Images

These docker images are configured in `docker-compose.yml` file.
You can comment or uncomment some services according to your project.

* [`kashifz/php-fpm-laravel-mysql-redis:7.4`](https://hub.docker.com/r/toblerone/laravel-php/) (this docker image extends `php:7.4-fpm-alpine` to add some PHP extensions) ;
* `mysql:5.7` ;
* `redis:4.0-alpine` ;

## Contributing

Contributions are welcome!
Leave an issue on Github, or create a Pull Request.

## Licence

This work is under [MIT](LICENCE) licence.


text:
Thirteen years ago,
we set ourselves a goal to end poverty.
After some success,
we've hit a big hurdle.
The aftermath of the financial crisis
has begun to hit aid payments,
which have fallen for two consecutive years.
My question is whether the lessons learned
from saving the financial system
can be used to help us overcome that hurdle
and help millions.
Can we simply print money for aid?
"Surely not."
It's a common reaction.

(Laughter)

It's a quick talk.
Others channel John McEnroe.
"You cannot be serious!"
Now, I can't do the accent, but I am serious,
thanks to these two children,
who, as you'll learn, are very much at the heart
of my talk.
On the left, we have Pia.
She lives in England.
She has two loving parents,
one of whom is standing right here.
Dorothy, on the right,
lives in rural Kenya.
She's one of 13,000 orphans
and vulnerable children
who are assisted by a charity that I support.
I do that because I believe
that Dorothy, like Pia,
deserves the best life chances
that we can afford to give her.
You'll all agree with me, I'm sure.
The U.N. agrees too.
Their overriding aim
for international aid
is to strive for a life of dignity for all.
But -- and here's that hurdle --
can we afford our aid aspirations?
History suggests not.
In 1970, governments set themselves a target
to increase overseas aid payments
to 0.7 percent
of their national income.
As you can see, a big gap opens up
between actual aid and that target.
But then come the Millennium Development Goals,
eight ambitious targets
to be met by 2015.
If I tell you that just one of those targets
is to eradicate extreme hunger and poverty,
you get a sense of the ambition.
There's also been some success.
The number of people living
on less than $1.25 a day has halved.
But a lot remains to be done in two years.
One in eight remain hungry.
In the context of this auditorium,
the front two rows aren't going to get any food.
We can't settle for that,
which is why the concern about the eighth goal,
which relates to funding,
which I said at the beginning is falling,
is so troubling.
So what can be done?
Well, I work in financial markets,
not development.
I study the behavior of investors,
how they react to policy and the economy.
It gives me a different angle on the aid issue.
But it took an innocent question
from my then-four-year-old daughter
to make me appreciate that.
Pia and I were on the way to a local cafe
and we passed a man collecting for charity.
I didn't have any change to give him,
and she was disappointed.
Once in the cafe, Pia takes out her coloring book
and starts scribbling.
After a little while, I ask her what she's doing,
and she shows me a drawing
of a £5 note
to give to the man outside.
It's so sweet,
and more generous than Dad would have been.
But of course I explained to her,
"You can't do that; it's not allowed."

To which I get the classic four-year-old response:
"Why not?"
Now I'm excited, because I actually think
I can answer this time.
So I launch into an explanation of how
an unlimited supply of money
chasing a limited number of goods
sends prices to the moon.
Something about that exchange stuck with me,
not because of the look of relief
on Pia's face when I finally finished,
but because it related
to the sanctity of the money supply,
a sanctity that had been challenged and questioned
by the reaction of central banks
to the financial crisis.
To reassure investors,
central banks began buying assets
to try and encourage investors to do the same.
They funded these purchases
with money they created themselves.
The money wasn't actually physically printed.
It's still sort of locked away
in the banking system today.
But the amount created was unprecedented.
Together, the central banks of the U.S.,
U.K and Japan
increased the stock of money in their economies
by 3.7 trillion dollars.
That's three times, in fact
that's more than three times,
the total physical stock of dollar notes in circulation.
Three times!
Before the crisis,
this would have been utterly unthinkable,
yet it was accepted remarkably quickly.
The price of gold,
an asset thought to protect against inflation,
did jump,
but investors bought other assets
that offered little protection from inflation.
They bought fixed income securities, bonds.
They bought equities too.
For all the scare stories,
the actual actions of investors
spoke of rapid acceptance and confidence.
That confidence was based on two pillars.
The first was that, after years
of keeping inflation under control,
central banks were trusted
to take the money-printing away
if inflation became a threat.
Secondly, inflation simply never became a threat.
As you can see, in the United States,
inflation for most of this period
remained below average.
It was the same elsewhere.
So how does all this relate to aid?
Well, this is where Dorothy
and the Mango Tree charity
that supports her comes in.
I was at one of their fundraising events
earlier this year,
and I was inspired to give a one-off donation
when I remembered that my firm
offers to match the charitable contributions
its employees make.

So think of this:
Instead of just being able to help Dorothy
and four of her classmates
to go through secondary school for a few years,
I was able to double my contribution.
Brilliant.
So following that conversation with my daughter,
and seeing the absence of inflation
in the face of money-printing,
and knowing that international aid payments
were falling at just the wrong time,

this made me wonder:
Could we match
but just on a much grander scale?
Let's call this scheme "Print Aid."
And here's how it might work.
Provided it saw little inflation risk from doing so,
the central bank would be mandated
to match the government's overseas aid payments
up to a certain limit.
Governments have been aiming to get aid
to 0.7 percent for years,
so let's set the limit at half of that,
0.35 percent of their income.

So it would work like this: If in a given year
the government gave 0.2 percent of its income
to overseas aid,
the central bank would simply top it up
with a further 0.2 percent.
So far so good.
How risky is this?
Well, this involves the creation of money
to buy goods, not assets.
It sounds more inflationary already, doesn't it.
But there are two important mitigating factors here.
The first is that by definition,
this money printed would be spent overseas.
So it's not obvious how it leads to inflation
in the country doing the actual printing
unless it leads to a currency
depreciation of that country.

That is unlikely for the second reason:
the scale of the money that would be printed
under this scheme.
So let's think of an example
where Print Aid was in place
in the U.S., U.K. and Japan.
To match the aid payments made
by those governments over the last four years,
Print Aid would have generated
200 billion dollars' worth of extra aid.
What would that look like
in the context of the increase in the money stock
that had already happened in those countries
to save the financial system?
Are you read for this?
You might struggle to see that at the back,
because the gap is quite small.
So what we're saying here
is that we took a $3.7 trillion gamble
to save our financial systems,
and you know what, it paid off.
There was no inflation.
Are we really saying that it's not worth the risk
to print an extra 200 billion for aid?
Would the risks really be that different?
To me, it's not that clear.
What is clear is the impact on aid.
Even though this is the printing
of just three central banks,
the global aid that's given
over this period is up by almost 40 percent.
Aid as a proportion of national income
all of a sudden is at a 40-year high.
Now, we don't get to 0.7 percent.
Governments are still incentivized to give.
But you know what, that's the
point of a matching scheme.
So I think what we've learned
is that the risks from this money creation scheme
are quite modest,
but the benefits
are potentially huge.
Imagine what we could do
with 40 percent more funding.
We might be able to feed the front row.
The thing that I fear, the only thing that I fear,
apart from the fact that I've run out of time,
is that the window of opportunity for this idea
is a short one.
Today, money creation by central banks
is an accepted policy tool.
That may not always be the case.
Today there are universally agreed aims
for international aid.
That may not always be the case.
Today might be the only time
that these two things coincide,
such that we can afford the aid
that we've always aspired to give.
So, can we print money for international aid?
I seriously believe the question should be,
why not?
Thank you very much.

(Applause)

repository: prewittdavon/TEDVis

gha_language: Python

repo_name: prewittdavon/TEDVis