text:
[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/labring/sealos)
[![Build Status](https://github.com/labring/sealos/actions/workflows/release.yml/badge.svg)](https://github.com/labring/sealos/actions)
[![Website](https://img.shields.io/website?url=https%3A%2F%2Fpostwoman.io&logo=Postwoman)](https://sealyun.com)
[![Go Report Card](https://goreportcard.com/badge/github.com/labring/sealos)](https://goreportcard.com/report/github.com/labring/sealos)
[![Chat on Telegram](https://img.shields.io/badge/chat-Telegram-blueviolet?logo=Telegram)](https://t.me/gsealyun)
---
**Document: _[Official document](https://www.sealyun.com/instructions), [中文文档](/README.md), [Blog](https://fuckcloudnative.io)_**

**Organization: _DingTalk(35371178), [Telegram](https://t.me/cloudnativer)_**
---
# Introduction
Build a kubernetes HA cluster for a production environment.

![](docs/images/arch.png)
* Each node will be configured with an ipvs proxy for masters LB, so we needn't haproxy or keepalived any more.
* Then run a [lvscare](https://github.com/labring/lvscare) as a staic pod to check apiserver is aviliable. `/etc/kubernetes/manifests/sealyun-lvscare.yaml`
* If any master is down, lvscare will remove the ipvs realserver, when master recover it will add it back.
* Sealos will send package and apply install commands, so we needn't ansible.

# ✨ Supported Environment

## Linux Distributions, CPU Architecture

- Debian 9+,  x86_64/ arm64
- Ubuntu 16.04， 18.04， 20.04 ,  x86_64/ arm64
- Centos/RHEL 7.6+,  x86_64/ arm64
- 99% systemd manage linux system， x86_64/ arm64
- Kylin arm64

## kubernetes Versions

- 1.16+
- 1.17+
- 1.18+
- 1.19+
- 1.20+
- 1.21+
- 1.22+
- 1.23+

Looking for more supported versions, [sealyun.com](https://www.sealyun.com).

## Requirements and Recommendations

- Minimum resource requirements
   - 2 vCpu
   - 4G RAM
   - 40G+ Storage

- OS requirements
   - SSH can access to all nodes.
   - These nodes have unique host names that meet the hostname requirements for kubernetes.
   - Time synchronization for all nodes.
   - Network Iface name is unique, it is recommended to change it to a standard NIC name, such as (eth.|en.|em.*).
   - Kubernetes1.20+, use containerd for default cri. user should not to install containerd or docker-ce. sealos will do it
   - Kubernetes1.19-, use docker for default cri. user should not to install docker-ce. sealos will do it for you
- Networking and DNS requirements：
  - Make sure the DNS address in /etc/resolv.conf is available. Otherwise, it may cause some issues of DNS in cluster。
  - If you use Ali cloud or Huawei cloud host to deploy.  The default pod segment will conflict with AliCloud's dns segment, it is recommended to customize the pod segment by specifying --podcidr during init.
  - Sealos disables the firewall by default ，If you need to open the firewall, it is recommended to release the relevant ports manually.
- Kernel requirements:
  - The cni component requires a kernel version of not less than 5.4 when selecting cilium

# Tips
- If you use Tencent Cloud Hosting to deploy, calico's IPIP rules are disabled by default, and you need to change to VXLAN rules to use it properly.

# 🚀 Quick Start

> Environmental information

Hostname|IP Address
---|---
master0|<IP_ADDRESS>
master1|<IP_ADDRESS>
master2|<IP_ADDRESS>
node0|<IP_ADDRESS>

Server password：123456

**kubernetes .0, the version is not recommended for production environment!!!**

> Just prepare the server and execute the following command on any server

```bash
# download and install sealos, sealos is a binary tool of golang, just download and copy directly to the bin directory, the release page can also be downloaded
wget -c https://sealyun-home.oss-cn-beijing.aliyuncs.com/sealos/latest/sealos && \
    chmod +x sealos && mv sealos /usr/bin

# download offline resource pack
wget -c https://sealyun.oss-cn-beijing.aliyuncs.com/05a3db657821277f5f3b92d834bbaf98-v1.22.0/kube1.22.0.tar.gz

# Install a three-master kubernetes cluster
sealos init --passwd '123456' \
	--master <IP_ADDRESS>  --master <IP_ADDRESS>  --master <IP_ADDRESS>  \
	--node <IP_ADDRESS> \
	--pkg-url /root/kube1.22.0.tar.gz \
	--version v1.22.0
```

> Parameter meaning

| parameter | meaning                                                                                | example                 |
|-----------|--------------------------------------------------------------------------------------------------------------|-------------------------|
| passwd    | server password                                                                                | 123456                  |
| master    | k8s master IP Address                                                                                | <IP_ADDRESS>             |
| node      | k8s node IP Address                                                                                | <IP_ADDRESS>             |
| pkg-url   | offline resource package address, support downloading to local or a remote address                           | /root/kube1.22.0.tar.gz |
| version   | [Resource pack](https://www.sealyun.com/goodsList) Corresponding version | v1.22.0                 |

> add master

```bash
🐳 → sealos join --master <IP_ADDRESS> --master <IP_ADDRESS>
🐳 → sealos join --master <IP_ADDRESS>-<IP_ADDRESS>  # or multiple consecutive IPs
```

> add node

```bash
🐳 → sealos join --node <IP_ADDRESS> --node <IP_ADDRESS>
🐳 → sealos join --node <IP_ADDRESS>-<IP_ADDRESS>  # or multiple consecutive IPs
```

> delete the specified master

```bash
🐳 → sealos clean --master <IP_ADDRESS> --master <IP_ADDRESS>
🐳 → sealos clean --master <IP_ADDRESS>-<IP_ADDRESS>  # or multiple consecutive IPs
```

> Delete the specified node

```bash
🐳 → sealos clean --node <IP_ADDRESS> --node <IP_ADDRESS>
🐳 → sealos clean --node <IP_ADDRESS>-<IP_ADDRESS>  # or multiple consecutive IPs
```

> clean up the cluster

```bash
🐳 → sealos clean --all
```

# ✅ Feature

- [x] Support ARM version offline package, v1.20 version offline package supports containerd integration, completely abandon docker
- [x] 99 years certificate, support cluster backup and upgrade
- [x] No dependency on ansible haproxy keepalived, a binary tool, 0 dependency
- [x] Offline installation, different versions of kubernetes download corresponding to different versions [Resource pack](https://www.sealyun.com/goodsDetail?type=cloud_kernel&name=kubernetes), Offline package contains all binary files configuration files and images
- [x] High-availability local LIB implemented through ipvs, which takes up less resources, is stable and reliable, and is similar to the implementation of kube-proxy
- [x] Almost compatible with all environments that support systemd x86_64 architecture
- [x] Easily add and delete cluster nodes
- [x] Thousands of users use sealos in the online environment, which is stable and reliable
- [x] The resource pack is placed on Alibaba Cloud OSS, so you don’t have to worry about network speed anymore

# 📊 Stats

![Alt](https://repobeats.axiom.co/api/embed/10ce83c1d8452210bc4a0b5a5df9d59bbc35d889.svg "Repobeats analytics image")

## Star History

[![Star History Chart](https://api.star-history.com/svg?repos=fanux/sealos&type=Date)](https://star-history.com/#fanux/sealos&Date)

repository: cuisongliu/sealos

gha_language: Go

repo_name: cuisongliu/sealos


text:
# lua-netio

## Description

lua-netio is a library to control outputs of NETIO 4x smart power sockets from [NETIO products a.s.](https://www.netio-products.com). These Ethernet- or WiFi-connected power sockets can be accessed using a varity of protocols and M2M-API methods, including HTTP(s) CGI, Telnet, XML, JSON and many more.

**Currently implemented:**
* URL API ([Offical doc](https://www.netio-products.com/files/download/sw/version/URL-API---description-of-NETIO-M2M-API-interface---PDF_1-1-0.pdf))
* JSON API ([Offical doc](https://www.netio-products.com/files/download/sw/version/JSON---description-of-NETIO-M2M-API-interface_1-2-0.pdf))

## TODO

* implement Telnet ([Offical doc](https://www.netio-products.com/files/download/sw/version/TELNET---description-of-NETIO-M2M-API-interface_1-0-0.pdf))
* implement Telnet support for NETIO 230B (older model) ([Offical doc](http://www.koukaam.se/koukaam/downloads/MAN_EN_CGI_NETIO_4.x.pdf))
* add rockspec

I'm not planing to implement the XML API, because in my opinion the JSON API is enough, but if someone want to contribute, do it :)

## Example Usage

```lua
local Netio = require('netio')
local netio1 = Netio.new({
    url = 'http://netio-4.netio-products.com',
    port = 8080,
    user = 'write',
    pass= 'demo',
    api = 'json'
  })

local resp, err = netio1:outputs_info(1)
print('Current state of Output1 is ' .. resp.State)
resp, err = netio1:outputs_toggle(1)
print('State after toggle of Output1 is ' .. resp[1].State)
```

## Documentation

Documentation was generated with [LDoc](https://github.com/stevedonovan/LDoc) and can be read here: https://imolein.github.io/lua-netio/

## Dependencies

* [lua-requests](https://github.com/JakobGreen/lua-requests)

## Tests

You need [busted](https://github.com/Olivine-Labs/busted) to run the tests.

```bash
busted spec/
```

Some tests might fail sporadically. That's because the demo instaces sporadically rejects the commands silently and just return the status JSON object. If you take a look into the NETIO's logfile, you see that the command is rejected, but not why.

license: MIT

repository: imolein/lua-netio

branch_name: refs/heads/master

extension: md

gha_language: Lua

gha_license_id: MIT

license_type: permissive

repo_name: imolein/lua-netio


text:
## Prerequisites

* [ ] Are you running the latest version of Bootstrap Listr (stable or alpha/beta)?
* [ ] Did you check your browser's console for errors?
* [ ] Did you check the [FAQ](https://github.com/idleberg/Bootstrap-Listr/wiki/FAQ)?
* [ ] Did you [perform a cursory search](https://github.com/idleberg/Bootstrap-Listr/issues) to see if your issue has already been reported?

## Description

[Description of the bug or feature]

## Steps to reproduce

1.
2.
3.

**Expected behavior:**

[What you expected to happen]

**Actual behavior:**

[What actually happened]

## Versions

* Bootstrap Listr
* PHP
* [browser]
* [server]

repository: drinkcerealmilk/Bootstrap-Listr

repo_name: drinkcerealmilk/Bootstrap-Listr


text:
# Easy as Pie!

## Summary

* Simple Privilege Escalation

## Description

* ![1](./1.png?raw=true)
  * Notice the last sentence of the problem about access control list.
* Server checks the authority of a user with access control list.
* An attacker needed to escalate privilege.
* ![2](./2.png?raw=true)
  * Just added a line to `acl.txt`, which has the authority information of files like /etc/passwd in Linux.
  * Notice that a user couldn't write `.acl.txt` and `flag.txt`.
  * Notice that there's a fake flag, too.
    * A flag string format is same as `auctf{...}`
  * So, `.acl.txt` is so much suspicious.
* ![3](./3.png?raw=true)


text:
## Student

Attribute | Description
--- | ---
studentId |
ownerId | The ID of the staff member assigned to this student
agencyId | The ID of the agency office that this student belongs to
nationalityId | The ID of the country representing the student’s nationality
photoId |
firstname |
lastname |
email |
phone |
address |
postalCode |
gender |
birthdate |
passportNumber |
notes |
accommodation |
budget |
startMonth |
startYear |
startDay |
durationWeekAmount | The number of weeks the student would prefer to study for
hoursPerWeek |
amOrPm |
created |
modified |
currentLocationGooglePlaceId |
isHighPriority |
isArchived |
isDeleted |
studentArchiveReasonId |
archiveNotes |
archiveDate |
startDate |
recoveryDate |
studentTags | Array<[StudentTag](#student-tag)>
studentCoursePreferences | Array<[StudentCoursePreference](#student-course-preference)>
studentSchoolPreferences | Array<[StudentSchoolPreference](#student-school-preference)>
studentLocationPreferences | Array<[StudentLocationPreference](#student-location-preference)>
studentCurrentPipelineStages | Array<[StudentCurrentPipelineStage](#student-current-pipeline-stage)>
studentPipelineStageStepCompleted | Array<[StudentPipelineStageStepCompleted](#student-pipeline-stage-step-completed)>
customPropertyValues | Array<[CustomPropertyValue](#custom-property-value)>
studentSecondaryContacts | Array<[StudentSecondaryContact](#student-secondary-contact)>
studentStudyRecords | Array<[StudentStudyRecord](#student-study-record)>
quotes | Array<[Quote](#quote)>
studentQuotes | Array<[StudentQuote](#student-quote)>
owner | [User](#user)
currentLocationGooglePlace | [GooglePlace](#google-place)
nationality | [Country](#country)
files | Array<[File](#file)>
studentEnrollments | Array<[StudentEnrollment](#student-enrollment)>
photo | [Photo](#photo)

### Queries

```shell
#example of using studentsGetList

curl https://api.edvisor.io/graphql \
  -X POST \
  -H "Authorization: Bearer MY_API_KEY" \
  -H 'content-type: application/json' \
  -d '{"query":"query CustomQueryName($pagination: PaginationInput, $filter: StudentsFilterInput) {studentsGetList(pagination: $pagination, filter: $filter) {count, data {studentId}}}","variables":{"pagination":{"limit":10,"offset":0},"filter":{"isDeleted":false}}}'
```

Query | Return object
--- | ---
student(studentId: <Int>) | [Student](#student)
students(studentIds: Array<Int>) | Array<[Student](#student)>
studentsGetList(pagination: <PaginationInput>, filter: <StudentsFilterInput>) | [ListResult](#list-result)

### Mutations

Mutation | Return object
--- | ---
createStudent(input: <StudentInput>) | [Student](#student)
createWeb2LeadStudent(input: <StudentInput>) | [Student](#student)
updateStudent(studentId: <Int>, input: <StudentInput>) | [Student](#student)
deleteStudents(studentIds: Array<Int>) | [Student](#student)
uploadStudentFiles(studentId: <Int>, fieldName: <String>) | [File](#file)
uploadStudentPhoto(studentId: <Int>, fieldName: <String>) | [File](#file)

gha_language: JavaScript

gha_license_id: NOASSERTION


text:
---
layout: post
title:  "Glazed lamb and a Greek-like-salad"
date:   2017-08-13 19:46:00
publishdate:   2017-08-13 19:46:00
tags: ["lamb", "2017"]
author: oli
image: "/images/blog/glazed-lamb/glazed-lamb-06.jpg"
---

I love a bit of quick grilled lamb and a marinade and glaze never goes too far wrong.  Despite lamb being sweet I think it benefits from a slightly sweetened glazed, however if you grill lamb hot and fast (as it benefits from) sugars in the glaze burn, so I decided to try adding it at the very end of cooking.

Using a red hot pan and a red hot grill means the lamb can be seared on the outside, still rare in the middle.

I can't claim this is a Greek salad because it has no olives (due to them only being 50% acceptable in our house).

## You will need

### For the lamb

* Lamb neck or lamb chops, diced to a little over an inch
* A good slug of red wine vinegar
* A good slug of olive oil
* Half a clove of garlic finely sliced
* A good sized sprig of mint, finely snipped
* A good spring of thyme, stripped off the branch
* A teaspoon of honey
* Salt and pepper

### For the salad

* 6 inches of cucumber diced to 1cm
* A handful of feta, diced
* A few fresh origano leaves, fine snipped
* A couple of ripe tomatoes
* Flat lettuce sliced
* A slug of olice oil
* A good twist of salt and pepper

## Do

1. Whisk up the oil, garlic, vinegar and mint
2. Reserve about a shot glass full to once side and mix the honey in with it
3. Mix the lamb and the non-honey'd marinate, leave for a few hours
4. Mix the diced feta, oil, salt, pepper and origano
5. Get a griddle pan really hot, and the grill too.
6. Drain off the lamb, pat dry and dump it into the pan.  After a minute or two turn it all.
7. Stick it under the grill for another few minutes
8. Once the lamb has some blackened edges, dump in the reserved honey mixture and stir about.  Return to the grill for a minute or too.
9.  Pile on a plate

## Result

The lamb is tender, crunchy bits, sweat bits, the vinegar lifts the rich grease up and there are (hopefully) sticky garlicy umarmi bits.

![Marinade is pretty](/images/blog/glazed-lamb/glazed-lamb-00.jpg)
![Lamb marinading (banana for scale)](/images/blog/glazed-lamb/glazed-lamb-01.jpg)
![The honeyed-marinade](/images/blog/glazed-lamb/glazed-lamb-02.jpg)
![Marinading feta](/images/blog/glazed-lamb/glazed-lamb-03.jpg)
![Salad mixed up](/images/blog/glazed-lamb/glazed-lamb-04.jpg)
![Sticky lamb](/images/blog/glazed-lamb/glazed-lamb-05.jpg)
![About to go in my face](/images/blog/glazed-lamb/glazed-lamb-06.jpg)

repository: coldclimate/omnomfrickinnom

extension: markdown

gha_language: HTML

repo_name: coldclimate/omnomfrickinnom


text:
---
layout: post
title: NEWDUG 2016 CodeCamp - Gulp All The Things
date: 2016/03/13
tags: ["JavaScript", "Gulp","NEWDUG","Speaking","Web"]
---

Thanks to everyone who came to my presentation at [NEWDUG 2016](http://newcodecamp.com/) this year!
I am always appreciative of the great tech talent we have in NorthEast Wisconsin, and it was certainly evident
with the number of attendees and the quality of the presentations.

If you are interested, the code from the presentation is available on [GitHub](https://github.com/jptacek/NewDug2016).
The PowerPoint presention is also available on [GitHub](https://github.com/jptacek/NewDug2016/blob/master/PPT/GulpAllTheThings.pptx?raw=true).

gha_language: CSS


text:
# apache log parser library

## Install

Using composer:

```
composer require jkh/apache-log-parser-library
```

## Usage

Simply instantiate the class :

```php
$parser = new \jkh\ApacheLogParser\ApacheLogParser();
```

And then parse the lines of your access log file :

```php
$log_file = '/var/log/apache2/access.log';

$handle = fopen($log_file, "r");
if ($handle) {
    while (($line = fgets($handle)) !== false) {
        $entry = $parser->parse($line);
    }
    fclose($handle);
} else {
    echo "An error occurred: unable to open the file!\n";
}
```

Where `$entry` object will hold all data parsed.

repository: JaouherK/apache-log-parser-library

repo_name: JaouherK/apache-log-parser-library


text:
# electrr-setup
Automated setup script for electrr

Refer to https://lucasnorth.gitbook.io/electrr/automated-installation for further details.

This script will install Nginx, MySQL, relevant PHP extensions, Composer, electrr, and Certbot for SSL. The script will configure most of these, but requires input for MYSQL_SECURE_SETUP, and Certbot. The process is otherwise non-interactive.

After running this, you will need to configure your database and database user, and update your .env file, which will be located at /var/www/electrr/.env

## Pre-requisites

This script is intended to be run on an otherwise clean (new) VPS running Ubuntu 20.04.
You should have created a non-root user with sudo privileges, e.g.:
 > adduser electrr
 >
 > usermod -aG sudo electrr

## Installation

As the non-root user you created, run the following:

 > curl https://raw.githubusercontent.com/TheLucasNorth/electrr-setup/main/electrr-setup.sh -o electrr-setup.sh
 >
 > sh electrr-setup.sh YOUR_ELECTRR_DOMAIN

It is essential that you replace YOUR_ELECTRR_DOMAIN with the domain you intend to use for electrr. It should be the fully qualified domain name only, e.g. electrr.example.com
This value is used to configure your NGINX sites.

This script is destructive - it will remove any existing /var/www/html directory, and unlink the default Nginx site. It is not intended to be used where you have already configured Nginx or other services.

repository: TheLucasNorth/electrr-setup

branch_name: refs/heads/main

repo_name: TheLucasNorth/electrr-setup


text:
From https://www.w3.org/TR/security-privacy-questionnaire/#questions (questions deemed irrelevant omitted)

### 3.1. Does this specification deal with personally-identifiable information?

Yes, potentially - since inline replies allows a free-form text box to be added to notifications,
this feature could be used to collect PII, like any form input element on a webpage.

E.g. A site could could ask users to sign up to a mailing list by entering an email address in
the notification.

However, we note that on platforms which support inline notification replies natively, e.g. Android,
we have not seen them being used for this purpose.

### 3.2. Does this specification deal with high-value data?

Yes, potentially - this feature could be used to solicit high-value data such as passwords or credit card numbers.

However, since masking is not enabled in the reply field, this feature is not expected to be used for
soliciting passwords.

Again, this is not a use-case we have observed on platforms which already support
notification inline replies.

### 3.9 Does this specification allow an origin access to aspects of a user’s local computing environment?

Sites will be able to detect whether users are on a system that supports inline replies, by checking whether
the `reply` property on the notificationclick event is non-null. Generally this corresponds to OS and OS
version (e.g. on Android they are supported from Nougat), but on Linux there are multiple notification managers
available which may differ in their support.

### 3.11. Does this specification allow an origin some measure of control over a user agent’s native UI?

Yes, since it allows input fields to appear in web notifications, which are part of native UI.


text:
# Change Log

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [0.8.1](https://github.com/remedyhealth/react-device/compare/v0.8.0...v0.8.1) (2017-08-30)

### Bug Fixes

* initial client side call incorrect ([6af9939](https://github.com/remedyhealth/react-device/commit/6af9939))

# [0.8.0](https://github.com/remedyhealth/react-device/compare/v0.7.1...v0.8.0) (2017-08-30)

## [0.7.1](https://github.com/remedyhealth/react-device/compare/v0.7.0...v0.7.1) (2017-08-30)

# [0.7.0](https://github.com/remedyhealth/react-device/compare/v0.6.2...v0.7.0) (2017-03-17)

### Bug Fixes

* initial client side call incorrect timing ([976f90d](https://github.com/remedyhealth/react-device/commit/976f90d))

## [0.6.2](https://github.com/remedyhealth/react-device/compare/v0.6.1...v0.6.2) (2017-03-08)

### Bug Fixes

* capitalization issue with filenames (#7) ([283c238](https://github.com/remedyhealth/react-device/commit/283c238))

## [0.6.1](https://github.com/remedyhealth/react-device/compare/v0.6.0...v0.6.1) (2017-03-08)

----

(prior tags/releases)
## 0.6.0 (2017-03-08)
Move calling onChange from componentDidMount to constructor since componentDidMount is not called on server.

Split the static _onChange into 2 methods:
- _onChange: used to register for window events
- _publish: used to call the listeners

By splitting this out, I can call _publish in the constructor for a single onChange prop.

Also change the default width and height from -1 to null.

repository: remedyhealth/react-device

repo_name: remedyhealth/react-device


text:
UX Aspects 1.3.2 is available! Check out the documentation at [https://uxaspects.github.io/UXAspects](https://uxaspects.github.io/UXAspects).

New Features:
* [Virtual Scroll](https://uxaspects.github.io/UXAspects/#/components/scrollbar#virtual-scroll) component, providing infinite scroll functionality for very large data sets.

Bug Fixes:
* (EL-2657) [Marquee Wizard](https://uxaspects.github.io/UXAspects/#/components/wizard#marquee-wizard-ng1) issue with cancelling step navigation.
* (EL-2658) [Marquee Wizard](https://uxaspects.github.io/UXAspects/#/components/wizard#marquee-wizard-ng1) support for navigating to a different step on finishing.
* (EL-2692) Less styles combined into a single file for the distribution, including Angular 4 style rules.

Any questions or feedback? Get in touch on Twitter [@UXAspects](https://twitter.com/UXAspects), open an issue on [GitHub](https://github.com/UXAspects/UXAspects/issues), or check our [blog](https://uxaspects.github.io/UXAspects/#/blog) for more information!

repository: UXAspects/UXAspects

gha_language: TypeScript

repo_name: UXAspects/UXAspects


text:
Python tool for generating random private key and associated public key and address.

## License

This bitcoin-address-generation-tool  is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

repository: gryuner/bitcoin-address-generation-tool

repo_name: gryuner/bitcoin-address-generation-tool


text:
---
title: "Total TS"
pubDatetime: 2022-09-23T15:22:00Z
tags: ["TS", "Typescript"]
draft: false
description: "Typescript beginner to advance"
---

## AutoComplete in VSCode

- `Ctrl+space`

- The arguments to a functions must be typed to avoid implicit any error.

## type vs interface

-

## Optional function arguments

- Must come after the mandatory args.

## Array types

- `Post[]` or `Array<Post>`

## Casting in TS

- By using 'as' keyword.
- Should not be used often.

## Set generic

## Map generic

## Record type

```ts
Record<string, string>
// Or
{
  [id:string]: string;
}
```

## Narrowing down Union types

## Typing errors in try-catch

```ts
....
catch(e) {
  if (e instanceof Error) {
    return e.message;
  }
}
```

## Inheriting interface properties

- Use extends.
- Can extend multiple interfaces.

## Combining types to create new types

- Use `&` operator on interfaces.

## Selectively Construct Types from Other Types

- Use `Pick<Type, Keys>` or `Omit<Type, Keys>`.

## Typing Functions

## Typing Async Functions

# 1: Type tansformations

## 1.1 Inference basics

## 1.1.1 Get the return type of a function

- Use `ReturnType<typeof myFunc>`

## 1.1.2 Extract Function Parameters Into A Type

- Use `Parameters<typeof myFunc>`

## 1.1.3 Extract The Awaited Result of a Promise

- Use `Awaited<ReturnType<typeof myFunc>>`

## 1.1.4 Create a Union Type From an Object’s Keys

- Use `keyof typeof myObj`

## 1.2 Unions and Indexing

## 1.2.1 Understand The Terminology Around Unions

- Union vs Discriminated unions vs enum

## 1.2.2 Extracting Members of a Discriminated Union

- Use `Extract<Type, Union>`

## 1.2.3 Excluding Parts of a Discriminated Union

- Use `Exclude<UnionType, ExcludedMembers>`

## 1.2.4 Resolve an Object’s Values as Literal Types

- Use `as const`.
- Can also be used for Arrays.

## 1.2.5 Create a UnionType From an Object's Values

- First convert to object literal type using as 'const'
- Use `typeof myObj[keyof typeof myObj]`

## 1.2.6 Create Unions out of Array Values

- First convert to Array literal type using as 'const'
- Then use `typeof myArr[number]` or `typeof myArr[0 | 1]`

## 1.3 Template Literals

## 1.3.1 Only Allow Specified String Patterns

- Use template literals for eg. `` type Route = `/${string}`  ``;

## 1.3.2 Extract Union Strings Matching a Pattern

- Use `Extract` with template literals.

## 1.3.3 Create a Union of Strings with all possible permutations of two unions

- Use template literals to combine the unions.

## Splitting a string into a tuple

- Use `ts-toolbelt` library method `Split<S, D>` to split a string into a tuple.

## Create an Object Whose Keys Are Derived From a Union

- Use `Record<UnionType, string>`

## Transform String Literals To Uppercase

- Use `Uppercase<>`

# 1.4: Type helpers (Generics)

- Generics are similar to functions in value world.

## 1.4.1 Creating a Maybe Type Helper

## 1.4.2 Ensure Type Safety in a Type Helper

gha_language: SCSS


text:
# Installation Guide for Spring Tool Suite

| Sl No  | Version  | Operating System |
|:-:|:-:|:-:|
| 1  | [latest(v2)](./tools/STS)  | Debian / Ubuntu (all v<=20.10)  |

---

<br>

- ### Installation of Spring Tool Suite(3.x.x) Ubuntu/Debian

1. Use one of the links below to [download](https://spring.io/tools#suite-three) an all-in-one distribution for your platform (Windows, mac, Linux). In this case, Linux for our Ubuntu 18.

2. Now open your terminal (Alt + Ctrl + T) and go to your Downloads directory and execute the following commands:

```sh
cd Downloads

sudo mv spring-tool-suite-3.9.10.RELEASE-e4.13.0-linux-gtk-x86_64.tar.gz /opt

cd /opt/

sudo tar zxvf spring-tool-suite-3.9.10.RELEASE-e4.13.0-linux-gtk-x86_64.tar.gz

sudo ln -s /opt/sts-bundle/sts-3.9.10.RELEASE/STS /usr/local/bin/sts

sudo gedit /usr/share/applications/stsLauncher.desktop
```

3. Now use, gedit or nano to create an application launcher for STS.

```sh
[Desktop Entry]
Name=Spring Tool Suite
Comment=Spring Tool Suite 3.9.10
Exec=/opt/sts-bundle/sts-3.9.10.RELEASE/STS
Icon=/opt/sts-bundle/sts-3.9.10.RELEASE/icon.xpm
StartupNotify=true
Terminal=false
Type=Application
Categories=Development;IDE;Java;
```

4. Open a terminal and type

```sh
$ sts
```

Voila!!

![alt img](https://miro.medium.com/max/700/1*tbhYDqDkoVICDF4UNNCQEg.png)

5. or Typing “Spring Tool Suite” in the Application Search will bring up the STS App icon.

![alt image](https://miro.medium.com/max/700/1*3JDYi6kGv3xS4SPadHRpAA.png)


text:
---
layout: post
title: Voter
---

To all those registered to vote in the UK's Europe Referendum: Go and vote; your country needs you.

Take your dog, young children along.  They can't vote but it'll help.

---

My handy guide to where to make your mark - either:

LEAVE [ ]X (thinking outside the box; it's the future)

or:

REMAIN [X] (predictable, safe)

(Borrowed from a Facebook post.)


text:
# Laravel API key

[![Latest Version on Packagist](https://img.shields.io/packagist/v/jargoud/laravel-api-key.svg?style=flat-square)](https://packagist.org/packages/jargoud/laravel-api-key)
[![Build Status](https://img.shields.io/travis/jargoud/laravel-api-key/master.svg?style=flat-square)](https://travis-ci.org/jargoud/laravel-api-key)
[![Quality Score](https://img.shields.io/scrutinizer/g/jargoud/laravel-api-key.svg?style=flat-square)](https://scrutinizer-ci.com/g/jargoud/laravel-api-key)
[![Total Downloads](https://img.shields.io/packagist/dt/jargoud/laravel-api-key.svg?style=flat-square)](https://packagist.org/packages/jargoud/laravel-api-key)

This package provides a simple API key authentication, based
on [Laravel Authentication](https://laravel.com/docs/master/authentication) system.

## Summary

[[_TOC_]]

## Installation

You can install the package via composer:

```bash
composer config repositories.laravel-api-key vcs https://github.com/jargoud/laravel-api-key.git
composer require jargoud/laravel-api-key
```

The package will automatically register itself.

You can publish the package's assets with one of the following commands:

```shell
php artisan vendor:publish --provider="Jargoud\LaravelApiKey\Providers\LaravelApiKeyServiceProvider" --tag="config"
php artisan vendor:publish --provider="Jargoud\LaravelApiKey\Providers\LaravelApiKeyServiceProvider" --tag="views"
```

## Usage

The package create an [ApiKey](./src/Models/ApiKey.php) entity, which contains:
- a name,
- a value: it's the Api key value, it's hashed so you should copy it before saving the model!
- a restriction selector: `none`, by `referer` or by `ip`,
- a list of referers to allow client requests,
- a list of ip addresses to allow server requests.

### Configuration

Add the package's guard and provider in your `auth.php` config file:

```php
// config/auth.php
return [
    // ...

    'guards' => [
        // ...

        'api' => [
            'driver' => 'api_token',
            'provider' => 'api_keys',
            'storage_key' => Jargoud\LaravelApiKey\Models\ApiKey::COLUMN_VALUE,
            'hash' => true,
        ],
    ],

    // ...

    'providers' => [
        // ...

        'api_keys' => [
            'driver' => 'eloquent',
            'model' => Jargoud\LaravelApiKey\Models\ApiKey::class,
        ],
    ],

    // ...
];
```

In order to protect your Api routes, you should use the `auth` middleware, as follow:

```php
Route::middleware('auth:api')->group(
    function() {
        // ...
    }
);
```

In order to query your Api, you should pass the Api key inside your requests. It can be a query parameter, an input or a
HTTP header. See [ApiTokenGuard.php](./src/Auth/ApiTokenGuard.php#L116) to find out how it's retrieved by the guard.

### Backpack

If your app uses [Laravel Backpack](https://backpackforlaravel.com/), it provides a CRUD controller that you can use in
order to manage your Api keys.

To enable it, set `api-key.backpack.enabled` configuration value to `true`.

It will auto register the route and you can then add a tab in your sidebar:

```html

<li class="nav-item">
    <a class="nav-link" href="{{ backpack_url('api-key') }}">
        <i class="nav-icon la la-key"></i>
        Api keys
    </a>
</li>
```

### Testing

``` bash
composer test
```

### Changelog

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

## Contributing

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

### Security

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

## Credits

- [Jérémy Argoud](https://github.com/jargoud)
- [All Contributors](../../contributors)

## License

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

## Laravel Package Boilerplate

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

repository: jargoud/laravel-api-key

repo_name: jargoud/laravel-api-key


text:
# Building from source

## Pre-requisites

- Ubuntu 16.04 64-bit (might work on other platforms, but not tested)
  - I hope to target also Mac, and you can help me to tweak some of the `BUILD` rules for Mac if you want (specifically [this one](https://github.com/hughperkins/tensorflow-cl/blob/tensorflow-cl/tensorflow/workspace.bzl#L21-L25), used by [usr_lib_x8664linux.BUILD](https://github.com/hughperkins/tensorflow-cl/blob/tensorflow-cl/usr_lib_x8664linux.BUILD))
- normal non-GPU tensorflow prerequisites for building from source
  - when you run `./configure`, you can put `n` for cuda, gpu etc
- you need an OpenCL-enabled GPU installed and OpenCL drivers for that GPU installed.  Currently, supported OpenCL version is 1.2 or better
  - To check this: run `clinfo`, and check you have at least one device with:
    - `Device Type`: 'GPU', and
    - `Device OpenCL C Version`: 1.2, or higher
  - If you do, then you're good :+1:

## Procedure

```
sudo apt-get install -y opencl-headers cmake clang-3.8 llvm-3.8 clinfo git gcc g++ python3-numpy python3-dev python3-wheel zlib1g-dev
sudo apt-get install -y git gcc g++ python3-numpy python3-dev python3-wheel zlib1g-dev virtualenv swig python3-setuptools
sudo apt-get install -y openjdk-8-jdk unzip zip
mkdir -p ~/git
cd ~/git

# install bazel
git clone https://github.com/bazelbuild/bazel.git
cd bazel
git checkout 0.3.2
./compile.sh
sudo cp output/bazel /usr/local/bin

# download tensorflow, and configure
git clone --recursive https://github.com/hughperkins/tensorflow-cl
cd tensorflow-cl
./configure
# put python path: /usr/bin/python3
# 'no' for hadoop, gpu, cloud, etc

# build cuda-on-cl
pushd third_party/cuda-on-cl
make -j 4
sudo make install
popd

# build tensorflow
source ~/env3/bin/activate
bazel run --verbose_failures --logging 6 //tensorflow/tools/pip_package:build_pip_package
# (ignore error message about 'No destination dir provided')
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflowpkg
if [[ ! -d ~/env3 ]]; then { virtualenv -p python3 ~/env3; } fi
pip install --upgrade /tmp/tensorflowpkg/tensorflow-0.11.0rc0-py3-none-any.whl

# test/validate
cd
python -c 'import tensorflow'
# hopefully no errors :-)
python ~/git/tensorflow-cl/tensorflow/stream_executor/cl/test/test_tf2.py
```

## Updating

- if you pull down new updates from the `tensorflow-cl` repository, you will almost certainly need to update the [cuda-on-cl](https://github.com/hughperkins/cuda-on-cl) installation:
```
git submodule update
pushd third_party/cuda-on-cl
make -j 4
sudo make install
popd
```
- you will probably need to do also `bazel clean`
- and then, as before:
```
source ~/env3/bin/activate
bazel run --verbose_failures --logging 6 //tensorflow/tools/pip_package:build_pip_package
bazel-bin/tensorflow/tools/pip_package/build_pip_package /tmp/tensorflowpkg
pip install --upgrade /tmp/tensorflowpkg/tensorflow-0.11.0rc0-py3-none-any.whl
```

repository: guoyejun/tensorflow-cl

branch_name: refs/heads/tensorflow-cl

repo_name: guoyejun/tensorflow-cl


text:
---
id: 19691
title: Dell 4.0 hardware MP is released for Opsmgr 2007 SP1 and R2
date: 2009-09-03T06:55:00+10:00
author<EMAIL_ADDRESS>
guid: /blogs/scom/archive/2009/09/03/dell-4-0-hardware-mp-is-released-for-opsmgr-2007-sp1-and-r2.aspx
sc_member_order:
  - "0"
  - "0"
  - "0"
  - "0"
  - "0"
  - "0"
post_views_count:
  - "1408"
  - "1408"
  - "1408"
  - "1408"
  - "1408"
categories:
  - SystemCenter
  - Uncategorized
tags:
  - dell
  - Management Pack
  - Operations Manager 2007
  - Opmsgr 2007 R2
  - opsmgr
  - opsmgr R2
---
Early this week Dell released a major update to their OpsMgr management pack with their 4.0 version.  I strongly encourage you to check out this MP as there are some significant improvements that are worth checking out.

**<http://support.us.dell.com/support/downloads/format.aspx?releaseid=R237719>**

**Feature highlights of this Dell Server Management Pack Suite v4.0 (A00) :
** – Improvements in scalability and performance over the previous releases by including:
        * Server Scalable MP (for managing large enterprise environments)
        * Server Detailed MP (addon MP that provides detailed instance level monitoring)
– Performance and Power monitoring and OpenManage 6.1 support for Dell Server MPs
– DRAC and CMC MPs to monitor Dell Remote Access Controllers and Chassis Management Controllers
– Override utility to enable Informational alerts for managed Dell Servers
Additional details are available in the User Guide inside the download


text:
# pyrcc
A python implementation of Robust Continuous Clustering.

The original matlab implementation can be found here: https://bitbucket.org/sohilas/robust-continuous-clustering

Sklearn style demonstration:

![rcc_clustering](fig1.png?raw=true)

RCC is a clustering method introduced here: http://www.pnas.org/content/early/2017/08/28/1700770114

This is a port of the matlab implementation provided by the authors.

The code is self-contained in rcc.py

The following parameters are used in RCC:
- k: (int)(deafult 10) number of neighbors used in the mutual KNN graph
- verbose: (bool)(default True) verbosity
- preprocessing: (string)(default 'none') one of 'scale', 'minmax', 'normalization', 'none'. How to preprocess the features
- measure: (string)(default 'euclidean') one of 'cosine' or 'euclidean'. Paper used 'cosine'. Metric to use in constructing the mutual KNN graph
- clustering_threshold: (float)(default 1.0) controls how agressively to assign points to clusters.

A demonstration of how to use this is shown in demo.py, measuring the AMI (adjusted mutual information) using the pendigits dataset

NOTE:
- The authors report a final AMI of 0.848 on the pendigit dataset. The current code achieves ~0.79. This is still pretty good, but I am trying to find the issue.

## Installation
Download pyrcc to a directory of your choice via
```
git clone https://github.com/ratzenboe/pyrcc.git
```
change into the created directory `cd pyrcc` and execute the setup script
```
python setup.py install
```

repository: ratzenboe/pyrcc

repo_name: ratzenboe/pyrcc


text:
# Pq2

Priority Queue implementation using Heap in pure Ruby.

Remarkable, this library does not do garbage collection, because it is optimized for short-lived processes.

## Usage

### Scalar

```ruby
pq = Pq2.new
pq.push(2)
pq.push(1)
pq.push(3)

pq.pop
# => 1
pq.first
# => 2
pq.pop
# => 2
pq.pop
# => 3

pq.empty?
# => true
```

### Comparable

```ruby
emails =<EMAIL_ADDRESS><EMAIL_ADDRESS>b@example.com].map(&Email.method(:new))
pq = Pq2.new(emails)
pq.pop
# =><EMAIL_ADDRESS>pq.pop
# =><EMAIL_ADDRESS>pq.pop
# =><EMAIL_ADDRESS>
class Email
  include Comparable

  attr_reader :domain, :local

  def initialize(email)
    @local, @domain = email.split(?@)
  end

  def <=>(other)
    order = domain <=> other.domain
    return order unless order == 0
    local <=> other.domain
  end
end
```

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'pq2', git: 'git@github.com:koseki-san/pq2.git', branch: 'master'
```

And then execute:

    $ bundle

## Benchmark

```
ruby benchmark/benchmark.rb

When the number of elements is 100.
Warming up --------------------------------------
                 pq2   505.000  i/100ms
    naive sorted set    34.000  i/100ms
Calculating -------------------------------------
                 pq2      5.055k (± 2.1%) i/s -     25.755k in   5.097600s
    naive sorted set    338.335  (± 2.1%) i/s -      1.700k in   5.026883s

Comparison:
                 pq2:     5054.6 i/s
    naive sorted set:      338.3 i/s - 14.94x  slower

When the number of elements is 1000.
Warming up --------------------------------------
                 pq2    32.000  i/100ms
    naive sorted set     1.000  i/100ms
Calculating -------------------------------------
                 pq2    322.963  (± 2.2%) i/s -      1.632k in   5.055332s
    naive sorted set      2.111  (± 0.0%) i/s -     11.000  in   5.211523s

Comparison:
                 pq2:      323.0 i/s
    naive sorted set:        2.1 i/s - 153.00x  slower

When the number of elements is 10000.
Warming up --------------------------------------
                 pq2     2.000  i/100ms
    naive sorted set     1.000  i/100ms
Calculating -------------------------------------
                 pq2     22.911  (± 0.0%) i/s -    116.000  in   5.063799s
    naive sorted set      0.010  (± 0.0%) i/s -      1.000  in 103.354271s

Comparison:
                 pq2:       22.9 i/s
    naive sorted set:        0.0 i/s - 2367.94x  slower
```

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/koseki-san/pq2. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## Code of Conduct

Everyone interacting in the Pq2 project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/pq2/blob/master/CODE_OF_CONDUCT.md).


text:
---
Disclaimer: MongoDB is a registered trademark of MongoDB, Inc.
---

# Getting Started on a macOS

## First steps

* Validate that your system has
    * x86-64 processor architecture
    * 4 GB RAM (per Document Layer instance)
    * macOS 10.7 or newer
* Download the FoundationDB and the Document Layer packages for your system from [Downloads](https://www.foundationdb.org/download/).

## Setting up the Key-Value Store

The Document Layer requires the FoundationDB Key-Value Store to store
its data, so you'll first need to [set up the FoundationDB Key-Value
Store](https://apple.github.io/foundationdb/getting-started-mac.html).
For both development and production use, the Document Layer must be
installed on a system running the FoundationDB client library (version
5.1 or greater) and containing [the cluster
file](https://apple.github.io/foundationdb/administration.html#cluster-files)
of a running FoundationDB system.

## Reserved keyspace for the Document Layer

The Document Layer stores all of its data in a directory managed by the
[Directory Layer](https://apple.github.io/foundationdb/developer-guide.html#directories).
This means that the Document Layer will not conflict with any other
application or layer using Key-Value Store
[tuples](https://apple.github.io/foundationdb/data-modeling.html#tuples),
[subspaces](https://apple.github.io/foundationdb/developer-guide.html#subspaces),
or
[directories](https://apple.github.io/foundationdb/developer-guide.html#directories)
in their default configurations. The name of the top-level directory
used by the Document Layer can be specified in the [configuration file
](configuration.html) and defaults to `document`. This allows multiple Document Layer
deployments to co-exist on a single FoundationDB cluster.

## Installing the Document Layer

To begin installation, double-click on
FoundationDB-Document-Layer-1.6.0.pkg. Follow the instructions in the
installer.

### Cluster file specification

The FoundationDB Document Layer package installs a [configuration file](configuration.html)
that specifies the default [cluster
file](https://apple.github.io/foundationdb/administration.html#cluster-files)
to be located at `/usr/local/etc/foundationdb/fdb.cluster`. After installation, you
can update this location if needed.

## Connecting to the Document Layer

You can test that the Document Layer is working by connecting to it with
the `mongo` CLI distributed with MongoDB® (e.g.
`mongo <IP_ADDRESS>:27016`). The default port on which the Document Layer
listens is `27016`, but the port can be changed in the [configuration
file](configuration.html) if needed. Be sure to insert and read back a small
document to ensure that the Document Layer is successfully communicating
with the Key-Value Store.

When you have successfully connected to the Document Layer from the `mongo` CLI, you will see a warning saying "This is not MongoDB®." This message confirms that you have connected to the Document Layer on the correct port and not another MongoDB® database.

## Importing data from MongoDB®

As Document Layer is compatible with the MongoDB® API, it can be used with the
`mongodump`,
`mongorestore`, `mongoimport`, and `mongoexport` tools distributed with
MongoDB®.

## Client support

The Document Layer has been tested with all of the officially supported
drivers provided by MongoDB®. It is expected to work with any MongoDB®
client or driver, although minor tweaking may be required in some cases
to use additional features.

repository: TheBenCollins/fdb-document-layer

repo_name: TheBenCollins/fdb-document-layer


text:
#Mahalo for Visual Studio Code
This package includes a syntax definition for [Mahalo](https://mahalo.github.io)
templates. If you follow the previous link you can find more information about
writing applications with the Mahalo framework.

## Features
Currently this extensions only declares the syntax for Mahalo's template language
to help developers by highlighting expressions. Apart from that it inherits from HTML.

If you want syntax highlighting inside HTML attributes you should use single
quotes to indicate that the value is a Mahalo expression. While at runtime
the Mahalo framework does not differentiate between the two this helps the highlighter
and gives developers the opportunity of choosing whether to highlight or not.

repository: mahalo/vscode-mahalo

repo_name: mahalo/vscode-mahalo


text:
Monochromatic
-------------

This app makes use of the built-in black and white device feature to provide a blue-light filtered screen without
the use of an overlay screen, to help relax your eyes at night and disincentivise phone usage.

[](https://f-droid.org/packages/uk.co.richyhbm.monochromatic/)

[](https://play.google.com/store/apps/details?id=uk.co.richyhbm.monochromatic)

Monochromatic needs the *Write Secure Settings* permission, which is [normally unavailable to apps][unavailable permission]. However, you can grant this permission with the following ADB command:

    adb shell pm grant uk.co.richyhbm.monochromatic android.permission.WRITE_SECURE_SETTINGS

[unavailable permission]: https://stackoverflow.com/a/19538956/712526

repository: RichyHBM/Monochromatic

gha_language: Kotlin

repo_name: RichyHBM/Monochromatic


text:
Changelog
=========
1.8
---
- Adds optional port parameter for Cassandra connection

1.7
---
- Properly closes connection to cluster

1.6
---
- Adds configurable default_timeout setting to Cassandra driver session

1.5
---
- Compatibility updates for Cassandra driver 3.0.0 release
- Adds protection against adding duplicate schema migration files
- Adds proper exit code when configuration files are missing
- Integration tests added to tox & Travis CI

1.4
---
- Enables automatic keyspace creation if keyspace isn't found in Cassandra

1.3
---
- Allows migration script filenames to consist entirely of numerals

1.2
---
- Authentication & SSL Cassandra connection options
- Configurable consistency level for all CQL statements

1.1
---
- Python 3 compatibility

1.0
---
- Initial release

repository: rackerlabs/cdeploy

gha_language: Python

repo_name: rackerlabs/cdeploy


text:
# md2html

## Overview

Converts markdown input into reveal.js HTML slides

## Usage

```
md2html [-n] [-t template_file] [-i input_file] [-o output_file]
  Convert markdown into reveal.js HTML slides

Options:
  -n: Generate notes not slides
  -t template_file: HTML template file to use
  -i input_file: Markdown input file (default: stdin)
  -o output_file: HTML output file (default: stdout)
```

## Building md2html

You can produce the `build/md2html.js` file by simply executing `webpack` in the project directory. Once the file is created, you can make it an executable file by adding `#!/usr/bin/env node` at the beginning of the file and setting its executable bit. Rename it into `md2html`.

## Explanation of JavaScript Files

Project root directory contains the following four JavaScript files:

1.  `index.js`: This is the main md2html code
2.  `katex.js`: This is a slightly modified version of `KaTeX` version 0.13.11, so that it supports `\htmlAttr` command
3.  `markdown-it-katex.js`: This is [@iktakahiro's markdown-it-katex](https://github.com/iktakahiro/markdown-it-katex), except that I changed it to use my custom KaTeX package, not the original one.
4.  `markdown-it-email.js`: This is an email obfuscation code for markdown-it obtained from [markdown-it-email-obfuscator](https://github.com/ilyaigpetrov/markdown-it-email-obfuscator) with minor modification. It seems the project has been abandoned and is no longer maintained.

## License

Uses MIT licensed code from [Connect](https://github.com/senchalabs/connect/) and  [Roots](https://github.com/jenius/roots).

(MIT License)

Copyright (c) 2021 Junghoo Cho

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.


text:
# Change the base image used by Docker

You may change the base image used in the `Dockerfile` that creates images by repo2docker.
This is equivalent to changing the `FROM <base_image>` in the Dockerfile.

To do so, use the `base_image` traitlet when invoking `repo2docker`.
Note that this is not configurable by individual repositories, it is configured when you invoke the `repo2docker` command.

```{note}
By default repo2docker builds on top of the `buildpack-deps:bionic` base image, an Ubuntu-based image.
```

## Requirements for your base image

`repo2docker` will only work if a specific set of packages exists in the base image.
Only images that match the following criteria are supported:

- Ubuntu based distributions (minimum `18.04`)
- Contains a set of base packages installed with [the `buildpack-deps` image family](https://hub.docker.com/_/buildpack-deps).

Other images _may_ work, but are not officially supported.

## This will affect reproducibility 🚨

Changing the base image may have an impact on the reproducibility of repositories that are built.
There are **no guarantees that repositories will behave the same way as other repo2docker builds if you change the base image**.
For example these are two scenarios that would make your repositories non-reproducible:

- **Your base image is different from `Ubuntu:bionic`.**
  If you change the base image in a way that is different from repo2docker's default (the Ubuntu `bionic` image), then repositories that **you** build with repo2docker may be significantly different from those that **other** instances of repo2docker build (e.g., those from [`mybinder.org`](https://mybinder.org)).
- **Your base image changes over time.**
  If you choose a base image that changes its composition over time (e.g., an image provided by some other community), then it may cause repositories build with your base image to change in unpredictable ways.
  We recommend choosing a base image that you know to be stable and trustworthy.


text:
---
title: "Disabling (some) zonejs in Angular app"
date: 2021-10-26
tags:
  - angular
  - zonejs
layout: layouts/post.njk
---

Profiling is so fun.

I noticed that a component is running significantly slower in angular than in vanilla JS. I had some spare time, and did some profiling.

The component did have a lot of interactivity (via `Element.addEventListener` and `requestAnimationFrame`). I noticed that there were a lot of calls to `globalZone`, and alot of unnecessary `delegate` calls. (each raf call. )

Normally reactivity is nice. It simplifies product development cycle and boosts productivity. In this case, however, it is unnecessarily punishing performance.

Intially, I wondered if I could call the component with a special set of globals, something like

```js

// before zone.js patch the hell out of native raf

window['originalRAF'] = window['requestAnimationFrame']

// ...

import 'zone.js'

//...

class MyHero implements OnInit{
  ngOnInit(){
    const proxyCreateMyComponent = createMyComponent.bind({
      ...window,
      requestAnimationFrame: window['originalRAF']
    })
    proxyCreateMyComponent('#comp-id')
  }
}
```

I did some digging, and some source code divining, and it seems, for the time being, the solution is actually much simpler:

```js

// disables patches to raf altogether

window['__Zone_disable_requestAnimationFrame'] = true

// ...

import 'zone.js'
```

Hopefully... the angular team doesn't change this, eh?


text:
# bloc_provider [![Codemagic build status](https://api.codemagic.io/apps/5c07297ae5d85c000decbd7a/5c0b461ee3b238001782269a/status_badge.svg)](https://codemagic.io/apps/5c07297ae5d85c000decbd7a/5c0b461ee3b238001782269a/latest_build)

Provides BLoC(Business Logic Component) to descendant widget (O(1)), and the bloc is disposed automatically by the state which the bloc_provider holds internally.

## Usage

#### 1. Define some BLoC like this:

```dart
class CounterBloc implements Bloc {
  final _countController = BehaviorSubject<int>.seeded(0);
  final _incrementController = PublishSubject<void>();

  CounterBloc() {
    _incrementController
        .scan<int>((sum, _v, _i) => sum + 1, 0)
        .pipe(_countController);
  }

  ValueStream<int> get count => _countController;
  Sink<void> get increment => _incrementController.sink;

  @override
  void dispose() async {
    await _incrementController.close();
    await _countController.close();
  }
}
```

#### 2. Provide the bloc by using BlocProvider and access the bloc at subtree:

```dart
void main() => runApp(
      // Create and provide the bloc.
      BlocProvider<CounterBloc>(
        creator: (_context, _bag) => CounterBloc(),
        child: App(),
      ),
    );

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    // Access the bloc with O(1) computation complexity.
    final bloc = BlocProvider.of<CounterBloc>(context);
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: StreamBuilder<int>(
            stream: bloc.count,
            initialData: bloc.count.value,
            builder: (context, snap) => Text(
                  'count: ${snap.data}',
                  style: Theme.of(context).textTheme.title,
                ),
          ),
        ),
        floatingActionButton: FloatingActionButton(
          child: const Icon(Icons.add),
          onPressed: () => bloc.increment.add(null),
        ),
      ),
    );
  }
}
```

- Computational complexity of `of` method, which is used for accessing the bloc is `O(1)`.
    - `of` method can be also called at [State](https://docs.flutter.io/flutter/widgets/State-class.html)'s [initState](https://docs.flutter.io/flutter/widgets/State/initState.html).
- Provided bloc will be disposed when the inner state is disposed 👍

## Examples

- https://github.com/mono0926/bloc_provider/tree/master/example
- [mono0926/wdb106-flutter](https://github.com/mono0926/wdb106-flutter)
- [TaskShare/taskshare-flutter](https://github.com/TaskShare/taskshare-flutter)

## Technical explanation

- [Flutter の BLoC(Business Logic Component)のライフサイクルを正確に管理して提供する Provider パッケージの解説](https://medium.com/flutter-jp/bloc-provider-70e869b11b2f)
  - Japanese only, currently🙇🇯🇵

## Features and bugs

Please file feature requests and bugs at the [issue tracker][tracker].

[tracker]: https://github.com/mono0926/bloc_provider/issues


text:
# Richsploit
Richsploit: Exploitation toolkit for RichFaces.

Overview

Richsploit can be used to exploit JSF endpoints using RichFaces. All versions from 3.1.0 and higher are vulnerable.

usage: Richsploit
 -e,--exploit <arg>   0: CVE-2013-2165
                 1: CVE-2015-0279
                 2: CVE-2018-12532
                 3: CVE-2018-12533
                 4: CVE-2018-14667
 -p,--payload <arg>   The file containing serialized object
                 (CVE-2013-2165), or
                 Shell command to execute (all other CVE's)
 -u,--url <arg>       URL of richfaces application, i.e.
                 http://example.com/app for RF4.x and
                 http://example.com/app/a4j/g/3_3_3.Final for RF3.x
 -v,--version <arg>   Richfaces branch, either 3 or 4

For more information about how to use the tool, please see [this blog post](https://www.redtimmy.com/java-hacking/richsploit-one-tool-to-exploit-all-versions-of-richfaces-ever-released/).

repository: fetzerms/Richsploit

repo_name: fetzerms/Richsploit


text:
## Swarmer — create, start and wait for Android emulators to boot in parallel.

`Swarmer` is a replacement for [such bash scripts](https://github.com/travis-ci/travis-cookbooks/blob/master/community-cookbooks/android-sdk/files/default/android-wait-for-emulator) but with features like:

* Start **multiple** Android Emulators and wait for each to boot in parallel.
* Pass `config.ini` that'll be applied to created emulator.
* Redirect Logcat output of an emulator to a file.

![Demo](swarmer/swarmer.gif)

## How to use

`Swarmer` shipped as `jar`, so just run it `java -jar swarmer.jar options`.

Dependencies:

* JVM 1.8+
* [Android SDK Tools 26.0.0+](https://developer.android.com/studio/releases/sdk-tools.html)

### Commands

#### Start

```console
java -jar swarmer.jar start …
```

##### Options

###### Required

* `--emulator-name`
  * Name of the emulator, i.e. `test_emulator_1`.
* `--package`
  * Package of the system image for this AVD (e.g.'system-images;android-25;google_apis;x86') to pass to `avdmanager create avd --package`.
* `--android-abi`
  * Android system image abi, i.e. `google_apis/x86_64`.
* `--path-to-config-ini`
  * Path either relative or absolute to the file that will be used as `config.ini` for created emulator.
  * Easiest way to get `config.ini` is to create AVD on your machine using Android Studio and then copy config from `~/.android/avd/device_name.avd/config.ini`.
  * We recommend to keep `config.ini` in version control so your team members could review it and builds will be reproducible.

###### Optional

* `--help, -help, help, -h`
  * Print help and exit.
* `--emulator-start-options`
  * Options to pass to `emulator -avd \$emulatorName` command, i.e. `--no-window -prop persist.sys.language=en -prop persist.sys.country=US`.
* `--emulator-start-timeout-seconds`
  * Timeout to wait for emulator to finish boot. Default value is 180 seconds.
* `--redirect-logcat-to`
  * Path either relative or absolute to the file that will be used to redirect logcat of started emulator to. No redirection will happen if parameter is not presented.
* `--keep-existing-avds`
  * Avoid recreating avds and reuse existing ones whenever possible.

###### Stop all running emulators

```console
java -jar swarmer.jar stop --timeout 10
```

### Download

Swarmer is [available on Bintray](https://bintray.com/staplessci/maven/swarmer).

>You can download it in your CI scripts or store it in your version control system (not recommended).

```console
SWARMER_VERSION=some-version
curl --fail --L https://staplessci.bintray.com/maven/com/staplessci/swarmer/swarmer/${SWARMER_VERSION}/swarmer-${SWARMER_VERSION}.jar --output /tmp/swarmer.jar
```

All the releases and changelogs can be found on [Releases Page](https://github.com/StaplesSCI/swarmer/releases).

### Composer

Swarmer works great in combination with [Composer][composer] — another tool we've built at Juno.

[Composer][composer] can run Android Instrumentation tests in parallel on multiple connected devices/emulators. In our [CI Pipeline][ci pipeline] we start emulators with Swarmer and then Composer runs tests on them.

### How to build

Dependencies: you only need `docker` and `bash` installed on your machine.

```console
bash ci/build.sh
```

## License

```
Copyright 2017 Juno, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```

[composer]: https://github.com/gojuno/composer
[ci pipeline]: https://github.com/gojuno/engineering/tree/master/articles/ci_pipeline_and_custom_tools_of_android_projects

repository: StaplesSCI/swarmer

repo_name: StaplesSCI/swarmer


text:
# Contract SDK - Record Player Maintenance

If you're familiar with record players you probably know how difficult it is to make sure that they run in pristine condition, especially if it's a collectible.

![](./cordaphone.png)

This cordapp simulates how you could model the process of a limited edition record player (the cordagraf) that is manufactured and issued to specific dealers, and those dealers are the only entities that can service those record players after the fact and report stats back to the manufacturer about how the players are being used.

Record Players are issued as `LinearState`s and are updated by dealers, that act functionally as the only entity that can update the `RecordPlayer` state.

### Using the Contract SDK

The [contract sdk](https://github.com/corda/contract-sdk) is a series of Annotations that you can use in your corda contracts. It's great for putting together cleaner contract code and writing it faster.

This repository demonstrates how you can configure and use it in your own projects.

Configuration is essentially three small steps:

- adding `maven { url 'https://software.r3.com/artifactory/corda-lib-dev' }` to `repositories.gradle`
- adding `compile "com.r3.corda.lib.contracts:contract-sdk:0.9-SNAPSHOT"` to the `build.gradle` file of your contract module in your cordapp
- adding the annotations to your apps!

To show how convenient this can be, here's an example demonstrating how to configure a simple issuance command with one output and no inputs.

```java
// note the annotations here from the Contracts SDK
@RequireNumberOfStatesOnInput(value = 0)
@RequireNumberOfStatesOnOutput(value = 1)
class Issue implements Commands {}
```

If you've written contracts before you might be used to outlining the verify method, applying a conditional for issuance commands and configuring a lot of the same verification for contract inputs. This removes the need for those tools.

Take a look at the small RecordPlayerContract sample in this repository to see how this works in practice.

## Usage

To run the cordapps, just use the gradle wrapper script the same way you normally would.

```
./gradlew deployNodes
./build/nodes/runnodes

flow start net.corda.samples.contractsdk.flows.IssueRecordPlayerFlow dealer: "O=Alice Audio,L=New York,C=US", needle: spherical

# you can get your state id with a quick vault query
run vaultQuery contractStateType: net.corda.samples.contractsdk.states.RecordPlayerState

flow start net.corda.samples.contractsdk.flows.UpdateRecordPlayerFlow stateId: < Place State ID here >, needleId: spherical, magneticStrength: 100, coilTurns: 100, amplifierSNR: 10000, songsPlayed: 100
```

## Additional Information

If you're looking to find more information on record players specifically, I included some sources for how we modeled record players in the state class.

- [You can find much more information on the contract sdk on github here](https://github.com/corda/contract-sdk)
- [The notes on the number of turns in a record player cartridge coil was sourced from here](https://www.vinylengine.com/turntable_forum/viewtopic.php?t=35449)
- [The info on other aspects of amplifiers was sourced from here](https://www.cambridgeaudio.com/usa/en/blog/amplifier-specifications)

repository: Vs-karma/AmexHack

repo_name: Vs-karma/AmexHack


text:
# Copy List with Random Pointer

## Problem：

  A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.

  Return a deep copy of the list.

## Source:
[Leetcode](https://leetcode.com/problems/copy-list-with-random-pointer/)

repository: Dragon-lake/leetcode

repo_name: Dragon-lake/leetcode


text:
---
title: Beginnings
description: The first of many session logs.
date: 2018-05-01
tags:
  - session
layout: layouts/post.njk
---
Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment.

Bring to the table win-win survival strategies to ensure proactive domination. At the end of the day, going forward, a new normal that has evolved from generation X is on the runway heading towards a streamlined cloud solution. User generated content in real-time will have multiple touchpoints for offshoring.

## Section Header

Capitalize on low hanging fruit to identify a ballpark value added activity to beta test. Override the digital divide with additional clickthroughs from DevOps. Nanotechnology immersion along the information highway will close the loop on focusing solely on the bottom line.

> ### Blockquotes
> Blockquotes to bring attention to specific things.

### Some Code Formatted
``` text/2-3
// this is a command
function myCommand() {
	let counter = 0;
	counter++;
}

// Test with a line break above this line.
console.log('Test');
```

## Other Section with Fancy Tables

| d20   | Result  | Other Column                                                      |
| ----- | ------- | ----------------------------------------------------------------- |
| 1-5   | Victory | Something pretty long just to prove that it doesn't break easily. |
| 6-15  | Neutral |                                                                   |
| 16-20 | Failure |                                                                   |

(Fancy tables only work immediately after headings level 1, 2, and 3)

#### A normal Table
| d20   | Result  | Other Column                                                      |
| ----- | ------- | ----------------------------------------------------------------- |
| 1-5   | Victory | Something pretty long just to prove that it doesn't break easily. |
| 6-15  | Neutral |                                                                   |
| 16-20 | Failure |                                                                   |

> ### A Fancy table inside a blockquote
> | d20   | Result  | Other Column                                                      |
> | ----- | ------- | ----------------------------------------------------------------- |
> | 1-5   | Victory | Something pretty long just to prove that it doesn't break easily. |
> | 6-15  | Neutral |                                                                   |
> | 16-20 | Failure |                                                                   |

> #### A table inside a blockquote
> | d20   | Result  | Other Column                                                      |
> | ----- | ------- | ----------------------------------------------------------------- |
> | 1-5   | Victory | Something pretty long just to prove that it doesn't break easily. |
> | 6-15  | Neutral |                                                                   |
> | 16-20 | Failure |                                                                   |


text:
# keyv-anyredis [![npm](https://img.shields.io/npm/v/keyv-anyredis.svg)](https://www.npmjs.com/package/keyv-anyredis) [![dependencies](https://img.shields.io/david/natesilva/keyv-anyredis.svg)](https://www.npmjs.com/package/keyv-anyredis) [![license](https://img.shields.io/github/license/natesilva/keyv-anyredis.svg)](https://github.com/natesilva/keyv-anyredis/blob/master/LICENSE)

Zero-dependency storage adapter for [Keyv](https://github.com/lukechilds/keyv) that works with many different Redis clients and supports cluster mode

## Background

The official [@keyv/redis](https://github.com/lukechilds/keyv-redis) adapter is built on the assumption that you are using the [ioredis](https://github.com/luin/ioredis) client in its normal (non-cluster) mode.

While this covers many use cases, it doesn’t work for the following:

- Using ioredis in [cluster mode](https://github.com/luin/ioredis#cluster)
- Using a different client

**keyv-anyredis** works with any Redis client that implements a [standard callback or Promise interface](src/compatible-redis-client.ts).

## Tested clients

| Client                                                              | Compatible? | Notes                                                                                |
| :------------------------------------------------------------------ | :---------- | :--------------------------------------------------------------------------------------- |
| [**redis**](https://github.com/NodeRedis/node-redis)                | ✅          |                                                                                |
| [**ioredis**](https://github.com/luin/ioredis)                      | ✅          | Standalone and cluster mode                                                              |
| [fakeredis](https://github.com/hdachev/fakeredis)                   | ✅          |                                                                                |
| [fast-redis-cluster2](https://github.com/h0x91b/fast-redis-cluster) | ✅          |                                                                                |
| [handy-redis](https://github.com/mmkal/handy-redis)                 | ✅          |                                                                                |
| [noderis](https://github.com/wallneradam/noderis)                   | ⛔         | `smembers` is missing                                                                    |
| [redis-clustr](https://github.com/gosquared/redis-clustr)           | ✅          |        |
| [tedis](https://github.com/silkjs/tedis)                            | 🟡          | Non-standard `get` return type; cast the client to `CompatibleRedisClient` in TypeScript |
| [thunk-redis](https://github.com/thunks/thunk-redis)                | ✅          | Set `usePromise: true`; works in cluster mode                                    |
| [xredis](https://github.com/razaellahi/xredis)                      | ✅          |                                                                                |

## Install

```shell
npm i keyv-anyredis
```

## Usage

```javascript
const Keyv = require('keyv');
const { KeyvAnyRedis } = require('keyv-anyredis');

// Create a client here, using ioredis, redis, or any
// compatible library.
//
// For example, to create a cluster client using ioredis as
// described at https://github.com/luin/ioredis#cluster:
//
// const Redis = require('ioredis');
// const client = new Redis.Cluster(…cluster configuration…);

const store = new KeyvAnyRedis(client);
const keyv = new Keyv({ store });
```

## Testing

To run the unit tests, it’s easiest to use Docker:

```shell
npm run test:docker
```

If you choose to run the tests locally (with `npm test`) you’ll need to have a standalone instance of Redis on port 6379 **and** a cluster instance of Redis on port 7000.

repository: wjhsf/keyv-anyredis

repo_name: wjhsf/keyv-anyredis


text:
# PHP Web Article Extractor

Web Article Extractor is a PHP library that detects and extracts the primary 'article' content from a web page, detecting and removing the 'clutter' to give you the clean article. Additionally, it will also filter information from the article that can be used for indexing, such as *language* and *keywords*.

## Features

* Extracts a clean article and headline from a web page quickly.
* Identifies the language of the extracted article.
* Identifies keywords for the extracted article.
* Designed to easily integrate into pipeline or microservice project architectures.

## Usage
There are two ways to use Web Article Extractor, the first way is to use the provided Docker file (See 'Installation'), this will create an instance that you can start using straight away and is ideal for pipeline architectures, the second way is to add the PHP library into your project through Composer.

## Installation
#### Docker
To build with Docker execute the build command inside this project's root directory
```bash
$ docker build -t zackslash/web-article-extractor .
```
You should now be able to run the article extractor script with the following command
```bash
$ docker run zackslash/web-article-extractor <URL>
```

Example:
```bash
$ docker run zackslash/web-article-extractor http://uk.ign.com/articles/2015/03/19/gabe-newell-discusses-possibility-of-half-life-3
```

#### Composer
The first step to using Web Article Extractor in PHP is to download Composer:

```bash
$ curl -s http://getcomposer.org/installer | php
```

Now add PHP Web Article Extractor to your project with Composer:

```bash
$ php composer.phar require zackslash/php-web-article-extractor
```

And that's it! Composer will automatically handle the rest.

Alternatively, you can manually add the dependency to `composer.json` file...

```json
{
    "require": {
        "zackslash/php-web-article-extractor": "*"
    }
}
```

... and then install our dependencies using:
```bash
$ php composer.phar install
```

PHP simple example:

```php
<?php

// This file is generated by Composer
require_once 'vendor/autoload.php';

// Extract article directly from a URL
$extractionResult = WebArticleExtractor\Extract::extractFromURL('http://uk.ign.com/articles/2015/03/19/gabe-newell-discusses-possibility-of-half-life-3');

// Display the extracted article in JSON form
echo json_encode($extractionResult);

?>
```
## Requirements

* PHP >= 5.5.0

## Running the Tests (Optional)

To run the unit tests, you'll need to install [PHPUnit](https://phpunit.de/), once installed, just launch the following command inside this libraries' 'build' directory:

```
$ phpunit
```

## Acknowledgements

Parts of PHP Web Article Extractor are based on algorithms from the whitepaper ['Boilerplate detection using Shallow Text Features'](http://www.l3s.de/~kohlschuetter/publications/wsdm187-kohlschuetter.pdf)
and 'Boilerpipe' by Christian Kohlschuetter, Peter Fankhauser, Wolfgang Nejdl

PHP Web Article Extractor implements the Rapid Automatic Keyword Extraction (RAKE) algorithm as described in the book ['Text Mining: Theory and Applications'](http://www.amazon.com/Text-Mining-Applications-Michael-Berry/dp/0470749822) and the implementation was based on [aneesha's open source Python version](https://github.com/aneesha/RAKE)

The Stop Word dictionary used in this project was pulled from [Peter Graham's 'stopwords' repository](https://github.com/6/stopwords)

## License

PHP Web Article Extractor is released under the MIT License.
See the bundled [LICENSE](https://github.com/zackslash/PHP-Web-Article-Extractor/blob/master/LICENCE) file for details.


text:
# Mobile Client Representation

In this document, we will cover what a mobile representation is and how you can create one
from the Android Studio Plugin (ASP). For the purpose of this document, we expect that
you have installed the plugin.

The mobile client representation provides the following things:
- Gives you a visual representation of your mobile client within Kubernetes or OpenShift.
- It is used to integrate with existing mobile services such as the
Aerogear digger (a service for building clients via JenkinsPipelines).
- The details in the mobile client representation are also used as part of the mobile
configuration and are likely to be used as part of the Android SDK.

## Creating the representation

When you start a new project, and you have the ASP installed and enabled, you will see
a popup in the bottom right corner asking if you want to create a new mobile client.
If you click on the link, a new form will be shown that will ask you for the following
information
- client name (this should be something you recognise)
- applicationIdentifier (this should be set to your package name com.my.company)
- the clientType can remain as android.

When ready simply press ok and that should be it.

A second option for creating the mobile client representation is to go to the:

```tools -> Aerogear Mobile -> create client```

You will then be presented with the same form as before.


text:
Color
=====

Having fun playing around with [colorForth](http://www.colorforth.com/cf.htm) and [GreenArrays](http://www.greenarraychips.com/) architecture. See the [demo](https://youtu.be/LYtQMmvgg6w) presented to the [Forth2020 Group](http://www.forth2020.org/) in AUG 2021 and [~~blog series~~](http://blogs.msdn.com/b/ashleyf/archive/tags/color/) - Blog series moved here to Github:

* [Chuck Moore's Creations](Docs/chuck_moores_creations.md)
* [Programming the F18](Docs/programming_the_f18.md)
* [Beautiful Simplicity of colorForth](Docs/beautiful_simplicity.md)
* [Multiply-step Instruction](Docs/multiply_step.md)
* [Simple Variables](Docs/simple_variables.md)

![Editor/Assembler](Docs/images/editor_assembler.png)

The assembler watches for changes to the block files saved by the editor. I leave an instance of this running in one terminal window (right) while working in the editor in another (left). Later I run the machine in a third window.

## Setup

Everything is written in F# and uses solution (`.sln`) and project (`.fsproj`) files compatible with Visual Studio or `dotnet build`. I personally have been using plain Vim (with the [excellent F# bindings](https://github.com/fsharp/fsharpbinding)). Here's setup steps for Ubuntu:

**Install .NET Core**

* Install the [.NET SDK](https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu). For example, for _Ubuntu 21.04_ in particular:

```
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

sudo apt-get update
sudo apt-get install -y apt-transport-https
sudo apt-get update
sudo apt-get install -y dotnet-sdk-5.0
```

**Pull down the project**

    git clone http://github.com/AshleyF/Color

**Build**

    dotnet build Color.sln

Each project produces an executable (`Assembler.exe`, `Editor.exe`, `Machine.exe`) within `bin/`

**Play!**

The editor edits block files (`/Blocks/*.blk`) while the assembler waits for changes to blocks and assembles them (to block 0). Running the machine executes block 0.

The normal way of working is to run the `./Editor` and `./Assembler` at the same time (in separate tabs or tmux splits, etc.). Each time a block is saved (by pressing `s` in the editor), it's assembled. Then run the `./Machine` to try it out.

license: Unlicense

repository: AshleyF/Color

gha_language: F#

gha_license_id: Unlicense

repo_name: AshleyF/Color


text:
# Employee Directory

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

![](/public/demo.gif)

- Github Repo: https://github.com/jacksolaro/employee-directory
- Deployed App: https://jacksolaro.github.io/employee-directory/

## DESCRIPTION
---------------------
This is a react project emulating an employee directory. Sample employee profiles are pulled from an API and displayed in a table directory with ability to search and sort.

## TABLE OF CONTENTS
---------------------

* [Installation](#installation)
* [Usage](#usage)
* [Tests](#tests)
* [License](#license)
* [Contributions](#contributions)
* [Questions](#questions)

## INSTALLATION
------------
npm install to install dependencies for this application

## USAGE
------------
As of right now you can search by first name using the search bar or you can sort the email column by clicking the email row header.

## TESTS
------------
No testing instructions at this time

## FUTURE RELEASES
------------
Future features include: 1. Ability to sort by all columns 2. Ability to search by all columns

## LICENSE
------------
This repository is covered under the [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) license.

## CONTRIBUTIONS
------------

## QUESTIONS
------------
Please direct all questions related to this repository to https://github.com/jacksolaro

repository: jacksolaro/employee-directory

repo_name: jacksolaro/employee-directory


text:
![test](https://github.com/reireias/microservice-sample-user/workflows/test/badge.svg)
# Microservice Sample User Service
User service for microservice sample application.

## Setup
You can install dependencies with `yarn`.

```sh
yarn install
```

## Run dev server
Set environments for development server.

```sh
yarn dev
```

## Lint files
Run lint with Eslint.

```sh
yarn lint
```

## Run test
Run test with ava.

```sh
yarn test
```

repository: reireias/microservice-sample-user

repo_name: reireias/microservice-sample-user


text:
# project

## Overview

The [project repository](https://github.com/mojaloop/project) is the central repository to track product development issues for the Mojaloop project.

* All work is tracked in GitHub and assigned to specific milestones.
* To review open work items go to: [https://github.com/mojaloop/project/issues](https://github.com/mojaloop/project/issues)
* To jump and get started, review any stories that are tagged with "[good first issue](https://github.com/mojaloop/project/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)"
* To file a new bug or feature request, follow the templates below.
* We also use "Zenhub" a GitHub plug-in to visualize the stories and associated swim lanes.

## Bug Template

**Summary**:

**Severity**: \(Low, Medium, High\)

**Priority**: \(Critical, Medium, Low\)

**Expected Behavior**

**Steps to Reproduce** 1. 2. 3.

**Specifications**

* Component \(if known\):
* Version:
* Platform:
* Subsystem:
* Type of testing:
* Bug found/raised by:

**Notes**:

* Severity when opened:
* Priority when opened:

## Feature Template

### **Goal**:

As a  I want to  so that

**Tasks**:

* [ ] TBD \[ @? \]

**Acceptance Criteria**:

* [ ] Designs are up-to date
* [ ] Unit Tests pass
* [ ] Integration Tests pass
* [ ] Code Style & Coverage meets standards
* [ ] Changes made to config \(default.json\) are broadcast to team and follow-up tasks added to update helm charts and other deployment config.
* [ ] TBD

### **Pull Requests**:

* [ ] TBD

### **Follow-up**:

* N/A

**Dependencies**:

* N/A

### **Accountability**:

* Owner: TBC
* QA/Review: TBC

repository: NicoDuvenage/documentation

repo_name: NicoDuvenage/documentation


text:
---
title: Comments on Data Science in Higher Education

layout: post
---

What is Data Science? Some people say that Data Science is statistics, but done on a Mac. I do think that Data Science as a practice enacts several principles that we in higher education research should do much more to emulate. Today I'll emphasize three:

* Displays of data analysis that reflect the complexity of modern computing and displays
* Showing results of data analysis that are dynamic and not static
* Being transparent about process used for results

Complex Displays
----------------

In presenting our research we use exactly the same style of presentation of our data that was used in 50 years ago. The innovators in the 1960s and 1970s who first used punch-cards to do data analysis in the social sciences reported their results in static tables, with maybe some graphics. Fifty years later, when computing power, storage and the graphical displays have all improved by multiple orders of magnitude and we have gained the ability to communicate results at never-before-seen levels of resolution, we report static tables, with maybe some graphics. It's not acceptable. Data displays should be rich, showing all of the data in a graphical format that aids in understanding.

Dynamic Reporting of Results
----------------
Every analyst knows that they have made decisions along the way that could affect the results of their analysis. Yet in our reporting of results, we pretend as if those decisions don't exist. The tools exist to allow the end-user to make different choices about the analysis that could affect the results. Reporting of results should be dynamic, such that the end user can understand the relationships in the data. This step is unnerving because the author becomes a guide to the relationships in the data observed, not the final arbiter of the precise "right" way to undertake the analysis.

Transparency
------------
Most analysis in higher education research takes place behind a curtain. The analyst or analysts write their code, undertake their analysis, and then report the results. There's no ability for others to track the decisions made along the way or to understand the way in which the analyst arrived at their results. Transparency as researchers ought to be our goal. Two ways to help achieve transparency:

* Use an open-source programming language. The two dominant languages in Data Science are Python and R, for good reason.
* Use a version control system such as Git or SVN. These are low-cost, easy to access, and allow for a workflow that tracks how the analysis might change over time.
* Share your code and data using the above tools.


text:
# Chale-Hotel

Website developed using liquid layout, allowing the page to adapt regardless of the screen size.

## Installation

Clone the project on your PC.

## Usage

So, open the root directory in your Browser.


text:
---
layout: post
title: "Start Shining With Ruby - Camug Presentation Next Saturday"
date: 2012-10-27 13:00
comments: true
categories: [training]
---
Well, its been quite a long time since I have given a formal presentation!!

The guys at [camug](http://www.meetup.com/Calgary-Agile-Methods-User-Group/events/87125652/) graciously asked if I would be interested in coming to give a small 4 hour intro to the Ruby programming language.

I am going to keep the concepts as simple as possible; and treat it as a basic introduction to the ruby programming language in the context of building a simple, but fun, application.

The presentation is completely free so if you are interested in attending you have to:

* Register for the event at the camug site (there are only 25 spots available)
* Show up next Saturday morning with you laptop in tow, so that you can code along and have the concepts solidify in your head.

##Software Requirements

* Windows Based OS
  * Install the latest version of Ruby using the [RubyInstaller](http://rubyforge.org/frs/download.php/76527/rubyinstaller-1.9.3-p286.exe)

* Unix Based OS (OSX/Linux)
  * Install the most current version of [RVM](https://rvm.io/rvm/install/), using the instructions on its site.

Regardless of which environment you come with, make sure that you have it configured correctly and can run a basic ruby file from your console. I would also recommend that you have a good text editor at the ready to code along during the presentation.

If there are still spots available, come out for what I pray will be a fun even for all involved!!!

[Develop With Passion®](http://www.developwithpassion.com)


text:
# Azure NetApp Files (ANF) integration with AKS
[Azure NetApp Files](https://azure.microsoft.com/en-us/services/netapp/) is a managed NFS service on Azure, this article will show you how to create and Azure NetApp File and then give your AKS containers access to this shared file system.

## Limitations
 - Azure NetApp Files (ANF) is only available in selected Azure regions. See ANF region availability [here](https://azure.microsoft.com/en-us/global-infrastructure/services/?products=netapp). Customer needs to apply for whitelisting before using using this service. Find more details from [here](https://azure.microsoft.com/en-us/services/netapp/)
 - NFS data path in ANF does not go over the Internet, ANF must be created in the same virtual network with AKS
 - Currently only static provisioning(create ANF in advance) is supported on AKS

## Prerequisite
 - [Set up Azure NetApp Files and create an NFS volume](https://docs.microsoft.com/en-us/azure/azure-netapp-files/azure-netapp-files-quickstart-set-up-account-create-volumes), including following steps:
   - Create a NetApp account in the `nodeResourceGroup`(started with `MC_` by default)
   - Create a capacity pool
   - Create a volume, and select the same virtual network with AKS in volume setup, after volume is created, write down the NFS mount path in the `mount instructions`

## 1. create a nfs persistent volume (pv)
 - download `pv-nfs.yaml`, change `nfs` config and then create a nfs persistent volume (pv)
```
wget https://raw.githubusercontent.com/andyzhangx/Demo/master/pv/pv-nfs.yaml
vi pv-nfs.yaml
kubectl create -f pv-nfs.yaml
```

make sure pv is in `Available` status
```
kubectl describe pv pv-nfs
```

## 2. create a nfs persistent volume claim (pvc)
```
kubectl create -f https://raw.githubusercontent.com/andyzhangx/Demo/master/pv/pvc-nfs.yaml
```

make sure pvc is in `Bound` status
```
kubectl describe pvc pvc-nfs
```

## 3. create a pod with nfs mount
```
kubectl create -f https://raw.githubusercontent.com/andyzhangx/Demo/master/linux/nfs/nginx-nfs.yaml
```

#### watch the status of pod until its Status changed from `Pending` to `Running`
```
watch kubectl describe po nginx-nfs
```

## 4. enter the pod container to do validation
```
kubectl exec -it nginx-nfs -- bash
root@nginx-nfs:/# df -h
Filesystem      Size  Used Avail Use% Mounted on
...
<IP_ADDRESS>:/test  100T  320K  100T   1% /mnt/azure
...
```

### Links
 - [Manually create and use an NFS (Network File System) Linux Server volume with Azure Kubernetes Service (AKS)](https://docs.microsoft.com/en-us/azure/aks/azure-nfs-volume)
 - [Set up Azure NetApp Files and create an NFS volume](https://docs.microsoft.com/en-us/azure/azure-netapp-files/azure-netapp-files-quickstart-set-up-account-create-volumes)
 - [Solution architectures using Azure NetApp Files](https://docs.microsoft.com/en-us/azure/azure-netapp-files/azure-netapp-files-solution-architectures)

repository: gkaleta/demo

repo_name: gkaleta/demo


text:
Files and scripts for building predictive models.

The screenshot (MLStudio_model.png) shows the structure of the ML Studio model. The main data input file is simulated_readmission_data.csv (this would normally be replaced by a call to a SQL database source).

The file to look up the demographic statistics by zipcode (zip_grocery_convenience.zip) goes into the zip file input of an "Execute R Script" block. The code that goes in that block is in zip_grocery_convenience.R.

The Excel file (Hospital Readmission [Predictive Exp.]) calls the web service running on our demo account.


text:
Video Download Bot for reddit

A bot for reddit that provides downloadable links for videos by using an external service

Formerly u/VredditDownloader

## Table of Contents

* [Prerequisites](#prerequisites)
* [Installation](#installation)
* [Run the bot](#run-the-bot)
* [Usage](#usage)
* [License](#license)

## Prerequisites

* Python3
* A reddit account
* Docker

## Installation

* Clone the repo

      git clone https://github.com/JohannesPertl/reddit-video-download-bot.git

* Create a [reddit app](https://ssl.reddit.com/prefs/apps/)
* Fill in the credentials in a [praw.ini file](https://praw.readthedocs.io/en/latest/getting_started/configuration/prawini.html)
located in the shared folder
* Fill in the bot configuration in [config.yaml](shared/config.yaml)

## Run the bot

**Start:** ```bash start.sh```
**Stop:** ```bash stop.sh```

You can scale each service by editing the ```start.sh``` script

## Usage

Mention the bot's name as a comment or send it a private message with the post link

## License

Distributed under the MIT License. See [LICENSE](LICENSE) for more information.

repository: Tharcoonvagh/reddit-video-download-bot

repo_name: Tharcoonvagh/reddit-video-download-bot


text:
# Netsoul-Ruby [![Gem Version](https://badge.fury.io/rb/netsoul.svg)](http://badge.fury.io/rb/netsoul) [![Build Status](https://travis-ci.org/fenicks/netsoul-ruby.svg?branch=master)](https://travis-ci.org/fenicks/netsoul-ruby) [![Coverage Status](https://coveralls.io/repos/fenicks/netsoul-ruby/badge.svg?branch=master&service=github)](https://coveralls.io/github/fenicks/netsoul-ruby?branch=master)

* formerly __libnetsoul-rb__

This gem is a simple and efficient Netsoul client implementation written in Ruby.
You can use it as a Ruby gem in order to implement your own Netsoul client or just use the provided Netsoul client.

*__[History]__: 8 years after writing my first ruby lines of code, I decide to rewrite this old own with all my Ruby backgrounds. The old design was really bad.*

## Features

* __MD5__ authentication
* __Kerberos__ (my own Ruby native extension) authentication. Something is wrong with kerberos server or gssapi __[work in progress]__
* Data transfert is supported **only for the library part, not the provided client**, use it at your own. _My academic account was closed when I tryed files transfert at school_.
* Identification Netsoul client is provided
* Netsoul message library: all netsoul DSL is covered by the 'netsoul/message' module

## Installation

### On your desktop

```ruby
gem install netsoul
```

### In your project

#### Gemfile

```ruby
gem 'netsoul', '~> 2.3.5'
```

#### project.rb

```ruby
require 'netsoul'
```

## Use the client

After installing the gem **netsoul**, call the client as described bellow.

Define at least two environment variables : `NETSOUL_LOGIN` and `NETSOUL_SOCKS_PASSWORD` (see the config for the complete list: [https://github.com/fenicks/netsoul-ruby]()).

```bash
netsoul-ruby
```

or with a config file

```bash
netsoul-ruby -config netsoul-config.yml
```

### Example of _netsoul-config.yml_ file

#### Standard (MD5) authentication

```yaml
:login: 'kakesa_c'
:socks_password: 'my socks password'
# :unix_password: 'unix password needed for kerberos authentication' # :auth_method must be set to :krb5
# :auth_method: :std # :std, :krb5
# :server_host: 'ns-server.epita.fr'
# :server_port: 4242
# :state: :none # :actif, :away, :connection, :idle, :lock, :server, :none
# :location: 'Home'
# :user_group: 'ETNA_2008'
```

#### Kerberos authentication

```yaml
:login: 'kakesa_c'
:unix_password: 'unix password'
:auth_method: :krb5 # :std, :krb5
# :socks_password: 'my socks password'
# :server_host: 'ns-server.epita.fr'
# :server_port: 4242
# :state: :none # :actif, :away, :connection, :idle, :lock, :server, :none
# :location: 'Home'
# :user_group: 'ETNA_2008'
```

## Build your own Netsoul client with netsoul-ruby gem

Look at the client implementation in this gem: [https://github.com/fenicks/netsoul-ruby/blob/master/bin/netsoul-ruby]().
This client is implemented in less than 80 lines of code ; including option parser, client reconnection, ...

```ruby
# Install the gem first (Gemfile or 'gem install'), see the 'Installation' section
require 'netsoul/client'

c = Netsoul::Client.new options[:user_opts_hash]
c.connect
# ...
if c.started
  # ...
  c.send str
  # ...
  msg = c.get
  #...
end
# ...
c.disconnect
```

## Contributing

1. Fork it ( https://github.com/fenicks/netsoul-ruby/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request

repository: christiankakesa/netsoul-ruby

repo_name: christiankakesa/netsoul-ruby