text:
# Introduction

Quectel USB Serial Driver for UCxx/EC2x/EGxx/EP06/EM06/BG96/AG35.

As I am working in Quectel as an FAE for Vietnam and South East Asia, we will try our best to support all world wide customers.

# Prepare

Ubuntu 16.04 running kernel 4.15.0-43-generic.

```
$ uname -a
Linux ubuntu 4.15.0-43-generic #46~16.04.1-Ubuntu SMP Fri Dec 7 13:31:08 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

```

Download Ubuntu linux headers:

```
$ sudo apt-get install linux-headers-$(uname -r)
```

the Linux headers will be located in /usr/src/

# Compile/Install

Determine the kernel version:

```
$ uname -r
```
Checkout the driver to the correct kernel version:

```
$ git clone git@github.com:ngohaibac/Quectel_USB_Serial_Driver.git
$ cd Quectel_USB_Serial_Driver
$ git checkout 4.15.0
$ make
$ sudo make install
```

# Credit

This guide and kernel driver is based on Quectel Driver User Guide V1.8 by Quectel Wirreless Solutions.


text:
# ice n-ary tree C library
Ice_narytree is a open source C library to help in Generic tree(n-ary tree) and resources to carry custom data, common functions(n-ary, traversal, search,create, insert childs/siblings,remove childs, destroy trees...)

You can use trees to solve file system problems, static analysis problems,  like recursive tree with N points with childs...

In computer science, a tree is a widely used abstract data type that simulates a hierarchical tree structure, with a root value and subtrees of children with a parent node, represented as a set of linked nodes. A tree data structure can be defined recursively as a collection of nodes (starting at a root node), where each node is a data structure consisting of a value, together with a list of references to nodes (the "children"), with the constraints that no reference is duplicated, and none points to the root.

First step, understand before run
--

Study the src/main.c to understand how to use...
Study calls to know how to use  lib...  lib/icenarytree.h

any doubts... create issue or send me a e-mail...

Second step, testing!
--

Look this following commands to run:
```
$ git clone https://github.com/CoolerVoid/ice_narytree
$ cd ice_narytree
$ make
$ ./bin/test_tree
$ cat src/main.c
```

No memory leaks
--

Look this content(tested with valgrind)
```
$ cat heap_log/valgrind_output.txt | tail
 ==63855==
==63855== HEAP SUMMARY:
==63855==     in use at exit: 0 bytes in 0 blocks
==63855==   total heap usage: 47 allocs, 47 frees, 10,399 bytes allocated
==63855==
==63855== All heap blocks were freed -- no leaks are possible
==63855==
==63855== For counts of detected and suppressed errors, rerun with: -v
==63855== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
```

Example:
```c
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>

#include "../lib/ice_narytree.h"

// user custom data to use in NODE of n-ary tree
struct data {
    bool taint;
    char *label;
    char *exp;
    char *var_name;
    int line;
};

typedef struct data data;

void *form_data(bool taint, char * label, char *exp, char *varname, int line)
{
	data *in=malloc(sizeof(data));

	in->label = strdup(label);
	in->var_name = strdup(varname);
        in->exp = strdup (exp);
        in->line = line;
        in->taint = taint;

	return (void *)in;
}

void inter_data(void *argv)
{
	data *in=(data *)argv;

	if(in != NULL)
	{

		printf("Label: %s\n var_name: %s\n Expression: %s\n", in->label,in->var_name,in->exp);
		printf("Line: %d\n ",in->line);
	}
}

void inter_free_treeleafs(void *argv)
{
	data *in=(data *)argv;

	if(in != NULL)
	{
		free(in->label);
		in->label=NULL;

		free(in->var_name);
		in->var_name=NULL;

		free(in->exp);
		in->exp=NULL;
		in->line=0;
		in->taint=NULL;
		free(in);
		in=NULL;
	}
}

int main()
{

	// Insert data in nodes
	void *A=form_data(false,"attribute","x=0","x",10);
	ice_tree_node *root = new_node(0,A);

	void *B=form_data(false,"attribute","x+=2","x",11);
        append_child(root, 1,B);

	void *C=form_data(false,"attribute","x+=8","x",12);
        append_child(root, 2,C);

	void *D=form_data(false,"attribute","z+=8","z",14);
	append_sibling(root, 3,D);

	void *E=form_data(false,"attribute","z+=12","z",15);
        append_child(root, 4,E);

	// Show all data of N-ARY TREE
    	traversal_tree_dbg(root);

	//Search by POSITION NODE
	ice_tree_node *ret=search_in_tree_per_position(root,3);
	if(ret != NULL && ret->position != 0)
		printf("\nResult found: %d \n",ret->position);

	//INSERT NODE BEFORE
	void *F=form_data(false,"sum","y+=2","y",16);
	insert_child_before(root,2,5,F);

	void *G=form_data(false,"sum","k+=2","y",17);
	insert_child_before(root,3,6,G);

	// Delete childs of node by position
	if(remove_node_childs_by_position(root,2,inter_free_treeleafs)==true)
		puts("its ok item remove item 12 and childs like 16\n");

	// CUSTOM SHOW ALL DATA
	interate_traversal_tree(root,inter_data);

	// liberate heap memory, destroy all tree
	traversal_and_destroy(root,inter_free_treeleafs);

	return 0;
}

```

Next resources:
--

* Functions to renderize tree using graphviz library (Its cool to debug the tree).
* Cmake config file to install in system library...
* Insert other functions...

References:
--
https://en.wikipedia.org/wiki/Tree_(data_structure)

https://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/ (The best C book)

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Contributing

We are happy to have others contribute to the development of this library. It is currently in its infancy. Please check out the ROADMAP.md for ideas on how you can add functionality. We welcome additional ideas as well.

## Source code

The variableFont.js libary source is written in TypeScript. It is located in the `src` directory.

TypeScript is available on npm at https://www.npmjs.com/package/typescript

### Compiling

