text:
# PhluffyFotos Sample
## Requires
- Visual Studio 2012
## License
- Apache License, Version 2.0
## Technologies
- Microsoft Azure
- Windows Azure Storage
- ASP.NET MVC 4
## Topics
- Microsoft Azure
- ASP.NET MVC
- Windows Azure Storage
## Updated
- 08/08/2012
## Description

PhluffyFotos Sample

PhluffyFotos is a Picture Gallery Service where users can upload their pictures from the web or mobile device. Users can upload, tag, and share photos in this sample.

The sample utilizes several technologies including
ASP.NET MVC 4,
Windows Azure SQL Databases and
Windows Azure Storage, including
Tables,
Blobs, and
Queues. In this sample, you will see how to pull together both a web application and Windows Azure Worker role to build cloud applications.

Prerequisites

Visual Studio 2012

Windows Azure SDK for .NET 1.7

ASP.NET MVC 4

Running the Sample Locally

Open Visual Studio 2012 as administrator.

Compile the solution. The NuGet packages dependencies will be automatically downloaded and installed.

Run the PhluffyFotos cloud project (right-click the project and select Debug | Start new Instance).

Run the PhluffyFotos.Web project (right-click the project and select Debug | Start new Instance).

Running the Sample in Windows Azure

To run this sample on the cloud you need a Windows Azure Subscription. If you don't have a Windows Azure account, you can sign up for a free trial
here.

You also need a Windows Azure Storage account, for leveraging Queues, Table and Blob Storage. Once you have your Windows Azure subscription, follow the steps in

this article to create a storage account. Make note of the account name and Primary Acess Key.

To update the solution with the values obtained previously, follow these steps:

Use the Windows Azure portal to create a Web site with a database

Use the Windows Azure portal to create a Cloud Service

Use the Windows Azure portal to create a Windows Azure Storage account

Start Visual Studio 2012 and open the solution included with this sample's download.

Open the ServiceConfiguration.Cloud.cscfg file located in the
PhluffyFotos Cloud project.

Modify the DataConnectionsString and the Diagnostic Connection string (Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString) for the worker role to point to the storage account you've just created.

Note: The connection string used for accessing the windows azure storage account is built with the following format:
DefaultEndpointsProtocol=https;AccountName={YOUR-ACCONT};AccountKey={YOUR-ACCONT-KEY} In it you'll need to replace
{YOUR-ACCONT} with the storage account name and {YOUR-ACCONT-KEY} with the Primary Access Key copied.

Open the Web.config file located in the PhluffyFotos.Web project and update the
DataConnectionString with the same value used in the step above.

Open the Web.config file located in the PhluffyFotos.Web project and update the
DefaultConnection connction string to reflect the connection string to the Windows Azure SQL Database you created in step 1.

Save the changes made to the file.

Publish the PhlufffyPhotos Cloud Service project to the Windows Azure Cloud Service you created in Step 2.

Publish the PhluffyPhotos.Web project to the Windows Azure Web Site you created in Step 1.

Detailed Instructions

For a more detailed walk-through on how to perform each of the individual tasks required to get this sample working in Windows Azure, see the sample's

Getting Started document in the repository containing the code for the sample.

path: /PhluffyFotos Sample/README.md


text:
# Machine-Learning
Gold price prediction using linear regression
This model has been created on the basis of yahoo finance report on daily gold price.
Linear regresion has been implemented along with differenet data wrangling and data visualization techniques, and finally r-squared method has used to predict the accuracy.
This method also focuses on the moving average concept of data wrangling technique.

license: MIT

repository: someshkr/Machine-Learning

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: someshkr/Machine-Learning


text:
[Go back to the main page](../../../README.md)

### Table of contents

