text:
# DEPRECATED DO NOT USE - Z-Widget - Tailor Booking

Javascript widget for booking a ztailor.

- [Setup](#setup)
- [Running Tests](#running-tests)
- [Training Materials](#training-materials)
- [Contributing](#contributing)

## Setup

1. Install Homebrew if you haven't already:

        ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2. Install Node.js:

        brew install node

3. Clone the repository:

        git clone https://github.com/ztailor/z-widget-tailor-booking.git

4. Install the project dependencies:

        npm install

5. Setup local environment variables:

        cp .env.example .env

6. (optional) Add the following to your `/etc/hosts` file:

        <IP_ADDRESS> local.z-widget-tb.com

7. Start up the local dev server:

        npm run start-local

8. Visit [http://local.z-widget-tb.com:9001](http://local.z-widget-tb.com:9001) or [http://localhost:9001](locahost:9001)

## Running Tests

Make sure you have completed steps 1-5 from the above __Setup__ section before attempting to run the tests.

##### ESLint

[ESLint](http://eslint.org/) breaks on warnings during `npm run build`, but only errors will fail the build during `npm run start-local`. You can run it manually here:

1. Install `eslint` globally:

        npm install -g eslint

2. Run eslint command:

        npm run lint

##### Unit tests

Unit tests can be ran with the command `npm test`.

##### Acceptance tests

1. Install `webdriver-manager` globally:

        npm install -g webdriver-manager

2. Update `webdriver-mananger`:

        webdriver-manager update

3. Ensure that you have a Java SDK installed

    * http://stackoverflow.com/questions/24342886/how-to-install-java-8-on-mac
    * http://www.oracle.com/technetwork/java/javase/downloads/index.html

4. Start the selenium server with:

        webdriver-manager start

5. Run the app locally:

        npm run start-local

6. Run the acceptance tests:

        node_modules/.bin/nightwatch

After initial setup steps 1-3 can be omitted from this process.

## Contributing

 If you are ready to submit a pull request, before doing so, please run

```
npm run build
```

If this is successful, look inside `public/assets` for all the assets, namely `zwidget.min.js`, `style.css`, and associated fonts.

## Training Materials

### ES2015
[Babel](https://babeljs.io/docs/learn-es2015/)
[React + ES6](https://babeljs.io/blog/2015/06/07/react-on-es6-plus)

### React

[Docs](http://facebook.github.io/react/docs/getting-started.html)
[Egghead React Series](https://egghead.io/technologies/react)

repository: darrenjennings/ztailors-widget

repo_name: darrenjennings/ztailors-widget


text:
Development discontinued
============

In newer gradle versions this plugin no longer works and we are not planning
to fix it. The biggest problem - eager initialization of properties - is
solved in gradle itself. While it still provides a popup that's useful
when you don't want to store your password in any form we don't feel like
it's really worth the effort and the hacks it needed!

https://docs.gradle.org/current/samples/sample_publishing_credentials.html

Old docs follow:

Lazy credentials gradle plugin
==============================

This is plugin adds `lazyCredentials` extension that can be used
to replace `credentials` in maven repo definition. Those
credentials won't be evaluated until it's necessary. It can
also prompt user for credentials.

When to use this plugin
-----------------------

It's useful when project uses gradle's `maven-publish` plugin -
you can use properties to pass repo username and password and
tasks not requiring them won't fail - you only need to
provide them when necessary. This also simplifies config
for team members who don't have to (or are not allowed to)
publish to maven repo - they can completely ignore configuring
credentials.

Furthermore, since plugin can prompt you for password (or username
and password) you don't have to store password in properties file
or put it as parameter.

How to use this plugin
----------------------

You can find instruction on how to add this plugin on
[gradle plugin portal.](https://plugins.gradle.org/plugin/pl.unity.lazy-credentials)

Basic usage is quite simple:

```
publishing {
  publications {
    maven(MavenPublication) {
      artifactId 'your-artifact'
      from components.java
    }
  }
  repositories {
    maven {
      url 'http://your.repo.com/repo/'
      lazyCredentials {
        passwordProperty "mvnPassword"
        usernameProperty "mvnUsername"
      }
    }
  }
}
```
You can also use `password` and `username` instead of
`passwordProperty` and `usernameProperty`. You can provide
String, GString or Closure as password and username. GString
and Closure will be evaluated only when necessary. It will
evaluate them only once though.

```
publishing {
  publications {
    maven(MavenPublication) {
      artifactId 'your-artifact'
      from components.java
    }
  }
  repositories {
    maven {
      url 'http://your.repo.com/repo/'
      lazyCredentials {
        password "${->lazy}"
        username {
          getUsername()
        }
      }
    }
  }
}
```

License
-------

See the LICENSE file for details.

repository: Unity-Group/gradle-lazy-credentials

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: Unity-Group/gradle-lazy-credentials


text:
# Flux + Node-OracleDB example application

The aim of this repository is to provide a working example of a [React](https://facebook.github.io/react/)/[Flux](https://github.com/facebook/flux) based application that uses an oracle database as storage. The database will be called using the [node-oracledb](https://github.com/oracle/node-oracledb) driver.

## Features

* Shows the TodoMVC app from [Flux](https://github.com/facebook/flux)
* Calls a webservice that is implemented in [another project](https://github.com/enpit/flux_node-oracledb.webservice)
 * The webservice communicates with an oracle database using [node-oracledb](https://github.com/oracle/node-oracledb)
 * If you don't have an Oracle XE database installed, just use a [docker container](https://registry.hub.docker.com/u/alexeiled/docker-oracle-xe-11g/)
* This project was built upon the [base-react-min](https://github.com/codewinds/base-react-min)

## Usage

This is still a WIP, but you can download, npm install and then npm build to use a local version of the todomvc app (no database functionality yet). Launch the index.html in /public in any webbrowser to start the app.

license: MIT


text:
## Export human readable protocols
Just like [generating scripts](https://clij.github.io/assistant/macro_export), one can also
generate human readable protocols of workflows. Just click the right-click menu `Generate Script > Human readable protocol`.

Note: As modern reference / citation checking tools might detect these generated texts as illegal citations, it is
recommended to mark these texts as generated.

![Image](images/human_readable_protocol.png)

## ImageJ Macro Markdown Notebooks

You can also export your workflow as notebook using the right-click menu `Generate Script > ImageJ Macro Markdown`:
<iframe src="images/ijmmd.mp4" width="540" height="540"></iframe>
[Download video](images/ijmmd.mp4)

Back to [CLIJx-Assistant](https://clij.github.io/assistant)

[Imprint](https://clij.github.io/imprint)

repository: clij/assistant

gha_language: Java

repo_name: clij/assistant


text:
# angular-input-modified

This AngularJS module adds additional properties and methods to the `ngModel` and `ngForm` controllers
as well as CSS classes to the underlying form elements
to provide end-user with facilities to detect and indicate changes in form data.

This extra functionality allows you to provide better usability for forms.
For example, you can add decorations to the form elements that are actually changed.
That way, user will see what values has changed since last edit.

Also, you can reset form to it's initial state (cancel all user edits) with just a single call to `form.reset()` or
lock new values (preserve new state) just by calling augmented `form.$setPristine()` method.
If you want, you can do this for individual input elements the same way.

## Demos and examples

Please see [the demos][gh-pages] hosted on our GitHub Pages or
[open them locally][faq-local-demos].

## Decorations and animation

This module adds `ng-modified` and `ng-not-modified` CSS classes (names are customizable) to the input fields to indicate their state.
Use them in your CSS to decorate input fields. You can combine multiple classes in the same selector.
For example, use this convenient CSS selector to decorate modified elements as valid:

``` css
/** Decorating only modified inputs as valid */
input.ng-valid.ng-modified {
    border-color: green;
}
```

This way target user will see what elements were actually changed.

---

This module also supports animations if `ngAnimate` module is available.

## Installation

### Install library with bower

`bower install --save angular-input-modified`

### Add library to your page

``` html
<script type="text/javascript" src="angular-input-modified/src/angular-input-modified.js"></script>
```

You can use minified version (`angular-input-modified.min.js`) in production.

### Add dependency in your application's module definition

``` javascript
var application = angular.module('application', [
    // ...
    'ngInputModified'
]);
```

---

## Usage

Please see our [demos and examples](#demos-and-examples) as well as [API](#api).

### Form initialization

Starting from version `2.0.0` form must be synchronously initialized during
controller execution. If you need some data to be fetched prior to form
initialization — the best approach is to
[resolve](https://docs.angularjs.org/api/ngRoute/provider/$routeProvider)
this data using your router.

However, if you really need to re-initialize form after controller execution —
please use the approach shown in this demo:
[Delayed Initialization][demo-delayed-init].

---

## API

### inputModifiedConfigProvider

Use this provider to configure behavior of this module.
Every setter of this provider supports methods chaining.
See example:

``` javascript
angular.module('Application', ['ngInputModified'])
    .config(function(inputModifiedConfigProvider) {
        inputModifiedConfigProvider
            .disableGlobally()
            .setModifiedClassName('my-changed')
            .setNotModifiedClassName('my-clear')
        ;
    })
;
```

#### enableGlobally

`{ConfigProvider} enableGlobally()`

Enables modifiable behavior globally for all form elements (this is default).

#### disableGlobally

`{ConfigProvider} disableGlobally()`

Disables modifiable behavior globally for all form elements.
You will have to add this behavior manually by using bsModifiable directive

#### setModifiedClassName

`{ConfigProvider} setModifiedClassName({string} className)`

Provides CSS class name that will be added to modified elements.
`ng-modified` is the default one.

#### setNotModifiedClassName

`{ConfigProvider} setNotModifiedClassName({string} className)`

Provides CSS class name that will be added to unmodified elements.
`ng-not-modified` is the default one.

### ngModel

Model controller properties and methods:

    PROPERTIES:
    ==========

    *        masterValue  - initial value of the input field.
    boolean  modified     - flag that indicates whether the input value was modified.

    METHODS:
    =======

    void  reset()  - resets input value to it's initial state.

### ngForm

Form controller properties and methods:

    PROPERTIES:
    ==========

    boolean  modified  - flag that indicates whether the form is modified (i.e. at least one element is modified).

    METHODS:
    =======

    void  reset()  - method to reset all input values of the form to their initial states.

---

## Changelog

Please see our [changelog](changelog.md).

## Feedback

If you have found a bug or have another issue with the library - please [create an issue][new-issue] in this GitHub repository.

If you have a question - file it with [StackOverflow][so-ask] and send me a
link to<EMAIL_ADDRESS>I will be glad to help.
Also, please create a [plunk][plunker] to demonstrate the issue, if appropriate.
You can even fork our [demo plunk][demo].

Have any ideas or propositions? Feel free to contact me by the same [E-Mail address][email].

Cheers!

## FAQ

### How do I access demos locally?

Node.js must be installed in your OS.

- Install [Gulp][gulp] by running `npm install --global gulp`
- clone the repo
- run `gulp webserver` in the repo's root directory
- open `http://localhost:8888/`

---

## License

The MIT License (MIT)

Copyright (c) 2014 Slava Fomin II

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

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

  [so-ask]:    http://stackoverflow.com/questions/ask?tags=angularjs,javascript
  [email]<EMAIL_ADDRESS>  [plunker]:   http://plnkr.co/
  [new-issue]: https://github.com/betsol/angular-input-modified/issues/new
  [gh-pages]:  http://betsol.github.io/angular-input-modified/
  [demo]:      http://plnkr.co/edit/g2MDXv81OOBuGo6ORvdt?p=preview
  [gulp]:      http://gulpjs.com/

  <!-- DEMOS -->

  [demo-delayed-init]: http://betsol.github.io/angular-input-modified/delayed-init/

  <!-- FAQ -->

  [faq-local-demos]: #how-do-i-access-demos-locally

repository: diegodorado/marino

gha_language: Ruby

repo_name: diegodorado/marino


text:
---
title: "Using Laravel Cashier to handle Stripe webhooks"
path: /posts/using-laravel-cashier-to-handle-stripe-webhooks
author: Dwight Watson
date: 2021-08-01
tags: ["laravel", "cashier", "stripe", "webhooks"]
---

Stripe webhooks can be a little bit annoying to verify. In Laravel I've generally done it using the `authorize` method of a FormRequest.

```php
use Exception;
use Illuminate\Foundation\Http\FormRequest;
use Stripe\Webhook;

class StripeRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize(): bool
    {
        try {
            $signature = $this->header('Stripe-Signature');
            $secret = config('services.stripe.webhook_secret');

            Webhook::constructEvent($this->getContent(), $signature, $secret);
        } catch (Exception $e) {
            return false;
        }

        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            //
        ];
    }
}
```

The implementation is simple enough: use Stripe to construct a Webhook event from the request and if an `Exception` is thrown you know it's invalid. You need to provide the webhook secret in order to build this event.

However, I've found that it's super easy to use [Laravel Cashier](https://laravel.com/docs/8.x/billing) to do most of the legwork for you here, and you get a beautiful syntax for handing those webhooks too.

## Install Cashier

Run `composer require laravel/cashier` to install the package.

## Ignore Cashier's migrations

Call `ignoreMigrations` in a service provider to prevent the framework from automatically running Cashier's migrations next time you migrate.

```php
use Illuminate\Support\ServiceProvider;
use Laravel\Cashier\Cashier;

class AppServiceProvider extends ServiceProvider
{
    public function register()
    {
        Cashier::ignoreMigrations();
    }
}
```

## Add the API route

Register the route in `routes/api.php` - not your regular web routes file.

```php
Route::post('/webhooks/stripe', [App\Http\Controllers\WebhooksController::class, 'handleWebhook'])->name('cashier.webhook');
```

## Create the Webhook controller

Finally create a webhooks controller that extends Cashier's controller. You can then create methods that camelCase Stripe events and handle them - for example `checkout.session.completed` is mapped to `handleCheckoutSessionCompleted` and the payload is passed in as an argument.

```php
<?php

namespace App\Http\Controllers;

use App\Models\Checkout;
use Illuminate\Support\Arr;
use Laravel\Cashier\Http\Controllers\WebhookController as CashierController;

class WebhooksController extends CashierController
{
    /**
     * Handle checkout session completed.
     *
     * @param  array  $payload
     * @return \Symfony\Component\HttpFoundation\Response
     */
    public function handleCheckoutSessionCompleted($payload)
    {
        $checkout = Checkout::where('stripe_checkout_session_id', Arr::get($payload, 'data.object.id'))
            ->firstOrFail();

        // Handle checkout
    }
}
```

Obviously there's a bit more code involved here than just using the custom `authorize` in a form request. However I like the simplification of being able to offload that (and the tests involved) to a well maintained first-party package, and get a fluent interface to handle events.

gha_language: JavaScript

gha_license_id: MIT


text:
# Contributing

Bug reports and pull requests are welcome. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

## Conventions

1. [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript)
2. [Conventional commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/)

repository: coinranking/supplies

repo_name: coinranking/supplies


text:
# graphql-codegen-helper
Graphql Codengen helper functions to quickly build plugins.

## Basic Usage

Creates a graphql-codegen plugin based off human readable Javascript Object interpretation of the graphql schema.

    const plugin = createPlugin(schemaObject => // do whatever you wish with the schema object and return whatever you wish to generated as string)

## Example: How to create a plugin. Simple Example to create a plugin that prettifies a graphql schema to human readable javascript object.

*With this typescript plugin file*

    import { createPlugin} from 'graphql-codegen-helper/dist'
    import { Types, PluginFunction, PluginValidateFn } from '@graphql-codegen/plugin-helpers';
    import { readFileSync } from 'fs'

    /* graphql-codegen plugin. */
    export const plugin = createPlugin(jsObj => `export default ${JSON.stringify(jsObj, null, 4)}`)

    const directives = readFileSync('directives.graphql')

    /* extra directives my library "needs" to run */
    exports.addToSchema = [
        directives, // other optional directives needed for your plugin
    ].join('\n')

*With this separate graphql Directive definition schema for my plugin.*

    directive @Foo on OBJECT
    directive @Bar on OBJECT

*Now if given this graphql Schema.*

    type Author @Foo {
        name: String!
        Books: [Book]
    }

    type Book @Bar {
        title: String!
        Authors: [Author]!
    }

*And run "npx graphql-codegen" with this graphql-codegen config file after compiling with "tsc -m esnext --outDir dist/esnext && tsc -m commonjs --outDir dist/commonjs". Note naming convention here just example not hardwired.*

    schema: testgen.graphql
    overwrite: true
    generates:
        testgen_output.js:
            - ./dist/commonjs/testgen.js

*I will receive this js output from my new plugin.*

    export default {
        types: {
            Author: {
                name: "Author",
                fields: {
                    name: {
                        isNullable: false,
                        isList: false,
                        directives: {},
                        type: "String"
                    },
                    Books: {
                        isNullable: true,
                        isList: true,
                        directives: {},
                        type: "Book"
                    }
                },
                directives: {
                    Foo: {}
                },
                interfaces: []
            },
            Book: {
                name: "Book",
                fields: {
                    title: {
                        isNullable: false,
                        isList: false,
                        directives: {},
                        type: "String"
                    },
                    Authors: {
                        isNullable: false,
                        isList: false,
                        directives: {},
                        type: "Author"
                    }
                },
                directives: {
                    Bar: {}
                },
                interfaces: []
            }
        },
        unions: {},
        interfaces: {}
    };

## Supports
    Objects
    Fields
    Unions
    Directives (must supply .graphql file(s) for your plugin)

## License

This code is provided under the MIT license.

repository: jjwtay/graphql-codegen-helper

gha_language: TypeScript

repo_name: jjwtay/graphql-codegen-helper


text:
Start by using a mutex_lock and 1 client access per shared argument stack

1. Make makefile

	`Assigned to: Jonathan`

2. Look into msg queues to make the two processes talk to each other

	`Assigned to:`

##Server Tasks

1. Design a struct for the process queue

	Needs:
	*	requestlist
	*	head should know
		*	length
		*	PID
		*	next
		*	arguement queue pointer
		*	lock pointer(or semaphone)

	`Assigned to:`

2. write the add method

	`Assigned to:`

3. initialize itself as a server

	`Assigned to:`

##Client Tasks

1. initialize inself as a client

	`Assigned to:`

2. Call add method through library

	`Assigned to:`

##Shared Memory Library

1. Create arguement stack struct

	Needs:
	*	lock pointer
	*	arguement pointer
	*	number of args
	*	return pointer

	`Assigned to: Jonathan`


text:
# Proj4Leaflet [![NPM version](https://badge.fury.io/js/proj4leaflet.png)](http://badge.fury.io/js/proj4leaflet) [![Build Status](https://travis-ci.org/kartena/Proj4Leaflet.svg?branch=master)](https://travis-ci.org/kartena/Proj4Leaflet)

This [Leaflet](http://leafletjs.com) plugin adds support for using projections supported by
[Proj4js](https://github.com/proj4js/proj4js).

_Proj4Leaflet uses Leaflet 1.0.3, for compatibility with Leaflet 0.7.x use the [0.7.2](https://github.com/kartena/Proj4Leaflet/releases/tag/0.7.2) release._

Leaflet comes with built in support for tiles in [Spherical Mercator](http://wiki.openstreetmap.org/wiki/EPSG:3857) and [a few other projections](http://leafletjs.com/reference-1.0.0.html#crs-l-crs-epsg3395).
If you need support for tile layers in other projections, the Proj4Leaflet plugin lets you use tiles in any projection
supported by Proj4js, which means support for just about any projection commonly used.

Proj4Leaflet also adds support for GeoJSON in any projection, while Leaflet by itself assumes GeoJSON to always
use WGS84 as its projection.

Image overlays with bounds set from projected coordinates rather than `LatLng`s are also supported by Proj4Leaflet plugin.

For more details, see this blog post on [tiling and projections](http://blog.kartena.se/local-projections-in-a-world-of-spherical-mercator/).

## Usage

Common use means making a new CRS instance for the projection you want to use.

```javascript
// RT90 with map's pixel origin at RT90 coordinate (0, 0)
var crs = new L.Proj.CRS('EPSG:2400',
  '+lon_0=15.808277777799999 +lat_0=0.0 +k=1.0 +x_0=1500000.0 ' +
  '+y_0=0.0 +proj=tmerc +ellps=bessel +units=m ' +
  '+towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +no_defs',
  {
    resolutions: [8192, 4096, 2048] // 3 example zoom level resolutions
  }
);

var map = L.map('map', {
  crs: crs,
  continuousWorld: true,
  worldCopyJump: false
});

L.tileLayer('http://tile.example.com/example/{z}/{x}/{y}.png').addTo(map);
```

Using options when constructing the CRS, you can set the tile set's origin.

```javascript
// SWEREF 99 TM with map's pixel origin at<PHONE_NUMBER>, 6126002.9379)
var crs = new L.Proj.CRS('EPSG:3006',
  '+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs',
  {
    origin: [218128.7031, 6126002.9379],
    resolutions: [8192, 4096, 2048] // 3 example zoom level resolutions
  }
);
```

## Proj4js compatibility notice
Proj4js has breaking changes introduced after version 1.1.0. The current version of Proj4Leaflet
uses Proj4js 2.3.14 or later. If you for some reason need Proj4js version 1.1.0 compatibility, you can
still use Proj4Leaflet [version 0.5](https://github.com/kartena/Proj4Leaflet/tree/0.5).

## API
The plugin extends Leaflet with a few classes that helps integrating Proj4's projections into
Leaflet's [CRS](http://leafletjs.com/reference-1.0.0.html#crs) abstract class.

### L.Proj.CRS
A CRS implementation that uses a Proj4 definition for the projection.
This is likely to be the only class you need to work with in Proj4Leaflet.

#### Usage example

```javascript
var map = L.map('map', {
    center: [57.74, 11.94],
    zoom: 13,
    crs: L.Proj.CRS('EPSG:2400',
      '+lon_0=15.808277777799999 +lat_0=0.0 +k=1.0 +x_0=1500000.0 ' +
      '+y_0=0.0 +proj=tmerc +ellps=bessel +units=m ' +
      '+towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +no_defs',
      {
        resolutions: [8192, 4096, 2048] // 3 example zoom level resolutions
      }
    ),
    continuousWorld: true,
    worldCopyJump: false
});
```

#### Constructor

```javascript
L.Proj.CRS(code, proj4def, options)
```

* `code` is the projection's SRS code (only used internally by the Proj4js library)
* `proj4def` is the Proj4 definition string for the projection to use
* `options` is an options object with these possible parameters:
  * `origin` - the projected coordinate to use as the map's pixel origin; overrides the `transformation` option if set
  * `transformation` - an [L.Transformation](http://leafletjs.com/reference-1.0.0.html#transformation) that is used
  to transform the projected coordinates to pixel coordinates; default is `L.Transformation(1, 0, -1, 0)`
  * `scales` - an array of scales (pixels per projected coordinate unit) for each corresponding zoom level;
  default is to use Leaflet's native scales. You should use `scales` _or_ `resolutions`, not both.
  * `resolutions` - an array of resolutions (projected coordinate units per pixel) for each corresponding zoom level;
  default is to use Leaflet's native resolutions. You should use `scales` _or_ `resolutions`, not both.
  * `bounds` - an [L.Bounds](http://leafletjs.com/reference-1.0.0.html#bounds) providing the bounds of CRS in projected
  coordinates. If defined, Proj4Leaflet will use this in the `getSize` method, otherwise reverting to Leaflet's
  default size for Spherical Mercator.

### L.Proj.GeoJSON

Extends [L.GeoJSON](http://leafletjs.com/reference-1.0.0.html#geojson) to add CRS support. Unlike the TileLayer extension, the
CRS is derived from the `name` property of a `crs` defined directly on the GeoJSON object per [the spec](http://www.geojson.org/geojson-spec.html#named-crs).
Linked CRSs are not supported.

**Note:** The relevant Proj4 definition should be defined directly via `proj4.defs` before loading the GeoJSON object.
If it is not, Proj4leaflet will throw an error.

Also, note that future versions of the GeoJSON spec may not include explicit CRS support. See https://github.com/GeoJSONWG/draft-geojson/pull/6 for more information.

#### Usage Example

```javascript
proj4.defs("urn:ogc:def:crs:EPSG::26915", "+proj=utm +zone=15 +ellps=GRS80 +datum=NAD83 +units=m +no_defs");

var geojson = {
  type: "Feature",
  geometry: {
    type: "Point",
    coordinates: [481650, 4980105]
  },
  crs: {
    type: "name",
    properties: {
      name: "urn:ogc:def:crs:EPSG::26915"
    }
  }
};

var map = L.map('map');

L.Proj.geoJson(geojson).addTo(map);
```

### L.Proj.ImageOverlay

Works like [L.ImageOverlay](http://leafletjs.com/reference-1.0.0.html#imageoverlay), but accepts bounds in the map's
projected coordinate system instead of latitudes and longitudes. This is useful when the projected coordinate systems
axis do not align with the latitudes and longitudes, which results in distortion with the default image overlay in Leaflet.

#### Usage Example

```javascript
// Coordinate system is EPSG:28992 / Amersfoort / RD New
var imageBounds = L.bounds(
  [145323.20011251318,<PHONE_NUMBER>5463786],
  [175428.80013969325,<PHONE_NUMBER>685671]
);

L.Proj.imageOverlay('http://geo.flevoland.nl/arcgis/rest/services/Groen_Natuur/Agrarische_Natuur/MapServer/export?' +
  'format=png24&transparent=true&f=image&bboxSR=28992&imageSR=28992&layers=show%3A0' +
  '&bbox=145323.20011251318%2C475418.56045463786%2C175428.80013969325%2C499072.9604685671&size=560%2C440',
  imageBounds);
```

repository: kaitlyndlee/CartoCosmos-Capstone

repo_name: kaitlyndlee/CartoCosmos-Capstone


text:
# FiatShamirIdentification
C# OOP implementation of Fiat Shamir Identification Scheme

**This project was designed for learning purposes, its use in real systems is not recommended. This project will no longer be updated.**

Library includes the classes:

	-PrivateKey
  	-PublicKey
	-Proover
	-Verifier

These classes provide key creation, key-bytes conversion, and the Fiat Shamir Identification protocol.
The library supports multithread key creation.

*Random Number Generator*
User can using a your own subclass of .NET RandomNumberGenerator abstract class.

*Usage:*

    a)the client create a private key with PrivateKey.NewKey static method
    b)the client generate a public key from the private key with GetPublicKey and send this to the server
    c)the client instantiates a Proover from the private key with GetProover
    c)the server instantiates a Verifier from the public key with GetVerifier
    d)run a session of the protocol exchanging the result of methods for N iteration, with N is the precision you like:

        1)Client: Proover.Step1 -> Server
        2)Server: Verifier.Step1 -> Client
        3)Client: Proover.Step2 -> Server
        4)Server: Verifier.Step2 -> result of identification
        4.1)Server: Verifier.CheckState -> result of identification

repository: ivansarno/FiatShamirIdentification

gha_language: C#

repo_name: ivansarno/FiatShamirIdentification


text:
# Night shift (Desaturated) theme for Google Chrome

This is a port of my [Night Shift theme](https://github.com/Jean-Tinland/vscode-theme-desaturated) for Visual Studio Code.\
You'll find an iTerm2 color scheme [here](https://github.com/Jean-Tinland/iTerm2-theme-desaturated).

## Preview

![img](./preview.jpg)

## Installation

First, clone this repo.

```bash
$ git clone https://github.com/Jean-Tinland/chrome-theme-desaturated
```

Then go to `chrome://extensions/` and toggle 'Developer mode'.\
Click on 'Load unpacked' button and select the `chrome-theme-desaturated` directory.

repository: Jean-Tinland/chrome-theme-desaturated

repo_name: Jean-Tinland/chrome-theme-desaturated


text:
Ansible Rclone
=========

[![Build Status](https://travis-ci.org/charliemaiors/rclone-ansible.svg?branch=master)](https://travis-ci.org/charliemaiors/rclone-ansible)

This role will install [Rclone](https://rclone.org/) for:

* Archlinux
* CentOS/RHEL
* Debian/Ubuntu
* Fedora
* FreeBSD
* macOS
* OpenSUSE
* Windows

Requirements
------------

There are no particular requirements, only the standards for FreeBSD and Windows connection setting.

Role Variables
--------------

No variables ATM.

Dependencies
------------

None

Example Playbook
----------------

Simple and easy

    - hosts: rclone
      roles:
         - { role: charliemaiors.rclone-ansible }

License
-------

BSD

Notes
-------

The unsupported part was taken from [stefangweichinger.ansible-rclone](https://github.com/stefangweichinger/ansible-rclone)

repository: charliemaiors/rclone-ansible

repo_name: charliemaiors/rclone-ansible


text:
# Object Oriented Zoo
This is the first project for Object Oriented Analysis and Design (CSCI-4448). The idea behind this project is to
exhibit class inheritance principles through a hierarchical structure of animal classes.

## Comments and Assumptions
* What to put for the different sounds that animals make (hippo sounds).
* There is no cap on the age for both the Zoo Employees or Animals. Therefore, they can theoretically live forever.
* We also assumed that negative numbers would not be entered for the day the user is
asked to enter or the age of animals.

## Development Issues
* We often had issues with deciding the location of class attributes. For example, the `ZooKeeper` class has an
attribute `zooAnimals` and we could not decide if it should belong in the `ZooKeeper` or `ZooEmployee` class.
* We encountered frequent problems relating to how we used the version control system,
but they were resolved relatively quickly.
* Two of the group members were somewhat new to java, so it took some time to get up to speed.

## Compilation and Execution Instructions
We built this project with Apache Maven. In order to compile and run our code, do the following:
```bash
mvn clean compile
cd target/classes/
java Main
```

## Credits
This project was completed by Jacob Malcy, Kyle Stewart, and Vincent Liu.


text:
# Active Route Manager

This code is based on the following article:

http://blog.sflow.com/2015/07/white-box-internet-router-poc.html

## To install

1. Copy files to the sFlow-RT app directory.
2. Restart sFlow-RT to load application.

Help is available within application web interface.

The following article provides a configuration example:

http://blog.sflow.com/2016/07/internet-router-using-merchant-silicon.html

For more information, visit:
http://www.sFlow-RT.com

repository: simwood/active-routes

repo_name: simwood/active-routes


text:
# Testing Best Practices at Etsy

## What is this document?

This is an introduction to the ideas and approaches that motivate good testing.
We'll walk through a concrete example of a system written in PHP and tested in
PHPUnit (as we use at Etsy) and discuss how to test it for good design and how
to design it for testability.

## Audience and prerequisites

This doc is intended for any Etsy engineer.

Before working through this guide, you should already have made a few changes to
Etsy's codebase, preferably but not necessarily in PHP, including work on unit
tests.

## Why test?

Here are a few chief reasons:

- **Correctness**: Make sure, as best you can, that the code you've written
  doesn't have bugs and treats its cases correctly.

- **Stability**: Make sure, as best you can, that future changes to the codebase
  (in whatever component, by whatever engineer) don't break your code. Every
  day, crises are averted in an unsung and straightforward manner simply because
  a test broke.

- **Design**: A test is a proof of concept that shows what it's like to work
  with your code. How readable is the API? How easy is it to accomplish a given
  task? If tests are hard to write, then your code is hard to use.

These go in order from less important to more important. By far the most
important thing you test in your code is its usability.

## Think in terms of inputs and outputs

The basic idea of a test is to give your code some input, let it do its thing,
then check that its output is what you expect. This is true whether you're
testing a single public method or an entire system. Let's see what that looks
like at the lowest level, where you're testing a single public method.

Throughout this guide we're going to test one example system: a *job queue*
where you submit a piece of "work" (a "job") to some "central" "server" that
carries out the "work" in some way. The rampant quotes are deliberate. The
technical details of what a piece of work entails or how the server does that
work are practically irrelevant. The important things to capture in your code
and tests are the abstractions involved and how they're used.

Here's a `JobServer` class with a public method that runs jobs you "send" to it:

```php
<?php

class JobServer {

    /** @var array a set of jobs we've already run recently and don't want to run again for now */
    private $recentlyRunJobs = array();

    /**
     * Attempts to run a given Job and returns a result code.
     *
     * @param Job $job the Job to run
     * @return int a code for the result of attempting to run $job:
     *     JobResult::SUCCESS if the job was successfully run,
     *     JobResult::FAILED_DURING_RUN if the job threw an exception,
     *     JobResult::FAILED_TO_SCHEDULE if this job has already been run recently
     */
    public function runJob(Job $job) {
        if (in_array($job, $this->recentlyRunJobs)) {
            return JobResult::FAILED_TO_SCHEDULE;
        }
        try {
            $job->run();
        } catch (Exception $jobException) {
            Logger::log_info("Exception during execution: " . $jobException->getMessage());
            return JobResult::FAILED_DURING_RUN;
        }
        $this->recentlyRunJobs[] = $job;
        return JobResult::SUCCESS;
    }
}
```

So. What do you want to test? Think in terms of the API and the class's
input/output contract:

- If you send it a job it hasn't recently run, it'll run it and return
  `JobResult::SUCCESS`.
- If you send it a job that throws an Exception during `run()`, it'll run it and
  return `JobResult::FAILED_DURING_RUN`.
- If you send it a job it *has* recently run, it'll return
  `JobResult::FAILED_TO_SCHEDULE`.

So in your unit test, test each aspect of the contract/API. Put it in
`tests/phpunit/JobServerTest.php`, and use method names that convey you're
testing one aspect of the `runJob()` API at a time:

```php
<?php

class JobServerTest extends PHPUnit_Framework_TestCase {

    public function testRunJob_success() {
        $jobServer = new JobServer();
        $job = new SuccessfulTestJob();

        $jobResult = $jobServer->runJob($job);
        $this->assertEquals(JobResult::SUCCESS, $jobResult);
        $this->assertTrue($job->jobRan);
    }

    public function testRunJob_failsDuringRun() {
        $jobServer = new JobServer();
        $job = new FailingTestJob();

        $jobResult = $jobServer->runJob($job);
        $this->assertTrue($job->jobRan);
        $this->assertEquals(JobResult::FAILED_DURING_RUN, $jobResult);
    }

    public function testRunJob_failsToSchedule() {
        $jobServer = new JobServer();
        $job = new SuccessfulTestJob();

        $jobResult = $jobServer->runJob($job);
        $this->assertEquals(JobResult::SUCCESS, $jobResult);
        $jobResult = $jobServer->runJob($job);
        $this->assertEquals(JobResult::FAILED_TO_SCHEDULE, $jobResult);
    }
}

/* A test-specific implementation like this is called a "stub". */
class SuccessfulTestJob implements Job {

    public $jobRan = false;

    public function run() {
        $this->jobRan = true;
    }
}

class FailingTestJob implements Job {

    public $jobRan = false;

    public function run() {
        $this->jobRan = true;
        throw new RuntimeException("Oopsie");
    }
}
```

Each test method answers the all-important question **"What am I testing,
exactly?"**

(Note: Some people prefer to approach this in reverse order, by writing tests
first that exercise the API, then filling in the implementation of the class
with code that honors that API. This is test-driven development, or TDD.)

## Choose your abstractions

We want to start writing the client side of our job queue. A client "sends" a
"job" to the "server" in some particular way.

**What are we testing, exactly?**

...which is, in this case, a way of asking "How do we specify a client?" Let's
say a client has a `sendJob()` method. (That seems easy enough to test, right?)
And in that method it has a short conversation with a server somewhere asking it
to execute the given job.

If we bake the conversation in:

```php
<?php

class JobClient {

    const JOB_BATCH_SIZE = 20;

    /**
     * @var array the current batch of jobs, to be sent to the server when there
     *     are JOB_BATCH_SIZE of them
     */
    private $currentJobBatch = array();

    /**
     * Tells this client to send off a job for execution. Jobs may be queued
     * for batch sending.
     */
    public function sendJob($jobName, $jobParametersJson) {

        $this->currentJobBatch[] = [$jobName, $jobParametersJson];

        if (count($this->currentJobBatch) + 1 >= self::JOB_BATCH_SIZE) {
            $curlHandle = curl_init("jobserver.etsy.com/submit");
            curl_setopt($curlHandle, CURLOPT_POST, 1);
            curl_setopt($curlHandle, CURLOPT_POSTFIELDS, ["data" => $this->currentJobBatch]);
            $result = curl_exec($curlHandle);
            $this->currentJobBatch = array();
            return $result;

        }
    }
}
```

...then a) we have to find a way to mock those curl calls for testing (gross),
and b) more deeply, we've bound the `JobClient` class to an implementation
decision -- that we'll use HTTP to send jobs over the wire -- that's none of its
business.

To put it another way, what we've got here is a script, not code. It doesn't
manage one part in a system of abstractions -- instead, it just runs some
commands. Scripts are hard to test, and they don't convey the purpose of their
code *within a system* the way an abstraction could -- an abstraction like:

```php
<?php

class JobClient {
    public function sendJob($jobName, $jobParametersJson) {
        if (count($this->currentJobBatch) + 1 >= self::JOB_BATCH_SIZE) {
            (new HttpJobTransmitter("jobserver.etsy.com"))->transmitJobs($this->currentJobBatch);
            $this->currentJobBatch = array();
        } else {
            $this->currentJobBatch[] = [$jobName, $jobParametersJson];
        }
    }
}
```

Now the act of serializing a job into an HTTP request, which is a deep enough
consideration to deserve its own abstraction, has its own class. But our
`JobClient` is still bound to using HTTP because it decides on its own, in the
body of `sendJob()`, to create a new `HttpJobTransmitter`. The choice of wire
protocol is no business of the `JobClient`. It should be *told* how to send a
job out:

```php
<?php

class JobClient {

    public function __construct(JobTransmitter $transmitter) {
        $this->transmitter = $transmitter;
    }

    public function sendJob($jobName, $jobParametersJson) {
        if (count($this->currentJobBatch) + 1 >= self::JOB_BATCH_SIZE) {
            $this->transmitter->transmitJobs($currentJobBatch);
            $this->currentJobBatch = array();
        } else {
            $this->currentJobBatch[] = [$jobName, $jobParametersJson];
        }
    }
}
```

...where `JobTransmitter` is some interface.

Now you can test that your `JobClient` implementation uses a `JobTransmitter`
correctly, similarly to how we tested successful and failing jobs for the
`JobServer` above.

*Choosing the right abstractions*, and the right structure for your project, is
the bedrock that makes everything else -- testing, maintenance, adding features,
usability -- easy or hard.

#### Exercises
- How do we test the batching of jobs in the client? What if we don't want
  batching for a particular test?
- What if, instead of writing a new `HttpJobTransmitter` class, we instead wrote
  different kinds of clients, one of them being `HttpJobClient`, each
  encapsulating its own job-sending protocol? What *other* classes would this
  approach necessitate to complete the `JobClient` system? Do you think this
  approach is better than the one above?
- What do you think of the signature of the `sendJob()` method? If you don't
  like it, how would you improve it?

## Testing parts together

The code is written for both client and server, but we've only tested each in
isolation. We want to test that the system itself actually works, for example
that we can successfully send a job from a real-life `JobClient` to a real-life
`JobServer`.

A common way to approach this is to start by testing each *interaction* between
any two parts of your system (sometimes called an "integration test").

**What are we testing, exactly?**

Ask yourself what happens between a client and server that can't be tested in
one or the other individually. Those are the only things you should worry about
testing at this level, because setting up two real-life components for testing
at the same time is harder than testing one by itself. So make the effort count.

Interactions we might consider testing:

- If we send a job from the client, the server receives it.
- If we send a job from the client when the server is down, the client fails as
  expected (or hangs on to it to retry, or something).
- If we send 1,000 jobs to a server that can only remember 500 at a time, it
  stops accepting jobs.

There's no particular trick to setting up an integration test. Stand up a
server, and stand up a client. Then have the client send a job, and check that
the server receives it.

You can use your imagination as to how this looks in code. Since the goal is to
test interactions as they'd occur in prod, have your client send a job the prod
way:

```php
<?php

class ClientServerIntegrationTest extends PHPUnit_Framework_TestCase {
    public function testSendAndReceiveJob() {
        $server = new HttpJobServer("localhost:8888");
        $this->startInBackground($server);  // Start the server in a background process.
        $client = new JobClient(new HttpJobTransmitter("localhost:8888"));
        $client->sendJob("test_job_type", '{ "param1": "value1" }');

        $serverQueue = $server->getJobQueue();
        $this->assertEquals("test_job_type", $serverQueue[0]->getJobType());
    }
}
```

There are many details elided over in this snippet. For example, how do you
prevent the job server from immediately dequeueing the incoming job before the
assert happens? To isolate the interaction between client and server for this
test, you may want to configure the job server not to execute at all, since job
execution isn't part of this test. Maybe you could pass it some kind of no-op
`JobExecutor` implementation. But the important thing here is that the structure
of the test is the same as before -- set up the parts under test, feed them
inputs, and check their outputs.

#### Exercises
- How would you test that if your `JobServer` only queues up to 500 jobs, and
  your client sends it 1,000, that the server stops accepting jobs and the
  client fails as expected?
- Do you think that calling `$server->getJobQueue()` for a test breaks the
  `JobServer` class's encapsulation? How would you change this test or the code
  under test so that we don't have to ask the `JobServer` to tell us about its
  internal state (i.e. the size of its job queue)?

## Testing an entire system

Finally, think about testing your system from the top down. The goals of testing
a whole system are the same as those of testing an individual class: does it do
what it promises users, and is it easy to use? Top-level tests, starting from
your system's user-facing entry point, are a way of making sure all of your
design decisions have successfully come together.

For example, if your system is a web app, the user-facing entry point is an HTTP
request. The request goes through a controller and is fulfilled by different
sub-systems in the controller logic: a database, a template system, a search
indexer, whatever.

To make a distinction, you can test the controller itself, say with an
integration test:

```php
<?php

/* PurchaseConfirmationPageController.php */
class PurchaseConfirmationPageController extends EtsyController {
    public function doPurchaseConfirmations(PurchaseObject $purchase) {
        $this->purchaseDatabase->store($purchase);
        echo '<h2>Purchase complete!</h2>';
        $this->jobClient->sendJob(
            "send_purchase_confirmation_email",
            "{ purchase_id: \"{$purchase->purchaseId}\" }");
    }
}

/* PurchaseConfirmationPageControllerTest.php */
class PurchaseConfirmationPageControllerStubTest extends PHPUnit_Framework_TestCase {
    public function testDoPurchaseConfirmations() {
        $stubJobClient = new NoOpClient();
        $stubDatabase = new TestPurchaseDatabase();

        $controller = new PurchaseConfirmationPageController(
            $stubDatabase,
            $stubJobClient
        );

        $controller->doPurchaseConfirmations(new PurchaseObject([1234 => "Plush lobster"]));

        // The getAllSentJobs() method is specific to the NoOpClient class.
        $this->assertEquals(1, count($stubJobClient->getAllSentJobs()));
    }
}
```

...but what are you testing, exactly? If you've broken up your code into
separate parts and your controller merely coordinates those parts, then this
isn't much more than a check for typos in your controller code.

On the other hand, you can test your system just as users do with an actual
end-to-end test where you set up an instance of your webapp and make HTTP
requests to it. The idea here is to test your code in as naive a way as possible
-- by using it the way your end users do. So there's no PHPUnit and no direct
interaction with the code.

In this case, the input is an HTTP request, and the outputs are -- well, it
depends. In this case, you want to check a) that the HTTP response is 200 and
looks sane, and b) that you receive a purchase confirmation email.

Setting up these resources in a test environment is an exercise for the reader.
For this test, you'd have to set up a real database and load it with data for
the purchase you want to confirm. And you'd have to set up Apache to run your
PHP webapp locally. And you've have to set up a local mail server. (See Etsy's
other testing documentation on how to write tests that use a real MySQL
database, for example.)

Once you've set that up, your end-to-end test could be a shell script that curls
your test webapp, a Selenium test that opens it in a browser, or a PHPUnit test
that uses PHP curl calls. It doesn't matter, so long as you do what a user does
and inspect your app's behavior as naturally and naively as possible. These
tests are a lot of work to set up, and they take a long time to run, so consider
them sanity checks that complement a suite of deeper and more fine-grained
PHPUnit tests. But do make sure your system is easy to test, i.e. easy to use.

## Balance different types of tests

Some code lends itself to thorough testing with unit tests because it breaks
down naturally into modules of plain logic. On the other hand, some code demands
more high-level integration and system testing because its substance is in
coordinating other parts or systems -- filesystems, network services, databases,
etc.

In any project you work on, you'll have to use your judgment to determine the
right kinds of tests, how to use them, and to what degree. Ask yourself, **"what
do I need to test, exactly?"** and let that determine the nature of your effort.

## Mocking

Many of our tests use an alternative approach to passing in stubs. In our
`JobServer` unit test above, we tested handling of a failing job by creating a
simple implementation of the `Job` interface whose `run()` method just throws an
exception. But often in code that doesn't use interfaces, we create trivial test
versions of concrete classes by *mocking* them.

For example, if you have some code that uses a database helper class, and that
helper class makes real MySQL calls, then the code using that helper is bound to
having a real MySQL instance running in the background:

```php
<?php

class MyDataProcessor {

    public function processData(DatabaseHelper $dbHelper) {
        $rows = $dbHelper->lookUpData(self::DATABASE_KEY);  // This runs a real MySQL query.

        $result = 0;
        foreach ($rows as $row) {
            // Process this $row...
        }
        return $result;
    }
}
```

If `DatabaseHelper` is a concrete class, you can use mocking to test this code
by creating a trivial, mock `DatabaseHelper` object:

```php
<?php

class MyDataProcessorTest extends PHPUnit_Framework_TestCase {
    public function testProcessData() {
        // Create a mock DatabaseHelper object.
        $mockDbHelper = $this->getMockBuilder('DatabaseHelper')
            ->disableOriginalConstructor()
            ->setMethods(array('lookUpData'))
            ->getMock();

        // Mock out a call to its lookUpData() method.
        $mockDbHelper->expects($this->once())
            ->method('lookUpData')
            ->with($this->equalTo(MyDataProcessor::DATABASE_KEY))
            ->will($this->returnValue(array('Data1', 'Data2', 'Data3')));

        $dataProcessorUnderTest = new MyDataProcessor();
        $result = $dataProcessorUnderTest->processData($mockDbHelper);
        $this->assertEquals(7, $result);
    }
}
```

Mocking can make it easy to test a piece of code in isolation when it doesn't
use interfaces. Or in some cases, it may be cleaner to mock a method or two than
to introduce a new abstraction. But if you use mocking as a substitute for
abstraction -- as a way to get passing tests without revisiting the design of
your code -- then you're undermining your code and your design in a deep way. As
in all these examples, use tests to evaluate your design, and be ready to
revisit your code (or anyone else's) when you find it's difficult to use.

Mocking is described in the [PHPUnit documentation][phpunit_mocking_link].

## Legacy code

Most codebases that have survived to importance have crucial code that wasn't
written with clean design and usability in mind. It may have tricky global
state, or lack abstractions (so that, for example, it does hard-coded database
operations in the middle of a class or method that's not database-related).

You'll have to use your imagination when you're working with such code. In the
end, your job is still to make your code well designed according to your
standards, regardless of the tricky bits it interacts with.

Say you need to use some legacy code that looks up a user's email address from
the database:

```php
<?php

class LegacyCode {

    private static function databaseLookUpOfEmailAddress($user) {
        // Do MySQL stuff...
    }

    public static function getEmailAddress($user) {
        return self::databaseLookUpOfEmailAddress($user);
    }
}
```

...and your code calls it like this:

```php
<?php

class MyNewClass {

    public function sendWelcomeEmail($user) {
        $this->sendEmail($this->welcomeText, LegacyCode::getEmailAddress($user));
    }
}
```

Now your code, through the `LegacyCode` class, has a hard-coded dependency on a
real MySQL database. In other words, there's no abstraction for the database
part of the code. Naturally, it's also hard to test. Why should you have to set
up a whole MySQL instance just to test the `sendWelcomeEmail()` function?

One approach to make your code how you want it is to devise an abstraction that
wraps the legacy code:

```php
<?php

class MyNewClass {

    public function __construct($emailLookerUpper) {
        $this->emailLookerUpper = $emailLookerUpper;
    }

    public function sendWelcomeEmail($user) {
        $this->sendEmail(
            $welcomeText,
            $this->emailLookerUpper->lookUpEmail($user));
    }
}

class ProdEmailLookerUpper implements EmailLookerUpper {
    public function lookUpEmail($user) {
        return LegacyCode::getEmailAddress($user);
    }
}
```

This solution frames the inputs to your class the way you want them. The
downside here is you risk creating many narrow and ad hoc abstractions for your
code.

Alternatively, you could try to improve the legacy code itself. You could start
by writing tests to cover the legacy code as is. This prepares you for safer
refactoring. If it's really hard to test the code as it's written, you'll have
to weigh the net benefit of writing complicated tests for brittle code that
you're planning to refactor anyway.

As for making the actual improvement, you could introduce the new abstraction
inside the legacy class -- but this may introduce more design problems than it
solves:

```php
<?php

class LegacyCode {

    private static $emailLookerUpper;

    // Introduce the EmailLookerUpper abstraction into all this static code
    // by using a static setter.
    public static function setEmailLookerUpper($emailLookerUpper) {
        self::$emailLookerUpper = $emailLookerUpper;
    }

    public static function getEmailAddress($user) {
        return self::$emailLookerUpper->lookUpEmail($user);
    }
}

class ProdEmailLookerUpper implements EmailLookerUpper {
    public function lookUpEmail($user) {
        // Do MySQL stuff from the old databaseLookUpOfEmailAddress() function...
    }
}
```

Global/static setters suck because they add a whole realm of complexity to your
code besides inputs and outputs, and they make it easy to introduce weird
entanglements between unrelated parts of your code. But the setter in this
example serves as a temporary measure to introduce an abstraction. Be warned --
this 'temporary' measure may be around a long time in the absence of a concerted
migration effort. At least you can test it.

While you're in there, you should add or adapt tests for the old functionality
you've refactored. Without tests, you're just rephrasing the code instead of
investing in the process of improving its design.

Another alternative is to just refactor the whole `LegacyCode` class with a
better object-oriented design -- *if* you can do it correctly, and *if* it's
worth the effort. But whenever you're tempted to gut a piece of legacy code and
rewrite it or significantly refactor it, do a cost-benefit analysis:

- How long will it take to rewrite?
- What features would it enable? How long would those features take without this
  rewrite?
- How much maintenance headache will it relieve us of? Consider the total value
  of this benefit across the whole engineering team.
- How many classes would I need to change to the rewritten API? How many of
  those classes are under active development and would benefit from easier use?

It may be better to only generalize or improve the code to the point required by
your current task (and add tests!).

## Conclusions

- To sum up, testing helps you think about your code in terms of inputs,
  outputs, and parts.
- The choice of the "right" abstraction can be difficult to judge, so try
  thinking about how your tests would look under a given set of abstractions, as
  a form of feedback.
- **Experiment.** Take your time. Enjoy the process.

## Try the CodeLab

The Testing 101 CodeLab (in this repo under `CodeLab/`) gives you in-depth
practice applying these ideas in real code. It's highly recommended that you
work through it.

## Appendix: Revision history

Version|Date|Author
-------|----|------
1.0|6/2014|Yash Parghi (yash@)
1.1|8/2014|Yash Parghi (yash@)

[phpunit_mocking_link]: http://phpunit.de/manual/current/en/test-doubles.html


text:
[Development Guidelines](../../../../README.md) / [Coding](../../../../README.md#coding) / [PL/SQL](../../../../README.md#coding_pl_sql) / [Coding Style](../../../../doc/coding/pl_sql/coding_style.md)

## [Use a simple loop to avoid redundant code required by a `WHILE` loop](../../../../doc/coding/pl_sql/coding_style.md#SimpleLoop)

Generally, you should use a simple loop if you always want the body of the loop to
execute at least once. You use a WHILE loop if you want to check before executing
the body the first time. Since the WHILE loop performs its check "up front," the
variables in the boundary expression must be initialized. The code to initialize is
often the same code needed to move to the next iteration in the WHILE loop. This
redundancy creates a challenge in both debugging and maintaining the code: how do
you remember to look at and update both?

If you find yourself writing and running the same code before the WHILE loop and at
end of the WHILE loop body, consider switching to a simple loop.

#### Instead of:

```PLSQL
DECLARE
    l_fine PLS_INTEGER := 0;
    l_date DATE := SYSDATE;
    l_overdue_count NUMBER;
BEGIN
    l_overdue_count :=
        overdue_pkg.countem (borrower_id => borrower_in, l_date);
    WHILE (l_overdue_count > 0 AND l_fine < 10)
    LOOP
        update_fine_info (l_date, l_one_day_fine);
        l_fine := l_fine + l_one_day_fine;
        l_date := l_date + 1;
        l_overdue_count :=
            overdue_pkg.countem (borrower_id => borrower_in, l_date);
    END LOOP;
```

#### it should be:

```PLSQL
DECLARE
    l_fine PLS_INTEGER := 0;
    l_date DATE := SYSDATE;
    l_overdue_count NUMBER;
BEGIN
LOOP
    EXIT WHEN
        (l_overdue_count <= 0 OR l_fine >= 10)
    update_fine_info (l_date, l_one_day_fine);
    l_fine := l_fine + l_one_day_fine;
    l_date := l_date + 1;
    l_overdue_count :=
        overdue_pkg.countem (borrower_id => borrower_in, l_date);
END LOOP;
```


text:
### [CVE-2010-3489](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-3489)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

Cross-site scripting (XSS) vulnerability in netautor/napro4/home/login2.php in CMS Digital Workroom (formerly Netautor Professional) 5.5.0 allows remote attackers to inject arbitrary web script or HTML via the goback parameter.

### POC

#### Reference
- http://packetstormsecurity.org/1009-exploits/ZSL-2010-4964.txt
- http://www.zeroscience.mk/en/vulnerabilities/ZSL-2010-4964.php

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

branch_name: refs/heads/main

gha_language: HTML

repo_name: trickest/cve


text:
# vmtemplate
IntelliJ template for my typical Voltage Modular Designer JAR project

## What The Template Contains

 * Source and test directories
 * Maven support
 * JUnit / Jupiter / Mockito dependencies
 * Basic JAR artifact export setup
 * Cmd+B builds JAR artifact (same as VM Designer)

## Installation

 1. Clone this repository
 1. Open with IntelliJ
 1. Make any edits
 1. Tools > Save Project as Template

## Usage

Once installed (above)...

 1. New > Project
 1. Choose "User-Defined" from the left menu

## Using JARs with Voltage Modular Designer

#### From within IntelliJ
 1. Build > Build Artifacts
 1. Build (project name)

#### From within VM Designer
 1. De-select everything
 1. Within the properties pane "Additional JAR Files"
 1. Select project/out/artifacts/project.jar

repository: collidermodular/vmtemplate

repo_name: collidermodular/vmtemplate


text:
---
title: Mouse Support
page_title: Mouse Support
description: Learn how you can control the mouse interaction and get notified when mouse events occur within RadGridView - Telerik's {{ site.framework_name }} DataGrid.
slug: gridview-overview-mouse-support
tags: mouse,support
published: True
position: 11
---

# Mouse Support

__RadGridView__ exposes several useful events, which can help you control the mouse interaction and get notified when mouse events occur. Moreover, using the mouse you can perform some most common tasks, such as:

* Change the __selection.__

* __Sort__ by clicking on the column headers.

* __Group__ by one or more columns.

* __Expand\Collapse__ groups or hierarchical grids.

* __Resize__ and __reorder__ columns.

* __Freeze\Unfreeze__ columns.

* Define\Remove simple __filters__.

* Start\End cell __editing.__

## Events

Here is a list of the common mouse events exposed by __RadGridView__, __GridViewRow__ and __GridViewCell__ objects:

* __MouseWheel__ - occurs when the user rotates the mouse wheel. The type of the passed event arguments is __MouseWheelEventArgs__.

* __MouseMove__ - occurs when the coordinate position of the mouse changes. The type of the passed event arguments is __MouseEventArgs__.

* __MouseLeftButtonDown__ - occurs when the left mouse button is pressed. The type of the passed event arguments is __MouseButtonEventArgs__.

* __MouseLeftButtonUp__ - occurs when the left mouse button is released. The type of the passed event arguments is __MouseButtonEventArgs__.

* __MouseLeave__ - occurs when the mouse leaves the control. The type of the passed event arguments is __MouseEventArgs__.

* __MouseEnter__ - occurs when the mouse enters the control. The type of the passed event arguments is __MouseEventArgs__.

* __LostMouseCapture__ - occurs when the object loses mouse capture. The type of the passed event arguments is __MouseEventArgs__.

* __MouseDoubleClick__ - occurs when the grid view cell is double clicked by the user. The type of the passed event arguments is __MouseButtonEventArgs__. Note that this event is available only in the __GridViewCell__ object.

In the example below you can see how to attach to __MouseWheel__ event from XAML.

#### __XAML__

{{region xaml-gridview-overview-mouse-support_0}}
	<telerik:RadGridView x:Name="radGridView" MouseWheel="radGridView_MouseWheel" />
{{endregion}}

>It is always a good practice to attach your event handlers in the XAML, whenever your application logic allows this.

The implementation of the event handler __radGridView_MouseWheel__ is located in the code-behind file (C# or VB.NET) and looks like this:

#### __C#__

{{region cs-gridview-overview-mouse-support_1}}
	private void radGridView_MouseWheel(object sender, MouseWheelEventArgs e)
	{
	    MessageBox.Show("The mouse wheel has changed: " + e.Delta);
	}
{{endregion}}

#### __VB.NET__

{{region vb-gridview-overview-mouse-support_2}}
	Private Sub radGridView_MouseWheel(ByVal sender As Object, ByVal e As MouseWheelEventArgs)
	    MessageBox.Show("The mouse wheel has changed: " & e.Delta)
	End Sub
{{endregion}}

The RadGridView actually uses and handles many of the mouse events. If you would like to handle them yourself, you should use the AddHandler() method of the GridView and set True for the __HandledEventsToo__ input parameter.

#### __C#__

{{region cs-gridview-overview-mouse-support_3}}
	this.radGridView.AddHandler(RadGridView.MouseWheelEvent, new MouseWheelEventHandler(radGridView_MouseWheel), true);
{{endregion}}

#### __VB.NET__

{{region vb-gridview-overview-mouse-support_4}}
	Me.radGridView.AddHandler(RadGridView.MouseWheelEvent, New MouseWheelEventHandler(AddressOf radGridView_MouseWheel), True)
{{endregion}}

## See Also

 * [Keyboard Support]({%slug gridview-overview-keyboard-support%})

 * [Configure the Data Bindings]({%slug gridview-configuring-the-databindings%})

 * [Managing Data]({%slug gridview-overview-managing-data%})

repository: telerik/xaml-docs

gha_license_id: NOASSERTION

repo_name: telerik/xaml-docs


text:
# sample-bitrise-yml-from-repo

Sample project, demonstrates how you can use your `bitrise.yml` directly from your repository for builds on bitrise.io

## Guide

1. Create a new app on [bitrise.io](https://www.bitrise.io).
2. Replace its `bitrise.yml` configuration with the one below.
3. Start a new build.

## "Host" `bitrise.yml`, drop-in for bitrise.io

This configuration can be copy-pasted to [bitrise.io](https://www.bitrise.io),
and will properly map the inputs to run `bitrise` with the `bitrise.yml`
found in this (or your) repository.

```
---
format_version: 1.4.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git

trigger_map:
- push_branch: "*"
  workflow: ci
- pull_request_target_branch: "*"
  workflow: ci

workflows:
  _run_from_repo:
    steps:
    - activate-ssh-key:
        run_if: '{{getenv "SSH_RSA_PRIVATE_KEY" | ne ""}}'
    - git-clone: {}
    - script:
        title: continue from repo
        inputs:
        - content: |-
            #!/bin/bash
            set -ex
            bitrise run "${BITRISE_TRIGGERED_WORKFLOW_ID}"
  ci:
    after_run:
    - _run_from_repo

  another-workflow:
    after_run:
    - _run_from_repo
```

## Important Security notes

Be aware that if you use this method **anyone can change your `bitrise.yml` file**
via Pull Requests!

You should only allow this if you're absolutely sure that no private/secret
information is exposed for builds started by Pull Requests!

repository: bitrise-io/sample-bitrise-yml-from-repo

repo_name: bitrise-io/sample-bitrise-yml-from-repo


text:
---
title: Iconic Black Anime Characters
date: 2021-02-18 22:00:00 +0000
permalink: iconic-black-anime-characters
description: In honour of Black History Month. Let's take a look at some black excellence
  in comics, manga and video games.
image: "/uploads/87c96efd0a48ce7bd13d2ae2211ccc2f.jpg"
author: Dante Ludolf

---
![](/uploads/anime-3.png)

### Afro Samurai

You'd be hard-pressed to find another character as well versed in the art of killing as the inimitable Afro Samurai.

A lone swordsman on a quest for revenge, Afro Samurai is at the centre of a story so crazy, deranged and hyperbolic that it could only exist in anime form. A revenge saga for the ages, there's no way you can watch this quiet and determined warrior slice his way to vengeance and not walk away thinking it is one of the coolest things you've ever seen.

In a feudal yet futuristic world, populated by cyborgs and ninjas and men with giant teddy bears on their heads, Afro Samurai still manages to be the coolest of the crop and will go down in history for being badass, savage and slick as hell.

![](/uploads/anime-4.png)

### Yoruichi Shihōin

A former Shinigami captain and also sometimes a literal cat, Yoruichi is a formidable warrior and knowledgable asset to the ragtag cast of would-be soul reapers in _Bleach_.

Yoruichi is one, if not the fastest, characters in _Bleach_ and is highly skilled in the arts of Hoho, Hakuda and Shunpo. She holds the title of 'Flash Goddess' and has been known to decimate entire armies with her speed and agility.

She has a rich and complicated past, being born into nobility and then rising up and leaving the ranks of the Shinigami to pursue a different life. Her rivalry with fellow Soul Reaper Sui Fong is also extremely intriguing, and their frenetic and super-fast fight is one of the best of the entire series.

![](/uploads/anime-1.png)

### Atsuko Jackson

While the star of _Michiko & Hachin_, Michiko Malandro, is equally worthy of being on this list, it is her arch-nemesis Atsuko Jackson that really shines out as an exceptionally intriguing and iconic character.

Growing up alongside Michiko in a South American orphanage, the two women would go on to lead wildly different lives. Whereas Michiko chose a life of rebellion and crime, Atsuko sought to carve herself a more legitimate life working with the police and quickly rose through the ranks as a tough and relentless lawmaker.

She is incredibly vicious and hellbent on destroying Michiko forever, as she endured harsh bullying and torment at her hands throughout their youth. Let me tell you that there is nothing that can prepare you for these ladies' epic beatdowns, and they are an absolute triumph in terms of animation and unbelievably fun to watch.

![](/uploads/12-2.png)

### Jet Black

All of the characters in _Cowboy Bebop_ are iconic in their own right and stand to show what can be achieved in terms of characterisation through the anime medium, but the gruff, tough and protective Jet stands out amongst his motley crew.

Sporting a bionic arm and a lengthy frame, Jet is one of the most dangerous and feared bounty hunters in the galaxy - and rightly so.

Whether wielding his favourite Walter P999, a katana or his trademark charm, Jet is always a stable and calming presence amongst his more emotionally volatile peers and acts as the perfect foil to their antics.

![](/uploads/anime-6.png)

### Muhammed Avdol

A serious, resolute and righteous fighter is bound to stand out amongst the more flamboyant and overt characters that populate the frenzied world of _Jojo's Bizarre Adventure_, and Muhammed Avdol is exactly that.

A tall and imposing Egyptian man with a penchant for wielding magical fire and a deep knowledge of Tarot, Avdol is nothing if not an extremely specific and niche character, which is ultimately what makes him so enduring and continuously appealing.

Joining Jospeh Joestar's group in their efforts to defeat the evil DIO, Avdol is a force to be reckoned with and an iconic character that will stand the test of time for sure.

repository: HermanMartinus/justsketchme-frontend

repo_name: HermanMartinus/justsketchme-frontend


text:
---
description: How to edit messages so as to add custom fields and attachments.
---

# Extending Messages

In this recipe, we will create an app that is called through a slash command, sends a message and extends it in order to attach one image to it and add a custom field.

## Attachments

Rocket.Chat supports numerous types of attachments \(and applicable **customisations** to these attachments\) which can be added to messages. For instance, you are able to attach images, documents, videos or audio files to messages, and creating your own **attachment class** is the first step in order to do so.

In this recipe, we will need to create an `ImageAttachment` class in the project's root, which can be implemented as follows:

```typescript
import { IMessageAttachment } from<EMAIL_ADDRESS>
export class ImageAttachment implements IMessageAttachment{
    imageUrl?: string; // [1]

    constructor(imgUrl: string){
        this.imageUrl = imgUrl;
    }

}
```

Here we **\[1\]** use a class' attribute with the **same identifier and type as in the `IMessageAttachment` interface**, which is essential to make your linked media visible to the user \(since only the variables in your attachment class which are defined in the `IMessageAttachment` interface will be used to retrieve the attachment's media\).

It is also possible to create your own classes for video or audio attachments, or even keep them all together in one single attachment class that may cover all of these possibilities. It's all up to you! Just be sure to use the same attributes described in the `IMessageAttachment.d.ts` file.

{% hint style="info" %}
The **audio** and **video** supported in Rocket.Chat message's attachments are the same as in HTML audio and video tags.
{% endhint %}

## Custom Fields

Custom fields are sets of structures linked to messages where each field is arranged such as a dictionary entry. That is, each field must present a **key** and a corresponding **value**. These fields are stored in the server's database within its corresponding messages so that they can be retrieved later.

## Create new auxiliary methods

It is helpful to define some auxiliary methods inside our slash command class so as to keep our code clear and concise.

### Method: `sendMessage`

Firstly, we will need to modify the [previoulsy given `sendMessage` method](https://docs.rocket.chat/apps-development/recipes/sub-command-pattern#bonus-print-the-texts-in-the-chat) so that the message's ID is returned after the message has been sent. Thus, the method must now return a `Promise<string>` instead of a `Promise<void>`.

The resulting `sendMessage` method is given below:

```typescript
private async sendMessage(context: SlashCommandContext, modify: IModify, message: string): Promise<string> {
    const messageStructure = modify.getCreator().startMessage();
    const sender = context.getSender();
    const room = context.getRoom();

    messageStructure
    .setSender(sender)
    .setRoom(room)
    .setText(message);

    return (await modify.getCreator().finish(messageStructure)); // [1]
}
```

The only change that must be made \(in comparison to the `sendMessage` described in previous pages\) is **\[1\]** to return the result of the `finish` method, which is the ID of the message that has just been sent.

### Method: `getMessageExtender`

After applying the changes in the `sendMessage` method and having the sent message's ID handy, we are now able to obtain the `messageExtender` object, which allows us to add custom fields and attachments.

The following asynchronous method can be used in order to obtain the `messageExtender` object:

```typescript
private async getMessageExtender(context: SlashCommandContext, modify: IModify, messageId: string): Promise<IMessageExtender>{
    const sender = context.getSender();
    return modify.getExtender().extendMessage(messageId, sender); // [1]
}
```

Here we **\[1\]** use the message's ID returned by the `sendMessage` method in order to obtain the `messageExtender` object using the `modifyExtender` object.

## Create the slash command

After developing the methods in the previous steps, we just now need to trigger these methods using a slash command, which can be done with the following code:

```typescript
import { IHttp, IModify, IPersistence, IRead, IMessageExtender } from<EMAIL_ADDRESS>import { ISlashCommand, SlashCommandContext } from<EMAIL_ADDRESS>import { ImageAttachment } from '../ImageAttachment';

export class ExtendMessageCommand implements ISlashCommand{
    public command = 'extend-message';
    public i18nParamsExample = '';
    public i18nDescription = '';
    public providesPreview = false;

    public async executor(context: SlashCommandContext, read: IRead, modify: IModify, http: IHttp, persis: IPersistence): Promise<void> {
        const messageId = await this.sendMessage(context, modify, 'Sending a message!'); // [1]
        const messageExtender = await this.getMessageExtender(context, modify, messageId); // [2]
        const value = 1;
        const img = new ImageAttachment('https://open.rocket.chat/images/logo/logo.svg'); // [3]

        messageExtender.addCustomField('key', value); // [4]
        messageExtender.addAttachment(img); // [5]

        await modify.getExtender().finish(messageExtender); // [6]
    }

    private async sendMessage(context: SlashCommandContext, modify: IModify, message: string): Promise<string> {
        const messageStructure = modify.getCreator().startMessage();
        const sender = context.getSender();
        const room = context.getRoom();

        messageStructure
        .setSender(sender)
        .setRoom(room)
        .setText(message);

        return (await modify.getCreator().finish(messageStructure));
    }

    private async getMessageExtender(context: SlashCommandContext, modify: IModify, messageId: string): Promise<IMessageExtender>{
        const sender = context.getSender();
        return modify.getExtender().extendMessage(messageId, sender);
    }
}
```

The main actions performed by the code above are:

* **\[1\]** Sends a message and stores the sent message's ID in the `messageId` variable;
* **\[2\]** Uses the sent message's ID. The `messageExtender` object is returned by the `getMessageExtender` method and stored in the `messageExtender` variable;
* **\[3\]** Creates the attachment object as an instance of the `ImageAttachment` class. Here, the attachment is an image;
* **\[4\]** Adds a custom field with the key `'key'` linked to the value 1 using the **`addCustomField`** **method** from the messageExtender object. Many more custom fields can be added to the same message just by calling the same method with distinct keys \(and values of your choice\);
* **\[5\]** Adds the image attachment to the message using the **`addAttachment`method** from the `messageExtender` object. Many attachments can be added all at once using the **`addAttachments` method**;
* **\[6\]** Finishes the modifyExtender object, which is crucial so as to apply the extensions made to the message and make them visible to the user.

## Register the slash command

After having the slash command's code done, we have to register it in the app's main class, in the project's root.

```typescript
import { App } from<EMAIL_ADDRESS>import { IAppInfo } from<EMAIL_ADDRESS>import { ExtendMessageCommand } from './slashcommands/ExtendSlashcommand'; // [1]

export class RocketChatTester extends App {
    constructor(info: IAppInfo, logger: ILogger, accessors: IAppAccessors) {
        super(info, logger, accessors);
    }

    public async extendConfiguration(configuration: IConfigurationExtend) {
        configuration.slashCommands.provideSlashCommand(new ExtendMessageCommand()); // [2]
    }
}
```

Here we **\[1\]** import our new slash command class and then **\[2\]** register it in the app's configuration. Now it is available for us.

## Deploy to the server

To deploy the app, run: `rc-apps deploy --url <server_url><server_port> -u <user> -p <pwd>`

## Finally: running the slash command

After performing the app's deployment, it is possible to run the slash command `/extend-message` in any channel.

Running the registered slash command will send a message in the current channel, which will be edited in order to add an image attachment and a custom field. The attached image can be seen in the edited message. In addition, the custom fields created can be found in any database client of your choice.

repository: Udit-takkar/developer-docs

repo_name: Udit-takkar/developer-docs


text:
---
title: Reminders SAAS
date: '2017-08-31T00:00:00.121Z'
description: ', SAAS reminder scheduling API;'
---

Reminders.company started as a spin off of another project I had going at
that time.

I was fiddling with the UI quite a bit, until it clicked to me that this isn't something
that anyone will use because it doesn't really solve a problem that another tool fixes
already, like a calendar reminder for example. So I decided to repack all that functionality
into an API and sell that API as a SAAS product targeted to developers. So that's what I did!

![Shot](./shot3.png)

It took me about 3 months to get it done, working on it every day after I was done with my day-to-day
job. The platform was divided in 3 services:

* Website: A nodejs app with koa, postgres and stripe for managing subscriptions.
* API: The actual api users were iteracting with, using koa, postgres, redis and cronjobs.
* Docs: Based on [slate](https://github.com/lord/slate)

![PH](./product-hunt.png)

The platform was deployed in heroku, with a paid dyno, a basic postgres and redis store. When launch
day came, I patiently waited until producthunt submissions of the day were open and
once they were I finally push the submit button, also to hackernews and a few subreddits. Reaction from
users [was pretty good](https://www.producthunt.com/posts/reminders-api), got quite some traction through out those days and even made it to *4th product of the day*
which was quite an achievement for me. Got around 240 accounts created, out of those around 100
tested the product and only 2 people converted to paid users for only one month.

![Shot](./stripe.png)
![Shot](./analytics.png)

A few API marketplaces got in touch to see if I was interested in integrating my product
into their platform and one even offered to buy it for 300 bucks. But I felt like the
product and the experiment itself failed and didn't wanted to give it away for a few bucks;
there was obviously some interest on it but maybe the pricing wasn't adequate or it was
just missing something else that I didn't figure out back then.


text:
## Accept Developer Certificate of Origin

In order for your contributions to be accepted, you must [sign off](https://git-scm.com/docs/git-commit#git-commit---signoff) your Git commits to indicate that you agree to the terms of [Developer Certificate of Origin](https://developercertificate.org/).

## Follow the Code of Conduct

In order to foster a more inclusive community, Gradle has adopted the [Contributor Covenant](https://www.contributor-covenant.org/version/1/4/code-of-conduct/).

Contributors must follow the Code of Conduct outlined at [https://gradle.org/conduct/](https://gradle.org/conduct/).

## Making Changes

### Development setup

You can test local changes to `gradle-completion.bash` by executing

```bash
source path/to/gradle-completion.bash
```

and then using completion as normal.

For ZSH, set your `fpath` to point to the cloned git repository

```bash
export fpath=($HOME/src/your_user/gradle-completion \$fpath)
```

Then execute `unfunction _gradle && autoload -U _gradle` to reload the gradle completion function, after which you can try completion as normal.

### Debugging

You can get a debug trace of zsh completion by typing `Ctrl-X ?` instead of hitting `[TAB]`. That is especially helpful when submitting bug reports.

Here's a handy [how-to on bash completion](https://iridakos.com/tutorials/2018/03/01/bash-programmable-completion-tutorial.html) and [zsh completion reference](https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org).

## Updating Homebrew formula
Updating the `gradle-completion` formula for Homebrew takes extra setup to perform all of the verification Homebrew requires.

First you will need to ensure you can build native ruby gem extensions necessary for `brew audit`:

```
xcode-select --install
brew vendor-install ruby

# Check for any homebrew issues
brew doctor

# Add this to your environment
export PATH="/usr/local/opt/ruby/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/ruby/lib"
export CPPFLAGS="-I/usr/local/opt/ruby/include"
export PKG_CONFIG_PATH="/usr/local/opt/ruby/lib/pkgconfig"
```

Ensure you have created a release tag on GitHub for `VERSION`.

```
export GRADLE_COMPLETION_VERSION="1.4.1"
wget "https://github.com/gradle/gradle-completion/archive/v${GRADLE_COMPLETION_VERSION}.tar.gz"
cat "v${GRADLE_COMPLETION_VERSION}.tar.gz" | shasum -a 256 | awk '{print $1}'

# Use brew tools to audit and create PR to homebrew/core — don't forget to replace `VERSION` AND `SHA_256`!
brew bump-formula-pr --url=https://github.com/gradle/gradle-completion/archive/v<VERSION>.tar.gz --sha256=<SHA_256> gradle-completion
```

### Creating Commits And Writing Commit Messages

The commit messages that accompany your code changes are an important piece of documentation, please follow these guidelines when writing commit messages:

* Keep commits discrete: avoid including multiple unrelated changes in a single commit
* Keep commits self-contained: avoid spreading a single change across multiple commits. A single commit should make sense in isolation
* If your commit pertains to a GitHub issue, include (`Issue: #123`) in the commit message on a separate line
* [Sign off](https://git-scm.com/docs/git-commit#git-commit---signoff) your commits to indicate that you agree to the terms of [Developer Certificate of Origin](https://developercertificate.org/).

### Submitting Your Change

After you submit your pull request, a Gradle core developer will review it. It is normal that this takes several iterations, so don't get discouraged by change requests. They ensure the high quality that we all enjoy.

If you need to check on CI status as an external contributor, login as a guest.

### Signing Off Commits After Submitting a Pull Request

Pull requests are automatically verified that all commit messages contain the Signed-off-by line with an email address that matches the commit author. In case you didn't sign off your commits before creating a pull request, you can still fix that to confirm that you agree to the terms of [Developer Certificate of Origin](https://developercertificate.org/).

To sign off a single commit:

`git commit --amend --signoff`

To sign off one or multiple commits:

`git filter-branch --msg-filter "cat - && echo && echo 'Signed-off-by: Your Name<EMAIL_ADDRESS>HEAD`

Then force push your branch:

`git push --force origin test-branch`

## Getting Help

If you run into any trouble, please reach out to us on the issue you are working on.

## Our Thanks

We deeply appreciate your effort toward improving Gradle. For any contribution, large or small, you will be immortalized in the release notes for the version you've contributed to.

If you enjoyed this process, perhaps you should consider getting [paid to develop Gradle](https://gradle.com/careers)?

repository: gradle/gradle-completion

gha_language: Shell

repo_name: gradle/gradle-completion


text:
# OpenShift Command Line Tools (RHC) [![Build Status](https://secure.travis-ci.org/openshift/rhc.png)](http://travis-ci.org/openshift/rhc)

The OpenShift command line tools allow you to manage your OpenShift
applications from the command line.  The [Getting Started
guide](https://openshift.redhat.com/app/getting_started) has additional
info on installing the tool on each supported operating system.

Please stop by #openshift on irc.freenode.net if you have any questions or
comments.  For more information about OpenShift, visit https://openshift.redhat.com
or the OpenShift support page
https://openshift.redhat.com/support.

RHC from rubygems.org is built on Ruby 1.8.7.  RHC does have conditional
dependencies during build time, so it can be built on multiple versions of Ruby.
If you are running into any dependency issues when using RHC, please try to
build RHC locally using `gem build rhc.gemspec` to use the correct dependencies.

## Using RHC to create an application

DEPENDENCIES:

* git
* openssh-clients
* ruby (1.8.7 or later)
* rubygems

Step 1:  Run the setup command to configure your system:

    $ rhc setup

Follow the instructions in setup to set your SSH keys and create a domain.  The name you choose for your domain will form part of your application's public URL.

Step 2: Create an OpenShift application:

    $ rhc app create -a appname -r /path/to/new/git/repo -t <framework Ex: php-5.3>

Once that's complete, follow the directions printed at the end of running
rhc app create.

## Making changes to your application

Once your site is created, updating it is as simple as making changes to your
git repo.  Commit them, then push.  For example:

    $ edit index.php
    $ git commit -a -m "what I did"
    $ git push

Then just reload your web page to see the changes.

## OS X Notes:

git:
OS X 10.6 comes w/ ssh and ruby, but not with git, unless you have
Xcode 4.0.x installed.

If you do not have Xcode, you can obtain a pre-packaged version
of git from:

    http://code.google.com/p/git-osx-installer/

Installing git from MacPorts/HomeBrew/Fink/etc requires Xcode.

Now obtain the client code, either via 'git clone' as above
or via the rhc gem.

## Developing / Contributing
We expect code contributions to follow these standards:

1. Ensure code matches the [GitHub Ruby styleguide](https://github.com/styleguide/ruby), except where the file establishes a different standard.
2. We use RSpec for functional testing and Cucumber for our high level
   integration tests.  Specs are in 'spec/' and can be run with bundle
exec rake spec.  Features are in 'features/' and can be run with
bundle exec rake features (although these tests runs
against the gem installed locally so you will need to gem install
first).  See [README.md](https://github.com/openshift/rhc/blob/master/features/README.md) in the features dir for more info.
3. We maintain 100% line coverage of all newly added code via spec
   testing.  The build will fail if new code is added and it does not
have full line coverage.  Some old code is currently excluded until it
can be refactored.  Run bundle exec rake spec on Ruby 1.9+
to see your code coverage level.
4. When writing a new Command please follow [ADDING_COMMANDS.md](https://github.com/openshift/rhc/blob/master/lib/rhc/commands/ADDING_COMMANDS.md)

Once you've made your changes:

1. [Fork](http://help.github.com/forking/) the code
2. Create a topic branch - `git checkout -b my_branch`
3. Push to your branch - `git push origin my_branch`
4. Create a [Pull Request](http://help.github.com/pull-requests/) from your branch
5. That's it!

If you use vim, we've included a .vimrc in the root of this project.
In order to use it, install https://github.com/MarcWeber/vim-addon-local-vimrc

repository: tiwillia/rhc

repo_name: tiwillia/rhc


text:
# Content Manager of Tutorial System

## Description

This repository is responsible to manage the input and output Rest API interface for the text content of the entire Tutorial System including Video and Metadata contents.

See Red highlight below for the scope of this repository.

![RESTAPI.jpg](images/Content_Manager_highlight.png)

## API END POINT
* http://tutorialinaja.tech/conm/v1

## API Docs
* https://cman.docs.apiary.io/#

## Example screen shots of API invocations

TODO

## How to commit

When committing, precommit hook been called and expect tests and linting be passed first

### Commit message [Conventional Commits](https://conventionalcommits.org/).

The commit message should be structured as follows:

---

```bash
<squad abbreviation-ticket number> <type>(<scope>):  <description>
<BLANK LINE>
[optional body]
<BLANK LINE>
[optional footer]
```

---

## Examples

### Commit message with description, scope and breaking change in body

```bash
CM-21 feat(dbid): allow provided config object to extend other configs

CM-22 BREAKING CHANGE(dbid): redirect old API request service page to new version
```

### Revert

If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.

### Type

Must be one of the following:

| type            | usage                                                                                |
| :-------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| fix             | A bug fix (this correlates with [PATCH](http://semver.org/#summary) in semantic versioning).                                                                          |
| feat            | A new feature (this correlates with [MINOR](http://semver.org/#summary) in semantic versioning).                                                                      |
| BREAKING CHANGE | introduces a breaking API change (correlating with [MAJOR](http://semver.org/#summary) in semantic versioning). A breaking change can be part of commits of any type. |
| chore           | bau taks                                                                                |
| build           | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm, webpack)                                                          |
| ci              | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)                                                           |
| docs            | Documentation only changes                                                                                |
| perf            | A code change that improves performance                                                                                |
| refactor        | A code change that neither fixes a bug nor adds a feature                                                                                |
| style           | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)                                                                |
| test            | Adding missing tests or correcting existing tests                                                                                |

### Scope

The scope should be the name of the component package affected (as perceived by the person reading the changelog generated from commit messages.

The following is the list of supported scopes:

| Short Code      | Components               |
| :-------------- | :----------------------- |
| content-manager | Content Manager          |
| test            | Test automation          |
| doc             | Documentation            |
... keep adding above list

gha_language: PHP


text:
# Viper Template Generator

Viper Template Generator is an XCode template generator with included VIPER design patern.

## Getting Started

Required [Phython 3](https://www.python.org) to running this script. [Follow this link to download Phthon 3](https://www.python.org/downloads/)

### Prerequisites

Download this repo or clone from git

```
git clone https://github.com/Dodiwahyupurnomo/viper-generator.git
```

### Installing

Open terminal and change directory to Viper Template Generator directory.

Type to terminal

```
./installer.py
```

and follow the instructions

## Usage

### Template Project

1. File -> New -> Project
2. Scroll down to your template group
![alt template group](https://raw.githubusercontent.com/Dodiwahyupurnomo/viper-generator/master/ss/template%20group.png)
3. Fill data in this form
![alt form project](https://raw.githubusercontent.com/Dodiwahyupurnomo/viper-generator/master/ss/form.png)

repository: dodiwahyu/viper-generator

repo_name: dodiwahyu/viper-generator


text:
# Smash Amiibo Cheat Tool
Hack your amiibos in a tap.

Based off the libctru NFC example

## Menu
Hack: Simple and quick way to buff your amiibo's stats to 200 everywhere

Restore backup: Restore a backup if previously backed up by the `Hack` function or the `Only dump appdata function`

Only dump appdata: Only dumps a backup file

Custom file writing: Writes `/Smash amiibo cheat tool/write.amiibo` to the amiibo

## Tagstates
1: Stopped scanning for Amiibos/NFC tags

2: Currently scanning for Amiibos/NFC tags

3: An Amiibo/NFC tag has been found

4: Usually happens after tagstate 3, Amiibo/NFC tag out of range

5: The Amiibo's/NFC tag's data successfully loaded

## Retuned values
0xC8A17628: The amiibo haven't been setup yet

0xC8A17638: Smash data haven't been found

0xC8C1760C and 0xC8A17618: The amiibo is corrupted

0x00000000: Everything's fine

## Credits
Yellows8 : Documentation on smash amiibo data

MarcusD: Helping me with some code issues

Thunder Kai: All the graphics

Yudowat, CloudedSun, Fug/leni, jasgx, Karma, LinkSoraZelda, Swiftloke and Y2K: Testing and ideas

repository: Multipixelone/Smash-Amiibo-Cheat-Tool

repo_name: Multipixelone/Smash-Amiibo-Cheat-Tool