First install [Node.js](https://nodejs.org/) which will by default include `npm`. Then, install the project dependencies, including the TypeScript compiler, using following command:

```sh
npm install
```

Don’t edit the `variableFont.js` file directly. It is generated using the TypeScript compiler, `tsc`. You can rebuild the file yourself by running the following command:

```sh
npm run build
```

This is a shortcut to running the build script defined in the `package.json` file. You can manually run it with:

```sh
npx tsc --project ./src/tsconfig.json
```

The output file is `variablefont.js` in the root folder.

## How to modify the source for contribution

1. On our [GitHub page](https://github.com/Monotype/variableFont.js), click the "Fork" button to create your personal fork
   of the variableFont.js repository.

2. Clone your repository:

    git clone git://github.com/Monotype/variableFont.js.git

3. Create a new branch for your feature. For example: `git checkout -b newfeature`.
    A dedicated branch for your pull request means you can develop multiple features at the same time, and ensures
    that your pull request is stable even if you later decide to develop an unrelated feature.

4. Install dependencies:

```sh
npm install
```

5. Make some changes to the source files in `src`

6. Build variableFont.js

```
npm run build
```

The output file is `variablefont.js` in the root folder.

7. Test your changes in the demo program. Modify it if needed.

8. Commit your changes

    git add --all && git commit

9. Submit your pull request -- and thanks in advance!

## Dependency

This project has a hard dependency on [opentype.js](https://github.com/nodebox/opentype.js). Please follow [instruction](https://github.com/nodebox/opentype.js#using-bower) on the opentype.js site to include it in your page. Opentype.js must be included before including variableFont.js in an html page. variableFont.js functions depend on opentype.js.

Some feature changes may be more appropriately made in [opentype.js](https://github.com/nodebox/opentype.js). If so, consider contributing to that project.

license: MIT


text:
# Ping-Pong

#### Ping-Pong allows a user to input a number and in return it will replace every multiple of 3 with "Ping", every multiple of 5 with "Pong", and every multiple of 15 with "Ping-Pong!"

#### By Michelle Poterek

## Description

_{This is a detailed description of your application. Its purpose and usage.  Give as much detail as needed to explain what the application does, and any other information you want users or other developers to have. }_

## Setup/Installation Requirements

_{This code uses the Bootstrap and jQuery CDN; Internet connection must be available for these resources to be available.}_

## Known Bugs

_{There are no known bugs at this time.}_

## Support and contact details

_{Please feel free to send me an e-mail at<EMAIL_ADDRESS>if you have any questions or advice.}_

## Technologies Used

_{HTML, jQuery, JavaScript, CSS, and Bootstrap}_

### License

*{MIT License}*

Copyright (c) 2017 **_{Michelle Poterek}_**


text:
---
templateKey: blog-post-podcast-tlc
slug: /podcasts/tlc/s05-e32
author: Peter Witham
tags: ["Podcast", "The Life Creative", "Videos"]
title: The Life Creative - How do you feel about your personal work?
date: 2021-07-26T21:52:51
blurb: How do you view your work? Does it change when someone shares their opinions with you?
---

<iframe src="https://anchor.fm/peter-witham/embed/episodes/How-do-you-feel-about-your-personal-work-e151uk8" height="102px" width="400px" frameborder="0" scrolling="no"></iframe>

In this episode, I want to talk about how you feel about your personal work.

##Video version

https://youtu.be/XEwG46JuCnw

##Say thanks for this video by buying me a coffee

https://buymeacoffee.com/pwcom

##Let's connect

https://bio.link/peterw

repository: GrfxGuru/gatsby-starter-netlify-cms

gha_language: JavaScript

gha_license_id: MIT

repo_name: GrfxGuru/gatsby-starter-netlify-cms


text:
   MafiaUnity

  Open-source Mafia game framework

    Brought to you by @zaklaus,
    @DavoSK,
    @Romop5,
    and other contributors!

## Introduction

Most of you probably know a Czech legendary game Mafia: The City of Lost Heaven. Released in 2002, it brought many of us an awesome experience full of action, emotions and realism. It is the game that can't be forgotten, the game that is seen as an example of how games should act like and what the possibilities truly are once passionate people decide to jump into a dream realisation.

As a tribute to our favorite game, we've decided to bring the soul a new skeleton, fully covered by modern tech, so that you can enjoy playing this game even after so many years. The decision to build tools and an engine, which will attempt to re-interpret the memories we've all had in our hearts and minds, to bring the nostalgic feeling back in front of our eyes, we seek to fullfill the ambition to bring the masterpiece and hear the whistles of the past once more.

## Description

We aim to create open-source tools for the game [Mafia](https://en.wikipedia.org/wiki/Mafia_(video_game)). The ultimate goal is to recreate the original game engine using Unity, to build up our framework and also simplify modding process.

## Development

We are currently using Unity version: **2019.3.9f1**.

To get the project up and running, you will need Mafia: The City of Lost Heaven installed. This is because the project uses original game assets and these cannot be provided with the project by law. The game's .dta files must then be unpacked so that the raw assets are exposed.

Actual development takes place in **develop** branch and therefore is covering more features and possible fixes. We highly recommend to use **develop** branch until we reach the time once our project gets more stable
(and starts using versioning semantics). **master** branch is considered stable but less developed and might also lack certain features which might introduce importing bugs or issues.

## Progress so far

We recommend to visit [our Discord server](https://discord.gg/eBQ4QHX) to be up-to-date about current status. The research on Mafia's native formats takes place [here](https://github.com/OpenMafia/OpenMF/blob/master/Docs/DataFiles.md)

## Disclaimer

We respect copyrights and intelectual property and you need to own the original game with all the game data in order for our tools to be useful to you.

## Contributing

If you'd like to join us and contribute, feel free to connect to [our Discord server](https://discord.gg/eBQ4QHX).

## Sponsorship

You can also sponsor us by donating money now! Check out the **Sponsor** button to see how to do that, your support will be very appreciated and will accelerate the development progress!

## Media
![](https://i.imgur.com/7b1ln6z.jpg)
![](https://i.imgur.com/A92V7mh.jpg)
![](https://i.imgur.com/6xSzE3O.jpg)
![](https://i.imgur.com/COocDgd.jpg)
![](https://i.imgur.com/kUNizMw.jpg)

repository: MafiaHub/MafiaUnity

branch_name: refs/heads/develop

gha_language: C#

repo_name: MafiaHub/MafiaUnity


text:
# go2proto

Generate Protobuf messages from given go structs. No RPC, not gogo syntax, just pure Protobuf messages.

### Example

```sh
GO111MODULE=off go get -u github.com/anjmao/go2proto
go2proto -f ${PWD}/example/out -p github.com/anjmao/go2proto/example/in

go2proto -f . -p .
```

### Note

Generated code may not be perfect but since it just 180 lines of code you are free to adapt it for your needs.


text:
# Multitenancy using multiple databases

By default, the examples guide you to setup the database connection by calling [Model.knex(knex)](/api/model/static-methods.html#static-knex). This doesn't fly if you want to select the database based on the request as it sets the connection globally. There are (at least) two patterns for dealing with this kind of setup:

_NOTE:_ The following patterns don't work if you have a large amount of tenants since we need to create a knex instance for each of them. In those cases you probably shouldn't be creating a separate database for each tenant anyway.

## Model binding pattern

If you have a different database for each tenant, a useful pattern is to add a middleware that adds the models to `req.models` hash and then _always_ use the models through `req.models` instead of requiring them directly. What [bindKnex](/api/model/static-properties.html#static-bindknex) method actually does is that it creates an anonymous subclass of the model class and sets its knex connection. That way the database connection doesn't change for the other requests that are currently being executed.

```js
const Knex = require('knex');

app.use((req, res, next) => {
  const knexCache = new Map();

  // Function that parses the tenant id from path, header, query parameter etc.
  // and returns an instance of knex. You should cache the knex instances and
  // not create a new one for each query. Knex takes care of connection pooling.
  const knex = getKnexForRequest(req, knexCache);

  req.models = {
    Person: Person.bindKnex(knex),
    Movie: Movie.bindKnex(knex),
    Animal: Animal.bindKnex(knex)
  };

  next();
});

function getKnexForRequest(req, knexCache) {
  // If you pass the tenantIs a query parameter, you would do something
  // like this.
  let tenantId = req.query.tenantId;
  let knex = knexCache.get(tenantId);

  if (!knex) {
    knex = Knex(knexConfigForTenant(tenantId));
    knexCache.set(tenantId, knex);
  }

  return knex;
}

function knexConfigForTenant(tenantId) {
  return {
    // The correct knex config object for the given tenant.
  };
}

app.get('/people', async (req, res) => {
  const { Person } = req.models;

  const people = await Person.query().findById(req.params.id);

  res.send(people);
});
```

## Knex passing pattern

Another option is to add the knex instance to the request using a middleware and not bind models at all (not even using [Model.knex()](/api/model/static-methods.html#static-knex)). The knex instance can be passed to [query](/api/model/static-methods.html#static-query), [\$query](/api/model/instance-methods.html#query), and [\$relatedQuery](/api/model/instance-methods.html#relatedquery) methods as the last argument. This pattern forces you to design your services and helper methods in a way that you always need to pass in a knex instance. A great thing about this is that you can pass a transaction object instead. (the knex/objection transaction object is a query builder just like the normal knex instance). This gives you a fine grained control over your transactions.

```js
app.use((req, res, next) => {
  // This function is defined in the previous example.
  req.knex = getKnexForRequest(req);
  next();
});

app.get('/people', async (req, res) => {
  const people = await Person.query(req.knex).findById(req.params.id);

  res.send(people);
});
```

## Using AsyncLocalStorage API

The [Async hooks](https://nodejs.org/api/async_hooks.html#async_hooks_async_hooks) modules in latest Nodejs provides a native implementation of "continuation-local-storage" called [AsyncLocalStorage](https://nodejs.org/api/async_hooks.html#async_hooks_class_asynclocalstorage)

This was added in Nodejs `v13.10.0` but, a "usable" version is only available @ `v15` after fixing some critical [bugs](https://github.com/knex/knex/issues/3879)

The basic idea is like thread level static variables, we can store/set "async stack" level variables and those variables will preserve its value for any functions invoked ( directly or indirectly ) from that particular "async stack"

For eg: consider we want to connect to different databases based on some request data. Then we have to do two things

1. Write a middleware which captures data from request and set it as a "AsyncLocalStorage" variable.
2. Override `Model.prototype.constructor.knex` function in Objection.js ( Every single query in Objection.js is using this function to get a connected knex instance ) in such a way that, we return a knex instance by using the information stored in previously set "AsyncLocalStorage" variable.

For eg:

1. ExpressJs middleware

```js
const { AsyncLocalStorage } = require('async_hooks');
const storage = new AsyncLocalStorage();

app.use(function(req, res, next) {
  /*
   * Here we are connecting to db based on subdomain name.
   * client1.example.com => client1db
   * client2.example.com => client2db
   */
  const host = req.headers['host'];
  const clientDomain = host.substring(0, host.indexOf('.'));
  storage.run(clientDomain, ()=>{
    setImmediate(next);
  });
});
```

2.  Override `Model.prototype.constructor.knex` function

```js
const { Model } = require('objection');

Model.prototype.constructor.knex = function() {
  const clientDomain = storage.getStore();
  return getKnexInstanceForClient(clientDomain);
};

```
where `getKnexInstanceForClient` function returns a connected knex instance based on provided `clientDomain` data

In the above example Point 1 and 2 can be written different files, but both should share the `storage` variable it can be shared either by using global variables or using a module / singleton


text:
# Best Practices: Images

## Responsible Responsive Images
## Background Images
## Native Images
## Tools
Use these tools to make your image optimization workflow easier.

### [TinyPNG](http://tinypng.com)
This tool allows you to drag and drop files from your desktop and have them optimized. Usually removes unused colors and has little to no noticeable effect on the quality of the image. Not uncommon to have 50% reduction in file size.

### [Kraken.io](https://kraken.io/web-interface)
This tool allows you to drag and drop files from your desktop and have them optimized. You can then download individual images or a zip file with all of them.

There are two options:

- Lossless - This mode will push your images to the extreme without changing a single pixel. (Better for large background images)
- Lossy - This mode will sacrifice a small amount of image quality, allowing you to save up to 90% of the image weight.

### [Sips](https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/sips.1.html)
This is a command line tool on Mac which lets you batch crop and resize images.

Example usage (folder has a bunch of JPGs):

```sh
# Replace all JPGs in folder with a max image width or height of 1500px
$ sips -Z 1500 *.jpg

# Replace all JPGs in folder (recursively) with a max image width or height of 1500px
$ find . -type f -name '*.jpg' -exec sips -Z 1500 {} \;
```

### [Mogrify](http://www.imagemagick.org/script/mogrify.php)
This is a command line tool which lets you do pretty much anything to an image.

Mogrify is part of [ImageMagick](http://www.imagemagick.org). Install it with Homebrew:

```sh
$ brew update && brew install ImageMagick
```

#### Examples

```sh
# Resize: Retain Aspect Ratio
# Usage: mogrify -resize [largest dimension] [filename]
# Usage: mogrify -resize [max width]x[max height] [filename]
$ mogrify -resize 500 logo.jpg

# Resize: Exact Dimensions
# Usage: mogrify -crop [width]x[height]+[x position]+[y position] +repage *.[file type]
$ mogrify -crop 250x250+0+0 +repage *.jpg

# Resize: Batch
# Usage: mogrify -resize [largest dimension] *.[file type]
# Usage: mogrify -resize [max width]x[max height] *.[file type]
$ mogrify -resize 1920x1200 *.jpg

# Conversion: Single
# Usage: mogrify -format [new image type] [filename]
$ mogrify -format png logo.jpg

# Conversion: Batch
# Usage: mogrify -format [new image type] *.[file type]
$ mogrify -format jpg *.png

# Conversion: Change the color of single color images (i.e. icons)
# Usage: convert [filename] -fill "[hex color]" -colorize 100%  [filename]
# Usage: for i in *.[filetype]; do convert $i -fill "[hex color]" -colorize 100%  $i; done
$ for i in *.png; do convert $i -fill "#555555" -colorize 100%  $i; done

# Rotation: Batch rotate images if the width exceeds the height
# Usage: rotate "[degrees]>|<" [filename]
$ mogrify -rotate "-90>" *.jpg
```

repository: itsahappymedium/best-practices

repo_name: itsahappymedium/best-practices


text:
Basic:
 - [x] Consumer,Producer,Topic CRUD.
 - [x] Produce and consume messages.
 - [x] Support for topic properties.
 - [x] Support to consume batch of messages.
 - [ ] Support to produce batch of messages.
 - [x] Support for queues.
 - [x] Support for keys.
 - [x] Lwt support.
 - [x] Async support.
 - [ ] Support for the high-level KafkaConsumer interface (rd_kafka_subscribe)

Errors:
 - [ ] Update the list of errors
 - [ ] Check if an error is fatale/retriable

Callbacks:
 - [x] Support for delivery report callback.
 - [ ] Support for error and log callbacks.
 - [ ] Support for statistics callback.
 - [x] Support for msg_opaque data on produce/delivery_callback.
 - [ ] Fix: the partitionner callback is never called.
 - [ ] Support to consume messages through a callback.

Messages
 - [x] Wrap messages in message enveloppes with topic,partition,offset,payload,key.
 - [x] Improve error handling on consume : PartitionEnd vs timeout or error.
 - [ ] Support for timestamp of a message.
 - [ ] Do we need to support headers?

Offsets
 - [x] Support for stored offsets.
 - [x] Specific offsets: Kafka.offset_stored, Kafka.offset_tail(n).
 - [ ] Support for look up of offsets by timestamp.
 - [ ] rd_kafka_commit_queue

Resources
 - [x] Free messages once consumed using rd_kafka_message_destroy.
 - [ ] Function: Kafka.wait_destroyed.
 - [x] rd_kafka_flush

Meta-data
 - [x] Value Kafka.librdkafka_version: string.
 - [x] Meta-data: topic list, partition list.
 - [ ] Meta-data: server list, list of replica.
 - [ ] Move all meta-data related values in `Kafka.Metadata`

Lwt:
 - [ ] Do we have to distinguish types: consumer vs producer ?
 - [ ] Integration tests
 - [ ] In the readme, say a word about Lwt.
 - [ ] Add group id to consumer/producer tools.

Async:
 - [ ] In the readme, say a word about Async.
 - [ ] Improve Consumer/Producer tools, notably with args for cluster and group id.

Misc
 - [x] Function: Kafka.outq_len.
 - [ ] rd_kafka_queue_length
 - [ ] Introduce a Kafka.Timeout exception.
 - [ ] Support for events.

repository: didier-wenzek/ocaml-kafka

gha_language: OCaml

repo_name: didier-wenzek/ocaml-kafka


text:
# About
Keypad interface pattern that is commonly used in embedded systems projects.

# Acknowledgement
This pattern is taken from the book Patterns for Time-Triggered Embedded Systems by Michael J. Pont

# Keypad:


text:
# HastyHex : a faster hex dumper

Fork from [https://github.com/skeeto/hastyhex](https://github.com/skeeto/hastyhex).

Windows Fixed

![](https://i.imgur.com/xbr4aMj.png)

## Usage

```
OVERVIEW: hastyhex
Usage: hastyhex [options] <input>
OPTIONS:
  -h [--help]                      Print hastyhex usage information and exit
  -n [--length]                    Read only N bytes from the input.
  -o [--out]                       Output to file instead of standard output
  -p                               Do not output color ("plain")

Example:
  hastyhex example.bin
```

license: MIT,Unlicense

repository: fcharlie/Planck

detected_licenses: MIT Unlicense

repo_name: fcharlie/Planck


text:
# stenoread-nodejs

This is a little hack and primitive web interface for [Google Stenographer](https://github.com/google/stenographer) to do [currently unsupported](https://github.com/google/stenographer/blob/master/DESIGN.md#serving-data) remote requests. Running `node server.js` will run a nodejs web server that hosts a web interface that is capable of requesting and downloading raw packet capture from Stenographer. This was designed to be used with the [ROCK NSM](http://rocknsm.io/) platform on an internal network. It can be run on the same server as rocknsm.

Although basic input sanitization is done, be carefull how you set the permissions for the nodejs process and secure the web interface appropriately. I know that passing on parameters to a shell command might be a bad idea ;-).

This is the first  prototype - so you were warned.

## Install

In order for this to work you will have to add a selinux exception for the nodejs webserver. You can use NPM to install this package. You can use pm2 to start the app and keep it running though reboots.

``` sh
sudo yum install nodejs -y
sudo semanage port -a -t http_port_t -p tcp 5602
sudo npm install "stenoread-nodejs" -g
sudo npm install pm2@latest -g
sudo pm2 start /usr/lib/node_modules/stenoread-nodejs/server.js
sudo mkdir /data/traces/
sudo chmod 777 /data/traces/
sudo pm2 startup
```
After running this commands the node app is running with root permissions. I didn't have the time so far to find out how to cut down needed permissions and still be able to run stenoread and write the capture files as well as run the app with pm2. If anyone figures this out feel free to contribute to the install process.

The server is only listening on localhost - so you can use nginx to publish/secure the site.
Sample NGINX location block:
```
    location /pcap {
        proxy_pass http://localhost:5602;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
```

Currently there is no cleaning up of pcap's in /data/traces  - so you will have to take care of this manually for the moment.

Feedback and PR's are welcome.

repository: anlx-sw/stenoread-nodejs

repo_name: anlx-sw/stenoread-nodejs


text:
Basix is a finite element definition and tabulation runtime library.
It is part of [FEniCSx](https://docs.fenicsproject.org),
alongside [FFCx](https://docs.fenicsproject.org/ffcx) and [DOLFINx](https://docs.fenicsproject.org/dolfinx/cpp),

The main functionality of Basix is written in C++. Documentation of the C++ functionality of Basix can be found
at {{link:URL/cpp}}.

The majority of the functionality of Basix is available for use through the Python wrapper. Documentation of
Basix's Python interface can be found at {{link:URL/python}}.

## Installing Basix
Instructions for installing Basix can be found at {{link:URL/install.html}}.

## Source
The source code of Basix is available [on GitHub](https://github.com/FEniCS/basix). It is available under
an [MIT license](https://github.com/FEniCS/basix/blob/main/LICENSE).

{{SUPPORTED ELEMENTS}}

repository: jpdean/basix

branch_name: refs/heads/main

repo_name: jpdean/basix


text:
---
title: 'Jesus Helps People In Need'
date: 10/08/2019
---

### Read for this week’s lesson
Luke 1:46–55; Luke 4:16–21; Matthew 12:15–21; Matthew 21:12–16; Isaiah 53:3–6.

>
Memory verse

> “ ‘The Spirit of the Lord is on me. He has chosen me to tell good news to the poor. He sent me to tell prisoners that they are free and to tell the blind that they can see again. He sent me to free those [people] who have been treated badly [hurt by other people] and to announce that the time has come for the Lord to show his kindness [loving care]’ ” (Luke 4:18, 19, ERV).

JESUS came to show us who God is. Jesus’ teachings show us God. So does His death on the cross. He showed us God by the way He lived. Many things Jesus did made real changes in other people’s lives.

God’s special messengers, His prophets, wrote about Jesus’ life and His work. Jesus Himself told His people about the work He came to do (Luke 4). Jesus cared for the poor. He helped people who were hurt by their leaders. Jesus showed the people love. The Old Testament prophets did these same things too.

But the religious leaders in Jesus’ day did not feel the same way about the poor. They feared Jesus. They were afraid He would take away their power. So, the leaders arrested Jesus. They put Him to death. Jesus’ death on the cross shows us that sin is very evil. But Jesus woke up from the dead. He won the war against sin. He saved us. His waking up from the dead gave us everlasting life.

*Jesus’ waking up from the dead gave us everlasting life.*

repository: Adventech/sabbath-school-lessons

branch_name: refs/heads/stage

repo_name: Adventech/sabbath-school-lessons


text:
# maximatch [![Build Status](https://travis-ci.org/timkendrick/maximatch.svg?branch=master)](https://travis-ci.org/timkendrick/maximatch)

> Extends [`multimatch()`](https://github.com/sindresorhus/multimatch) with support for filter functions and regular expressions

## Install

```sh

$ npm install --save maximatch
```

## Usage

```js
var maximatch = require('maximatch');

maximatch(['unicorn', 'cake', 'rainbows'], ['*', '!cake']);
//=> ['unicorn', 'rainbows']

maximatch(['unicorn', 'cake', 'rainbows'], function(path) { return path.length > 4; });
//=> ['unicorn', 'rainbows']

maximatch(['unicorn', 'cake', 'rainbows'], /^[^k]+$/);
//=> ['unicorn', 'rainbows']

maximatch(['unicorn', 'cake', 'rainbows'], [function(path) { return path.charAt(0) === 'u'; }, /w/]);
//=> ['unicorn', 'rainbows']
```

See the [tests](https://github.com/timkendrick/multimatch/blob/master/test.js) for more usage examples and expected matches.

## API

Same as [`minimatch.match()`](https://github.com/isaacs/minimatch#minimatchmatchlist-pattern-options) except for `pattern` also accepting a filter function, a regular expression, or an array that can contain globs, filter functions and regular expressions.

```js
var results = maximatch(paths, patterns);
```

The return value is an array of matching paths.

## How multiple patterns work

Positive patterns (e.g. `foo` or `*`) add to the results, while negative patterns (e.g. `!foo`) subtract from the results.

Therefore a lone negation (e.g. `['!foo']`) will never match anything – use `['*', '!foo']` instead.

## Globbing patterns

Just a quick overview.

- `*` matches any number of characters, but not `/`
- `?` matches a single character, but not `/`
- `**` matches any number of characters, including `/`, as long as it's the only thing in a path part
- `{}` allows for a comma-separated list of "or" expressions
- `!` at the beginning of a pattern will negate the match

## Related

See [globby](https://github.com/sindresorhus/globby) if you need to match against the filesystem instead of a list.

## License

MIT © [Sindre Sorhus](http://sindresorhus.com), [Jon Schlinkert](https://github.com/jonschlinkert), [Tim Kendrick](https://github.com/timkendrick)

repository: sundial-dreams/BlogApp

repo_name: sundial-dreams/BlogApp


text:
# Traefik

[Traefik](https://traefik.io/) is a modern HTTP reverse proxy and load balancer made to deploy
microservices with ease.

## Introduction

This chart bootstraps Traefik version 2 as a Kubernetes ingress controller,
using Custom Resources `IngressRoute`: <https://docs.traefik.io/providers/kubernetes-crd/>.

### Philosophy

The Traefik HelmChart is focused on Traefik deployment configuration.

To keep this HelmChart as generic as possible we tend
to avoid integrating any third party solutions nor any specific use cases.

Accordingly, the encouraged approach to fulfill your needs:
1. override the default Traefik configuration values ([yaml file or cli](https://helm.sh/docs/chart_template_guide/values_files/))
2. append your own configurations (`kubectl apply -f myconf.yaml`)
3. extend this HelmChart ([as a Subchart](https://helm.sh/docs/chart_template_guide/subcharts_and_globals/))

## Installing

### Prerequisites

With the command `helm version`, make sure that you have:
- Helm v3 [installed](https://helm.sh/docs/using_helm/#installing-helm)

Add Traefik's chart repository to Helm:

```bash
helm repo add traefik https://helm.traefik.io/traefik
```

You can update the chart repository by running:

```bash
helm repo update
```

### Deploying Traefik

```bash
helm install traefik traefik/traefik
```

#### Warning

If you are using Helm v2

You have to deploy CRDs manually with the following command:

```
kubectl apply -f traefik/crds
```

### Exposing the Traefik dashboard

This HelmChart does not expose the Traefik dashboard by default, for security concerns.
Thus, there are multiple ways to expose the dashboard.
For instance, the dashboard access could be achieved through a port-forward :

```
kubectl port-forward $(kubectl get pods --selector "app.kubernetes.io/name=traefik" --output=name) 9000:9000
```

Another way would be to apply your own configuration, for instance,
by defining and applying an IngressRoute CRD (`kubectl apply -f dashboard.yaml`):

```yaml
# dashboard.yaml
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRoute
metadata:
  name: dashboard
spec:
  entryPoints:
    - web
  routes:
    - match: Host(`traefik.localhost`) && (PathPrefix(`/dashboard`) || PathPrefix(`/api`))
      kind: Rule
      services:
        - name: api@internal
          kind: TraefikService
```

## Contributing

If you want to contribute to this chart, please read the [Contributing Guide](../CONTRIBUTING.md).

gha_language: Smarty


text:
# Changelog

All notable changes to this project will be documented in this file. See
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.1.1](https://github.com/d2-projects/vue-filename-injector/compare/v1.1.0...v1.1.1) (2020-03-01)

### Bug Fixes

* **dependencies:**<EMAIL_ADDRESS>([312b68a](https://github.com/d2-projects/vue-filename-injector/commit/312b68a22774a64237919949c4d2887e80ff90b4))


text:
## Backend Application
The backend application is a .NET Core Web API service hosted on Azure Web Apps. The application receives requests to the contollers via REST calls and uses the user's authentication token to request a key vault access token on behalf of the user.

### Controllers
The application structure for pages is as follows:

- [health](/backend/services/healthcheck/ServicesHealthCheck.cs) - Provides a health state for the application
- api
  - [secrets](/backend/Controllers/SecretController.cs)
    - Get - Get all Secrets
    - Get {Secret Id} - Get Secret By Id
    - Post - Create Secret
    - Post {Secret Id}/update - Update existing secret

### Secret Controller
Performs all secret actions against the specified key vault as provided in the [appsettings.json](/backend/appsettings.json) file. To do this the application must request an access token to the Azure key vault service using the [token acquistion](/backend/helpers/OnBehalfOfCredential.cs) service. Once a token is acquired this is then used with the [Keyvault Client Helper](/backend/helpers/KeyVaultClient.cs) to query the key vault and pass the responses back to the frontend.

### Token Acquisition Service
The [token acquisition service](/backend/helpers/OnBehalfOfCredential.cs) is injected into the controller. To acquire a token the [application settings](/backend/appsettings.json) are read to identify the backend application to Azure AD. When combined with a users access token Azure AD will provide an access token to the key vault.

### key vault Client
The key vault client is a [static helper](/backend/helpers/KeyVaultClient.cs) class that when provided with key vault information and access token will perform requests against the key vault.

### Health Service
The application will perform several basic health checks which can be checked by querying the /health URL.

### Application Settings
Application [settings](/backend/appsettings.json) are imported when the application starts. These are the key settings that are required to use the app.

```
{
  "AppConfiguration" : {
    "ApiScope" : "user_impersonation",
    "KeyvaultUrl" : "#{KeyvaultUrl}#",
    "FrontEndUrl" : "#{FrontEndUrl}#"
  },
  "AzureAd": {
    "Instance": "https://login.microsoftonline.com/",
    "Domain": "#{Domain}#",
    "TenantId": "#{TenantId}#",
    "ClientId": "#{ClientId}#",
    "ClientSecret" :"#{ClientSecret}#",
    "Audience" : "#{Audience}#",
    "CallbackPath": "/signin-oidc"
  },
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning",
      "Microsoft.Hosting.Lifetime": "Information"
    }
  },
  "AllowedHosts": "*"
}

```

| Setting | Use |
|---|---|
| AppConfiguration: ApiScope | The scope that the frontend application should present to access the backend app |
| AppConfiguration: keyvaultUrl | The URL of the key vault to access |
| AppConfiguration: FrontEndUrl | The frontend app url for CORS policy |
| AzureAd: Instance | The Azure AD endpoint |
| AzureAd: Domain | The Azure AD Domain |
| AzureAd: TenantId | The Azure AD Tenant Id |
| AzureAd: ClientId | The backend application identifier |
| AzureAd: ClientSecret | The backend application secret |
| AzureAd: Audience | The expected audience that the app should validate |

<- [Back to Summary](/docs/architecture/readme.md) | [Now read about the Azure AD application details here](/docs/architecture/auth/readme.md) ->

repository: MSFTWJONES/passwordmanager

repo_name: MSFTWJONES/passwordmanager


text:
# Four-fundamental-subspaces-Linear-Algebra-Matlab-Code
This is a MATLAB code to find out all 4 fundamental subspaces in Linear Algebra.

% Bases of four fundamental vector spaces associated with the matrix A.

1. cs- basis of the column space of A

2. ns- basis of the nullspace of A

3. rs- basis of the row space of A

4. lns- basis of the left nullspace of A

![3b09bacea4eb4987a900c4ab7d65114f](https://user-images.githubusercontent.com/31156238/104673341-90c2b880-5707-11eb-8ee3-ce464994fc9e.png)


text:
# i3dm.export getting started

In this document we run i3dm.export on a sample dataset of traffic signs (GeoJSON file). The generated instanced 3D tiles are visualized using a simple glTF
box in a MapBox GL JS viewer and Cesium client.

## Prerequisites

Some open source tooling is used in this tutorial:

- wget https://www.gnu.org/software/wget/

- Docker https://www.docker.com/get-started

- ogr2ogr https://gdal.org/programs/ogr2ogr.html

- psql https://www.postgresql.org/docs/9.2/app-psql.html

- .NET 5.0 https://dotnet.microsoft.com/download/dotnet/5.0

- Python 3 https://www.python.org/

## Download data

```
$ wget https://raw.githubusercontent.com/Amsterdam/mlvb/master/output/asset-registration/current_traffic_signs.geojson
```

## Setup PostGIS

Start PostGIS database

```
$ docker run -d -e POSTGRES_PASSWORD=postgres -p 5432:5432 mdillon/postgis
```

## Import traffic signs to PostGIS

```
$ ogr2ogr -f "PostgreSQL" PG:"host=localhost user=postgres password=postgres dbname=postgres" current_traffic_signs.geojson -nlt POINT -nln traffic_signs
```

## PSQL into PostGIS

PSQL into PostGIS and do a count on the traffic signs:

```
$ psql -U postgres -h localhost

postgres=# select count(*) from traffic_signs;
 count
-------
 58999
(1 row)
```

## Create instances table

We create a new table, with

- trees in epsg:4326;

- Box.glb as model;

- randomized scales;

- randomized horizontal rotations;

- for tags use fields 'id' and 'bevestiging' .

```
postgres=# CREATE TABLE traffic_signs_instances as (
	SELECT ogc_fid as id,
	st_transform(wkb_geometry, 4326) as geom,
	1 +  random() as scale,
	random()*360 as rotation,
	'Box.glb' as model,
	json_build_array(json_build_object('id',ogc_fid), json_build_object('bevestiging',bevestiging)) as tags
	from traffic_signs
);

postgres=# CREATE INDEX geom_idx ON traffic_signs_instances USING GIST (geom);
postgres=# delete from traffic_signs_instances where st_x(geom) < 4.5 or st_x(geom)>5.0;
postgres=# exit;
```
## Install i3dm.export

```
$ dotnet tool install -g i3dm.export
```

## Run i3dm.export on instance table

When visualizing in MapBox add the -f mapbox parameter:

```
$ i3dm.export -c "Host=localhost;Username=postgres;password=postgres;Port=5432" -t  traffic_signs_instances -f mapbox
```

When visualizing in Cesium add the -f cesium parameter:

```
$ i3dm.export -c "Host=localhost;Username=postgres;password=postgres;Port=5432" -t  traffic_signs_instances -f cesium
```

Here we visualize the traffic lights all instances as a simple red box (box.glb), but any glTF model can be used instead.

An 'output' directory will be created with a tiles subdirectory containing tileset.json and i3dm tiles.

## Visualize in MapBox GL JS

Put the MapBox client (index.html and mapbox3dtiles.js from directory samples/traffic_lights/mapbox ) and the output folder with tiles on a webserver:

```
$ python3 -m http.server
Serving HTTP on <IP_ADDRESS> port 8000 (http://<IP_ADDRESS>:8000/) ...
```

Navigate in a browser to http://localhost:8000 and the traffic signs should be visible. When moving with mouse over a
sign you should be able to see the 'id' and 'bevestiging' tags in the upperleft popup.

Result should look like:

Live demo: https://geodan.github.io/i3dm.export/docs/index.html

![screenshot](traffic_mapbox.png)

## Visualize in Cesium

Put the Cesium client (index.html and from directory samples\traffic_lights\cesium ) and the output folder with tiles on a webserver.

Live demo: todo

Result should look like:

![screenshot](traffic_cesium.png)

Live demo: https://geodan.github.io/i3dm.export/samples/traffic_lights/mapbox/#16.79/52.367926/4.89836/0/45


text:
# LAUCaptureVideoPreviewLayer

## Introduction

LAUCaptureVideoPreviewLayer is a preview layer for the AVCaptureSession with GPU-based blur filter. You can use it like a AVCaptureVideoPreviewLayer and then dynamically/in real-time apply a blur filter to the video output frames.

It was developed for [Lightmate](https://lightmate.app/ "Lightmate")'s iOS app with the goal of replacing AVFoundation's *AVCaptureVideoPreviewLayer*. This is mainly an R&D project and there are still many optimizations needed before it can be used in a "production" context. This is an attempt to share some of the learnings and components used in the app.

## Requirements and Dependencies

* iOS 7.0 or later
* ARC
* Suported devices: ?
* OpenGL 2.0 / GLSL

## Using with CocoaPods

Create or edit an existing text file named Podfile in your Xcode project directory:

```ruby
pod "LAUCaptureVideoPreviewLayer", '~> 0.1.0'
```

Install LAUCaptureVideoPreviewLayer in your project:

```bash
$ pod install
```

Open the Xcode workspace instead of the project file when building your project:

```bash
$ open YourProject.xcworkspace
```

Import LAUCaptureVideoPreviewLayer:

```obj-c
#import <LAUCaptureVideoPreviewLayer/LAUCaptureVideoPreviewLayer.h>
```

LAUCaptureVideoPreviewLayer's interface is very similar to AVCaptureVideoPreviewLayer. Here's an example:

```obj-c
// Create your AVCaptureSession
// ...

// Create the session video preview layer from LAUCaptureVideoPreviewLayer
LAUCaptureVideoPreviewLayer * videoPreviewLayer = [[LAUCaptureVideoPreviewLayer alloc] initWithSession:captureSession];

// Change the blur property just like you change opacity
videoPreviewLayer.blur = 1.0f;
```

## Example

The example is a single view application with a AVCaptureSession and a AVCaptureDeviceInput (AVCaptureDevicePositionBack).

![Blur in out example](docs/figures/blur-in-out-example.gif)

__Interactions:__

* Tap to blur-in (animated)
* Pull-down to gradually decrease blur value
* Pause/Resume the capture session (animated)

## Development Notes

__LAUCaptureVideoPreviewLayer vs. AVCaptureVideoPreviewLayer__

LAUCaptureVideoPreviewLayer could be used as a drop-in replacement for AVCaptureVideoPreviewLayer. Our intention during the development was to copy and mimic as much as possible AVCaptureVideoPreviewLayer's interface and behavior. However, under the hood that is totally different. To start AVCaptureVideoPreviewLayer is Apple's own preview layer with access to unknown APIs. If you inspect an AVCaptureSession's connections you'll notice AVCaptureVideoPreviewLayer is used as an output (just like AVCaptureVideoDataOutput, for example).

In order to make LAUCaptureVideoPreviewLayer work we need to add a AVCaptureVideoDataOutput to the existing AVCaptureSession. We then use the _captureOutput:didOutputSampleBuffer:fromConnection:_ delegate method to render each frame and apply the blur filter. If you need to use a AVCaptureVideoDataOutput yourself it's also possible. In that case LAUCaptureVideoPreviewLayer will detect if an existing AVCaptureVideoDataOutput is already added to the session's outputs and then _hijack_ it. Your _captureOutput:didOutputSampleBuffer:fromConnection:_ delegate method will then be called from LAUCaptureVideoPreviewLayer.

Remember, LAUCaptureVideoPreviewLayer is experimental. Please report any issues you find.

__Gaussian Blur Implementation__

1. Separable filters
2. Bilinear interpolated texture sampling
3. Downsampling
4. Dynamic texture lookup

## References

[Real-Time Rendering, 3rd Edition, 10.9 Image Processing (p.468-472)](http://www.realtimerendering.com)

[Intel, An investigation of fast real-time GPU-based image blur algorithms](https://software.intel.com/en-us/blogs/2014/07/15/an-investigation-of-fast-real-time-gpu-based-image-blur-algorithms)

[GPU Gems 3, Chapter 40. Incremental Computation of the Gaussian](http://http.developer.nvidia.com/GPUGems3/gpugems3_ch40.html)

[Rastergrid, Efficient Gaussian blur with linear sampling](http://rastergrid.com/blog/2010/09/efficient-gaussian-blur-with-linear-sampling/)

[Xissburg, Faster Gaussian Blur in GLSL](http://xissburg.com/faster-gaussian-blur-in-glsl/)

repository: laugga/LAUCaptureVideoPreviewLayer

repo_name: laugga/LAUCaptureVideoPreviewLayer


text:
## Required Labels if CAN is Not Configured

Some services on the system are required to access services outside of the HPE Cray EX system. If the Customer Access Network \(CAN\) is not configured on the system, these services will need to be pinned to `ncn-m001` because that is the only node that has external access. See [Customer Access Network \(CAN\)](Customer_Access_Network_CAN.md) for more implications if CAN is not configured.

The label used for scheduling these services is `no_external_access`:

-   If the `no_external_access` label is applied to a node with the value `True`, then any pods that require outside access will not be scheduled on that node.
-   If the `no_external_access` label is applied to a node with the value `False`, or if the label does not exist on the node, then any pods that require outside access will be scheduled on that node.

Therefore, if CAN is not configured on the system, the label `no_external_access=True` must be applied to all NCN master and worker nodes other than `ncn-m001`.

### Before Installation

The label can be configured by setting the following values to True in the customizations.yaml file. This value needs to be set for each NCN master and worker node, excluding `ncn-m001`.

```screen
      cray-node-labels:
        nodeLabels:
        - ncn-m001:no_external_access=False
        - ncn-m002:no_external_access=True
        - ncn-m003:no_external_access=True
        - ncn-w001:no_external_access=False
        - ncn-w002:no_external_access=False
        - ncn-w003:no_external_access=False
```

### Post-Installation

The label can be set by editing the Kubernetes ConfigMap by running the following command:

```screen
ncn-m001# kubectl edit cm -n services cray-node-labels
```

Edit the following section as desired \(save and close by hitting the **ESC** key and typing **:wq**\):

```screen
  node_labels: |2-

    - ncn-m001:no_external_access=False
    - ncn-m002:no_external_access=True
    - ncn-m003:no_external_access=True
    - ncn-w001:no_external_access=False
    - ncn-w002:no_external_access=False
    - ncn-w003:no_external_access=False
```

To view the labels applied to each node:

```screen
ncn-m001# kubectl get nodes --show-labels
```


text:
GlassBible
==========

Search the Bible for verses by quickly saying book, chapter and verses.

The version of the Bible used is NET(New English Translation).

API is provided by Bible.org Labs. (https://labs.bible.org/api_web_service)

Optimized for XE16 as of April 17, 2014.

To use, adb sideload the apk to your Glass as any other.
Once the app is installed, "Ok glass, search the Bible..."

### Example voice commands:
- Genesis chapter 1 verse 1 (for Gen 1:1)
- Genesis chapter 1 verse 1 to 10 (for Gen 1:1 to Gen 1:10)
- Today (for Verse of the Day)
- Random (for random Bible verse)

### TODO:
- Share on Twitter/FB
- Send email to friends

### Screenshots:

![Screen Shot1](https://raw.githubusercontent.com/ehdtkqorl123/glassBible/master/glassbible.gif)


text:
# How to sign in to your Account

You can use either [**Online Client**](https://client.earths.ga), or standalone version for [**Windows**](https://earths.ga/files/EarthsClient-win.zip), [**Mac**](https://earths.ga/files/EarthsClient-mac.dmg) or [**Linux**](https://earths.ga/files/EarthsClient-linux.deb). All versions support automatic update!

Choose and open up your Earths wallet.

On the main page choose the necessary address from the drop-down list and put the password, then click **Log in**.

![](/_assets/login_page.png)

___

See more articles in the [Account Management](/earths-client/account-management.md) chapter.

If you have troubles with our platform, please create a [support](https://support.earths.ga/) ticket or write a [question](https://forum.earths.ga/) on our forum.

repository: wavespay/earths-documentation

repo_name: wavespay/earths-documentation


text:
# Draw md is responsible for result of drawing the images.

    // Theh Draw class is a class whhich will creates us a new object each time wi click the button "Zakręć"'

    // For te purpose for drawin the fruits - we will see later
    //
    //
    //
    //
    //
    //
    class Draw {
        // the constructor returns new object which will have theh access to our variable _result, where will be stored objects drawed in the drawResult() method.
        constructor() {
                // Te array with our objects of our
                this.options = [{
                        link: './images/fruits.jpeg',
                        name: 'Kosz Owoców',
                    },
                    {
                        link: './images/seven.png',
                        name: 'Numer Siedem',
                    },
                    {
                        link: './images/apple.jpeg',
                        name: 'Jabłko',
                    },
                    {
                        link: './images/banana.jpeg',
                        name: 'Banan',
                    },
                    {
                        link: './images/cherry.jpeg',
                        name: 'Wiśnia',
                    },
                    {
                        link: './images/tomato.jpeg',
                        name: 'Pomidor',
                    },
                ];
                // the variable which will store the score of our drawing
                // Here we can pass the results from the draw result method.
                let _result = this.drawResult();
                // Methode created inside constructor for having n acces to the _result variable
                this.getDrawResult = () => _result;
            }
            // Methodes inside prototype which lets to the other methodes access to the information it containes;
        drawResult() {
            // The get results will be forwarded to the variable created inside the drawResult method
            let images = [];
            // Now through the for loop we are building the array of drawed objects from options
            for (let i = 0; i < 3; i++) {
                // Now we need to draw the index in that loop
                const optionsIndex = Math.floor(Math.random() * this.options.length);
                // Now we need to get specified object from the options array
                const image = this.options[optionsIndex];
                // check if it works
                console.log(image);
                // And now we need to push the draw object with image parameters into the images array.
                images.push(image);
            }
            // That method only returns the images and pass them to the _result variable.
            return images;
        }
    }

    // For checking if it works we need to crreate an instance of tat class
    // const drawedImage = new Draw();


text:
# MenuSystem

MenuSystem is a proprietary menu system builder. This is used to generate a CSV
file containing connections between nodes in a menu system, the actions which
are available from each node, as well as what is to displayed on each of these
nodes.

## License

MIT © Skyler Layne, 2016

repository: skylerto/MenuSystem

repo_name: skylerto/MenuSystem


text:
---
layout: page
title: Bitsy Bye
permalink: /bitsy-bye/
---

## _aka: **QUIT.SYSTEM**_

* A new program launcher with many features.
* Runs on all Apple II computers and CPUs: _6502, 65c02 or 65816._
* Allows drives to be selected directly by slot using number keys 1-7.
* Allows files to be selected by typing the first letter of their filename.
* Displays and quickly scrolls through up to 2,733 files per directory.
* Displays and allows selection of all files on a drive, not just System files and directories like previous launchers.
* Displays file types and allows launching Applesoft Basic, Binary, Text exec, and GS/OS S16 files via Basic.System.
* Displays the slot and drive of each device.
* Does not abort on drive errors, but instead lists and allows launching of all readable files.
* The code and data size for Bitsy Bye is less than 1KB, with room to spare thanks to **Peter Ferrie** _(qkumba)_.
* **Bitsy Bye** is only `$300` bytes long yet _**hides an Easter egg**_.
Look for it in `QUIT.SYSTEM` on the **ProDOS 2.4**, _and later,_ disks.

## How the system launches Bitsy Bye _(QUIT.SYSTEM)_ on boot

* ProDOS will **always** launch the first program with a suffix of `.SYSTEM` and a file type of `SYS`
* The order is determined by the placement in the disk catalog, not by the spelling.
* To launch **QUIT.SYSTEM** when ProDOS starts up, it must be the first `.SYSTEM` file in the catalog.

1. Format a blank ProDOS disk _(also include the boot sector / loader )_
2. Files need to be in this order in the catalog ...
  - 2.1. copy **PRODOS**
  - 2.2. copy **BITSY.BOOT**
  - 2.3. copy **QUIT.SYSTEM**
  - 2.4. copy **BASIC.SYSTEM**

* **BITSY.BOOT** should be the first **SYS** file.

### When Booting:

1. The boot sector searches the volume for and loads **PRODOS**
2. PRODOS searches for the first **SYS** file, which is **BITSY.BOOT**.
3. **BITSY.BOOT** will then launch the next `.SYSTEM` file on the disk.
If you want **BASIC.SYSTEM** to be the first **SYS** file in the disk catalog, copy it _before_ QUIT.SYSTEM.
To make the system launch **Bitsy Bye** on boot, copy QUIT.SYSTEM **BEFORE** BASIC.SYSTEM.

## The benefit of using **QUIT.SYSTEM** vs. Something like **ProSel**

* It allows you to also have `BASIC.SYSTEM` in the root dir.
* **Bitsy Bye** needs `BASIC.SYSTEM` if you want to use Bitsy to run **BAS**, **BIN**, or **TXT** _(exec)_ files.

## Can Bitsy-Bye operate in 80-column mode?

* Bitsy-Bye is a super lean piece of assembly code.
* `Line 1` of the code for Bitsy-Bye **enables 40-column mode**,
followed by `line 2` which **disables 80-column mode**.

* A feature request for a version of **Bitsy-Bye** with 80-column mode support has been submitted, however there is **no 80-column support** version of **Bitsy-Bye** available at this time.

gha_language: HTML


text:
## camel-kafka-file-serialization
An implementation of [camel-ldp](https://github.com/trellis-ldp/camel-ldp) that:
* consumes an activity stream from Kafka
* filters events of type `http://www.w3.org/ns/ldp#NonRDFSource`
* retrieves only `valid.formats` from TrellisLDP
* executes ImageMagik Convert
* streams the resource to a configured file system directory.

## Configuration
There are two deployment conditions, in a docker network or outside of one.

If you are testing, this will be done outside of Docker, so it is ok to use `localhost`
However, if you are running in a Docker network, the hostnames must match the container names.
So, the trellis and kafka endpoints should to be configured like this:
`
kafka.host=110_kafka_1
trellis.baseUrl=trellis:8445
`

* HTTPS
Note that there is a X509 certificate in the docker build so that Camel can handshake with Trellis over a secure channel.
This file `trellis.crt` must match the certificate built into the Trellis image!

* Filesystem
The host serialization directory defaults to `/mnt/serialized-binaries`.
This is a bound volume for both the image server and the serializer.

* Image server Filesystem resolver
See `cantaloupe.properties` to build project specific collection paths.
Currently, it is set for `SERIALIZATION_DEFAULT_DIR` + `/collection/vp/res/`

repository: ubl-chj/camel-kafka-file-serialization

repo_name: ubl-chj/camel-kafka-file-serialization


text:
# Gravy

Pour it on your shell to make it taste better.

## Overview

This is just a collection of scripts that make life a little easier.

## Installation

Clone this project and add the `bin` directory to your `PATH`.

    echo "export PATH=$PATH:~/path/to/gravy/bin" >> ~/.bashrc

Make sure the `gravy` script is executable.

    chmod 755 bin/gravy

## Usage

    gravy {COMMAND} [{OPTIONS}]

## Commands

- `tunnel` - Kill/Create an SSH Tunnel.
- `redirects` - Get a list of redirects for a URL.

## Configurations

Some gravy commands support predefined configurations. For the ones that do
there should be a example in the `config/{command}` directory. To create
configuration just copy the example file to a file with the desired
configuration name in the `config/{command}` directory.

For example let's say we want a predefined ssh tunnel:

    cp config/tunnel/example config/tunnel/train

Then just edit the configuration and use like this:

    gravy tunnel train

repository: jonathandixon/gravy

repo_name: jonathandixon/gravy


text:
Toggle
======

A content toggle by click plugin for Monstra.

## Version
#### [**v1.3**](https://github.com/devmount-monstra/toggle/releases/tag/v1.3) - 2016-05-02

Here is a [list of all releases](https://github.com/devmount-monstra/toggle/releases) of `Toggle`

## Installation
1. Download latest version of `Toggle`
2. Log into Monstra backend and go to `Extends > Plugins > Install new`
3. Select downloaded file and first click `Upload`, then click `Install`
4.  Now everything is ready to use!

## Usage
Shortcode for content pages:

    {toggle click="some link text" toggle="some toggle content"}

Codesnippet for templates:

    <?php Toggle::show('The answer to life, the universe and everything?', '42'); ?>

## Options
| option         | type     | description                                                 |
|----------------|----------|-------------------------------------------------------------|
| Slide duration | `int`    | How many milliseconds the sliding animation should take     |
| Slide easing   | `string` | Easing type for the sliding animation: `swing` or `linear`  |

## License
This Plugin is distributed under [MIT-License](http://opensource.org/licenses/mit-license.html).

## Sources
This plugin is based on the [.slideToggle()](http://api.jquery.com/slidetoggle/) method of jQuery

---

If you like this plugin and want to give some love back, feel free to...

repository: devmount-monstra/toggle

gha_language: PHP

repo_name: devmount-monstra/toggle


text:
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/vtorres/youcheater)

![](https://i.imgur.com/OWPF3I3.png)

[![Python 3.9](https://img.shields.io/badge/python-3.9-00acd2.svg)](https://www.python.org/downloads/release/python-360/)
[![License: MIT](https://img.shields.io/badge/License-MIT-2bd8af.svg)](https://github.com/vtorres/youcheater/blob/master/LICENSE)

  💬 Auto Comment/Like for Youtube Contests | ZHC | MrBeast 💬

The YouTube channels that gained the most subscribers in the latest year show the platform's current trends
and the areas that are growing rapidly. YouTube channels like MrBeast and ZHC are known by giving prizes
away to the subscribers and for whatever reasons, channels have sort of gamified the objective
of having the first comment/like on a video as soon as it releases!
Yeah, you know... here it comes the automation step! Using a Python command-line application that crawls the data out of YouTube
and search for the latest video of the specified YouTube channel with the goal to auto comment/like using
the YouTube API Provider.

### Install dependencies

- Only needs this step if you started without the use of Gitpod:
```
pip install -r requirements.txt
```

### Configure

- Replace the client_id.json file inside the credentials directory by your google credentials generated file

- Change the following variables in the .env file:
```
CHANNEL_ID # Youtube Channel ID
CHANNEL_URL # Youtube Channel URL
CHANNEL_LAST_VIDEO_ID # Youtube Channel Current Last Video ID
CLOCK_TIME_ZONE # est gmt or utc
CLOCK_WAITING_TIME # Verification period time in seconds
COMMENT_MSG # Your comment
VIDEO_RELEASE_DATE # Start time to try to scrape the data out of youtube
```

### Run
- Use with your responsibility:
```
python ./src/youcheater.py
```

### Contributors
- There are many ways to improve this project, feel free to contribute with your pull request

| Author | Description |
| :---: | :--- |
|  | **One day project by [@vtorres](https://github.com/vtorres)**

repository: vtorres/youcheater

gha_language: Python

repo_name: vtorres/youcheater


text:
# Selenium Helper Scripts for Windows

Because our primary user base is in Windows, we chose to set up our Selenium Grid nodes using Windows 10.  This is not a requirement, each node can be a different operating system with different browsers configured.  It is even possible to specify the operating system you want to test on when building selenium tests, and the Selenium Hub will distribute the tests to the appropriate node.

## session_cleanup.ps1

PowerShell script that looks for orphaned processes left behind from Selenium scripts. The  Often times the driver or browser processes do not close successfully.  This can cause browser instances to not be released for Selenium Grid, or can take up memory and cpu resources unnecessarily.

This script looks for any running Firefox and Chrome browsers processes and their drivers and determines if they are stale.  Sessions are determined to be stale if they have running for more than 20 minutes.

In addition to killing the stale processes, an event is logged with the details of the actions performed when the script runs.

If no running sessions are found, it takes the opportunity to clear temp files that are often generated from the browser sessions.

This script was designed to be used in a Scheduled Task that can run every 15 minutes.

## ScheduleCleanup.ps1

This is a helper script to automatically set up your scheduled task for the `session_cleanup.ps1` script above.

## Dependencies

The dependencies below need to be installed or copied to the specified locations.

### Java Runtime Environment (JRE)

To use Selenium Webdriver Remote, you need to run the Selenium Standalone Server. This requires a Java Runtime Environment (JRE) to be installed.

### Selenium Standalone Server

You can download Selenium Standalone Server from https://www.selenium.dev/downloads/.  The download is in the form of a `.jar` file. The PowerShell scripts referenced in this documentation expect it to be located in the same directory as the scripts.

**Version used in these scripts:** 3.141.59

### Google Chrome Driver

You can download the latest ChromeDriver from https://sites.google.com/a/chromium.org/chromedriver/downloads.  The scripts expect it to be located in the `webdrivers` subdirectory.  As a practice, I usually append the version number to the file name for clarity.

**Example:** `windows/webdrivers/chromedriver86.exe`
**Version used in this script:** 86.0.4240.22

*NOTE:*
You will also need to have a compatible version of Google Chrome installed. Each version of Chrome has a corresponding version of ChromeDriver.

#### Mozilla GeckoDriver

You can download the latest GeckoDriver from https://github.com/mozilla/geckodriver/releases.  The scripts expect it to be located in the `webdrivers` subdirectory.  Version number appended to the file name for clarity.

**Example:** `mac/webdrivers/geckodriver27.exe`
**Version used in this script:** 0.27.0

*NOTE:*
You will also need to have a recent version of Firefox installed (>=60)


text:
![cover](./cover.png)

# Day 53 - The Binary Search Tree

The questions from here onwards will be focusing on complex data structures and hence will be little more  open ended than before, try to do them yourself.

Ques) Implement a Binary Search Tree, and the following methods

1. `insert()` - to insert a new value to the BST
2. `find()` - to find a value in the BST

### Binary Search Tree

Binary Search Tree is a node-based binary tree data structure which has the following properties:

1. The left subtree of a node contains only nodes with keys lesser than the node’s key.
2. The right subtree of a node contains only nodes with keys greater than the node’s key.
3. The left and right subtree each must also be a binary search tree.

[Read more about Binary Search Trees... (Geeks4Geeks)](https://www.geeksforgeeks.org/binary-search-tree-data-structure/)

[ques](./ques.png)

## Solution

## JavaScript Implementation

### [Solution](./JavaScript/BST.js)

```js
/* ==== A very simple implementation of a BST ==== */

class Node {
    constructor (value) {
        this.value = value;
        this.left = null;
        this.right = null;
    }
}

class BST {
    constructor () {
        this.rootnode = null;
    }
}
```

See full solution [here](./JavaScript/BST.js)

repository: CodeToExpress/dailycodebase

gha_language: Java

repo_name: CodeToExpress/dailycodebase


text:
# Lawyer: Widow of man shot by police adamant he wasn’t armed

Published at: **2019-11-05T06:25:19+00:00**

Author: **The Associated Press**

Original: [The Seattle Times](https://www.seattletimes.com/nation-world/nation/angry-crowd-confronts-alabama-police-over-deadly-shooting/)

MADISON, Ala. (AP) — An attorney representing relatives of a black man who was killed by police in Alabama is demanding full transparency over the deadly shooting.
Ben Crump says he’s representing Cherelle Fletcher, who was with her daughter just a few feet away when husband Dana Fletcher was shot to death by Madison police last month.
Crump says the woman is adamant that her husband wasn’t armed even though authorities say he was. Crump says authorities need to release video of the confrontation.
A community gathering held Monday night about Fletcher’s slaying turned raucous as people confronted authorities over the shooting.
News outlets report that Madison County Sheriff Kevin Turner told the crowd he has seen police video that clearly shows a weapon was involved before officers shot Fletcher.
The Associated Press

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
<div align="center">

[![NPM](https://nodei.co/npm/prerender-spa-cdn-plugin.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/prerender-spa-cdn-plugin/)

</div>

## About prerender-spa-cdn-plugin

`prerender-spa-cdn-plugin` is an webpack plugin derived from [`prerender-spa-plugin`](https://github.com/chrisvfritz/prerender-spa-plugin/).

`prerender-spa-plugin` is a popular plugin which helps to provide a simple prerendering solution for SPA website. Although `prerender-spa-plugin` is very convenient to configure and popular used, it has bad support for CDN-like public-path as shown in [issue#114](https://github.com/chrisvfritz/prerender-spa-plugin/issues/114), I wrote `prerender-spa-cdn-plugin` and try to present a zero-config way to make it easier.

## How it works

In online environment, the host of static files in a website is usually different from website's main host. Normally static files use CDN host such as `//static-cdn.abc.com`. The problem is when the integration machine is running prerendering process, the needed static files have not been uploaded to CDN servers yet, which makes prerendering failed.

There are several solutions. 1, Upload files to CDN before start prerendering, which is unreasonable or unavailable in many circumstances. 2, Set  static files 2, Mock CDN host and server in the integration machine during prerendering. This plugin follows the latter.

Before starting to prerender, `prerender-spa-cdn-plugin` generates a forward proxy server which will be configured as the headless browser's proxy server. Then all traffic is directed to forward proxy server for both CDN hostname and website's main hostname. In this way we don't need to do any further configuration such as editing local etc/hosts or launching a local web server to support visiting static files with CDN hostname locally.

`prerender-spa-cdn-plugin` uses [puppeteer](https://github.com/GoogleChrome/puppeteer) as the only kind of headless browser.

## Basic Usage

Basic usage is similiar to `prerender-spa-plugin`
ex, cdn host is `//cdn.abcd.com`, plugin is without special configure.

```
npm install prerender-spa-cdn-plugin
```

```
const PrerenderSpaCdnPlugin = require('prerender-spa-cdn-plugin')
// ...
new PrerenderSpaCdnPlugin({
  staticDir: path.join(__dirname, 'dist'),
  routes: ['/', '/about'],
  rendererOptions: {
    maxConcurrentRoutes: 1,
    injectProperty: '__PRERENDER_INJECTED',
    inject: {
      rendering: true
    }
  }
})
```

## Advanced Usages

### 1、cdn host with pathname

ex, cdn host is `//cdn.abcd.com/static/`, `server` should be added into the option to configure a pathname rewrite. In this way, `server.proxy` option may be a function cause serverPort is not specified by developer but `port-finder`.
```
new PrerenderSpaCdnPlugin({
  staticDir: path.join(__dirname, 'dist'),
  routes: ['/', '/about'],
  server:
    proxy: function (serverPort) {
      return {
        '/static': {
          target: `http://localhost:${serverPort}`,
          pathRewrite: { '^/static': '' }
        }
      }
    }
  },
  rendererOptions: {
    maxConcurrentRoutes: 1,
    injectProperty: '__PRERENDER_INJECTED',
    inject: {
      rendering: true
    }
  }
})
```

### 2、support other hosts

Cause we add a forward-proxy in pupeeteer, all request will be directed to the forward-proxy, which is configured to support the static server only. If other hostname should be supported, we add `proxy-bypass-list` args to puppeteer.

ex, api host is 'api.abcd.com'
```
new PrerenderSpaCdnPlugin({
  staticDir: path.join(__dirname, 'dist'),
  routes: ['/', '/about'],
  browserProxyServer: {
    bypassList: 'api.abcd.com'
  },
  rendererOptions: {
    maxConcurrentRoutes: 1,
    injectProperty: '__PRERENDER_INJECTED',
    inject: {
      rendering: true
    },
    renderAfterTime: 5000
  }
})
```

## Documentation

### Plugin Options

Options is similiar to [prerender-spa-plugin](https://github.com/chrisvfritz/prerender-spa-plugin/blob/master/README.md).

Difference is as follows.

| Option | Type | Required? | Default | Description |
|-------------|-------------------------------------------|-----------|---------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| server | Object | No | None | App server configuration options (See below) |
| rendererOptions  | Object  | No        | new PuppeteerRenderer()   |  Use `@prerenderer/renderer-puppeteer` as the renderer to prerender the app. |
|browserProxyServer | Object | No | None | The configuration of forward-proxy used by puppeteer. (See below)|

#### Server Options

| Option | Type    | Required? | Default                    | Description                            |
|--------|---------|-----------|----------------------------|----------------------------------------|
| port   | Integer | No        | First free port after 8000 | The port for the app server to run on. |
| proxy  | Object\|Function(String serverPort): Object  | No        | No proxying                | Proxy configuration. Has the same signature as [webpack-dev-server](https://github.com/webpack/docs/wiki/webpack-dev-server#proxy) |

`proxy` could be a function whenever `serverPort` is the free port autodetected by package `port-finder`. `serverPort: String` is function's single parameter and the function returns an object whose pattern is as shown in upper table.

```
server: {
  proxy: function(serverPort){
    '/static': {
      target: `http://localhost:${serverPort}`,
      pathRewrite: { '^/static': '' }
    }
  }
}
```

#### BrowserProxyServer Option

| Option | Type    | Required? | Default                    | Description                            |
|--------|---------|-----------|----------------------------|----------------------------------------|
| port   | Integer | No        | First free port after server.port | The port for the forward proxy server to run on. |
| bypassList | String | No | None | List of hostnames which should be bypassed by forward proxy server. In principle it configures puppeteer' args with[`--proxy-bypass-list`](https://www.chromium.org/developers/design-documents/network-settings)
| proxy  | Object\|Function(String serverPort): Object  | No        | proxy: {target: `http://localhost:${serverPort}`}    | Forward proxy configuration. Has the same signature as [webpack-dev-server](https://github.com/webpack/docs/wiki/webpack-dev-server#proxy) |

If proxy is a function, it passes `serverPort: String` as its parameters and returns an object as [webpack-dev-server](https://github.com/webpack/docs/wiki/webpack-dev-server#proxy). `serverPort` is the app server's port specified by `server.port` or autodetected by package `port-finder`.

```
browserProxyOptions: {
  proxy: function(serverPort){
    return {
      target: `http://localhost:${serverPort}`,
    }
  },
  bypassList: 'api.abcd.com'
}
```

### RendererOptions

The only renderer browser used in this plugin is `@prerenderer/renderer-puppeteer`. To be simple, just configure `rendererOptions` instead of set `new PuppeteerRenderer()` to `render` option.

| Option                                                                                | Type                                                                                | Required? | Default                | Description                                                                                |
|------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|-----------|------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| maxConcurrentRoutes                                                                                | Number                                                                                | No        | 0 (No limit)           | The number of routes allowed to be rendered at the same time. Useful for breaking down massive batches of routes into smaller chunks.                                                                                |
| inject                                                                                | Object                                                                                | No        | None                   | An object to inject into the global scope of the rendered page before it finishes loading. Must be `JSON.stringifiy`-able. The property injected to is `window['__PRERENDER_INJECTED']` by default.                                                                   |
| injectProperty                                                                                | String                                                                                | No        | `__PRERENDER_INJECTED` | The property to mount `inject` to during rendering.                                                                                |
| renderAfterDocumentEvent                                                                                | String                                                                                | No        | None                   | Wait to render until the specified event is fired on the document. (You can fire an event like so: `document.dispatchEvent(new Event('custom-render-trigger'))`                                                                                |
| renderAfterElementExists                                                                                | String (Selector)                                                                                | No        | None                   | Wait to render until the specified element is detected using `document.querySelector`                                                                                |
| renderAfterTime                                                                                | Integer (Milliseconds)                                                                                | No        | None                   | Wait to render until a certain amount of time has passed.                                                                                |
| skipThirdPartyRequests                                                                                | Boolean                                                                                | No        | `false`                | Automatically block any third-party requests. (This can make your pages load faster by not loading non-essential scripts, styles, or fonts.)                                                                                |
| consoleHandler                                                                                | function(route: String, message: [ConsoleMessage](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#class-consolemessage)) | No        | None                   | Allows you to provide a custom console.* handler for pages. Argument one to your function is the route being rendered, argument two is the [Puppeteer ConsoleMessage](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#class-consolemessage) object. |
| [[Puppeteer Launch Options]](https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#puppeteerlaunchoptions) | ?                                                                                | No        | None                   | Any additional options will be passed to `puppeteer.launch()`, such as `headless: false`.                                                                                |

---

## MIT License
```
## MIT License

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

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

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

repository: vbigbang/prerender-spa-cdn-plugin

repo_name: vbigbang/prerender-spa-cdn-plugin


text:
# playShell
Linux Shell Script Learning

1. grant user <user> to access docker

   ```
   usermod -a -G docker <user>
   ```
2. make sh executable

   ```
   $ chmod +x *.sh
   ```
3. Show group permission on current path

    ```
    $ ls -ld $(pwd)
    ```

4.
    ```
    $ ls -ld some_dir
      drwxrwxr-x 2 alex consult 4096 Feb 20 10:10 some_dir/
                    ^     ^
                    |     |_____ directory's group
                    |___________ directory's owner
    ```

5. [Systemd](https://coreos.com/os/docs/latest/getting-started-with-systemd.html)

   Description: systemd is an init system that provides many powerful features for starting, stopping, and managing processes. Within Container Linux, you will almost exclusively use systemd to manage the lifecycle of your Docker containers.

   Path:  /etc/systemd/system
```
[Unit]
Description=MyApp
After=docker.service
Requires=docker.service

[Service]
TimeoutStartSec=0
ExecStartPre=-/usr/bin/docker kill busybox1
ExecStartPre=-/usr/bin/docker rm busybox1
ExecStartPre=/usr/bin/docker pull busybox
ExecStart=/usr/bin/docker run --name busybox1 busybox /bin/sh -c "trap 'exit 0' INT TERM; while true; do echo Hello World; sleep 1; done"

[Install]
WantedBy=multi-user.target
```

6. find command in bash
The basic syntax is as follows:
```
find /path/to/dir -name "filename"
find /nas/projects -name "*.h"
```

7.

8.

repository: Prussia/playShell

repo_name: Prussia/playShell


text:
# ember-responsive-image

[![Build Status](https://travis-ci.org/kaliber5/ember-responsive-image.svg?branch=master)](https://travis-ci.org/kaliber5/ember-responsive-image)
[![npm version](https://badge.fury.io/js/ember-responsive-image.svg)](https://badge.fury.io/js/ember-responsive-image)
[![Code Climate](https://codeclimate.com/github/kaliber5/ember-responsive-image/badges/gpa.svg)](https://codeclimate.com/github/kaliber5/ember-responsive-image)
[![Ember Observer Score](https://emberobserver.com/badges/ember-responsive-image.svg)](https://emberobserver.com/addons/ember-responsive-image)

An ember-cli addon to automatically generate resized images and use them in `img` tags with the `srcset` attribute.

This is very useful for responsive web apps to optimize images for a wide range of devices (smartphones, tablets, desktops etc.). All browsers with [support for the `srcset` attribute](http://caniuse.com/#search=srcset) will automatically load the most appropriate resized image for the given device, e.g. based on screen size and density (high dpi "retina" screens).

Built on top of the awesome [sharp](https://github.com/lovell/sharp) library.

## Getting started

### Install in ember-cli application

In your application's directory:

```bash
ember install ember-responsive-image
```

### Install sharp

On Windows, Mac and Linux `npm` / `yarn` will download and install the `sharp` image processing library
automatically. For other environments please consult the [installation](http://sharp.dimens.io/en/stable/install/#installation)
instructions.

## Basic Usage

Add the configuration to your `config/environment.js`

```js
module.exports = function(environment) {
  var ENV = {
    'responsive-image': {
      sourceDir: 'assets/images/generate',
      destinationDir: 'assets/images/responsive',
      quality: 80,
      supportedWidths: [2048, 1536, 1080, 750, 640],
      removeSourceDir: true,
      justCopy: false,
      extensions: ['jpg', 'jpeg', 'png', 'gif']
    }
  }
}
```

If you need different configurations, you can make the `responsive-image` config an array:

```js
module.exports = function(environment) {
  var ENV = {
    'responsive-image': [
        {
          sourceDir: 'assets/images/generateLarge',
          destinationDir: 'assets/images/responsiveLarge',
          quality: 80,
          supportedWidths: [2048, 1536, 1080],
          removeSourceDir: true,
          justCopy: false,
          extensions: ['jpg', 'jpeg', 'png', 'gif']
        },
        {
          sourceDir: 'assets/images/generateSmall',
          destinationDir: 'assets/images/responsiveSmall',
          quality: 80,
          supportedWidths: [750, 640, 320],
          removeSourceDir: true,
          justCopy: false,
          extensions: ['jpg', 'jpeg', 'png', 'gif']
        }
    ]
  }
}
```

### Options

* **sourceDir:** The folder with the origin images.
* **destinationDir:** This folder will contain the generated Images. It will be created, if not existing. Must not be the same as sourceDir.
* **supportedWidths:** These are the widths of the resized images.
* **removeSourceDir:** If true, the sourceDir will be removed from the build.
* **justCopy:** If true, the images will just be copied without resizing. This is useful for development builds to speed things up, but should be false for production.
* **extensions:** Array of file extensions. Only files with these extensions will be resized, others will be ignored. Avoid errors with files like `.DS_Store`.

Put one or more images in the source folder (in this case 'assets/images/generate/'), like 'myImage.png', and build the project. The resized images will be generated into the destination directory ('assets/images/responsive'):
```
myImage640w.png
myImage750w.png
myImage1080w.png
myImage1536w.png
myImage2048w.png
```

**Note:** If the width of your origin image is less than the generated should be, the image will be generated unresized.

## Service

The `responsive-image` service provides the available images with the sizes for a given origin image, and also retrieves the image that fits for the current screen size.
```js
let availableImages = responsiveImageService.getImages("myImage.png");
/**
avaliableImages contains now:
[
    {width: 640, height: 320, image: "/assets/images/responsive/myImage640w.png"},
    {width: 750, height: 375, image: "/assets/images/responsive/myImage750w.png"},
    ...
    {width: 2048, height: 1012, image: "/assets/images/responsive/myImage2048w.png"}
]
*/

let imageData = responsiveImageService.getImageDataBySize("myImage.png", 100); // The size argument is in ´vw´, 100 is the default and can be omitted
// {width: 750, height: 375, image: "/assets/images/responsive/myImage750w.png"}

let fittingImage = responsiveImageService.getImageBySize("myImage.png", 100); // The size argument is in ´vw´, 100 is the default and can be omitted
// "/assets/images/responsive/myImage1080w.png"
```

The base width to calculate the necessary image width is the `screen.width` assigned to the `screenWidth` property of the services. If this doesn't fit your needs, you can assign an other value, e.g. `document.documentElement.clientWidth`.

## Helper

The `responsive-image-resolve` helper provides the image url that fits for the current screen size. The first parameter is the name of the origin image.
The second argument is the width in `vw` and has a default value of `100`, so it can be omitted.

```hbs
{{responsive-image-resolve "myImage.png" 100}}
```

will result in

```html
/assets/images/responsive/myImage1080w.png
```

## Components
### The responsive-image component

In a template you can use the responsive-image component. The image argument is required and must be one of the origin files:

```hbs
{{responsive-image image="myImage.png"}}
```

This will generate an `img` tag with the resized images as the [`srcset` attribute](https://developer.mozilla.org/de/docs/Web/HTML/Element/img#attr-srcset), so the browser can decide, which image fits the needs:
```html
<img id="ember308" src="/assets/images/responsive/myImage1080w.png" srcset="/assets/images/responsive/myImage640w.png 640w, /assets/images/responsive/myImage750w.png 750w, /assets/images/responsive/myImage1080w.png 1080w, /assets/images/responsive/myImage1536w.png 1536w, /assets/images/responsive/myImage2048w.png 2048w" class="ember-view">
```

The image in the `src` attribute is calculated by the component and will be used by browsers without `srcset` support.

Other attributes like `alt`, `className`, `width` or `height` are optional:

```hbs
{{responsive-image image="myImage.png" className="my-css-class" alt="This is my image"}}
```

```html
<img id="ember308" src="..." srcset="..." class="ember-view my-css-class" alt="This is my image">
```

If your image width is not '100vw', say 70vw for example, you can specify the `size` (only `vw` is supported as a unit by now):
```hbs
{{responsive-image image="myImage.png" size="70"}}
```

```html
<img id="ember308" src="..." srcset="..." sizes="70vw">
```

You can also replace the [`sizes` attribute](https://developer.mozilla.org/de/docs/Web/HTML/Element/img#attr-sizes) if your responsive image width is more complicated like:
```hbs
{{responsive-image image="myImage.png" sizes="(min-width: 800px) 800px, 100vw"}}
```

```html
<img id="ember308" src="..." srcset="..." sizes="(min-width: 800px) 800px, 100vw">
```

### The responsive-background component

In a template you can use the `responsive-background` component. The image argument is required and must be one of the origin files:

```hbs
{{responsive-background image="myImage.png"}}
```

This will generate an `div` tag with an image as a background image, which fits the needs:
```html
<div id="ember308" style="background-image: url('/assets/images/responsive/myImage1080w.png')" class="ember-view"></div>
```

Like the `responsive-image` component, you can pass a size:
```hbs
{{responsive-background image="myImage.png" size="50"}}
```

```html
<div id="ember308" style="background-image: url('/assets/images/responsive/myImage640w.png')" class="ember-view"></div>
```

## Mixins
### The responsive-image mixin

This mixin binds the url of the best fitting image to the source attribute, based in the values provided by the `image` and `size` attribute. It also get the `responsiveImage` service injected.

### The responsive-background mixin

This mixin binds the url of the best fitting image as the background url to the elements style attribute, based in the values provided by the `image` and `size` attribute. It also get the `responsiveImage` service injected.

## Extensibility hooks
### Extend the image processing

During the image process the addon calls the `preProcessImage` and the `postProcessImage` hooks for each origin image and supported width. Here you can add custom image process steps, like a watermark integration. The first hook will be called just before the addon's image process calls applies, the latter after. You can register your callbacks by calling the addon's `addImagePreProcessor` or `addImagePostProcessor` function before the addon's `postprocessTree` was called.
In both cases the callback function you provide must have the following signature:

```javascript
  function preProcessor(sharp, image, width, configuration)
  {
    // do something with the sharp-object...
    return sharp;
  }
```
* **sharp:** [sharp](https://github.com/lovell/sharp) object with the current origin image
* **image:** the name of the origin image file
* **width:** the width of the resulting resized image of the current process
* **configuration:** the configuration for the current image processing (from environments configuration)

The callback must return a `sharp`-object or a Promise resolves to it.

**Note:** In addition to the callback, you can also pass an optional target object that will be set as `this` on the context. This is a good way to give your function access to the current object.

**Note:** If you set `justCopy` to `true` in your configuration, your callback will be called, but the result doesn't take effect to the resulting image (because it's just a copy).

For an example see [ember-lazy-responsive-image](https://github.com/kaliber5/ember-lazy-responsive-image/blob/master/index.js)

### Extend the metadata

Before the addon injects the generated metadata into the build, a `extendMetadata`-hook is called for each origin image. The `metadata`-object contains the information for the addon's `ResponsiveImage`-Service. Here you can add custom metadata. You can register your callbacks by calling the addon's `addMetadataExtension` function before the addon's `postprocessTree` was called.
The callback function you provide must have the following signature:

```javascript
  function customMetadata(image, metadata, configuration)
  {
    // do something with the metadata-object...
    return metadata;
  }
```
* **image:** the name of the origin image file
* **metadata:** object with the metadata of the generated images
* **configuration:** the configuration for the image generation (from environments configuration)

The callback must return an object with the extended metadata.

**Note:** In addition to the callback, you can also pass an optional target object that will be set as `this` on the context. This is a good way to give your function access to the current object.

For an example see [ember-lazy-responsive-image](https://github.com/kaliber5/ember-lazy-responsive-image/blob/master/index.js) and the extended [ResponsiveImageService](https://github.com/kaliber5/ember-lazy-responsive-image/blob/master/addon/services/responsive-image.js)

## Lazy loading and LQIP (Low Quality Image Placeholder)

For lazy-loading and LQIP support, see [ember-lazy-responsive-image](https://github.com/kaliber5/ember-lazy-responsive-image).

## Tests

Sometimes you can get in trouble in integration tests and get an assertion `'There is no data for image ...'` if your subject relates to this addon. Because the `ResponsiveImageService` gets necessary data injected in an initializer, and initializers won't be called in the integration tests. To fix this, you can provided `setupResponsiveImage()` test helper in tests:

```js
import { setupRenderingTest} from 'ember-qunit';
import { setupResponsiveImage } from 'ember-responsive-image/test-support';

module('Integration: My Image Component', function(hooks) {
  setupResponsiveImage(hooks);

  test(...);
});
```

repository: lineupninja/ember-responsive-image

repo_name: lineupninja/ember-responsive-image


text:
---
title: "Expectation Propagation for t-Exponential Family Using q-Algebra"
collection: publications
permalink: /publication/2009-10-01-paper-title-number-1
excerpt: 'This paper is about the Expectation Propagation'
date: 2017-12-10
venue: 'NIPS'
paperurl: 'https://papers.nips.cc/paper/6819-expectation-propagation-for-t-exponential-family-using-q-algebra'
#citation: 'Your Name, You. (2009). "Paper Title Number 1." <i>Journal 1</i>. 1(1).'
---
This paper is about the extension of Expectation Propagation, and applied it to Student-T process.

[Download paper here](https://papers.nips.cc/paper/6819-expectation-propagation-for-t-exponential-family-using-q-algebra)

## Outline
* We extended the Expectation Propagation method beyond the exponential families to t-exponential families preserving the analytical update equations.
* In the paper, experiments using Gaussian processes and Student-T processes show the usefulness of the method.
* The biggest contribution of this work is introducing the novel tool called ‘Q-algebra’ developed in the statistical physics and applying it to the Bayesian inference method successfully.


text:
# Install
Easy peasy lemon squeezy

## Repo and Dependencies
Just clone the repo, then install the project's dependencies:
```
$ git clone https://github.com/DiegoVictor/meetapp-api.git
$ cd meetapp-api
$ yarn
```

## Database
The project use two databases: postgres and redis. We will use docker here to start up faster:
```
$ docker run --name meetapp -e POSTGRES_PASSWORD=docker -p 5432:5432 -d postgres
```
If the image not start automatically, run:
```
$ docker start meetapp
```

To redis the process is basically the same:
```
$ docker run --name redismeetapp -p 6379:6379 -d -t redis:alpine
$ docker start redismeetapp
```

### Seed
Optionally you can fill the database with some random data:
```
$ yarn sequelize db:seed:all
```

## .env
Just copy the `.env.example` in the application folder and set the remaning settings.

The first block is the application settings, the `APP_SECRET` is used to encrypt passwords
```
APP_URL=http://localhost
APP_PORT=3333
APP_SECRET=c8ca2b37536277952488afa5ab7ac8e9
NODE_ENV=development
```

Below you must configure the postgres settings:
```
DB_DIALECT=postgres
DB_HOST=<IP_ADDRESS>
DB_PORT=5432
DB_USER=postgres
DB_PASS=docker
DB_NAME=meetapp
```

In the next block you can configure the mail service. If necessary you can do more configurations in the `src/config/mail.js` file.

By default redis is already configurated, but if necessary feel free to update it:
```
REDIS_HOST=<IP_ADDRESS>
REDIS_PORT=6379
```

> If you are on Windows using Docker Toolbox maybe you need set your redis and postgres host to `<IP_ADDRESS>`

## LOG
Optionally you can configure a sentry project to log errors:
```
LOG=1
SENTRY_DSN=<sentry dsn>
SEQUELIZE_LOG=0
```
> Set `LOG` to  `0` if you do not want to log errors in Sentry. Set `SEQUELIZE_LOG` to disable sequelize's terminal logs

# Run
Finally you can run the application. First run the email queue:
```
$ yarn queue
```
Then the server:
```
$ yarn dev
```

# Tests
```
$ yarn test
```

repository: jramalho/meetapp-api

repo_name: jramalho/meetapp-api