- [Advanced Web Development (CM3035)](#advanced-web-development-cm3035)
  - [Professor(s)](#professors)
  - [Topics covered](#topics-covered)
  - [Assessment](#assessment)
  - [Module specification](#module-specification)
  - [Syllabus](#syllabus)
  - [Resources](#resources)
    - [Complementary learning](#complementary-learning)
      - [YouTube](#youtube)
    - [:heart: Notes](#heart-notes)

---

## Advanced Web Development (CM3035)

Through this module, you will learn how to build dynamic, data-driven
websites using databases, front-end frameworks and server-side
programming. This module provides the skill set required to do full
stack web development work. By studying this module, you will develop
a web developer skill set that enables you to understand how to build
and deploy complete, data-driven websites. You will consider several
different technologies for client side-web development such as HTML,
CSS, JavaScript and templates. You will explore methods for developing
server-side web applications, by building web-accessible wrappers around
databases. You will consider issues of scalability, and learn about web
application configuration and deployment.

### Professor(s)

- Dr. Daniel Buchan

### Topics covered

- The web stack: clients, web servers and databases
- Advanced features of HTML, CSS and Templates
- Deploy a website
- Basic databases and data schemas for a website
- Build a CRUD/ RESTFul API
- Build a CRUD/ RESTFul API pt 2
- Build a websocket server
- User authentication and security
- Working with external APIs
- Scalability

### Assessment

Coursework only (Type II)

### Module specification

- [Module specification](https://github.com/world-class/binary-assets/blob/master/modules/module-specification/CM3035_AWD-Module-Spec.pdf)

### Syllabus

- [Syllabus](https://github.com/world-class/binary-assets/blob/master/modules/syllabi/Syllabus_CM3035_AWD.pdf)

### Resources

#### Complementary learning

##### YouTube

- [Build a Django DRF app and React Front-end - Part-1](https://www.youtube.com/watch?v=soxd_xdHR0o) - Very Academy
- [Build a Django DRF Quiz API - Part-2](https://www.youtube.com/watch?v=EWJ2-xkfvXI) - Very Academy
- [JWT Token Authentication with React - Part-3](https://www.youtube.com/watch?v=AfYfvjP1hK8) - Very Academy
- [Viewsets and Routers with React Front-end Example - Part-4](https://www.youtube.com/watch?v=dCbfOZurCQk) - Very Academy
- [API Schema and Documentation Generation - Part-5](https://www.youtube.com/watch?v=-nuobfiU49Q) - Very Academy
- [Filters and Search features - Part-6](https://www.youtube.com/watch?v=3Qdy-FvUEcY) - Very Academy
- [CRUD with React Front-end - Part-7](https://www.youtube.com/watch?v=Hxadcs7v1NY) - Very Academy
- [Image Uploading / Handling with React Front-end - Part-8](https://www.youtube.com/watch?v=V2zaeqFSSTE) - Very Academy
- [Django Rest Framework Course - Social Logins with React and DRF - Part-9](https://www.youtube.com/watch?v=wlcCvzOLL8w) - Very Academy

#### :heart: Notes

- Visit [this page of world-class/notes](https://github.com/world-class/notes/tree/master/level-6/advanced-web-development).

repository: world-class/REPL

gha_language: SCSS

gha_license_id: MIT

repo_name: world-class/REPL


text:
Dropwizard Patch Implementation
================

About
-----
This small framework provides an implementation for HTTP Patch for resources in [Dropwizard](http://dropwizard.io).
This  implementation is based off of [RFC6902](https://tools.ietf.org/html/rfc6902), a proposed standard for
updating resources.

How does JSON Patch work?
-------------------------
[RFC6902](https://tools.ietf.org/html/rfc6902) proposes a method of patching to consist of multiple patch instructions. Each patch instruction
contains information about how a resource should be changed. Below is an example patch document:

```json
[
    {"op": "add",    "path": "/pets/0", "value:": "Mogget"},
    {"op": "remove", "path": "/pets"}
]
```

### What does the path represent?
The `path` property of a patch instruction references the property of the resource to modify. In the above case, the
add operation will add the `value` to the 0th element of the `pets` array. Likewise, the remove operation will remove
the `pets` array entirely. The path format is specified in [RFC6901](https://tools.ietf.org/html/rfc6901).

### Operations
There are six patch operations listed in the specification. For your convenience, here is a brief summary of each operation. Please note that this is
not an official summary and if you'd like a more detailed explanation, check out the actual document ([RFC6902](https://tools.ietf.org/html/rfc6902)).

####add
Depending on what part of a resource you point to with the `path` property, this operation can be used in three ways.

- Add an element to an array
- Add a non-existent property and value
- Replace an existent property with a value

####copy
The `copy` operation can be used to copy any part of a resource to another part of that resource.

####replace
This operation simply replaces a property or element with a given value.

####remove
The `remove` operation removes a property or element of a resource in its entirety. Do not confuse this with writing
`null` to a property; use the `replace` operation with a value of `null` to accomplish this. This operation however is
useful for removing elements of an array.

####move
The move operation can be used to move any part of a resource to another part of that resource.

####test
This operation can be used to validate a part of a resource either before or after other patch operations.

Getting started
---------------
```xml
<dependency>
    <groupId>io.progix.dropwizard</groupId>
    <artifactId>dropwizard-patch</artifactId>
    <version>0.2.2</version>
</dependency>
```

There are three ways an operation can be executed

- Default: automatically applies an operation to a Java object by serializing, patching, and deserializing
- Contextual: Like default, but instead of automatically patching, simply provides the operation information and target object for you to manipulate
- Basic: Like contextual, but does not target a object

BasicJsonPatch
--------------
This mode of patching can be achieved by setting a `BasicJsonPatch` instance as your entity in the resource method. An
example is shown below:

```java
@PATCH
@Path("/{id}")
public void patchUser(@PathParam("id") int id, BasicJsonPatch request) throws PatchTestFailedException {
    request.setAdd(new AddOperation() {

        @Override
        public void add(JsonPath path, JsonPatchValue value) {
            ...
        }
    });

    request.apply();
}
```

In this example, the `JsonPatch#setAdd()` method is used to set an `AddOperation`, which will contain the logic for the
`add` operation. For each patch instruction in this request, the code inside the `AddOperation#add` method will execute.

The `BasicJsonPatch` also has methods for all other operations listed above, exposing the relevant information.

Note that `BasicJsonPatch#apply()` is required to be called before the resource method returns for any patching
to be preformed!

ContexualJsonPatch
------------------
This mode of patching can be achieved by setting a `ContexualJsonPatch` instance as your entity in the resource method. An
example is shown below:

```java
@PATCH
@Path("/{id}")
public void patchUser(@PathParam("id") int id, ContexualJsonPatch<Person> request) throws PatchTestFailedException {

    request.setAdd(new ContextualAddOperation<Person>() {

        @Override
        public void add(Person person, JsonPath path, JsonPatchValue value) {
            ...
        }
    });

    Person person = personDao.findById(id);

    Person patchedPerson = request.apply(person);
}
```

Notice that `ContextualJsonPatch` uses a generic type to determine what object should be targeted by the patch operation.

The `Person` object that is exposed in `ContextualAddOperation#add()` represents the target of the operation. Note that
this a copied object (by value) and not a copied reference. Any changes made to the person object in this method will not
modify the targeted object directly.

`ContextualJsonPatch#apply(T)` is where the targeted object should be passed in. Applying the patch will return the patched
object.

DefaultJsonPatch
----------------
This mode of patching can be achieved by setting a `DefaultJsonPatch` instance as your entity in the resource method. An
example is shown below:

```java
@PATCH
@Path("/{id}")
public void patchUser(@PathParam("id") int id, DefaultJsonPatch<Person> request) throws PatchTestFailedException {

    Person person = personDao.findById(id);

    Person patchedPerson = request.apply(person);
}
```

Notice that `DefaultJsonPatch` uses a generic type to determine what object should be targeted by the patch operation.

`DefaultJsonPatch#apply(T)` is where the targeted object should be passed in. Applying the patch will return the patched
object.

This method of patching will use Jackson to serialize the target object, apply the operation automatically, and return
the deserialized patched object. If the patch transforms the serialized JSON document in such a way that prevents
deserialization, an error is thrown.

Notice that you do not need to set a `AddOperation` or any other operation handlers. `DefaultJsonPatch` comes
preconfigured with operation handlers that perform a JSON patch. However, if you would like to have more control over
one or more operations, `DefaultJsonPatch` extends `ContextualJsonPatch`. You can still call the operation handler
setters to override the default JSON patching handlers.

###JsonPath
`JsonPath` instances contain path information as defined in [RFC6901](https://tools.ietf.org/html/rfc6901) and wrap
around Jackson's `JsonPointer`. The path is split into segments that can be referenced by index. In this class, helper
methods are exposed to make patching easier and more concise.

Building on the example shown above, displayed are a few ways you can use `JsonPath`

```java
request.setRemove(new RemoveOperation() {
    @Override
    public void remove(JsonPath path) {

        if (path.property(0).is("pets")) {

            if(path.element(1).exists()) {
                int index = path.element(1).val();
                user.getPets().remove(index);
            }

        }

    }
});
```

As expected, the only information a `remove` operation needs is the `JsonPath`, which is provided in the
`remove` method of the `RemoveHandler`. We use the `path` to get the first segment as a string property with
`JsonPath#property(int)` and check if it's equal to `pets` using the `JsonPathProperty#is(String)` method.

Because `pets` is an array, we should expect the next segment (if any) to contain an integer. To get segments you
know will be integers, the `JsonPath#element(int)` is exposed. Using its `exists()` method, we can confirm the
segment at this index is actually an integer index. At this point, we can extract the actual index referenced in the
`JsonPath` using the `val()` method and update the appropriate data.

The `JsonPathElement#isEndOfArray()` is exposed for the special character `'-'` to symbolize the end of an array.

Note that both `JsonPath#property(int)` and `JsonPath#element(int)` will never return null! They will return a
`JsonPathProperty` and `JsonPathElement`, respectively. The `exists()` method for each can be used to determine what
type the segment is. For each index passed to these methods, only one will return true.

`JsonPath` can also perform a direct equality check to avoid long if-else blocks using `JsonPatch#is(String)`. This
method requires the given string path to start with a `/`. An important feature/caveat in this method is matching elements.
Because we won't always know the index a `JsonPath` targets, you can use the `#` character in the path to represent
"any number". Because of this, if you need to use the `#` character, prepend it with a `~` (`~#`). See the previous
example using this method instead:

```java
request.setRemove(new RemoveOperation() {
    @Override
    public void remove(JsonPath path) {

        if(path.is("/pets/#")) {
            int index = path.element(1).val();
            user.getPets().remove(index);
        }

    }
});
```

####Invalid paths
To provide better client-side information for a path you do not implement patching for, the `JsonPath#endsAt(int)`
method is provided. This method will return true if the index given is the final segment of the path, false if the
path continues. This can be useful to ensure the path is exactly what you expect.

`InvalidPatchPatchException` is also provided to be thrown when you choose not to support a specific path. The above
example is shown below with better error handling (assuming we only allow the array elements of `pets` to be modified.

```java
request.setRemove(new RemoveOperation() {
    @Override
    public void remove(JsonPath path) {
        if (path.property(0).is("pets")) {
            if(path.element(1).exists() && path.endsAt(1)) {
                int index = path.element(1).val();
                user.getPets().remove(index);
            } else {
                throw new InvalidPatchPatchException();
            }
        } else {
            throw new InvalidPatchPatchException();
        }
    }
});
```

###JsonPatchValue
Like `JsonPath`, there is a helper class to store values in a patch instruction. `JsonPatchValue` can store a list of
values or an single value (RFC6902 does not require always using an array for the `value` property).

Because of this, the `JsonPatchValue#many(Class)` method returns a list of all values and `JsonPatchValue#one
(Class)` returns a single value (throws an IndexOutOfBoundsException if there are more than one or no values). The
`Class` passed into these methods is the class the objects for this path you expect. Internally, Jackson is used to
deserialize the objects into the target class.

Complete example
----------------
In the absence of a dedicated sample, you may reference the `UserResource` class used for tests.

FAQ
---
###Why does the do the various test operations return a boolean?
The boolean determines if the test fails or succeeds. If the test fails, a `PatchTestFailedException` is
automatically thrown. Note that you should not return false if the `JsonPath` is invalid, see [Invalid paths]
(#invalid-paths).

###I'm using the BasicJsonPatch in my resource, but nothing happens after a call is made?
Make sure you call `BasicJsonPatch#apply()` before you return within the resource.

repository: devinrsmith/dropwizard-patch

repo_name: devinrsmith/dropwizard-patch


text:
---
layout: post
title:      "Types of for Loops"
date:       2020-12-11 14:56:31 +0000
permalink:  types_of_for_loops
---

This week I spent some time working through different iterators and have spent some time looking into what makes each unique.  During your time at Flatiron there is a high liklihood you'll see a section on the difference between forEach and .map for example.  This is going to wind up being important because of all of the types of interators JS offers you.  The two I will be focusing on here are

> for (let index = 0; index < array.length; index++) {
>     const element = array[index];
> }

And

> for (let x of Array) {
>     console.log(x)
> }

There is a key difference here and it is a functional one.  With the array above you can indicate positions in the array you're iterating through in an effort to specifically modify elements.  The second loop just has you move through each stage in the array and is much more akin to something like .map.

extension: markdown


text:
# point_based_interpolated
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/hydrogeohc/point_based_interpolated/master)
This repo includes clean data and spatial interpolation codes for hydrologic data in Python and R
![alt text](https://github.com/hydrogeohc/point_based_interpolated/blob/master/workflow1.png)
Results
![alt text](https://github.com/hydrogeohc/point_based_interpolated/blob/master/Comparion_1.png)


text:
# ReportGenerator
*ReportGenerator* converts XML reports generated by OpenCover, dotCover, Visual Studio, NCover, Cobertura, JaCoCo or Clover into human readable reports in various formats.

Author: Daniel Palme
Blog: [www.palmmedia.de](http://www.palmmedia.de)
Twitter: [@danielpalme](https://twitter.com/danielpalme)

## Usage
To learn how to use *ReportGenerator* have a look at the:
* [Usage Guide](https://danielpalme.github.io/ReportGenerator/usage.html)
* [Command line parameters](https://github.com/danielpalme/ReportGenerator/#usage)

## Screenshots
The screenshots show two snippets of the generated reports:
![Screenshot 1](img/screenshot1.png)
![Screenshot 2](img/screenshot2.png)

repository: sonercelix/ReportGenerator

repo_name: sonercelix/ReportGenerator


text:
# Data Factory - SSIS integration runtime

Creates an SSIS integration runtime within a Data Factory.
Depends on the Data Factory being already deployed, eg using the datafactory.json template.

Please note that SSIS integration runtime is created in a stopped state, and needs starting before it can be used.
This is a currently a manual process via the Azure Data Factory instance website.

## Parameters

DataFactoryName: required (string)
The name of the Data Factory instance to deploy the SSIS rumtime to.

RuntimeName:  required (string)
The name of the SSIS runtime instance to create.

RuntimeDescription:  required (string)
The description for the SSIS runtime instance.

NodeSize: required (string)
The size of node to run the integration runtime upon.
Must match one of the Azure VM sizes.

NodeCount: optional (int)
The number of nodes to run.
Defaults to 2 if not otherwise specified.

MaxConcurrentJobsPerNode: optional (int)
The maximum number of concurrent jobs to run on each node simultaneously.
Defualts to 8.

CatalogServerEndpoint: required (string)
The name of the SQL Server containing the SSIS catalog.

CatalogServerAdminUsername: required (string)
The name of the admin user to connect to the SSIS catalog with.

CatalogServerAdminPassword: required (string)
The password for the admin user to connect to the SSIS catalog with.

repository: SkillsFundingAgency/dfc-devops

gha_language: PowerShell

repo_name: SkillsFundingAgency/dfc-devops


text:
certsrvhelper
======

This is a little extension to the Microsoft Active Directory Certificate Services web page (certsrv), that adds an option to print the ASN1 content of the certificate request you're about to submit.

![bilde](https://raw.githubusercontent.com/magnuswatn/certsrvhelper/master/picture.png)

This saves you a trip to the command line, just to check that the CSR is correct.

It also lets you show the newly issued certificate in the browser, without downloading it first.

![bilde2](https://raw.githubusercontent.com/magnuswatn/certsrvhelper/master/picture2.png)

Saves you a download!

## installation

Clone the repo to the server running certsrv, and run the install.ps1 script as Administrator. Probably take a full backup beforehand.

## uninstallation

Just uninstall the "Certificate Authority Web Enrollment" Role Service, and delete the certsrvhelper folder from C:\Windows\System32\certsrv\en-US. And then install the Role Service again. That should fix everything.

## disclaimer

It's quite hackish and it modifies files that only Microsoft should touch. I wouldn't use it if I were you.

## asn1js

It's the great [asn1js](https://lapo.it/asn1js/) library that is used for the parsing. It has the following licence:

ASN.1 JavaScript decoder Copyright (c) 2008-2014 Lapo Luchini<EMAIL_ADDRESS>
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

license: ISC,MIT

repository: magnuswatn/certsrvhelper

detected_licenses: ISC MIT

repo_name: magnuswatn/certsrvhelper


text:
# IPFS Extended
This docker image is roughly the same as the official docker image.
Only it adds a few flags to the startup command. Namely: `--enable-pubsub-experiment` and `--enable-namesys-pubsub`.

# Build instructions
Just run:
`docker build -t ipfs_extended --no-cache --pull .`

Or pull from docker hub using:
`docker pull markg85/ipfs_extended`

# Running
Follow the documentation from the official docker image to run it.
See https://hub.docker.com/r/ipfs/go-ipfs

branch_name: refs/heads/main


text:
# Changelog

## [2.2.0](https://github.com/mahsumurebe/jrpc-server/tree/2.2.0) (2022-11-08)

[Full Changelog](https://github.com/mahsumurebe/jrpc-server/compare/2.1.1...2.2.0)

**Merged pull requests:**

- update @mahsumurebe/jrpc-client package for tests [\#13](https://github.com/mahsumurebe/jrpc-server/pull/13) ([mahsumurebe](https://github.com/mahsumurebe))
- fix TS2345 problem [\#12](https://github.com/mahsumurebe/jrpc-server/pull/12) ([mahsumurebe](https://github.com/mahsumurebe))

## [2.1.1](https://github.com/mahsumurebe/jrpc-server/tree/2.1.1) (2022-11-06)

[Full Changelog](https://github.com/mahsumurebe/jrpc-server/compare/1.1.3...2.1.1)

**Merged pull requests:**

- update workflow [\#11](https://github.com/mahsumurebe/jrpc-server/pull/11) ([mahsumurebe](https://github.com/mahsumurebe))
- V2 [\#10](https://github.com/mahsumurebe/jrpc-server/pull/10) ([mahsumurebe](https://github.com/mahsumurebe))
- V2 [\#9](https://github.com/mahsumurebe/jrpc-server/pull/9) ([mahsumurebe](https://github.com/mahsumurebe))
- update README.md [\#8](https://github.com/mahsumurebe/jrpc-server/pull/8) ([mahsumurebe](https://github.com/mahsumurebe))
- update v2 [\#7](https://github.com/mahsumurebe/jrpc-server/pull/7) ([mahsumurebe](https://github.com/mahsumurebe))
- add npm-publish.yml workflow [\#6](https://github.com/mahsumurebe/jrpc-server/pull/6) ([mahsumurebe](https://github.com/mahsumurebe))
- update readme [\#5](https://github.com/mahsumurebe/jrpc-server/pull/5) ([mahsumurebe](https://github.com/mahsumurebe))

## [1.1.3](https://github.com/mahsumurebe/jrpc-server/tree/1.1.3) (2021-01-01)

[Full Changelog](https://github.com/mahsumurebe/jrpc-server/compare/b59e7867e3a48e67dc21b8c909d15675200fd275...1.1.3)

**Closed issues:**

- Vulnerability in acorn, depency of jest version used in jrpc-server [\#2](https://github.com/mahsumurebe/jrpc-server/issues/2)

**Merged pull requests:**

- Update readme [\#4](https://github.com/mahsumurebe/jrpc-server/pull/4) ([mahsumurebe](https://github.com/mahsumurebe))
- Bumped 1.1.0 [\#3](https://github.com/mahsumurebe/jrpc-server/pull/3) ([mahsumurebe](https://github.com/mahsumurebe))

\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

repository: mahsumurebe/jrpc-server

gha_language: TypeScript

repo_name: mahsumurebe/jrpc-server


text:
---
description: ''
sidebar: 'docs'
prev: '/docs/deployments/troubleshooting/'
next: '/docs/custom-domains/troubleshooting/'
---

# Setup with Hover

1. Go ahead and login to your Hover dashboard. You'll see something like this. Click the link of your Domain you want to use.

2. There's a lot of information here about your domain. Look for the DNS tab and click it.

3. Here's where we adjust your settings. Click Add New to expand the DNS options area.

4. But first, you need to grab the IP address from Forge. Head back to Forge and note the IP address marked in green. Important to get this right, so do it carefully.

5. Finally, make your Hover settings look like this. The @ line should point to the IP address you just noted down, with an A Record. Hit Save. This can be a bit confusing, but don't worry. The @ is your root domain, e.g. http://yoursite.com


text:
# groovyservlet-sample-template

groovyservlet-sample-template is a simple source code template for Servlet programming with Groovy.
If you want some light-weight web application framework, this template will be a good answer.

## quick start

1. Run ```gradle tomcatRun```.
2. Put ```xxxx.groovy``` or copy sample files under ```src/main/webapp/```.
3. Open browser, access to ```http://localhost:8090/xxxx.groovy```.
4. NO NEED to restarting groovy neither tomcat.

## how to customize

1. Read ```src/main/groovy/gsst/ToolKit.groovy```, and hack it. :)

## notes

1. If you want to add some little bit complicated class libraries, You can put and use Groovy/Java classes under ```src/main/groovy|java/``` directory. These sources are compiled and put to ```src/main/webapp/WEB-INF/classes/```, so, you can import that in xxxx.groovy. Of course, it is also possible to use your favorite external libraries by embedding dependencies in ```build.gradle```.
2. This sample uses mustache/Hogan.groovy as view component. If you prefer other template engine, you can put it.
3. If you want more functional web application frameworks, we'll recommend other heavy-weight web application frameworks such as Grails, Spring, Play framework, e.t.c.


text:
# gcf-ddns

Implementation of DynDns update protocol as a Google Cloud Function to
dynamically update records in Google Cloud DNS.

## Usage

Rename `domains.sample.json` to `domains.json` and edit accordingly with your
Google Cloud project, domain, zone name, and dynamic records with credentials of
your choosing.

### Run locally before deploying

`npm install` to pull in dependencies.

#### Create Service Account and its key

You will need to create a service account and a key for it to be able to access
Cloud DNS API and make changes locally.

```
$ gcloud iam service-accounts create \
<EMAIL_ADDRESS>
$ gcloud projects add-iam-policy-binding YOUR_PROJECT_ID \
  --member<EMAIL_ADDRESS>\
  --role roles/dns.admin

$ gcloud iam service-accounts keys create \
  dnsadmin.creds.json \
  --iam-account<EMAIL_ADDRESS>```

#### Start the emulator

Use `npm start` to start the local Cloud Functions emulator and deploy the
function under `/nic`.
```
$ GOOGLE_APPLICATION_CREDENTIALS=dnsadmin.creds.json npm start
```

### Deploy to Production

`npm run-script deploy-prod` will use `gcloud` command and deploy the function
to production.

## Test

There are no unit or integration tests, yet.
In the mean time, you can "test in production" just with `curl`.

```
# Set an IPv6 address for test.example.com
$ curl -u test_username:test_password \
  'https://us-central1-YOUR_PROJECT_ID.cloudfunctions.net/nic/update?hostname=test.example.com&myip=2001:DB8:7357::bdd'

# Set the IPv4 address of test.example.com to client IP
$ curl -4 -u test_username:test_password \
  'https://us-central1-YOUR_PROJECT_ID.cloudfunctions.net/nic/update?hostname=test.example.com'
```

## Logs

Both success and failure logs of the function goes to its console. You can read
them from the local emulator with `functions read logs`, and from production
with `gcloud beta functions logs read` commands.

repository: gclawes/gcf-ddns

repo_name: gclawes/gcf-ddns


text:
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---

**Describe the bug**

A clear and concise description of what the bug is.

**To Reproduce**

Steps to reproduce the behavior:

1. Run '...'
2. Type '....'
3. Observe '....'

**Expected behavior**

A clear and concise description of what you expected to happen.

**Screenshots**

If applicable, add screenshots to help explain your problem.

**Environment (please complete the following information):**

- OS: [e.g. Windows]
- OS Version: [e.g. 1903]
- Deno Version [e.g. 0.10.0]

**Additional context**

Add any other context about the problem here.

repository: dev-nicolaos/sw-trivia

repo_name: dev-nicolaos/sw-trivia


text:
## Date/Time input
Enter formatted date and time without pickers.

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

**Version 2 contains breacking changes.**

For the demo and docs please visit https://ua9msn.github.io/datetime

### What is it
The jQuery plugin which makes date/time input from text one.
Inspired by "dateentry" plugin http://keith-wood.name/timeEntry.html

### Why is it
The mentioned above plugin is outdated. I tried to use it with a webpack, and failed.
It use some kind a plugin wrapper which is not used anywhere else and, in my opinion, adds extra complexity.

### Why jQuery and not React
Just because i need jQuery. When i need react, i'll add the branch.

### What is inside
Instead of create huge data file with day names, month names, etc. I use Intl inside.
So all languages supported by Intl, should be ready to use without any twitches.

Meanwhile, internally, this code doesn't use jQuery, i need jQuery only as interface to attach the plugin to input.

### What's next

 * Add step option
 * Add ERA support
 * Increase test coverage
 * Optimize code

repository: phistuck/datetime

repo_name: phistuck/datetime


text:
# Contractual Profit Splitting
The following repository is to show the skills and understanding of creating a contract using Solidity from the lectures taught by the Rice University FinTech Bootcamp and 2U.[1]

---

## Table of contents
* [General Information](#general-information)
* [Screenshots](#screenshots)
* [Dependencies](#dependencies)
* [Installation Guide](#installation-guide)
* [Code Examples](#code-examples)
* [Usage](#usage)
* [Sources](#sources)
* [Status](#status)
* [Contributors](#contributors)

---

## General Information

Our company created its own Ethereum-compatible blockchain and wants to use the technology to connect financial institutions while increasing transparency and automating accounting and auditing.  Three profit splitting contracts are listed below.  While only one is required for completion of the the assignment, all three can be completed if there is enough time.

* Pay your Associate-level employees quickly and easily.

* Distribute profits to different tiers of employees.

* Distribute company shares for employees in a "deferred equity incentive plan" automatically.[1]

---

## Screenshots

* Value of accounts before deposit

![Value of accounts before deposit](./images/associate_profit_splitter_before_payout.png)

* Transaction confirmation

![Transaction confirmation](./images/associate_profit_splitter_transaction_confirmation.png)

* Value of accounts after deposit

![Value of accounts after deposit](./images/associate_profit_splitter_after_payout.png)

---

## Dependencies

* Ganache 2.5.4+
    * Create a workspace configured for ETH and localhost:8545
    * Create three addresses with prefunded balances

* MetaMask 9.0.4+
    * Import the same three addresses created in Ganache
    * Configure the same network as used previously with Ganache

* Remix
    * A [Remix Ethereum](http://remix.ethereum.org) account must be created to run the Solidity contract file

---

## Installation Guide

1. Download the entire repository

2. Make sure the [dependencies](#dependencies) are configured before moving to the next step

3. Open Remix and import the [AssociateProfitSplitter](AssociateProfitSplitter.sol) file

*See the [Usage](#usage) section below for instructions to run the notebook.

---

# Code Examples

* Deposit function

```solidity
function deposit() public payable {
        // split `msg.value` into three
        uint amount = msg.value / 3;

        // Transfer the amount to each employee
        employeeOne.transfer(amount);
        employeeTwo.transfer(amount);
        employeeThree.transfer(amount);

        // take care of a potential remainder by sending back to HR (`msg.sender`)
        msg.sender.transfer( (msg.value - (amount * 3)) );
    }
```

---

## Usage

1. Open Ganache and start your preconfigured workspace

2. Open your web browser and make sure MetaMask is logged in with your Ganache workspace select as the network to use.

3. Open Remix and compile the AssociateProfitSplitter.sol file by selecting the Compile button from the Solidity Compiler option in the left navigation bar.

4. Once compiled, click the Deploy & Run Transaction option in the left navigation bar of Remix (keep in mind, the option might be labeled something different as the site is enhanced over time).

5. Choose "Injected Web3" from the Environment drop down menu and choose "ether" in the Value drop down menu.  (leave the numerical value 0, zero, for deployment).

6. MetaMask will ask for confirmation of the accounts to use and the deployment.  Check the three accounts preconfigured and confirm the configuration.

7. Click the Deploy button in Remix to deploy the contract configuration.

8. Try using the contract by entering the employee addresses, specifying a Value of ether to deposit and dispurse and then clicking the Deposit button futher down the page.

9. The Value specified by the account depositing money, Human Resources or another account, will be divided by three, each division will be transferred to an identified employee's address, and any remainder left over after the division will be returned to the sender depositing the funds.

10. You should see the accounts change values and evenly dispurse funds between the three accounts while returning the remainder to "Human Resources"/the original account making the deposit.  Success!!

The following is a short clip of the usage steps mentioned above.  It starts by showing the three accounts used in Ganache and MetaMask.  Enjoy!

![Associate Profit Splitter](./images/associate_profit_splitter.gif)

---

## Sources

- [1] https://rice.bootcampcontent.com/Rice-Coding-Bootcamp/rice-hou-fin-pt-09-2020-u-c/tree/master/hw/20-Solidity/Instructions

---

## Status

Project is: _Complete_

---

## Contributors

* Jonathan Owens
* LinkedIn: www.linkedin.com/in/jonowens

repository: jonowens/profitsplitter

repo_name: jonowens/profitsplitter


text:
# Work with an interactive map layer

This example shows how to read data from and write it to an interactive map layer on Node.js using HERE Data SDK for TypeScript.

## Build and run an app on Node.js

Before you build an app, make sure that you installed all of the dependencies.

**To build and run an app on Node.js:**

1. Create an npm project.

   ```shell
   mkdir example-app && cd example-app && npm init
   ```

2. Initialize a TypeScript project.

   ```shell
   tsc --init
   ```

3. Install node types.

   ```shell
   npm install --save-dev @types/node
   ```

4. Install the SDK modules.

   ```shell
   npm install --save @here/olp-sdk-authentication @here/olp-sdk-dataservice-api
   ```

   Now, everything is set to create the app.

5. Create the `index.ts` file and app skeleton.

   ```typescript
   /**
    * An example of the Node.js app used for reading data from and writing it to an interactive map layer in the datastore.
    */

   class App {
     run() {
       console.log("App works!");
     }
   }

   const app = new App();
   app.run();
   ```

6. Compile and run the app.

   ```shell
   tsc && node .
   ```

After a successful run, the console displays the following message:

```shell
App works!
```

## Create `RequestBuilder`

You need `RequestBuilder` to use the `InteractiveApi` functions from `@here/olp-sdk-dataservice-api`.
You can use the `InteractiveApi` functions to request any data from an [interactive map layer](https://developer.here.com/documentation/data-user-guide/user_guide/portal/layers/layers.html#interactive-map-layers).

**To create the `RequestBuilder` instance:**

1. Create the `OlpClientSettings` object.

   For instructions, see Create platform client settings.

2. Create the `RequestBuilder` instance with `RequestFactory` that contains the catalog HRN, platform client settings from step 1, API name, and API version.

   ```typescript
   const requestBuilder = await RequestFactory.create(
     "interactive",
     "v1",
     settings,
     HRN.fromString("your-catalog-HRN")
   );
   ```

## Get data from an interactive map layer

Each [interactive map layer](https://developer.here.com/documentation/data-user-guide/user_guide/portal/layers/layers.html#object-store-layers) has a different set of features that you can request and use to work with map data.

You can request one or several features of the interactive map layer using their IDs, tiles that contain them, a bounding box, spatial search, search, iteration, and statistics.

> #### Note
>
> When you request features from the interactive map layer, you get `FeatureCollection` even if the request returns only one feature or there are no features found.

The interactive API supports the following tile types:

- `web` – for the Mercator projection (used by OpenStreetMap, Google Maps, and Bing Maps). Format: `level_x_y`. For example, `10_100_100` means level 10, x-coordinate 100, and y-coordinate 100.

- `tms` – for the Tile Map Service specification developed by the Open Source Geospatial Foundation. Format: `level_x_y`. For example, `10_100_100` means level 10, x-coordinate 100, y-coordinate 100.

- `quadkey` – for quadtree keys used by Bing Maps (formerly Virtual Earth). For example,<PHONE_NUMBER> is a quadkey for the level 10 tile.

- `here` – for the HERE tiling schema.

**To get features from the interactive layer:**

1. Create the `RequestBuilder` object.

   For instructions, see [Create RequestBuilder](#create-requestbuilder).

2. Depending on what you want to use to get features, do one of the following:

   - To get one feature using its ID, call the `getFeature` function with the request builder, feature ID, and layer ID.

     ```typescript
     const result = await InteractiveApi.getFeature(requestBuilder, {
       id: "your-feature-id",
       layerId: "your-layer-id",
     });
     ```

   - To get more than one feature using their IDs, call the `getFeatures` function with the request builder, feature IDs, and layer ID.

     ```typescript
     const result = await InteractiveApi.getFeatures(requestBuilder, {
       id: "your-feature1-id,your-feature2-id",
       layerId: "your-layer-id",
     });
     ```

   - To get features using a bounding box, call the `getFeaturesByBBox` function with the request builder, feature IDs, and layer ID.

     ```typescript
     const result = await InteractiveApi.getFeaturesByBBox(requestBuilder, {
       bbox: "13.082,52.416,13.628,52.626", // Bounding box of Berlin
       layerId: "your-layer-id",
     });
     ```

   - To get features using a tile, call the `getFeaturesByTile` function with the request builder, feature IDs, and layer ID.

     ```typescript
     const result = await InteractiveApi.getFeaturesByTile(requestBuilder, {
       tileType: "your tile type",
       layerId: "your-layer-id",
       tileId: "your-tileId",
       params: "your-params-string",
     });
     ```

   - To get features using the spatial search, call the `getFeaturesBySpatial` or `getFeaturesBySpatialPost` functions.

     With the spatial search, you can find all features around a given position or in a given region. For more information, see [Spatial search for features](https://developer.here.com/documentation/data-api/data_dev_guide/rest/getting-interactive-spatial.html) in the Data API Guide.

   - To get features using the search, call the `searchFeatures` function.

     For more information, see [Searching for features](https://developer.here.com/documentation/data-api/data_dev_guide/rest/getting-interactive-search.html) in the Data API Guide.

   - To get features using iteration, call the `iterateFeatures` function.

     You get an ordered set of features, and none of them is returned twice. For more information, see [Iterating features](https://developer.here.com/documentation/data-api/data_dev_guide/rest/getting-interactive-iterate.html) in the Data API Guide.

   - To get features using statistics, call the `getStatistics` function with the ID of the layer.

     ```typescript
     const result = await InteractiveApi.getStatistics(requestBuilder, {
       layerId: "your-layer-id",
     });
     ```

## Update data and publish it to an interactive map layer

You can update existing features in an interactive map layer or publish new ones.

**To update and publish features:**

1. Create the `RequestBuilder` object.

   For instructions, see [Create RequestBuilder](#create-requestbuilder).

2. Call the `patchFeature`, `postFeatures`, `putFeature`, or `putFeatures` functions.

   For more information, see [Update data in an interactive map layer](https://developer.here.com/documentation/data-api/data_dev_guide/rest/updating-data-interactive.html) and [Publish to an interactive map layer](https://developer.here.com/documentation/data-api/data_dev_guide/rest/publishing-data-interactive.html) in the Data API Guide.

## Delete data from an interactive map layer

You can delete features from an interactive map layer when you no longer need them.

1. Create the `RequestBuilder` object.

   For instructions, see [Create RequestBuilder](#create-requestbuilder).

2. Call the `deleteFeature` or `deleteFeatures` functions.

   For more information, see [Delete data from an interactive map layer](https://developer.here.com/documentation/data-api/data_dev_guide/rest/deleting-data-interactive.html) in the Data API Guide.

repository: here-kulkarni/here-data-sdk-typescript

repo_name: here-kulkarni/here-data-sdk-typescript


text:
Using the Homegirl console
==========================
To use Homegirl, download and extract the zip file. If you're on Windows, run `homegirl_windows.exe`, else run `homegirl.sh`.

Keyboard hotkeys
----------------
Key | Action
----|---------
Ctrl+F4 | Kill the program of the front-most screen (unless it's the main screen).
F7      | Auto-resize and center window
F8      | Sync audio buffer
F9      | Toggle CRT filter
F11     | Toggle Fullscreen
F12     | Open config folder

Configuration
-------------
Homegirl is configured with a config file, discovered in the following order:

 1. specified as a command line argument. (filename has to end with `.json`)
 2. `homegirl.json` in the current working directory.
 3. `%APPDATA%\Homegirl\config.json` if on Windows.
 4. `~/.config/Homegirl/config.json` or `config.json` in the current working directory if no home directory can be found.

If a config file can't be found, a default file will be created.

branch_name: refs/heads/dev

gha_language: Lua


text:
# Landing Page

multi-section landing page. Often times, we don’t know how much content will be added to a page through a CMS or an API. To circumvent this problem, we can dynamically add the content to the page. We will be demonstrating this with the navigation menu

  [![GitHub contributors](https://img.shields.io/github/contributors/fuboki10/landing-page)](https://github.com/fuboki10/landing-page/contributors)
  [![GitHub issues](https://img.shields.io/github/issues/fuboki10/landing-page)](https://github.com/fuboki10/landing-page/issues)
  [![GitHub forks](https://img.shields.io/github/forks/fuboki10/landing-page)](https://github.com/fuboki10/landing-page/network)
  [![GitHub stars](https://img.shields.io/github/stars/fuboki10/landing-page)](https://github.com/fuboki10/landing-page/stargazers)
  [![GitHub license](https://img.shields.io/github/license/fuboki10/landing-page)](https://github.com/fuboki10/landing-page/blob/main/LICENSE)

# Demo-Preview

# Table of contents

- [Landing Page](#landing-page)
- [Demo-Preview](#demo-preview)
- [Table of contents](#table-of-contents)
- [Installation](#installation)
- [Usage](#usage)
- [Development](#development)
- [Contribute](#contribute)
    - [Sponsor](#sponsor)
    - [Adding new features or fixing bugs](#adding-new-features-or-fixing-bugs)
- [License](#license)
- [Contributers](#contributers)

# Installation

[(Back to top)](#table-of-contents)

1. Clone the repo

```sh
git clone https://github.com/fuboki10/landing-page
```

2. Open `index.html` in your favourite browser

# Usage

[(Back to top)](#table-of-contents)

# Development

[(Back to top)](#table-of-contents)

After Instaliation feel free to edit `index.html` for the main project skeleton, `css/styles.css` for page style and `js/app.js` for dynamic page logic.

# Contribute

[(Back to top)](#table-of-contents)

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.

1. Fork the Project
2. Create your Feature Branch (`git checkout -b AmazingFeature-Feat`)
3.  Push to the Branch (`git push origin AmazingFeature-Feat`)
5. Open a Pull Request

### Sponsor

[(Back to top)](#table-of-contents)

### Adding new features or fixing bugs

[(Back to top)](#table-of-contents)

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.

1. Fork the Project
2. Create your Feature Branch (`git checkout -b AmazingFeature-Feat`)
3.  Push to the Branch (`git push origin AmazingFeature-Feat`)
5. Open a Pull Request

# License

[(Back to top)](#table-of-contents)

Distributed under the MIT License. See `LICENSE` for more information.

# Contributers

Abdelrahman Tarek


text:
# Tuya Smart iOS Lighting SDK Release Notes

## V0.1.2

### Release date

2021.03.24

- Update podspec.
- Update documentation.

## V0.1.1

### Release date

2021.01.13

### New features

- Get how many lights the current device is.
- Get the value of all function points of the lamp.
- Lights control functions.

<div>
        © 2014 - 2021 Tuya Inc. All Rights Reserved.
</div>


text:
# Laravel Route File Macro

[![Latest Version on Packagist](https://img.shields.io/packagist/v/kirschbaum-development/laravel-route-file-macro.svg?style=flat-square)](https://packagist.org/packages/kirschbaum-development/laravel-route-file-macro)
[![Total Downloads](https://img.shields.io/packagist/dt/kirschbaum-development/laravel-route-file-macro.svg?style=flat-square)](https://packagist.org/packages/kirschbaum-development/laravel-route-file-macro)

This package allows you to load a routes file directly from the Laravel `Router`.

## Requirements

This package requires Laravel 5.7 or higher.

__Due to Laravel 7's PHP version requirement, if you need support for PHP 7.1, please use version 0.2 of the package.__

## Installation

You can install this macro via composer:

```bash
composer require kirschbaum-development/laravel-route-file-macro
```

## Usage

### Single Item

`Route::file` accepts a single file path or `SplFileInfo` object and cannot be used with multiple paths or file objects.

```php
Route::file(base_path('routes/admin/users.php'));

$files = File::files(__DIR__.'/routes');
Route::files($files[0]);
```

### Multiple Items

`Route::files` accepts an array of file paths or an array of `SplFileInfo` objects and cannot be used with a single path or file object.

```php
Route::files([
    base_path('routes/admin/posts.php'),
    base_path('routes/admin/users.php')
]);

$files = File::files(__DIR__.'/routes');
Route::files($files);
```

## Changelog

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

## Contributing

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

### Security

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

## Credits

- [David VanScott](https://github.com/dvanscott)
- [Justin Seliga](https://github.com/jrseliga)

## Sponsorship

Development of this package is sponsored by Kirschbaum Development Group, a developer driven company focused on problem solving, team building, and community. Learn more [about us](https://kirschbaumdevelopment.com) or [join us](https://careers.kirschbaumdevelopment.com)!

## License

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

gha_language: PHP


text:
---
title: Organization
keywords:
tags: [Organization.md]
sidebar: documentation_guide
summary:
---

## Organization of documentation

This documentation is organized with following two main sections
* Kratos
* Applications

### Kratos

In the **Kratos** section of the documentation, the **Kratos** core component documentation is found. It is furthe sub-divided in to three.
* For Users
* For Developers
* Debugging
* Documentation Guide

#### For Users

This section contains documentation content tailored for users of the Kratos. These users may be having understanding of using Kratos with *GiD*, *json* or *python* level.

#### For Developers

This section focuses on having documentation tailored for developers of the Kratos. These users may be having understanding of using Kratos with *GiD*, *json*, *python*, *C++* level.

#### Debugging

This section focuses on debugging Kratos. This is tailored for both users and developers.

#### Documentation Guide

This section focuses on advising Kratos users and developers on documenting Kratos.

### Applications

This will consist of list of applications for which the users and developers have created documentation content. Each application should have their own documentation content.

## Navigation

This documentation is placed under *docs* folder of the Kratos Multiphysics github repository. The content creators are allowed only to change content under the *docs/pages* only. Rest of the content will be automatically generated based on the content placed in the folder *docs/pages*.

There are two navigation bars in this documentation. One is the top navigation bar which is kept constant. The second is the side navigation bar which can be modified as per content creators requirements.

### Top navigation bar

The top navigation bar consist of few elements which corresponds to folders found in *docs/pages* and content found in *docs/pages/menu_info.json". This structure is not to be changed.

### Side navigation bar

Side navigation bars can be found in each content page. Creation of these side bar navigation entries are automated and can be controlled by having "menu_info.json" file in each folder.

repository: KratosMultiphysics/Kratos

gha_license_id: NOASSERTION

repo_name: KratosMultiphysics/Kratos


text:
Power manangement
------

An easy way to switch between AC and BAT on thinkpad lenovo, using obkey

Usage
-----
Add two keyboard shortcuts, using [obkey](https://aur.archlinux.org/packages/obkey/), one to set power management to **AC** and one to set it to **BAT**

For example add `CTRL+SHIFT+A` for **AC** and `CTRL+SHIFT+B` for **BAT**

Script is just one liner: `sudo tlp $1 ; notify-send Power "Set to $1"`

Battery status tray icon
-----

Using `batterymon` from AUR

repository: GhostsOfHiroshima/linux-config

repo_name: GhostsOfHiroshima/linux-config


text:
# Introduction

A [cookiecutter](https://github.com/audreyr/cookiecutter) for [Flask](http://flask.pocoo.org).

# Topics

- [Features](#features)
- [Quick start](#quick-start)
- [Usage](#usage)

## Features

  * For Flask 0.10.1
  * Twitter [Bootstrap](http://getbootstrap.com) 3
  * Customized user registration
  * Gulp w/ Webpack integration
  * Logging configured via structlog
  * Automatic pyenv-virtualenv creation
  * Automatic teamocil file
  * Konch configuration

# Quick start

```
$ pip install cookiecutter
$ cookiecutter https://github.com/ryankanno/cookiecutter-flask
```

# Usage

To create your database:
  * `python manage.py createdb`

To drop your database:
  * `python manage.py dropdb`

To drop your database (without a prompt):
  * `python manage.py dropdb --force`

repository: ryankanno/cookiecutter-flask

repo_name: ryankanno/cookiecutter-flask


text:
    Build websites even faster with components on top of Tailwind CSS

    <img <EMAIL_ADDRESS>alt="Total Downloads">
    <img<EMAIL_ADDRESS>alt="Latest Release">

------

## Documentation

For full documentation, visit [flowbite.com](https://flowbite.com/).

## Getting started

Flowbite can be included as a plugin into an existing Tailwind CSS project and it is supposed to help you build websites faster by having a set of web components to work with built with the utility classes from Tailwind CSS.

👉 [See all components](https://flowbite.com/docs/components/alerts/)

### Require via NPM

Make sure that you have Node.js and Tailwind CSS installed.

1. Install Flowbite as a dependency using NPM by running the following command:

```bash
npm i @themesberg/flowbite
```

2. Require Flowbite as a plugin inside the `tailwind.config.js` file:

```javascript
module.exports = {

    plugins: [
        require('@themesberg/flowbite/plugin')
    ]

}
```

3. Include the main JavaScript file to make interactive elements work:

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

If you use Webpack or other bundlers you can also import it like this:

```javascript
import '@themesberg/flowbite';
```

### Include via CDN

The quickest way to get started working with FlowBite is to simply include the CSS and JavaScript into your project via CDN.

Require the following minified stylesheet inside the `head` tag:

```html
<link rel="stylesheet" href="https://unpkg.com/<EMAIL_ADDRESS>/>
```

And include the following javascript file before the end of the `body` element:

```html
<script src="https://unpkg.com/<EMAIL_ADDRESS>```

## Community

If you need help or just want to discuss about the library join the community on Github:

[Discuss about Flowbite on GitHub](https://github.com/themesberg/flowbite/discussions)

For casual chatting with others using the library:

[Join the Flowbite Discord Server](https://discord.com/invite/4eeurUVvTy)

repository: programine-it/flowbite

repo_name: programine-it/flowbite


text:
# DOM Atomic 02: Hide Many Elements

## Questions

---

> How did you go about selecting the DOM elements to hide? Describe the "contract" for that function.

Paslēpjamie DOM elementi tika izvēlēti pēc to klases izmantojot getElementsByClassName.

---

> Describe how you were able to hide each element. Were you able to do it as one operation, or did you use a loop of some kind? Describe the "contracts" that were utilized to accomplish your goal.

repository: IvarsLevans/Labots-javascript-DOM

repo_name: IvarsLevans/Labots-javascript-DOM


text:
# Providers <Badge text="Experimental" type="warn"/> <Badge text="0.13+"/>

**Providers** solve the problem of injecting reusable resources into HTTP and WebSocket views in an explicit, modular and async-capable manner, without having to rely on global variables or numerous import statements.

In practice, you can view providers as a **runtime dependency injection system**.

The API for providers was heavily influenced by [pytest fixtures](https://docs.pytest.org/en/latest/provider.html), so it should feel fairly familiar. Also, their core implementation was extracted into a separate, officially supported package: [aiodine](https://github.com/bocadilloproject/aiodine).

## Example

Suppose we want to implement a cache system backed by [Redis](https://redis.io), a distributed key-value store, using the [aioredis](https://github.com/aio-libs/aioredis) library. How would we make a Redis connection available to views?

The naive solution would be to create a `redis` global variable, initially `None`, and then use [lifespan handlers](/guide/apps.md#lifespan-events) to give it a value on app startup. It's hacky, and definitely not very testable. Instead, let's use providers!

Let's start by adding a `REDIS_URL` setting to the settings module:

```python
# myproject/settings.py
from starlette.config import Config

config = Config(".env")

PROVIDER_MODULES = ["myproject.providerconf"]
REDIS_URL = config("REDIS_URL", default="redis://localhost")
```

We can now define the `redis` provider. Since we registered `myproject.providerconf` in `PROVIDER_MODULES`, let's place the provider there:

```python
# myproject/providerconf.py
import aioredis
from bocadillo import provider, settings

@provider
async def redis():
    conn = await aioredis.create_redis(settings.REDIS_URL)
    yield conn
    await conn.wait_closed()
```

Thanks to this code, if a request is made to your application, and the view asked for the `redis` provider (more on that shortly), here's what happens:

1. Bocadillo executes everything above the `yield` statement. In this case, it connects to Redis and creates the connection object.
2. The `yield`ed object (here, the Redis connection) is passed to the view as a keyword argument.
3. When the view has finished (and even if an exception occurred), Bocadillo executes everything after the `yield` statement. In this case, it closes the Redis connection.

::: tip
It is not mandatory that a provider uses `yield`. If no cleanup is required, it can also simply `return`:

```python
@provider
async def hello():
    return "Hello, world!"
```

:::

Now, how can we use the `redis` provider in a view?

Simple enough: **by declaring it as a view parameter**.

```python
# myproject/app.py
@app.route("/value")           👇
async def get_value(req, res, redis):
    value = await redis.get("some-key")
    if value is None:
        value = 42
        await redis.set("some-key", value)
    res.json = {"value": value}
```

An important principle behind providers is _Define once, reuse everywere_: we could also access the Redis cache in other REST endpoints, or in a WebSocket endpoint:

```python
# myproject/app.py
@app.route("/valuefeed")  👇
async def value_feed(ws, redis):
    async for message in ws:
        value = await redis.get(message["key"])
        await ws.send({"value": value})
```

::: tip SEE ALSO
The [tutorial](/guide/tutorial.md) shows how to use providers and WebSocket to implement a real-time chatbot server.
:::

## Scopes

By default, a provider is computed on each request. But some providers are typically expansive to setup and teardown, or could gain from being reused across requests. In the previous example, we may want to reuse the Redis connection throughout the lifespan of the application.

For this reason, Bocadillo providers have two possible **scopes**:

- `request`: a new copy of the provider is computed for each HTTP request or WebSocket connection. This is the default behavior.
- `app`: the provided value is reused and shared between requests.

The `app` scope can be used to implement **long-lived objects**, i.e. objects which Bocadillo initialises and reuses for as long as the app is running.

For example, you could keep track of connected WebSocket clients via an app-scoped provider which initially returns an empty set:

```python
# myproject/providerconf.py
from bocadillo import provider

@provider(scope="app")
async def clients() -> set:
    return set()
```

and then register/unregister clients as they connect/disconnect to the WebSocket endpoint:

```python
# myproject/app.py
@app.websocket_route("/echo")
async def echo(ws, clients: set):
    clients.add(ws)
    try:
        async for message in ws:
            await ws.send(message)
    finally:
        clients.remove(ws)
```

## Modularity

Providers are **modular**, in the sense that **providers can be injected into other providers**. This allows to build an ecosystem of loosely-coupled, reusable resources.

A contrived example of this could be:

```python
# myproject/providerconf.py
from bocadillo import provider

@provider
async def message_format():
    return "{greeting}, {who}"

@provider
async def hello_message_format(message_format):
    return message_format.format(greeting="Hello")
```

As you can see, `hello_message_format` reuses the `message_format` provider.

## Auto-used providers

If you want the provider to be activated without explicitly declaring it as a parameter of a view, use `autouse=True`.

For example, you can make sure that database calls are always performed within a transaction. Using the [Databases](https://github.com/encode/databases) library, this could be implemented by creating a `db` provider first:

```python
# myproject/providerconf.py
from databases import Database
from bocadillo import provider

@provider(scope="app")
async def db() -> Database:
    async with Database("sqlite://:memory:") as db:
        yield db
```

And then creating another **auto-used provider** which automatically sets up a transaction:

```python
# myproject/providerconf.py
@provider(autouse=True)
async def transaction(db: Database):
    async with db.transaction():
        yield
```

## Decorator usage

If you don't actually need the value returned by the provider, you can decorate the consumer view with the `@useprovider` decorator:

```python
# myproject/providerconf.py
@provider(name="show_hello")
async def provide_show_hello():
    print("Hello, providers!")
```

```python
# myproject/app.py
@app.route("/hi")
@useprovider("show_hello")
async def say_hi(req, res):
    res.text = "A hello message was printed to the console."
```

::: tip

- The `@useprovider` decorator accepts a variable number of providers.
- Providers can be passed by name or by reference.

:::

## Factory providers

Factory providers are a **design pattern** that allows to build generic providers that can be used for a variety of inputs.

tl;dr: instead of returning a value, the provider returns a **function**.

As an example, let's build a factory provider that retrieves a note item from the database given its primary key. We'll use a hardcoded in-memory database of sticky notes for the sake of simplicity:

```python
# myproject/providerconf.py
from bocadillo import provider

@provider(scope="app")
async def notes():
    # TODO: get these from a database
    return [
        {"id": 1, "text": "Groceries"},
        {"id": 2, "text": "Make potatoe smash"},
    ]

@provider
async def get_note(notes):
    async def _get_note(pk: int) -> dict:
        note = next(note for note in notes if note["id"] == pk, None)
        if note is None:
            raise HTTPError(404, detail=f"Note with ID {pk} does not exist.")
        return note

    return _get_note
```

Example usage:

```python
# myproject/app.py
@app.route("/notes/{pk}")
async def retrieve_note(req, res, pk: int, get_note):
    res.json = await get_note(pk)
```

## How are providers discovered?

Bocadillo can find providers from a number of sources:

1. **(Recommended)** Functions decorated with `@provider` that live in a module listed in the `PROVIDER_MODULES` setting. This is what [Bocadillo CLI](https://github.com/bocadilloproject/bocadillo-cli) generates.

```python
# myproject/settings.py
PROVIDER_MODULES = ["myproject.providerconf", "myproject.more_providers"]
```

2. Functions decorated with `@provider` that live in a module marked for discovery using `discover_providers()`.

```python
# myproject/app.py
from bocadillo import discover_providers

discover_providers("myproject.more_providers")
```

3. Functions decorated with `@provider` that live in a `providerconf.py` module relative to the current working directory (note that this may be different from the directory where `app.py` is located).

```python
# providerconf.py
import random as _random
from bocadillo import provider

@provider
async def random() -> float:
    return _random.random()
```

4. Functions decorated with `@provider` present in the application script:

```python
# myproject/app.py
from bocadillo import App, provider

@provider
async def message():
    return "Hello, providers!"

app = App()

@app.route("/hello")
async def hello(req, res, message):
    res.json = {"message": message}
```

5. Functions decorated with `@provider` that get _imported_ in the application script:

```python
# myproject/messages.py
from bocadillo import provider

@provider
async def message():
    return "Hello, providers!"
```

```python
# myproject/app.py
from . import messages
```

## Naming providers <Badge text="Advanced" type="warn"/>

By default, a provider's name is the same as that of its defining function, but you can override it with the `name` parameter to `@provider`.

When the provider is declared and used _in the same file_, linters and IDEs may complain because of conflicting names. A good convention is then to name the provider function as `provide_{name}`. For example:

```python
@provider(name="hello")
async def provide_hello():
    return "Hello, providers!"
```

## Lazy evaluation <Badge text="Advanced" type="warn"/>

By default, Bocadillo awaits the coroutine returned by the provider before passing it to the view. (Note: if this is gibberish, take a look at the [Async crash course](/guide/async.md).)

If you need to defer awaiting the provider until you really need it, you can declare it as `lazy`. The following example uses the [requests-async](https://github.com/encode/requests-async) library:

```python
# myproject/providerconf.py
import requests_async as requests
from bocadillo import provider

@provider(lazy=True)
async def random_data():
    r = await requests.get("https://httpbin.org/json")
    return r.json()
```

```python
# myproject/app.py
@app.route("/data")
async def get_data(req, res, random_data: Awaitable[dict]):
    res.json = random_data
```

::: warning CAVEAT
Lazy providers can only be **request-scoped**. If they could be app-scoped, Bocadillo would have no way to know whether it has already been awaited when processing another request.
:::

repository: teaglebuilt/bocadillo

repo_name: teaglebuilt/bocadillo


text:
[Home](./index.md) > [puppeteer](./puppeteer.md) > [SnapshotOptions](./puppeteer.snapshotoptions.md)

## SnapshotOptions interface

Signature:

```typescript
export interface SnapshotOptions
```

## Properties

|  Property | Type | Description |
|  --- | --- | --- |
|  [interestingOnly?](./puppeteer.snapshotoptions.interestingonly.md) | boolean | (Optional) Prune uninteresting nodes from the tree. |
|  [root?](./puppeteer.snapshotoptions.root.md) | [ElementHandle](./puppeteer.elementhandle.md) | (Optional) Root node to get the accessibility tree for |

repository: yujiosaka/puppeteer

repo_name: yujiosaka/puppeteer


text:
---

copyright:
  years: 2015, 2017
lastupdated: "2017-01-06"

---

{:new_window: target="_blank"}
{:shortdesc: .shortdesc}
{:screen: .screen}
{:codeblock: .codeblock}
{:pre: .pre}

# Authorization

When you have [authenticated](authentication.html),
the next test is to decide whether you are permitted to perform certain tasks.
This is called authorization.
{:shortdesc}

## Roles

Role          | Description
--------------|------------
`_reader`     | Gives the user permission to read documents from the database.
`_writer`     | Gives the user permission to create, update, and delete documents (except design documents) in the database.
`_admin`      | Gives the user the ability to change security settings, including adding roles.
`_replicator` | Gives the user permission to replicate a database, including creating checkpoints.
`_db_updates` | Gives the user permission to use the global changes feed.
`_design`     | Gives the user permission to read design documents.
`_shards`     | Gives the user access to the `/$DATABASE/_shards` endpoint.
`_security`   | Gives the user permission to read from the `/_api/v2/db/$DATABASE/_security` endpoint

The credentials you use to log in to the dashboard automatically have `_admin` permissions to all databases you create.
Everyone and everything else,
including users you share databases with and API keys you create,
must be given a permission level explicitly.

## Viewing Permissions

To see who has permissions to read,
write,
and manage the database,
send a `GET` request to `https://$USERNAME.cloudant.com/_api/v2/db/$DATABASE/_security`.

_Example request to determine permissions, using HTTP:_

```http
GET /_api/v2/db/$DATABASE/_security HTTP/1.1
```
{:codeblock}

_Example request to determine permissions, using the command line:_

```sh
curl https://$USERNAME.cloudant.com/_api/v2/db/$DATABASE/_security
```
{:codeblock}

<!--

_Example request to determine permissions, using Javascript:_

```javascript
var nano = require('nano');
var account = nano("https://"+$USERNAME+":"+$PASSWORD+"@"+$USERNAME+".cloudant.com");
account.request({
	db: $DATABASE,
	path: '_security'
	},
	function (err, body, headers) {
		if (!err) {
			console.log(body);
		}
	}
});
```
{:codeblock}

-->

The `cloudant` field in the response object contains an object with keys that are the usernames
that have permission to interact with the database.
The `nobody` username indicates what rights are available to unauthenticated users,
that is,
any request made without authentication credentials.

In the following example response,
the `nobody` username has `_reader` permissions.
This means that the database is publicly readable.

_Example response to request for permissions:_

```json
{
	"cloudant": {
		"antsellseadespecteposene": [
			"_reader",
			"_writer",
			"_admin"
		],
		"garbados": [
			"_reader",
			"_writer",
			"_admin"
		],
		"nobody": [
			"_reader"
		]
	},
	"_id": "_security"
}
```
{:codeblock}

## Modifying Permissions

To modify who has permissions to read,
write,
or manage a database,
send a `PUT` request to `https://$USERNAME.cloudant.com/_api/v2/db/$DATABASE/_security`.
To see what roles you can assign,
see [Roles](#roles).

_Example of sending an authorization modification request, using HTTP:_

```http
PUT /_api/v2/db/$DATABASE/_security HTTP/1.1
Content-Type: application/json
```
{:codeblock}

_Example of sending an authorization modification request, using the command line:_

```sh
curl<EMAIL_ADDRESS>\
	-X PUT \
	-H "Content-Type: application/json" \
	-d "$JSON"
```
{:codeblock}

<!--

_Example of sending an authorization modification request, using Javascript:_

```javascript
var nano = require('nano');
var account = nano("https://"+$USERNAME+":"+$PASSWORD+"@"+$USERNAME+".cloudant.com");
account.request(
	{
		db: $DATABASE,
		path: '_security',
		method: 'PUT',
		body: '$JSON'
	},
	function (err, body, headers) {
		if (!err) {
			console.log(body);
		}
	}
);
```
{:codeblock}

-->

The request must provide a document in JSON format,
describing a `cloudant` field.
The field contains an object with keys that are the usernames having permission to interact with the database.
The `nobody` username indicates what rights are available to unauthenticated users,
that is, anybody.

In the following example request,
the `nobody` username is given `_reader` permissions.
This authorization makes the database publicly readable.

_Example of an authorization modification request document:_

```json
{
	"cloudant": {
		"antsellseadespecteposene": [
			"_reader",
			"_writer",
			"_admin"
		],
		"garbados": [
			"_reader",
			"_writer",
			"_admin"
		],
		"nobody": [
			"_reader"
		]
	}
}
```
{:codeblock}

The response tells you whether the update has been successful.

_Example response following a successful authorization modification request:_

```json
{
	"ok" : true
}
```
{:codeblock}

You must run the `GET` command first to retrieve the security object.
Then,
you can modify that security object with new permissions.
If you do not run the `GET` command and retrieve the security object before you run an API call,
the result might disrupt your environment.
For example,
if you want to add a new `nobody` user with read-only access,
the  following incorrect request removes _all_ the other users with access to the database.

_Example of an incorrect authorization modification request document:_

```json
{
    "cloudant": {
        "nobody": [
            "_reader"
        ]
    }
}
```
{:codeblock}

## Creating API Keys

>	**Note**: An earlier method of generating API keys by `POST`ing to
the `https://cloudant.com/api/generate_api_key` endpoint is deprecated.

API keys allow you to give access to a person or application without having to create a new Cloudant account.
An API key consists of a randomly generated username and password.
The key is given the desired access permissions.

Once generated,
the API key can be used in the same way as a normal user account,
for example by granting read,
write,
or admin access permissions.

API keys are not the same as normal user accounts.
In particular,
an API key does not have access to the dashboard.

An API key is primarily used to enable applications to access a database,
with a determined level of access control.

>	**Note**: If you choose to generate an API key through the dashboard,
remember to record the key name and password.
These are both randomly generated,
and cannot be retrieved if lost or forgotten.

>	**Note**: [IBM Cloudant Data Layer Local Edition ("Cloudant Local") ![External link icon](../images/launch-glyph.svg "External link icon")](https://www.ibm.com/support/knowledgecenter/SSTPQH_1.0.0/com.ibm.cloudant.local.doc/SSTPQH_1.0.0_welcome.html){:new_window}
does not support API Keys.
For a similar capability,
create "CouchDB" style users,
as described in the [IBM Knowledge Center ![External link icon](../images/launch-glyph.svg "External link icon")](http://www-01.ibm.com/support/knowledgecenter/SSTPQH_1.0.0/com.ibm.cloudant.local.install.doc/topics/clinstall_db_security.html){:new_window}.

_Example request to create an API key, using HTTP:_

```http
POST https://<username>.cloudant.com/_api/v2/api_keys HTTP/1.1
```
{:codeblock}

_Example request to create an API key, using the command line:_

```sh
curl -X POST<EMAIL_ADDRESS>```
{:codeblock}

<!--

_Example request to create an API key, using Javascript:_

```javascript
var nano = require('nano');
var account = nano("https://$USERNAME:$PASSWORD@cloudant.com");
account.request(
	{
		db: '_api',
		path: 'v2/api_keys',
		method: 'POST'
	},
	function (err, body) {
		if (!err) {
			console.log(body);
		}
	}
);
```
{:codeblock}

-->

The response contains the generated key and password.

_Example response to request for an API key:_

```json
{
	"password": "YPNCaIX1sJRX5upaL3eqvTfi",
	"ok": true,
	"key": "blentfortedsionstrindigl"
}
```
{:codeblock}

When you have generated an API key,
you can assign the API key to a database by sending a `PUT` request to
`https://<username>.cloudant.com/_api/v2/db/<database>/_security`.
Once assigned to a database,
the key can be granted access permissions.
By default,
an API key has no permissions for anything,
and must be given permissions explicitly.

## Deleting API keys

### To remove an API key using the Dashboard

1.	Click on `Databases` -> `Permissions`.
2.	Hover over the API key you would like to delete.
3.	Click the '`X`' that appears when you hover over the API key.

### To remove an API key using the Cloudant API

Use the [modifying permissions](#modifying-permissions) technique to remove the API key from the list of users with access permission.

This works because an API key is similar to a user,
and has been granted access permissions.
By removing the API key from the list of users that have access permissions,
the effect is to delete the API key.

To remove the API key,
send an HTTP `PUT` request to the same `_security` API endpoint you used to [create the API key](#creating-api-keys).
Provide an updated list of the usernames that have access permission.
The updated list should _omit_ the API key.

## Enabling the `_users` database with Cloudant

You can use the
[_users database ![External link icon](../images/launch-glyph.svg "External link icon")](http://docs.couchdb.org/en/1.6.1/intro/security.html#authentication-database){:new_window}
to manage roles in Cloudant.
However,
you must turn off Cloudant security for those roles first.
To do this,
`PUT` a JSON document to the `_security` endpoint of the database.
For example, `https://<username>.cloudant.com/<database>/_security`.

_Example submission of a modification request, using HTTP:_

```http
PUT /$DATABASE/_security HTTP/1.1
Content-Type: application/json
```
{:codeblock}

_Example submission of a modification request, using the command line:_

```sh
curl<EMAIL_ADDRESS>\
	-X PUT \
	-H "Content-Type: application/json" \
	-d @request-body.json
```
{:codeblock}

_Example modification request, in JSON format:_

```json
{
	"couchdb_auth_only": true,
	"members": {
		"names": ["member"],"roles":[]
	},
	"admins": {
		"names": ["admin"],"roles":[]
	}
}
```
{:codeblock}

_Example response:_

```json
{
	"ok" : true
}
```
{:codeblock}


text:
grails-security-stateless
=========================

  Grails plugin to implement *really* stateless authentication. It is based on the procedure described at http://www.kaleidos.net/blog/295/stateless-authentication-with-api-rest/

   Long story short: we do not keep tokens. We generate a self-contained token, sign it, and give it to the client. The client then send this token on every request. As the token is signed, the client can't mess with it. And as the token is self-contained, we don't need to keep it, only verify it.

   In general, when you try to access a protected method, you will get a 401 (UNAUTHORIZED) if there isn't a valid token on the Authorization header.

Standalone
----------

#### Configuration

The plugin can be used on a pure stand alone mode. For this, you only need to set two parameters on Config.groovy:

```groovy
grails.plugin.security.stateless.secretKey = "mysupersecretkey"
grails.plugin.springsecurity.active = false
```

#### Secure controllers and methods

You can mark any controller or method with @SecuredStateless, and the plugin will keep the authentication for you, adding to the request an attribute 'securityStatelessMap' with the user data.

```groovy
import net.kaleidos.grails.plugin.security.stateless.annotation.SecuredStateless

class HelloController {
    @SecuredStateless
    def index() {
        render "hello ${request.securityStatelessMap.username}"
    }
}
```

#### Login

On standalone mode, you have to code your own login controller. This controller should validate the credentials as you need, and return a security-stateless token, using the method statelessService.generateToken(String username).

A silly example of login controller could be:

```groovy
import grails.converters.JSON

class LoginController {
    def statelessService

    def index() {
        if (params.password == '12345'){
            render (['token': statelessService.generateToken(params.user)] as JSON)
        } else {
            render(status: 401, text: '')
        }
    }
}
```

Integrated with springsecurity
------------------------------

#### Configuration

The plugin can be used along with springsecurity. In order to do so, you need to set several parameters on Config.groovy:

```groovy
grails.plugin.security.stateless.secretKey = "mysupersecretkey"
grails.plugin.security.stateless.springsecurity.integration = true
```

Also, you need to add the statelessAuthenticationFilter to the list of filters of your application adding this line to BootStrap.groovy

```
SpringSecurityUtils.clientRegisterFilter('statelessAuthenticationFilter', SecurityFilterPosition.SECURITY_CONTEXT_FILTER.order + 10)
```

#### Secure controllers and methods

Any method controlled by the defined chainMap is secured. And inside it, you can access both springSecurityService.currentUser and request.securityStatelessMap.

```groovy
import net.kaleidos.grails.plugin.security.stateless.annotation.SecuredStateless
import grails.plugin.springsecurity.annotation.Secured

class HelloController {
    def springSecurityService

    def index() {
        render "hello ${springSecurityService.currentUser.username} ${request.securityStatelessMap.username}"
    }
}
```

#### Login

You can code your own login controller. But the plugin offers you a default method for login. In order to use it, you only need to configure several parameters on Config.groovy. First, you need to add and endpoint to the chainMap. Next, define the follow parameters:

* grails.plugin.security.stateless.springsecurity.login.active: true for activate login
* grails.plugin.security.stateless.springsecurity.login.endpointUrl: the same login url defined on chainMap
* grails.plugin.security.stateless.springsecurity.login.usernameField: The name of the parameter for the username. By default it is "user".
* grails.plugin.security.stateless.springsecurity.login.passwordField: The name of the parameter for the username. By default it is "password".

```groovy
grails.plugin.security.stateless.secretKey = "mysupersecretkey" //as allways
grails.plugin.security.stateless.springsecurity.integration = true
grails.plugin.springsecurity.filterChain.chainMap = [
    '/stateless/login': 'statelessLoginFilter'
]
grails.plugin.security.stateless.springsecurity.login.active = true
grails.plugin.security.stateless.springsecurity.login.endpointUrl = "/stateless/login"
grails.plugin.security.stateless.springsecurity.login.usernameField = "user"
grails.plugin.security.stateless.springsecurity.login.passwordField = "password"

```

The login will return 400 (BAD_REQUEST) if there isn't username or password, 401 (UNAUTHORIZED) for wrong username/password, or 200 (OK) for valid username/password. On 200, also return a JSON body with the token:

```groovy
["token":"Bearer eyJ1c2VybmFtZSI6InBhbGJhIn1fMUkwL3FIblpoQ2JYek5hVVVxSUw4TjAvNmk1Y3Qwb0IvamhQVFdUWGpNTT0="]
```

repository: burtbeckwith/grails-security-stateless

repo_name: burtbeckwith/grails-security-stateless


text:
Lambdas
=======

Sometimes you need a function, but it's going to be very short and only serve a single use. You could `define` the function anyway, but that means you have one more named function hanging around. Lambdas are a shorthand way of defining a new function. The simplest form of a lambda looks like this:

```
# Inferred type: Function( => Integer)
var v = {|| 10}
```

You can now call 'v' with no arguments and receive an Integer. Since there was no `define`, you can assign 'v' to another function, and the current one will eventually be garbage collected.

```
define example[A](left: A, f: Function(A => A)) : A
{
    return f(left)
}

example(10, {|a| a * a})                      # 100
example("abc", {|hello| hello.concat("def")}) # "abcdef"
# Invalid operation: List[Integer] / Integer
# example([1, 2, 3], {|lst| lst / 10})
```

Lambdas, like normal functions, are fully able to participate in type inference. In the first call, the lambda infers that it will have one parameter of type A. Since type A has been solved as Integer, then the variable a must therefore have the type Integer. The second time, it's solved as type string. Proof that this is type inference (and not the interpreter happening to allow something that works) can be found in the last usage, which generates a type error if run.

Lambdas are currently limited in that they cannot have their types annotated, and thus rely entirely on inference for determining their parameters. Lambdas are also unable to have default arguments, or variable arguments. Those are limitations that may be lifted later.

However, it is still possible to do some neat things with lambdas and generics:

``
define transform[A, B](input: A, f: Function(A => B)) : B
{
    return f(input)
}

# Result: 3
transform(transform(10, {|a| [a, a, a]}), {|b| b.size()})
```

If a function requires only one argument, and that argument is a function, you can pass a lambda without parentheses.

```
define f(g: Function( => Integer)) : Integer {
    return g()
}

# Value: 20
f{|| 10 + 10}
```


text:
# Listably

![license-badge](https://img.shields.io/badge/license-MIT-yellow)

## Description

Listably is a media consumption tracker where a user can find trending movies or TV shows or search for their own favourite movies or shows. The user can then add movies and shows into their own list for tracking purposes.

## Table of Contents

-   [Description](#description)
-   [Usage](#usage)
-   [Contributing](#contributing)
-   [Questions](#questions)

## Usage

1. Go to [Listably](listably1.herokuapp.com)
2. Please create an account or sign in on the top right corner of the page.

	![Screenshot of the Listably Login](./public/assets/listably-login.png)

3. Navigate to the trending page by clicking Movies/TV Shows on the nav bar or the circular image from the home page or use the search bar to conduct a search.

	![Screenshot of the Listably Homepage](./public/assets/listably-homepage.png)

4. Add media that you would like to keep track on by using the dropdown on each card.

    ![Screenshot of the Listably Trending movies](./public/assets/listably-trending.png)

5. Click on "My List" to see the media that you have saved to your list. Use the column on the left to filter your results.
    ![Screenshot of the Listably User Page](./public/assets/listably-user.png)

## Contribution

#### Contributors

[Joseph Cordell](https://github.com/JosephCordell),
[Paul Jeffery](https://github.com/Paulndrwjeffrey),
[Melissa Tan](https://github.com/melissa-tan), and
[Kila Weeks](https://github.com/kilaweeks)

## Questions

If you have any questions or see any issues, please submit an [issue](https://github.com/JosephCordell/Listably/issues) on GitHub!

repository: JosephCordell/Listably

gha_language: JavaScript

repo_name: JosephCordell/Listably


text:
# V1EndpointSubset

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Addresses** | [**[]V1EndpointAddress**](v1.EndpointAddress.md) | IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize. | [optional]
**NotReadyAddresses** | [**[]V1EndpointAddress**](v1.EndpointAddress.md) | IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check. | [optional]
**Ports** | [**[]V1EndpointPort**](v1.EndpointPort.md) | Port numbers available on the related IP addresses. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

repository: kubernetes-client/go

gha_language: Go

repo_name: kubernetes-client/go


text:
# Splunk Cafe

Get Data into Splunk + Start Analyze Data in 15 mins

---

An open source app to demonstrate

1. Collecting from Bluetooth Scale - [Skale II](https://github.com/atomaxinc/SkaleKitAndroid)
2. Send data to [Splunk](https://www.splunk.com/) Enterprise localhost via HEC (Http Event Collector)

Check [my demo slide on Speaker Deck - 2021-02-17_splunk_cafe.pdf](https://speakerdeck.com/androchentw/2021-02-17-splunk-cafe) for more detail.

repository: androchentw/SplunkCafe

repo_name: androchentw/SplunkCafe


text:
# backbone-queryparams-rails

This gem wraps the [backbone-query-parameters
library](https://github.com/jhudson8/backbone-query-parameters) in the Rails asset pipeline for Rails 3.1 and up.

### Step 1: Add to Gemfile

    gem 'backbone-queryparams-rails'

### Step 2: Include assets

#### javascript

    // In application.js
    //= require backbone-queryparams-rails

### Many Thanks

[Joe Hudson](https://github.com/jhudson8)

repository: duhast/backbone-queryparams-rails

repo_name: duhast/backbone-queryparams-rails


text:
---
sidebarDepth: 3
---

# Introduction

**tkctl** is a wrapper tool which executes any other best of breed tool such as [Terraform](https://www.terraform.io/) [Ansible](https://www.ansible.com/) and any other tools you may wish to add.
In our first Fuseday we decided our MVP would be to setup a VPC on the 3 major cloud providers + a Kubentes cluster.
This `basic plugins` will enable us to compose more robust & complex architectures by maintaining configuration profiles.

![MVP](./../assets/tkctl-mvp.svg)

## Why - Philosophy
Life is complicated, but it shouldn't be ! So:

After over 2 decades of Consultancy when our first decade included an offering was an ALM suite, and after another one as pure ALM/DevOps/SecOps consultants we realise our code/tools isn't the main thing we bring to the table,
and considering re-use is in our nature.
This tool doesn't come to replace any tool out there, this tool is hopefully our collective way of thinking of **Infrastructure Design**.

We purely designed it as a **DevOps tools** any Recommendations you may have a more than welcome!

## Why - Technologically

2 Trends we see growing from **multi-cloud** to **poly-cloud** and in the background as DevOps and a whole lot of **Tooling**, the irony is we need all of them to get s**t done !

Our biggest "fear" of `Generic Tools` is what get's in or will my things / way of thinking get's in or not so - it's simple ;):
If we share something and 3 people use it in `dev` branch, let's share it with `*`, let's use PR's / Github Issues to discuss these.

## Goals

1. Initial cli with the following command line args:
   * `init` - Instantiate .tkctl + load configuration
     * ---cloud `aws`,`gcp`,`azure`
   * `deploy infra` - a wrapper to creating states
     * wrapper for create vpc state
     * `-i` `--interactive` for step by step
   * `deploy app state`
   * `destroy` - a wrapper to destroying apps, destroy vpc

2. 3 modules vpc
   * `gcp`
   * `azure`
   * `aws`

3. Managed Kubernetens - Phase 1

4. ClusterAPI for Kubernetes initialization - Phase 2

repository: vivshri/tkctl

repo_name: vivshri/tkctl


text:
# Version 0.02

# INSTRUCTIONS:
1. Ensure that the flash game is open in the background
2. Run Python program and follow intructions on the alert boxes
3. Enjoy the Mayo!
4. When done or an error has occured cover the Mayo bottle, weather that be closing the browser or press Ctrl + C to stop the Python program.

If you have a problem with the program please first refer to this video https://www.youtube.com/watch?v=tXMZVV3UGfY


text:
# Chrome Timeline Data Parser

This script parses the JSON produced by Chrome’s Timeline.

You can call the script with either a directory or a file, as well as an event message name.

For example:

```
node index.js ~/file.json "Event name"
```

…will output all the timestamps for that event name to the console.

Similarly:

```
node index.js ~/files/ "Event name"
```

…will parse all the files in that directory and output the timestamps to the console.


text:
# Ripple-without-JS
Create [Material Design](https://material.io/) ripple effect in your HTML without using a single line of JavaScript code.

[![forthebadge](https://forthebadge.com/images/badges/validated-html5.svg)](https://forthebadge.com) [![forthebadge](https://forthebadge.com/images/badges/uses-css.svg)](https://forthebadge.com)

## LIVE DEMO: https://kvaibhav01.github.io/Ripple-without-JS/

## What's the output?
Here it is!

![Ripple demo](https://github.com/Kvaibhav01/Ripple-without-JS/blob/master/rippleWithoutJSGIF.gif)

_Fun isn't it?_

## How to achieve?
If there's no JS, then there's CSS. To achive the task we need to make a new [CSS file](https://github.com/Kvaibhav01/Ripple-without-JS/blob/master/style.css) having:

- **[Container](https://www.w3schools.com/w3css/w3css_containers.asp)**: [`display`](https://www.w3schools.com/cssref/pr_class_display.asp) property set to `flex` to make it of same length regardless of the content.

- **Ripple**: [`transform`](https://www.w3schools.com/cssref/css3_pr_transform.asp) property set to `translate3d` to define a 3D translation.

- **Ripple-after**: this is where the ripple effect ends. We can show something like a text but it doesn't make sense here. Therefore the `content` has been set to `""`.
  - `background-image`'s value has been set to the [`radial-gradient`](https://www.w3schools.com/cssref/func_radial-gradient.asp) function which takes in a `circle` as its `shape`, `#fff` or white as the `start-color` and `last-color` as `transparent 10.01%`.
  - `transition` is used along with `transform` with its corresponding timing and `opacity`.

#### That's it! Simple, clean and Materialistic!

Read [this article](https://codeburst.io/create-a-material-design-ripple-effect-without-js-9d3cbee25b3e) I wrote to incorporate this in your project file.

license: Unlicense

gha_language: CSS

gha_license_id: Unlicense


text:
Role Name
=========

This role installs the VRTS-ralus agent for BackupExec on RHEL 7.x / CentOS 7.x. Since the package isn't very compatible with EL7, all its brokenness is fixed by this role.

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

The required rpm's for VRTS-ralus should be placed in the files/ subdirectory, see the Readme file in that directory.

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

Create a list of ip-addresses named 'backup_servers' to which the firewall will be opened. Example:

backup_servers:
  - <IP_ADDRESS>
  - <IP_ADDRESS>
  - <IP_ADDRESS>

If using a firewall (firewalld), create a variable
  - firewalld_enabled: true

Specify an encrypted password for the svc_beuser account in 'vrtsralus_password'

Other variables are documented in the defaults/main.yml file

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

None, besides an EL7 distro

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

Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too:

    - hosts: servers
      roles:
         - { role: sigio.vrtsralus }

License
-------

BSD

Author Information
------------------

Mark Janssen<EMAIL_ADDRESS>Sig-I/O Automatisering

repository: sigio/ansible-role-vrtsralus

repo_name: sigio/ansible-role-vrtsralus


text:
# A Complete Expressiveness Hierarchy for Subgraph {GNN}s via Subgraph Weisfeiler-Lehman Tests

```
@inproceedings{sswl_icml23,
title = {A Complete Expressiveness Hierarchy for Subgraph {GNN}s via Subgraph Weisfeiler-Lehman Tests},
author = {Zhang, Bohang and Feng, Guhao and Du, Yiheng and He, Di and Wang, Liwei},
booktitle = {Proceedings of the 40th International Conference on Machine Learning (ICML)},
pages = {41019--41077},
year = {2023}
}
```

links
- [icml](https://icml.cc/Conferences/2023/Schedule?showEvent=25206)
- [pmlr](https://proceedings.mlr.press/v202/zhang23k.html)

gha_language: Jupyter Notebook