text:
# Terraform::AzureRM::VirtualMachineScaleSet

Manage a virtual machine scale set.

~> **Note:** All arguments including the administrator login and password will be stored in the raw state as plain-text.
[Read more about sensitive data in state](/docs/state/sensitive-data.html).

## Properties

`Name` - (Required) Specifies the name of the virtual machine scale set resource. Changing this forces a new resource to be created.

`ResourceGroupName` - (Required) The name of the resource group in which to create the virtual machine scale set. Changing this forces a new resource to be created.

`Location` - (Required) Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created.

`NetworkProfile` - (Required) A collection of network profile block as documented below.

`OsProfile` - (Required) A Virtual Machine OS Profile block as documented below.

`OsProfileWindowsConfig` - (Required, when a windows machine) A Windows config block as documented below.

`OsProfileLinuxConfig` - (Required, when a linux machine) A Linux config block as documented below.

`Sku` - (Required) A sku block as documented below.

`StorageProfileOsDisk` - (Required) A storage profile os disk block as documented below.

`UpgradePolicyMode` - (Required) Specifies the mode of an upgrade to virtual machines in the scale set. Possible values, `Rolling`, `Manual`, or `Automatic`. When choosing `Rolling`, you will need to set a health probe.

`AutomaticOsUpgrade` - (Optional) Automatic OS patches can be applied by Azure to your scaleset. This is particularly useful when `UpgradePolicyMode` is set to `Rolling`. Defaults to `false`.

`BootDiagnostics` - (Optional) A boot diagnostics profile block as referenced below.

`Extension` - (Optional) Can be specified multiple times to add extension profiles to the scale set. Each `Extension` block supports the fields documented below.

`EvictionPolicy` - (Optional) Specifies the eviction policy for Virtual Machines in this Scale Set. Possible values are `Deallocate` and `Delete`.

`HealthProbeId` - (Optional) Specifies the identifier for the load balancer health probe. Required when using `Rolling` as your `UpgradePolicyMode`.

`LicenseType` - (Optional, when a Windows machine) Specifies the Windows OS license type. If supplied, the only allowed values are `Windows_Client` and `Windows_Server`.

`OsProfileSecrets` - (Optional) A collection of Secret blocks as documented below.

`Overprovision` - (Optional) Specifies whether the virtual machine scale set should be overprovisioned.

`Plan` - (Optional) A plan block as documented below.

`Priority` - (Optional) Specifies the priority for the Virtual Machines in the Scale Set. Defaults to `Regular`. Possible values are `Low` and `Regular`.

`RollingUpgradePolicy` - (Optional) A `RollingUpgradePolicy` block as defined below. This is only applicable when the `UpgradePolicyMode` is `Rolling`.

`SinglePlacementGroup` - (Optional) Specifies whether the scale set is limited to a single placement group with a maximum size of 100 virtual machines. If set to false, managed disks must be used. Default is true. Changing this forces a new resource to be created. See [documentation](http://docs.microsoft.com/en-us/azure/virtual-machine-scale-sets/virtual-machine-scale-sets-placement-groups) for more information.

`StorageProfileDataDisk` - (Optional) A storage profile data disk block as documented below.

`StorageProfileImageReference` - (Optional) A storage profile image reference block as documented below.

`Tags` - (Optional) A mapping of tags to assign to the resource.

`Zones` - (Optional) A collection of availability zones to spread the Virtual Machines over.

### Sku Properties

`Name` - (Required) Specifies the size of virtual machines in a scale set.

`Tier` - (Optional) Specifies the tier of virtual machines in a scale set. Possible values, `standard` or `basic`.

`Capacity` - (Required) Specifies the number of virtual machines in the scale set.

### RollingUpgradePolicy Properties

`MaxBatchInstancePercent` - (Optional) The maximum percent of total virtual machine instances that will be upgraded simultaneously by the rolling upgrade in one batch. As this is a maximum, unhealthy instances in previous or future batches can cause the percentage of instances in a batch to decrease to ensure higher reliability. Defaults to `20`.

`MaxUnhealthyInstancePercent` - (Optional) The maximum percentage of the total virtual machine instances in the scale set that can be simultaneously unhealthy, either as a result of being upgraded, or by being found in an unhealthy state by the virtual machine health checks before the rolling upgrade aborts. This constraint will be checked prior to starting any batch. Defaults to `20`.

`MaxUnhealthyUpgradedInstancePercent` - (Optional) The maximum percentage of upgraded virtual machine instances that can be found to be in an unhealthy state. This check will happen after each batch is upgraded. If this percentage is ever exceeded, the rolling update aborts. Defaults to `20`.

`PauseTimeBetweenBatches` - (Optional) The wait time between completing the update for all virtual machines in one batch and starting the next batch. The time duration should be specified in ISO 8601 format for duration (https://en.wikipedia.org/wiki/ISO_8601#Durations). Defaults to `0` seconds represented as `PT0S`.

`Type` - (Required) Specifies the identity type to be assigned to the scale set. Allowable values are `SystemAssigned`, `UserAssigned`, and `SystemAssigned, UserAssigned`. For the `SystemAssigned` identity the scale set's Service Principal ID (SPN) can be retrieved after the scale set has been created. See [documentation](https://docs.microsoft.com/en-us/azure/active-directory/managed-service-identity/overview) for more information.

`IdentityIds` - (Optional) Specifies a list of user managed identity ids to be assigned to the VMSS. Required if `Type` is `UserAssigned`.

### OsProfile Properties

`ComputerNamePrefix` - (Required) Specifies the computer name prefix for all of the virtual machines in the scale set. Computer name prefixes must be 1 to 9 characters long for windows images and 1 - 58 for linux. Changing this forces a new resource to be created.

`AdminUsername` - (Required) Specifies the administrator account name to use for all the instances of virtual machines in the scale set.

`AdminPassword` - (Required) Specifies the administrator password to use for all the instances of virtual machines in a scale set.

`CustomData` - (Optional) Specifies custom data to supply to the machine. On linux-based systems, this can be used as a cloud-init script. On other systems, this will be copied as a file on disk. Internally, Terraform will base64 encode this value before sending it to the API. The maximum length of the binary array is 65535 bytes.

### OsProfileSecrets Properties

`SourceVaultId` - (Required) Specifies the key vault to use.

`VaultCertificates` - (Required, on windows machines) A collection of Vault Certificates as documented below.

### VaultCertificates Properties

`CertificateUrl` - (Required) It is the Base64 encoding of a JSON Object that which is encoded in UTF-8 of which the contents need to be `data`, `dataType` and `password`.

`CertificateStore` - (Required, on windows machines) Specifies the certificate store on the Virtual Machine where the certificate should be added to.

### OsProfileWindowsConfig Properties

`ProvisionVmAgent` - (Optional) Indicates whether virtual machine agent should be provisioned on the virtual machines in the scale set.

`EnableAutomaticUpgrades` - (Optional) Indicates whether virtual machines in the scale set are enabled for automatic updates.

`Winrm` - (Optional) A collection of WinRM configuration blocks as documented below.

`AdditionalUnattendConfig` - (Optional) An Additional Unattended Config block as documented below.

### Winrm Properties

`Protocol` - (Required) Specifies the protocol of listener.

`CertificateUrl` - (Optional) Specifies URL of the certificate with which new Virtual Machines is provisioned.

### AdditionalUnattendConfig Properties

`Pass` - (Required) Specifies the name of the pass that the content applies to. The only allowable value is `oobeSystem`.

`Component` - (Required) Specifies the name of the component to configure with the added content. The only allowable value is `Microsoft-Windows-Shell-Setup`.

`SettingName` - (Required) Specifies the name of the setting to which the content applies. Possible values are: `FirstLogonCommands` and `AutoLogon`.

`Content` - (Optional) Specifies the base-64 encoded XML formatted content that is added to the unattend.xml file for the specified path and component.

### OsProfileLinuxConfig Properties

`DisablePasswordAuthentication` - (Optional) Specifies whether password authentication should be disabled. Defaults to `false`. Changing this forces a new resource to be created.

`SshKeys` - (Optional) Specifies a collection of `path` and `key_data` to be placed on the virtual machine.

### NetworkProfile Properties

`Name` - (Required) Specifies the name of the network interface configuration.

`Primary` - (Required) Indicates whether network interfaces created from the network interface configuration will be the primary NIC of the VM.

`IpConfiguration` - (Required) An ip_configuration block as documented below.

`AcceleratedNetworking` - (Optional) Specifies whether to enable accelerated networking or not. Defaults to `false`.

`DnsSettings` - (Optional) A dns_settings block as documented below.

`IpForwarding` - (Optional) Whether IP forwarding is enabled on this NIC. Defaults to `false`.

`NetworkSecurityGroupId` - (Optional) Specifies the identifier for the network security group.

### DnsSettings Properties

`DnsServers` - (Required) Specifies an array of dns servers.

### IpConfiguration Properties

`Name` - (Required) Specifies name of the IP configuration.

`SubnetId` - (Required) Specifies the identifier of the subnet.

`ApplicationGatewayBackendAddressPoolIds` - (Optional) Specifies an array of references to backend address pools of application gateways. A scale set can reference backend address pools of one application gateway. Multiple scale sets cannot use the same application gateway.

`LoadBalancerBackendAddressPoolIds` - (Optional) Specifies an array of references to backend address pools of load balancers. A scale set can reference backend address pools of one public and one internal load balancer. Multiple scale sets cannot use the same load balancer.

`LoadBalancerInboundNatRulesIds` - (Optional) Specifies an array of references to inbound NAT rules for load balancers.

`Primary` - (Required) Specifies if this ip_configuration is the primary one.

`ApplicationSecurityGroupIds` - (Optional) Specifies up to `20` application security group IDs.

`PublicIpAddressConfiguration` - (Optional) Describes a virtual machines scale set IP Configuration's PublicIPAddress configuration. The public_ip_address_configuration is documented below.

### PublicIpAddressConfiguration Properties

`Name` - (Required) The name of the public ip address configuration.

`IdleTimeout` - (Required) The idle timeout in minutes. This value must be between 4 and 32.

`DomainNameLabel` - (Required) The domain name label for the dns settings.

### StorageProfileOsDisk Properties

`Name` - (Optional) Specifies the disk name. Must be specified when using unmanaged disk ('managed_disk_type' property not set).

`VhdContainers` - (Optional) Specifies the vhd uri. Cannot be used when `Image` or `ManagedDiskType` is specified.

`ManagedDiskType` - (Optional) Specifies the type of managed disk to create. Value you must be either `Standard_LRS`, `StandardSSD_LRS` or `Premium_LRS`. Cannot be used when `VhdContainers` or `Image` is specified.

`CreateOption` - (Required) Specifies how the virtual machine should be created. The only possible option is `FromImage`.

`Caching` - (Optional) Specifies the caching requirements. Possible values include: `None` (default), `ReadOnly`, `ReadWrite`.

`Image` - (Optional) Specifies the blob uri for user image. A virtual machine scale set creates an os disk in the same container as the user image.
Updating the osDisk image causes the existing disk to be deleted and a new one created with the new image. If the VM scale set is in Manual upgrade mode then the virtual machines are not updated until they have manualUpgrade applied to them.
When setting this field `OsType` needs to be specified. Cannot be used when `VhdContainers`, `ManagedDiskType` or `StorageProfileImageReference` are specified.

`OsType` - (Optional) Specifies the operating system Type, valid values are windows, linux.

### StorageProfileDataDisk Properties

`Lun` - (Required) Specifies the Logical Unit Number of the disk in each virtual machine in the scale set.

`CreateOption` - (Optional) Specifies how the data disk should be created. The only possible options are `FromImage` and `Empty`.

`Caching` - (Optional) Specifies the caching requirements. Possible values include: `None` (default), `ReadOnly`, `ReadWrite`.

`DiskSizeGb` - (Optional) Specifies the size of the disk in GB. This element is required when creating an empty disk.

`ManagedDiskType` - (Optional) Specifies the type of managed disk to create. Value must be either `Standard_LRS`, `StandardSSD_LRS` or `Premium_LRS`.

### StorageProfileImageReference Properties

`Id` - (Optional) Specifies the ID of the (custom) image to use to create the virtual
machine scale set, as in the [example below](#example-of-storage_profile_image_reference-with-id).

`Publisher` - (Optional) Specifies the publisher of the image used to create the virtual machines.

`Offer` - (Optional) Specifies the offer of the image used to create the virtual machines.

`Sku` - (Optional) Specifies the SKU of the image used to create the virtual machines.

`Version` - (Optional) Specifies the version of the image used to create the virtual machines.

### Extension Properties

`Name` - (Required) Specifies the name of the extension.

`Publisher` - (Required) The publisher of the extension, available publishers can be found by using the Azure CLI.

`Type` - (Required) The type of extension, available types for a publisher can be found using the Azure CLI.

`TypeHandlerVersion` - (Required) Specifies the version of the extension to use, available versions can be found using the Azure CLI.

`AutoUpgradeMinorVersion` - (Optional) Specifies whether or not to use the latest minor version available.

`Settings` - (Required) The settings passed to the extension, these are specified as a JSON object in a string.

`ProtectedSettings` - (Optional) The protected_settings passed to the extension, like settings, these are specified as a JSON object in a string.

### Plan Properties

`Name` - (Required) Specifies the name of the image from the marketplace.

`Publisher` - (Required) Specifies the publisher of the image.

`Product` - (Required) Specifies the product of the image from the marketplace.

## Return Values

### Fn::GetAtt

`Id` - The virtual machine scale set ID.

## See Also

* [azurerm_virtual_machine_scale_set](https://www.terraform.io/docs/providers/azurerm/r/virtual_machine_scale_set.html) in the _Terraform Provider Documentation_


text:
---
layout: post
image: /building-visual-hierarchy.png
tags: [visual-design-cat, ux-design-cat]
resource-url: https://www.uxpin.com/studio/ebooks/web-ui-design-building-visual-hierarchy/
access: Requires Email
resource-type: Ebook
resource-org: UXPin
title: "The Building Blocks of Visual Hierarchy: Designing Visually Intuitive Web UI"
---
{% include JB/setup %}

In this ebook:
- See how to design visually intuitive interfaces for the web.
- Learn how size, colors, space, layout, and style affect visual understanding.
- Get quick tips for designing clear visual hierarchies.
- 18 examples of the best sites analyzed from companies like MailChimp & RelateIQ.

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: HTML

gha_license_id: MIT

license_type: permissive


text:
# Source Code and Materials from my [blog](https://kaloyanit.com)

# Topics
-   **Google ReCAPTCHA Server-Side Validation** - [Source](https://github.com/KaloyanIT/BlogCodeSamples/tree/main/src/GoogleRecaptchaServerSideValidation)

repository: KaloyanIT/BlogCodeSamples

branch_name: refs/heads/main

repo_name: KaloyanIT/BlogCodeSamples


text:
---
title: talk-plugin-deep-reply-count
permalink: /plugin/talk-plugin-deep-reply-count/
layout: plugin
plugin:
    name: talk-plugin-deep-reply-count
    provides:
        - Server
---

The Deep Reply Count plugin will add a new graph edge, `Comment.deepReplyCount`
that will return the count of all descendant replies.

**Warning: Enabling the talk-plugin-deep-reply-count plugin introduces a significant
performance impact on larger sites, use with care.**

repository: AramZS/talk

gha_license_id: NOASSERTION

repo_name: AramZS/talk


text:
# plex-s3fs 🎥🍿

A Plex Media Server that is backed by an Amazon S3 Bucket.

[![License](https://img.shields.io/github/license/nicholasadamou/stockflight.svg?label=License&maxAge=86400)](./LICENSE)
![Say Thanks](https://img.shields.io/badge/say-thanks-ff69b4.svg)

---

## Why create `plex-s3fs`?

A while back a good pal of mine introduced me to Plex. I started looking up stuff about it like its features, system requirements, and how it works, then before I know it, I had my own server set up to run 24/7! Having experience with Amazon AWS and Digital Ocean, I figured, it would be extremely simple to not only get a Plex Server up and running in the cloud, but also have my entire library of movies and TV shows backed up in the cloud as well through Amazon's S3 buckets. I choose Amazon S3 for my storage because of it's dirt cheap pricing and flexibility. Also, you don't have to use the root user, I did because I didn't know what I was doing with my first attempt and I just stuck with it. It is better if you create your own user with the sufficient privileges, but can be done however you desire. This doesn't have to be done through DigitalOcean. You can use any VPS you want, I used DigitalOcean because I was familiar with it.

⚠ _**Note**_: Before I start, I'm going to say that this is better for people with small libraries (under 500GB) due to Amazon S3's pricing, and if your are curious about pricing, see [Amazons official S3 pricing calculator](https://calculator.aws/#/createCalculator/S3).

## Getting Started

## Digital Ocean Account & Droplet

In order to start, you must first create a VPS (Virtual Private Server) using Digital Ocean or one of its competitors. First, go to [Digital Ocean](https://m.do.co/c/6256ee0966d5) and create an account using my referral code to get yourself a \$10 credit to see if you want to stick with it.

After your account is created, log in and create a new **droplet**.

**It doesn't matter which pricing option you choose**, just be sure you choose one with enough transfer to upload all of your content because it all has to be uploaded through the server.

_When it asks you what distribution of Linux to install_, be sure to **choose the latest version of Ubuntu**.

After your droplet is created, I recommend using SSH instead of the web console. On PC, get [Putty](http://www.chiark.greenend.org.uk/~sgtatham/putty/), and for Mac, open terminal and type `ssh root@your-ip-here` and replace `youriphere` with the IP of your droplet. It will prompt you for your password, enter it and your in!

## Amazon AWS Account & S3 Bucket

Secondly, you must create a Amazon AWS S3 Bucket. To do this, you must first have an Amazon AWS account. To create one, visit [this](https://aws.amazon.com/premiumsupport/knowledge-center/create-and-activate-aws-account/) link.

After your account is created, log in and click on **"S3"** under **"Storage & Content Delivery"** and create a new bucket.

After your bucket is created, click on your name at the top right corner and from the drop-down menu choose **"My Security Credentials"**. Click on **"Access Keys"** and **"Create New Access Key"** and download the file. This file contains your **access key** and **secret** for accessing your S3 bucket outside of the web portal. If you do not download them, you will have to delete the previous key and generate a new one.

## Setup

[![xkcd: Automation](http://imgs.xkcd.com/comics/automation.png)](http://xkcd.com/1319/)

Now, to install `plex-s3fs`, just run the snippet in the `terminal` of the [Digital Ocean Droplet](https://www.digitalocean.com/products/droplets/):

(⚠ **DO NOT** run the `install` snippet if you don't fully
understand [what it does](install.sh). Seriously, **DON'T**!)

```bash
bash <(curl -s -L https://raw.githubusercontent.com/nicholasadamou/plex-s3fs/master/install.sh)
```

That's it! ✨

### Running on a headless server

In order to properly configure our Plex server, we need to add the required claim token. To add the token, you will need to use ssh tunneling to gain access and setup the server for first run. During the first run, you setup the server to make it available and configurable. However, this setup option will only be triggered if you access it over http://localhost:32400/web, it will not be triggered if you access it over http://ip_of_server:32400/web. Since we are setting up PMS (Plex Media Server) on a headless server, you can use a SSH tunnel to link http://localhost:32400/web (on your current computer) to http://localhost:32400/web (on the headless server running PMS):

`ssh username@ip_of_server -L 32400:localhost:32400 -N`

## Liability

The creator of this repo is _not responsible_ if your machine ends up in a state you are not happy with.

## License

Copyright Nicholas Adamou

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.

gha_language: Shell


text:
# Filter spams

[![Latest Stable Version](https://poser.pugx.org/pkboom/laravel-spam-filter/v)](//packagist.org/packages/pkboom/laravel-spam-filter)
[![Build Status](https://travis-ci.com/pkboom/laravel-spam-filter.svg?branch=master)](https://travis-ci.com/pkboom/laravel-spam-filter)
[![Total Downloads](https://poser.pugx.org/pkboom/laravel-spam-filter/downloads)](//packagist.org/packages/pkboom/laravel-spam-filter)

Using a honeypot, you can easily filter spams. This package uses [spatie/laravel-honeypot](https://github.com/spatie/laravel-honeypot) under the hood.

## Installation

You can install the package via composer:

```bash
composer require pkboom/laravel-spam-filter
```

## Usage

Place this in your form.

```html
<form>
    <input name="honeypot" type="hidden" value="" />
    <input
        name="encrypted_time"
        type="hidden"
        value="{{ \Spatie\Honeypot\EncryptedTime::create(now()->addSecond()) }}"
    />
    ...
</form>
```

Filter spams

```php
use Illuminate\Support\Facades\Request;

if (Request::isSpam()) {
    return response('', 400);
}
```

### Testing

```bash
composer test
```

## License

The MIT License (MIT). Please see [MIT license](http://opensource.org/licenses/MIT) for more information.

repository: pkboom/laravel-spam-filter

repo_name: pkboom/laravel-spam-filter


text:
# CapstoneProject-EmailClassification

## Data Analysis on Email Classification Data set
* In this we use emails.csv file which provide information of different emails.
* In this emails.csv file we have a target column "Prediction" that identify whether the mail is spam or not.
* In Order to Train the data we make a dataset that conatin equal number of spam and ham mails.

## Data Testing
In Data Testing we test the data on three Different models.
1. Naive Bayes: This model used for text identification through text it identify whether the mail is spam or not.
2. Support Vector Machine: Support Vector Machine is used for classic classification problems. SVMs work on the algorithm of Maximal Margin.
3. Random Forest Classifier: It Ensemble methods turn any feeble model into a highly powerful one.
* CASE 1 : Let's take a word 'Greetings'. Say, it is present in both 'Spam' and 'Not Spam' mails.
* CASE 2 : Let's take a word 'lottery'.Say, it is present in only spam mails.
* CASE 3 : Let's take a word 'cheap'. Say, it is present only in spam mails.

## To Run The Code
* Clone Github Repository to your computer
* Run Train Data.ipynb to prepare the data in your computer.
* Run Test Data.ipynb to check the accuracy of emails.


text:
<img alt="License" src="https://img.shields.io/badge/-MIT License-blue">

# Life_On_Mars

This site allows you to see a sample of weather conditions on Mars and select images of Mars by date

[Click here to live link](https://mwturner611.github.io/Life_On_Mars/)

# Contributors

- Jslota25
- PBridwell
- mwturner611

# Technology

JQuery, JavaScript, Materialize, HTML, CSS, AJAX

# About

This site allows you to experience a day in the life on Mars.

# License

This project is licensed under The MIT License (MIT).

# How to use this code

1. On open see the most recent weather on Mars available from Nasa's API
2. Toggle between Celsius and Fahrenheit
3. Use the date selector on the left hand side to pick which date you would like to see photos from
4. Cycle through more photos on same date or choose a different date to view

# Contributing Guidelines

All contributions and suggestions are welcome! For direct contributions, please fork the repository and file a pull request.

# Contacts

- Name: John Slota (@Jslota25)
- LinkedIn: https://www.linkedin.com/mwlite/in/john-slota-83b432165

- Name: Patrick Bridwell (@PBridwell)
- LinkedIn: https://www.linkedin.com/mwlite/in/patrick-bridwell-0a7451133

- Name: Matt Turner (@mwturner611)
- e-mail<EMAIL_ADDRESS>- LinkedIn: https://www.linkedin.com/in/matt-turner-ba328211a/*

# Thank you's

- Chris Cerami for maintaining the Mars Rover Photos API [repository here](https://github.com/chrisccerami/mars-photo-api)
- Nasa's Jet Propoulsion Laboratory for maintaing the [InSight: Mars Weather Service API](https://api.nasa.gov/)


text:
simplehttp
==========

`simplehttp` is a family of libraries and daemons built upon libevent that make high performance HTTP servers
simple and straightforward to write.

The following libraries and daemons are included:

 * `buffered_socket` - a simple abstraction on bufferevent for arbitrary TCP sockets
 * `domain_socket` - an async C library for creating, listening, and communicating over unix domain sockets
 * `host_pool` - a library for dealing with endpoint selection, pooling, failure, recovery, and backoff
 * `profiler_stats` - a library to track arbitrary profiler timings for average, 95%, 99%, 100% time
 * `ps_to_http` - a daemon built on top of pubsubclient to write messages from a source pubsub to destination simplequeue or pubsub server
 * `ps_to_file` - a daemon built on top of pubsubclient to write messages from a source pubsub to time rolled output files
 * `pubsub` - a daemon that receives data via HTTP POST events and writes to all subscribed long-lived HTTP connections
 * `pubsub_filtered` - a pubsub daemon with the ability to filter/obfuscate fields of a JSON message
 * `pubsubclient` - a library for writing clients that read from a pubsub
 * `pysimplehttp` - a python library for working with pubsub and simplequeue
 * `qrencode`
 * `queuereader` - a library for writing clients that read from a simplequeue and do work
 * `simpleattributes`
 * `simplegeo`
 * `simplehttp`
 * `simpleleveldb` - a HTTP CRUD interface to leveldb
 * `simplememdb` - an in-memory version of simpletokyo
 * `simplequeue` - an in memory queue with HTTP /put and /get endpoints to push and pop data
 * `simpletokyo` - a HTTP CRUD interface to front tokyo cabinet's ttserver
 * `sortdb` - sorted database server

simplehttp Install Instructions
===============================

to install any of the simplehttp components you will need to install
[libevent](http://www.monkey.org/~provos/libevent/) 1.4.13+ and the 'simplehttp' module first.

build the main library
this provides libsimplehttp.a simplehttp/simplehttp.h and simplehttp/queue.h

    cd simplehttp
    make && make install

now install whichever module you would like
this will compile 'simplequeue' and place it in /usr/local/bin

    cd simplequeue
    make && make install

Some modules have additional dependencies:

* [json-c](http://oss.metaparadigm.com/json-c/)
* [leveldb](http://code.google.com/p/leveldb/)
* [tokyocabinet](http://fallabs.com/tokyocabinet/) / [tokyotyrant](http://fallabs.com/tokyotyrant/)
* [qrencode](http://fukuchi.org/works/qrencode/index.en.html)
* [pcre](http://www.pcre.org/)

pysimplehttp Install Instructions
=================================

    pip install pysimplehttp

provides `file_to_sq.py` and `ps_to_sq.py`. It will use ujson if available.


text:
# Appstore iOS 11
So I was following Brian Voong's Appstore videos on letsbuildthatapp.com and I decided to turn things up a notch.. and this came about. Found the designs on dribble! I guess there's just a whole lot of dope stuff online... Basically a rough draft of the appstore freebie by Felix Lebedinzew (http://felix-lebedinzew.com/), The app store data is from apptweak.io , they have an awesome API.. I mean there's everything in their JSON responses. I learnt (the hard way) quite a lot about navigation controllers and how they work with the navigation bar, tab bars etc.

## Technology Stack
Apptweak.io
UIKit

## Used libraries
**LBTAComponents** - library by letsbuildthatapp.com for easy UICollectionViewController management ...
**Kingfisher** - Popular image loader ...we all know this guy
**Alamofire** - For handling network requests
**ReadMoreTextView** - For showing collapsible text
**AZSearchView** - Nice searchview controller...

## To do
**1.** -- Split a lot of the files, some long .swift files exist in this project
**2.** -- Read up on writing better animations

License
----------------

The MIT License (MIT)

Copyright (c) 2017 Aliu Abdul-Mujib

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:
---
title: Pipeline Helper classes
footer: MIT Licensed | Copyright © 2018 - Compuware
---

# Helper classes

The helper classes primarily serve as wrapper classes for use by  different methods used by the plugins. Other purposes include providing configuration data `PipelineConfig` or preparing `JCL` for a specific pipeline execution `JclSkeleton`.

## GitHelper

The [GitHelper](./GitHelper.md) class serves as a wrapper around the Git SCM plugin and provides these methods:

### [`GitHelper(steps)`](./GitHelper.md#GitHelper)

The constructor receives the `steps` from the pipeline to allow use of pipeline step within the class code.

### [`checkout(String gitUrl, String gitBranch, String gitCredentials, String tttFolder)`](./GitHelper.md#checkout)

checks out the branch `gitBranch` in the Git(Hub) repository at `gitUrl`. It uses the `gitCredentials` to authenticate and places the cloned Git repository into the folder `tttFolder` within the Jenkins workspace.

### [`checkoutPath(String gitUrl, String gitBranch, String path, String gitCredentials, String gitProject)`](./GitHelper.md#checkoutPath)

performs a *sparse checkout*, and checks out path `path` in the branch `gitBranch` in the project `gitProject` in the Git(Hub) repository at `gitUrl`. It uses the `gitCredentials` to authenticate.

## IspwHelper

The [IspwHelper](./IspwHelper.md) class serves as a wrapper around the Compuware ISPW plugin and provides these methods:

### [`IspwHelper(steps, pConfig)`](./IspwHelper.md#ispwhelper)

The constructor receives the `steps` from the pipeline to allow use of pipeline step within the class code and a [`PipelineConfig`](./#PipelineConfig) to make use of pipeline specific execution parameters.

### [`downloadAllSources(String ispwLevel)`](./IspwHelper.md#downloadallsources)

Downloads all COBOL sources and copybooks for the ISPW stream, application and level as stored in the `PipelineConfig`.

### [`downloadSources()`](./IspwHelper.md#downloadsources)

Downloads all sources (COBOL programs and copybooks) contained in the [ISPW set](../../pipelines/basic_scenario.md) triggering the pipeline.

### [`downloadCopyBooks(String workspace)`](./IspwHelper.md#downloadcopybooks)

Performs the following tasks:
- receives the path to the `workspace` for the pipeline job
- uses the `referencedCopyBooks` method to determine all copybooks used by the download COBOL programs
- uses a [`JclSkeleton`](./Jcl_skeletons.md) object's `createIebcopyCopyBooksJcl` method to create an `IEBCOPY` job `JCL` that copies all required copybooks in the list from the ISPW libraries into a temporary PDS
- submits this `JCL` using the [Topaz Utilities](https://plugins.jenkins.io/compuware-topaz-utilities/) plugin
- downloads the content of the temporary PDS, using the [ISPW PDS downloader](https://plugins.jenkins.io/compuware-scm-downloader/)
- uses the `JclSkeleton` method `jclSkeleton.createDeleteTempDsn` to create a `DELETE` job `JCL`
- and submits that `JCL`

### [`referencedCopyBooks(String workspace)`](./IspwHelper.md#referencedcopybooks)

Performs the following tasks:
- receives the path to the `workspace` of the pipeline job
- searches all `*.cbl` program sources in the folder containing all downloaded sources and builds a list of COBOL programs
- for each program in the list it
  - reads the source file
  - scans the content for valid `COPY` statements (e.g. not comments)
  - determines the referenced copybook
  - add each copybook to the list of copybooks
- returns the resulting list of copybooks

### [`regressAssignmentList(assignmentList, cesToken)`](./IspwHelper.md#regressassignmentlist)

Receives a list of assignment IDs in `assignmentList`, the [CES Token](../../tool_configuration/CES_credentials_token.md) in `cesToken` and calls method [`regressAssignment`](#regressassignment-assignment-cestoken) for each element of `assignmentList`

### [`regressAssignment(assignment, cesToken)`](./IspwHelper.md#regressassignment)

Receives an Assignment ID in `assignment`, the [CES Token](../../tool_configuration/CES_credentials_token.md) in `cesToken` and uses the ISPW REST API to regress the assignment.

## JclSkeleton

The [JclSkeleton](./JclSkeleton.md) class allows the pipelines to customize pieces of `JCL` in certain, predefined ways. This allows changing e.g. `job cards`, `STEPLIB` concatenations and others during runtime. The `JCL` [skeletons](./Jcl_skeletons.md) are read from folder `./resources/skels` in the pipeline workspace.

### [`JclSkeleton(steps, String workspace, String ispwApplication, String ispwPathNum)`](./JclSkeleton.md#jclskeleton)

The constructor  receives the `steps` from the pipeline to allow use of pipeline step within the class code, the path to the pipeline `workpace`, the name of the ISPW application in `ispwApplication` and the [number of the development path](../../guidelines/ttt/ttt_scenario.md) in `pathNum`.

### [`initialize()`](./JclSkeleton.md#initialize)

Is used for additional initialization which cannot be executed in the constructor and it:
  - reads the `JobCard.jcl` skeleton file
  - reads the `deleteDs.skel` skeleton file
  - reads the `cleanUpCcRepo.skel` skeleton file
  - initializes the `IEBCOPY` `JCL` by using the [`buildIebcopySkel`](#buildiebcopyskel) method.

### [`buildIebcopySkel()`](./JclSkeleton.md#buildiebcopyskel)
Initializes the `IEBCOPY` `JCL` by
    - reading the `iebcopy.skel` skeleton file (main `JCL`)
    - reading the `iebcopyInDd.skel` skeleton file (input `DD` statements)
    - building the required `INDD=INx` cards
    - replacing the placeholders in the skeleton `JCL` by the concrete values
    - returning the resulting `JCL` code
    -
### [`createIebcopyCopyBooksJcl(String targetDsn, List copyMembers)`](./JclSkeleton.md#createiebcopycopybooksjcl)

Receives the target DSN for the `IEBCOPY` job in `targetDsn` and the list of required copybooks in `copyMembers` and
  - builds a `SELECT MEMBER=` card for each entry in `copyMembers`
  - Uses method `buildFinalJcl` to build the final `JCL` passing
    - the `jobCardJcl` from `initialize`
    - the `iebcopyCopyBooksJclSkel` built previously in `initialize`
    - a map array of parameter markers and values
  - returns the resulting `JCL` code

### [`createDeleteTempDsn(String targetDsn)`](./JclSkeleton.md#createdeletetempdsn)

Receives the target DSN for the `DELETE` job in `targetDsn` and
  - Uses method `buildFinalJcl` to build the final `JCL` passing
    - the `jobCardJcl` from `initialize`
    - the `cleanUpDatasetJclSkel` built previously in `initialize`
    - a map array of parameter markers and values
  - returns the resulting `JCL` code

### [`createCleanUpCcRepo()`](./JclSkeleton.md#createcleanupccrepo)

  - Uses method `buildFinalJcl` to build the final `JCL` passing
    - the `jobCardJcl` from `initialize`
    - the `cleanUpCcRepoJclSkel` built previously in `initialize`
    - a map array of parameter markers and values
  - returns the resulting `JCL` code

### [`buildFinalJcl(jobCard, jclSkel, parametersMap)`](./JclSkeleton.md#buildfinaljcl)

Receives a `jobCard`, a `jclSkel` skeleton JCL, a parameter map `parametersMap` and
  - places the `jobCard` in front of the `jclSkel` test
  - for each element in `parametersMap` replaces the corresponding parameter marker stored in `parmName` by the corresponding value stored in `parmValue`
  - returns the resulting `JCL` code

### [`readSkelFile(String fileName)`](./JclSkeleton.md#readskelfile)

Receives a `fileName` and
  - reads the corresponding file from the skeletons folder in the pipeline workspace
  - returns the content of the file as list of records

## PipelineConfig

The [PipelineConfig](./PipelineConfig.md) class stores and allows retrieval of any pipeline [configuration and runtime specific parameters](../parameters.md).

### [`PipelineConfig(steps, workspace, params, mailListLines)`](./PipelineConfig.md#pipelineconfig)

The constructor receives the `steps` from the pipeline to allow use of pipeline step within the class code, the path of the pipeline `workspace` the `Map` `params` containing the `key:value` parameter pairs from the [pipeline call](../readme.md#mainframe-ci-pipeline-from-shared-lib), and a the list of records from the [`mailList.config` file](../../tool_configuration/readme.md) and initializes all parameters that can be initialized immediately.

### [`initialize()`](.PipelineConfig#initialize)

Is used for additional initialization which cannot be executed in the constructor and it:
- Deletes any old content from the pipeline workspace
- Uses the following methods to read configuration files and based on the content initialize further parameters:
  - [`setServerConfig`](#setserverconfig) to set server (Sonar, XLR, etc.) specific parameters
  - [`setTttGitConfig`](#settttgitconfig) to set parameters for the Git repository containing TTT assets
  - [`setMailConfig`](#setmailconfig) to build the map of ISPW owner IDs and corresponding email addresses.

### [`setServerConfig()`](.PipelineConfig#setserverconfig)

Performs the following tasks:
- reads the pipeline configuration file [`pipeline.config`](../config_files.md#pipeline-config), containing server URLs (e.g. Sonar, XL Release) etc.
- extracts the values for the corresponding parameters
- sets the parameters

### [`setTttGitConfig()`](.PipelineConfig#settttgitconfig)

Performs the following tasks:
- reads the pipeline configuration file [`tttgit.config`](../config_files.md#tttgit-config), containing information about the GitHub repository storing the Topaz for Total Test projects
- extracts the values for the corresponding parameters
- sets the parameters

### [`setMailConfig()`](.PipelineConfig#setmailconfig)

Performs the following tasks:
- loops though the list of `mailListLines` containing the `TSO user:email` pairs
- turns the records into a `Map`
- determines the email address for the owner of the ISPW set and sets the parameter `mailRecipient` accordingly

### [`readConfigFile(String fileName)`](.PipelineConfig#readconfigfile)

Reads a (configuration) file and returns the content with each line/record as an element of a list.

## SonarHelper

The [SonarHelper](./SonarHelper.md) class serves as a wrapper to execute the SonarQube scanner.

### [`SonarHelper(script, steps, pConfig)`](./SonarHelper.md#sonarhelper)

The constructor receives the `script`object and the `steps` from the pipeline  and a [`PipelineConfig`](./#PipelineConfig) to make use of pipeline execution specific parameters.

### [`initialize()`](./SonarHelper.md#initialize)

Is used for additional initialization which cannot be executed in the constructor and determines the scanner home path.

### [`scan()`](./SonarHelper.md#scan)

Determines the test results locations based on the assumption that the results have been created by Topaz for Total Unit Test. (If Functional Tests have been executed, uses the [`scan(pipelineType)`](#scan-pipelinetype) method.) It then uses the [`runScan`](#runscan) method to execute the Sonar scanner.

### [`scan(pipelineType)`](./SonarHelper.md##scan-pipelinetype)

Determines the test results locations based on the type of Topaz for Total tests, either unit tests or functional tests. It then uses the [`runScan`](#runscan) method to execute the Sonar scanner.

### [`checkQualityGate`](./SonarHelper.html#checkqualitygate)

Receives the results of the Sonar quality gate and returns its status.

### [`determineUtProjectName`](./SonarHelper.html#determineutprojectname)

Builds the name for the SonarQube project, if Topaz for Total Test unit tests were executed and the pipeline is a "Generate" pipeline.

### [`determineFtProjectName`](./SonarHelper.html#determineftprojectname)

Builds the name for the SonarQube project, if Topaz for Total Test functional tests were executed and the pipeline is a "Integrate" pipeline.

### [`determineUtResultPath`](./SonarHelper.html#determineutresultpath)

Builds the path to point to Topaz for Total Test unit test results files to be passed to Sonar.

### [`runScan`](./SonarHelper.html#runscan)

Prepares all parameters required for Sonar and executes the Sonar scanner:

- [`sonar.testExecutionReportPaths`](https://docs.sonarqube.org/latest/analysis/generic-test/) allows using a comma-separated list of paths the results of unit tests (Topaz for Total Test in our case) in the format required by the Sonar scanner.
- [`sonar.tests`](https://docs.sonarqube.org/latest/analysis/analysis-parameters/) comma-separated list of folders containing unit tests (Topaz for Total Test projects in our case)
- [`coverageReportPaths`](https://docs.sonarqube.org/latest/analysis/generic-test/) path to code coverage results. With Xpediter Code Coverage the results will reside in `Coverage/Coverage.xml`.
- [`sonar.projectKey`](https://docs.sonarqube.org/latest/analysis/analysis-parameters/) the SonarQube project key that is unique for each project. Our example pipelines use the [Jenkins environment variable](https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables) `JOB_NAME`.
- [`sonar.projectName`](https://docs.sonarqube.org/latest/analysis/analysis-parameters/) the SonarQube project name that is unique for each project. Our example pipelines use the [Jenkins environment variable](https://www.jenkins.io/doc/book/pipeline/jenkinsfile/#using-environment-variables) `JOB_NAME`.
- [`sonar.projectVersion`](https://docs.sonarqube.org/latest/analysis/analysis-parameters/) the SonarQube project version. The current examples to not modify the project version between executions.
- [`sonar.sources`](https://docs.sonarqube.org/latest/analysis/analysis-parameters/) comma-separated paths to directories containing source files. With the ISPW downloader the sources reside in folder `<ispw_application>/MF_Source`.
- [`sonar.cobol.copy.directories`](https://docs.sonarqube.org/latest/analysis/languages/cobol/) comma-separated paths to COBOL copybooks.  With the ISPW downloader the sources reside in folder `<ispw_application>/MF_Source` and the `downloadCopyBooks` method of the [`IspwHelper`](./IspwHelper.md) class copybooks will reside in the same folder as the COBOL sources `<ispw_application>/MF_Source`.
- [`sonar.cobol.file.suffixes`](https://docs.sonarqube.org/latest/analysis/languages/cobol/) file suffixes for the Sonar scanner to identify files that need to be scanned.
- [`sonar.cobol.copy.suffixes`](https://docs.sonarqube.org/latest/analysis/languages/cobol/) file suffixes for the Sonar scanner to identify COBOL copybooks.

## TttHelper

The [TttHelper](./TttHelper.md) class serves as a wrapper around Topaz for Total Test related activities like, executing the unit tests for the downloaded programs in a loop, and gathering the results from Code Coverage.

### [`TttHelper(script, steps, pConfig)`](./TttHelper.md#ttthelper)

The constructor receives the `script` object and the `steps` from the pipeline and a [`PipelineConfig`](./PipelineConfig.md) to make use of pipeline execution specific parameters.

### [`initialize()`](./TttHelper.md#initialize)

Is used for additional initialization which cannot be executed in the constructor and does the following:

- Instantiates a `JclSkeleton` for later use by `loopThruScenarios()`.
- Builds a list of downloaded COBOL sources
- Builds a list of downloaded `.testscenarios`.

### [`loopThruScenarios()`](./TttHelper.md#loopthruscenarios)

Loops through the `.testscenarios` and for each scenario:
- determines if the scenario matches one of the COBOL programs
- in that case
  - the job card of the corresponding runner jcl gets replaced by the configuration job card
  - the scenario gets executed

### [`executeFunctionalTests`](./TttHelper.md#executefunctionaltests)

Will execute all Topaz for Total Test functional test scenarios previously downloaded from Git.

### [`passResultsToJunit()`](./TttHelper.md#passresultstojunit)

Uses the JUnit plugin to display the unit test results on the pipeline dashboard (and stored results in the pipeline output).

### [`collectCodeCoverageResults()`](./TttHelper.md#collectcodecoverageresults)

Uses the Xpediter Code Coverage plugin to retrieve code coverage results from the Xpediter Code Coverage repository.

### [`cleanUpCodeCoverageResults()`](./TttHelper.md#cleanupcodecoverageresults)

Uses a JCL Skeleton and the resulting JCL to clean up statistics from the previous build in the Code Coverage repository. This prevents the repository dataset to be cluttered by statistics that are not being used anymore.
<!--stackedit_data:
eyJoaXN0b3J5IjpbLTg4MDQwNDY1NywtMjA0OTc5MDEwMSwxMz
k5NzI0NzcyLC02NzM4MTY2MjUsMTY4MzgxOTA3NywtMjEwMDA3
NjE4MiwtMTE1MzE5NDk0XX0=
-->

repository: cpwr-devops/DevOps-Examples-Doc

repo_name: cpwr-devops/DevOps-Examples-Doc


text:
A simple, stand-alone f.lux `CollectionProperty` example. A `CollectionProperty` provides built-in support for working with remote data. Collections are generic and perform data operations through an endpoint which could be a RESTful api, graphql, or a local data source. In this app, we use the `PojoEndpointProperty` to perform data operations against a local object. This makes getting the app up and running super easy and reliable.

Each file is heavily commented to provide context and interesting `CollectionProperty` related features and techiques. I encourage you to run the app and then explore the files. The store contains a root state that contains a single property containing the todo items stored in a `TodoCollection`. Each todo is represented using the `TodoProperty` type.

The react UI is passed the 'store' property that references the single application store.

* * *

The project consists of the following files:

* `main.js` - the javascript entry point file. It creates the property model, creates the store, and renders the UI.
* `AddTodo.react.js` - component for adding a new todo item
* `TodoCollection.js` - specialized CollectionProperty for handling todos
* `TodoItem.react.js` - component for display a single todo item
* `TodoProperty.js` - specialized ObjectProperty for representing a todo item stored in the collection
* `TodoRootProperty.js` - the root property for the store. You may find its use of the f.lux property life-cycle interesting.
* `Todos.react.js` - the main UI component

* * *

Setup instructions:

1. Install webpack globally:

	> npm install webpack -g

2. Install dependencies:

	> npm install

3. Compile the javascript code:

	> webpack

4. Open the public/index.html in a web browser

5. To run using webpack hot reloader (not React Hot Reloader module)
	1. Start the webpack dev server: `npm start`
	2. Point browser to: `http://localhost:8080/`

Note: this app accesses css resources through CDN based resources. So if you are running without a network connection the
styling will be bad.

* * *

The following libraries greatly sped the demo creation:

* (Font Awesome)[http://fontawesome.io/]
* (Moment)[http://momentjs.com/]
* (Picnic CSS)[http://picnicss.com/]
* (Pluralize)[https://github.com/blakeembrey/pluralize]


text:
## Inflow InfluxDB client implementation examples

Inflow is a library for using InfluxDB with Java projects that need to talk HTTP or UDP.

This repo is example implementation code for talking to an InfluxDB database with Inflow.

For more details on Inflow, see https://github.com/nkiraly/influxdb-inflow

repository: nkiraly/influxdb-inflow-examples

repo_name: nkiraly/influxdb-inflow-examples


text:
# Domains

`Domain` is an abstract type whose subtypes represent oriented domains on which we wish to approximate functions.  Examples include `Interval`, `Ray`, `Line` and `Arc`.  Periodic domains include `PeriodicSegment`, `PeriodicLine` and `Circle`.

## Relationship with spaces

Every domain `d` has a default space, constructed via `Space(d)`.  For example, the default space for `ChebyshevInterval()` is `Chebyshev(ChebyshevInterval())`, which is efficient for representing smooth functions.  On the other hand, the default space for `PeriodicSegment()` is `Fourier(PeriodicSegment())`, which uses trigonometric polynomials to approximate periodic functions.

## Manipulating domains

Domains can be manipulated to make more complicated domains.  For example, you can take the union of an interval and a circle

```julia
ChebyshevInterval() ∪ Circle(3,0.5)  # equivalent to union(ChebyshevInterval(),Circle(3,0.5))
```
and the following creates a rectangle `[0,1]^2`:

```julia
rect=Interval(0,1)^2
```

Some other set operations are partially implemented:

```julia
Interval(0,2) ∩ ChebyshevInterval()  # returns Interval(0,1)
```

gha_language: Julia


text:
# Basic Express Server

### Author: Mark Duenas

[Test Reports](https://github.com/MarkDuenas/basic-express-server/actions)

[Deployed Link](https://basic-express-md.herokuapp.com/)

[Pull Req](https://github.com/MarkDuenas/basic-express-server/pull/3)

## Set up

`.env` requirements

  - PORT - Port Number

  ### Running the app
    - npm start
    - Endpoint: /person?name=YOURNAMEHERE
      - Returns JSON Object

        ```
        {
          "name":"Jack"
        }
        ```
  ### Tests
    - Server Tests: `npm run test`

  ### UML
  ![LAB02](./lab02.png)

repository: MarkDuenas/basic-express-server

gha_language: JavaScript

repo_name: MarkDuenas/basic-express-server


text:
# Dockable

Dockable is a small PHP framework for working with HTTP requests and responses. The name comes from my desire to gain a better understanding of using [Docker](https://www.docker.com/).

Much of what is developed here can already be found in Laravel or Lumen. This project was built out of a desire to learn how one might create an API application from the ground-up.

## Environment

Docker is used to manage the webserver, PHP, and database images. The images run with custom commands are setup inside the `docker/` directory. The following images are being used for now:

- nginx:1.13.8
- php:7-fpm
- mongo:3.7.1-jessie

Environment settings are read using the Dotenv convention. All possible options are listed in `.env.example`. To change these settings, be sure to copy them over to a proper `.env` file:

```bash
cp .env.example .env
```

## Database

The intention is to have a properly developed, DBMS-agnostic approach. However, the framework currently only has a MongoDB adapter.

## License

The Dockable framework is open-sourced software licensed under the [MIT license](https://github.com/rideron89/dockable/blob/master/COPYRIGHT).


text:
## Run your own Nixery

<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->

- [0. Prerequisites](#0-prerequisites)
- [1. Choose a package set](#1-choose-a-package-set)
- [2. Build Nixery itself](#2-build-nixery-itself)
- [3. Prepare configuration](#3-prepare-configuration)
- [4. Deploy Nixery](#4-deploy-nixery)
- [5. Productionise](#5-productionise)

<!-- markdown-toc end -->

---------

⚠ This page is still under construction! ⚠

--------

Running your own Nixery is not difficult, but requires some setup. Follow the
steps below to get up & running.

*Note:* Nixery can be run inside of a [GKE][] cluster, providing a local service
from which images can be requested. Documentation for how to set this up is
forthcoming, please see [nixery#4][].

## 0. Prerequisites

To run Nixery, you must have:

* [Nix][] (to build Nixery itself)
* Somewhere to run it (your own server, Google AppEngine, a Kubernetes cluster,
  whatever!)
* A [Google Cloud Storage][gcs] bucket in which to store & serve layers

## 1. Choose a package set

When running your own Nixery you need to decide which package set you want to
serve. By default, Nixery builds packages from a recent NixOS channel which
ensures that most packages are cached upstream and no expensive builds need to
be performed for trivial things.

However if you are running a private Nixery, chances are high that you intend to
use it with your own packages. There are three options available:

1. Specify an upstream Nix/NixOS channel[^1], such as `nixos-20.09` or
   `nixos-unstable`.
2. Specify your own git-repository with a custom package set[^2]. This makes it
   possible to pull different tags, branches or commits by modifying the image
   tag.
3. Specify a local file path containing a Nix package set. Where this comes from
   or what it contains is up to you.

## 2. Build Nixery itself

Building Nixery creates a container image. This section assumes that the
container runtime used is Docker, please modify instructions correspondingly if
you are using something else.

With a working Nix installation, building Nixery is done by invoking `nix-build
-A nixery-image` from a checkout of the [Nixery repository][repo].

This will create a `result`-symlink which points to a tarball containing the
image. In Docker, this tarball can be loaded by using `docker load -i result`.

## 3. Prepare configuration

Nixery is configured via environment variables.

You must set *all* of these:

* `BUCKET`: [Google Cloud Storage][gcs] bucket to store & serve image layers
* `PORT`: HTTP port on which Nixery should listen

You may set *one* of these, if unset Nixery defaults to `nixos-20.09`:

* `NIXERY_CHANNEL`: The name of a Nix/NixOS channel to use for building
* `NIXERY_PKGS_REPO`: URL of a git repository containing a package set (uses
  locally configured SSH/git credentials)
* `NIXERY_PKGS_PATH`: A local filesystem path containing a Nix package set to use
  for building

You may set *all* of these:

* `NIX_TIMEOUT`: Number of seconds that any Nix builder is allowed to run
  (defaults to 60)

To authenticate to the configured GCS bucket, Nixery uses Google's [Application
Default Credentials][ADC]. Depending on your environment this may require
additional configuration.

If the `GOOGLE_APPLICATION_CREDENTIALS` environment is configured, the service
account's private key will be used to create [signed URLs for
layers][signed-urls].

## 4. Deploy Nixery

With the above environment variables configured, you can run the image that was
built in step 2.

How this works depends on the environment you are using and is, for now, outside
of the scope of this tutorial.

Once Nixery is running you can immediately start requesting images from it.

## 5. Productionise

(⚠ Here be dragons! ⚠)

Nixery is still an early project and has not yet been deployed in any production
environments and some caveats apply.

Notably, Nixery currently does not support any authentication methods, so anyone
with network access to the registry can retrieve images.

Running a Nixery inside of a fenced-off environment (such as internal to a
Kubernetes cluster) should be fine, but you should consider to do all of the
following:

* Issue a TLS certificate for the hostname you are assigning to Nixery. In fact,
  Docker will refuse to pull images from registries that do not use TLS (with
  the exception of `.local` domains).
* Configure signed GCS URLs to avoid having to make your bucket world-readable.
* Configure request timeouts for Nixery if you have your own web server in front
  of it. This will be natively supported by Nixery in the future.

-------

[^1]: Nixery will not work with Nix channels older than `nixos-19.03`.

[^2]: This documentation will be updated with instructions on how to best set up
    a custom Nix repository. Nixery expects custom package sets to be a superset
    of `nixpkgs`, as it uses `lib` and other features from `nixpkgs`
    extensively.

[GKE]: https://cloud.google.com/kubernetes-engine/
[nixery#4]: https://github.com/google/nixery/issues/4
[Nix]: https://nixos.org/nix
[gcs]: https://cloud.google.com/storage/
[repo]: https://github.com/google/nixery
[signed-urls]: under-the-hood.html#5-image-layers-are-requested
[ADC]: https://cloud.google.com/docs/authentication/production#finding_credentials_automatically

repository: mcnguyen-bitgo/nixery

repo_name: mcnguyen-bitgo/nixery


text:
## Dawn CSS
Dawn is a minimal and lightweight utility-enhanced CSS starter framework. It provides a solid foundation of CSS for your project and enables simple control of your layout and styles through intuitive utility classes.

[**See the demo**](https://www.alanbrown.ca/dawn-css/)

## Try it Out
- Drop in the CSS:
- Clone the repo: `git clone https://github.com/alanbrown-ca/dawn-css.git`
- Install on npm:

## What's included
```
dawn-css/
└── dist/
    ├── dawn.min.css
    └── dawn.min.css.map
└── scss/
    ├── _content.scss
    ├── _layout.scss
    ├── _modifiers.scss
    ├── _normalize.scss
    ├── _variables.scss
    └── dawn.scss
```

## Documentation
Full documentation can be accessed at: [https://alanbrown.ca/dawn-css](https://www.alanbrown.ca/dawn-css/)

## License
Code and docs released under the MIT License.

repository: alanbrown-ca/dawn-css

repo_name: alanbrown-ca/dawn-css


text:
---
layout: post
title: On books
date: 2009-03-12
tags: ["books","random","stephenfry","thingsweread"]
---

The progression of the digital age is changing what will become the cultural objects that mark our time. In 50 years, will passing on a 1st edition Kindle to ones children hold the same significance as passing on a 1st edition Alice's Adventures in Wonderland? What about a vinyl copy of The Wall versus an iPod loaded with the entire Pink Floyd back-catalog?

As the digital age makes it easier to access and share information, does the value in physical embodiments of these things reduce? Who would buy a 26-volume encyclopedia today when they could search wikipedia in an instant?

A common sentiment at BookCamp and beyond is that you can't replace the experience of holding a book. Whilst 1000's of people may read a book, few will read the same book, the same physical embodiment of the text with all of its history and experience worn into its patina.

There are many sites that help socialise the experience of reading a book - I have recently started to use [bkkeepr](http://bkkeepr.com/people/knolleary) but have also tried out [LibraryThing](http://www.librarything.com/profile/knolleary). They are good for keeping a record of what you've read and what your friends have read but I can't help feel they are missing something when it comes to the physicality of books. More on this, maybe, another day.

For now, here's what triggered me to write this today. Whilst books are important, sometimes 'progress' is inevitable.

[![Stephen Fry on books](/blog/content/2009/03/sftwitter.png)](http://twitter.com/stephenfry/status/1312695167)


text:
---
title: Kotlin Multiplatform
date: 2019-12-06 17:24:25
tags:
- kotlin
- multiplatform
---

Multiplatform projects is a feature in Kotlin that allows for sharing Kotlin code between iOS and Android. Android leverages the Kotlin/JVM and iOS uses Kotlin/Native which allows iOS apps to call Kotlin from Swift.  This post will step us through getting an environment setup for Android and iOS development.  A completed template project is available on [GitHub](https://github.com/doneill/kotlin-multiplatform-template).

## Update 06/28/2020

These steps should still work if followed in order but the original repo on [GitHub](https://github.com/doneill/kotlin-multiplatform-template) has changed beyond just setting up the dev environment and can still be used as a guide to accompany this post.

## Local Environment
- [Android Studio](https://developer.android.com/studio)
- Kotlin plugin 1.3.50 or higher should be installed in the IDE.
- [Xcode](https://developer.apple.com/xcode/)

## Create an Android Project
Create an empty activity project within Android Studio with **File > New > New Project** from the toolbar.  Ensure that **Kotlin** is the selected language or ensure Kotlin support is checked (depending on version of Android Studio).

Kotlin native requires a recent version of Gradle, ensure that the **gradle/wrapper/gradle-wrapper.properties** file is grabbing 5.5.1 or higher with the following **distributionUrl**:

```
distributionUrl=https\://services.gradle.org/distributions/gradle-5.5.1-all.zip
```

You should be able to compile and run your new Android app.

## Create an Shared Java Library module
Create a new module with **File > New > New Module** from the toolbar, then select **Java Library**.  We will assume the library name is **lib**, but you can name it anything you want.

### Setup folder structure for shared Java lib
Create the following subdirectories under your new **lib** module:

- androidMain
- commonMain
- iosMain

With a corresponding **kotlin** folder underneath, resembling the structure below:

```
-- lib
  -- src
    -- androidMain
        -- kotlin
    -- commonMain
        -- kotlin
    -- iosMain
        -- kotlin
```

### Update shared lib build script
We will need to update the lib module build script to be a kotlin multiplatform lib.  Rename the **lib/build.gradle** file to **lib/build.gradle.kts**, then remove all the contents, and replace with the following code:

```kotlin
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget

plugins {
    kotlin("multiplatform")
}

kotlin {
    //select iOS target platform depending on the Xcode environment variables
    val iOSTarget: (String, KotlinNativeTarget.() -> Unit) -> KotlinNativeTarget =
    if (System.getenv("SDK_NAME")?.startsWith("iphoneos") == true)
    ::iosArm64
    else
    ::iosX64

    iOSTarget("ios") {
        binaries {
            framework {
                baseName = "SharedCode"
            }
        }
    }

    jvm("android")

    sourceSets["commonMain"].dependencies {
        implementation("org.jetbrains.kotlin:kotlin-stdlib-common")
    }

    sourceSets["androidMain"].dependencies {
        implementation("org.jetbrains.kotlin:kotlin-stdlib")
    }
}

val packForXcode by tasks.creating(Sync::class) {
    val targetDir = File(buildDir, "xcode-frameworks")

    /// selecting the right configuration for the iOS
    /// framework depending on the environment
    /// variables set by Xcode build
    val mode = System.getenv("CONFIGURATION") ?: "DEBUG"
    val framework = kotlin.targets
            .getByName<KotlinNativeTarget>("ios")
            .binaries.getFramework(mode)
    inputs.property("mode", mode)
    dependsOn(framework.linkTask)

    from({ framework.outputDirectory })
    into(targetDir)

    /// generate a helpful ./gradlew wrapper with embedded Java path
    doLast {
        val gradlew = File(targetDir, "gradlew")
        gradlew.writeText("#!/bin/bash\n"
                + "export 'JAVA_HOME=${System.getProperty("java.home")}'\n"
                + "cd '${rootProject.rootDir}'\n"
                + "./gradlew \$@\n")
        gradlew.setExecutable(true)
    }
}

tasks.getByName("build").dependsOn(packForXcode)
```

The update build script uses `kotlin-multiplatform` plugin and defines several targets.  It also defines a `packForXcode` task which configures a framework lib to link in our iOS app we will create in a later step.

## Implement shared lib module
Create a new package and kotlin source file under **lib/src/commonMain/DateHelper.kt**.  Add the following code to get the current date as `String`.

```kotlin
package com.yourdomain.platform

expect fun getCurrentDate(): String

fun getDate(): String {
    return "Today's Date is ${getCurrentDate()}"
}
```

The method dependent on platform implementation is marked as `expect`.  The method called by Android and iOS app clients is `getDate()`.

The common lib implementation is done in **androidMain** and **iosMain** respectively.  Create the same package as **commonMain** with a new kotlin source file under **lib/src/androidMain/DateHelperAnd.kt** and **lib/src/iosMain/DateHelperIos.kt**

Add the following for **DateHelperAnd.kt**

```kotlin
package com.yourdomain.platform

import java.util.Date

actual fun getCurrentDate(): String = Date().toString()
```

Add the following for **DateHelperIos.kt**

```kotlin
package com.yourdomain.platform

import platform.Foundation.NSDate

actual fun getCurrentDate() = NSDate().toString()
```

The implementation of the `expect` methods are marked as `actual`.  Kotlin/Native compiler comes with a set of pre-imported frameworks, so we can use the `NSDate`.  Objective C and Swift interop covered in more detail [here](https://kotlinlang.org/docs/reference/native/objc_interop.html).

## Link shared module in Android
In order for our Android app to depend on the shared lib we must link it as a dependency.  Open the **app/build.gradle** file and add the following under **dependencies** block:

```

dependencies {
    implementation project (':lib')
    ...
}
```

## Update the Android app
Using the default `TextView` added when we generated an Android project, let's assign an `id` to the `TextView` in the activity so we can access it from code.  Open **app/src/main/res/layout/activity_main.xml** and add the `id`:

```xml
<TextView android:id="@+id/date_view"
    ...
    />
```

Now we can add the following line of code to the `MainActivity` class in **/app/src/main/java/[package]/MainActivity.kt** file to the end of the `onCreate` method:

```kotlin
findViewById<TextView>(R.id.date_view).text = getDate()
```

At this point you should be able to run the Android app and see the current date.

## Create iOS project
Fire up Xcode and create a new **Single View App** with **File > New > Project**.  Create a project name, e.g. **ios-app**, and set the directory inside of the project directory created with Android Studio.  Your resulting project structure should look similar to this:

```
-- Project
  -- app
  -- lib
  -- iosApp
```

## Generate shared framework and link to project
We need to build the framework initially before we can link it to our ios project using the `build` task from our common lib module.  Open a terminal and cd into the **lib** module folder and run the following:

```
$ ./gradlew clean packForXcode --info
```

This will run the `packForXCode` task we defined and configure the framework inside of the **lib/build/xcode-frameworks** folder.

### Add embedded libs
Select the **ios-app** project inside xcode file view to open the project properties.  Under the **General** tab scroll down to **Frameworks, Libraries, and Embedded Content** and click on the `+` button to add the framework.  Select the **SharedContent.framework** and click **Add**.

### Update build settings
With the project properties open, select the **Build Settings** tab and search for **EFramework Search Paths** and update the path to `$(SRCROOT)/../lib/build/xcode-frameworks`

### Create new run script
To keep the framework updated with new builds, select the **Build Rules** tab and add a new run script phase.  Add the following to the shell script:

```
cd "$SRCROOT/../lib/build/xcode-frameworks"
./gradlew :lib:packForXCode -PXCODE_CONFIGURATION=${CONFIGURATION}
```

This will keep the framework up to date on successive builds.

## Update the iOS App
The iOS app will use the common lib from Kotlin.  Open up the **ViewController.swift** file and add the following import:

```swift
// import the framework
import main
```

Now append the following to the `viewDidLoad()` method:

```swift
let date = DateHelperKt.getDate()

let label = UILabel(frame: CGRect(x: 0, y: 0, width: 230, height: 42))
label.center = CGPoint(x: 160, y: 285)
label.textAlignment = .center
label.font = label.font.withSize(16)
label.textColor = UIColor.black
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
label.text = date
view.addSubview(label)
```

Take note of the `DateHelperKt.getDate` method call to Kotlin.  At this point you should be able to run the iOS app and see the current date.

## References
This is a basic example of setting up code sharing with Kotlin between iOS and Android, below are some references to documentation and libraries:

- [Kotlin/Native interoperability with Swift/Objective-C](https://kotlinlang.org/docs/reference/native/objc_interop.html)
- [Multiplatform Programming](https://kotlinlang.org/docs/reference/multiplatform.html)
- [kotlinx.coroutines](https://github.com/Kotlin/kotlinx.coroutines/blob/master/README.md)
- [kotlinx-io](https://github.com/Kotlin/kotlinx-io)
- [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization)
- [Ktor](https://ktor.io/)
- [Ktor HTTP client](https://ktor.io/clients/index.html)

branch_name: refs/heads/develop

gha_language: Stylus


text:
# Project Name
Forest-Service
# Date and Development Team
11 september 2021
The System was developed by Chepkemoi Rop
## Description
The application keeps track of wildlife in the forest keeping records of non-endangered and endangered animals ,their age ,health and sites where they were seen.
It keeps records of the ranger who saw and noted the sites where he/she has seen whichever animal.
## Settup and Installation process
Installed java jdk and using gradle,spark framework and postgresql on my computer.
A user can also clone this project from the link github link: judyrop
## Known bugs
For the time being ,some groups of the wildlife are not displayed on the user interface but on the backend database.
## Support and Contact Details
Phone number:<PHONE_NUMBER>
<EMAIL_ADDRESS>## Technologies Used
JAVA
SPARK
CSS
sql2o
## License
This  application is licensed under MIT License.
Copyright (c) 2021

repository: judyrop/Forest-Service

repo_name: judyrop/Forest-Service


text:
:::{php:namespace} Atk4\Ui
:::

:::{php:class} Accordion
:::

# Accordion

Accordion implement another way to organize your data. The implementation is based on: https://fomantic-ui.com/modules/accordion.html.

Demo: https://ui.atk4.org/demos/accordion.php

## Basic Usage

Once you create an Accordion container you can then mix and match static and dynamic accodion section:

```
$acc = Accordion::addTo($app);
```

Adding a static content section is pretty simple:

```
LoremIpsum::addTo($acc->addSection('Static Tab'));
```

You can add multiple elements into a single accordion section, like any other view.

:::{php:method} addSection($name, $action = null, $icon = 'dropdown')
:::

Use addSection() method to add more section in an Accordion view. First parameter is a title of the section.

Section can be static or dynamic. Dynamic sections use {php:class}`VirtualPage` implementation mentioned above.
You should pass Closure action as a second parameter.

Example:

```
$t = Accordion::addTo($layout);

// add static section
HelloWorld::addTo($t->addSection('Static Content'));

// add dynamic section
$t->addSection('Dynamically Loading', function (VirtualPage $vp) {
    LoremIpsum::addTo($vp);
});
```

## Dynamic Accordion Section

Dynamic sections are based around implementation of {php:class}`VirtualPage` and allow you
to pass a callback which will be triggered when user clicks on the section title.:

```
$acc = Accordion::addTo($app);

// dynamic section
$acc->addSection('Dynamic Lorem Ipsum', function (VirtualPage $vp) {
    LoremIpsum::addTo($vp, ['size' => 2]);
});
```

## Controlling Accordion Section via Javascript

Accordion class has some wrapper method in order to control the accordion module behavior.

:::{php:method} jsOpen($section, $action = null)
:::

:::{php:method} jsToggle($section, $action = null)
:::

:::{php:method} jsClose($section, $action = null)
:::

For example, you can set a button that, when clicked, will toggle an accordion section:

```
$button = Button::addTo($bar, ['Toggle Section 1']);

$acc = Accordion::addTo($app, ['type' => ['styled', 'fluid']]);
$section1 = LoremIpsum::addTo($acc->addSection('Static Text'));
$section2 = LoremIpsum::addTo($acc->addSection('Static Text'));

$button->on('click', $acc->jsToggle($section1));
```

## Accordion Module settings

It is possible to change Accordion module settings via the settings property.:

```
Accordion::addTo($app, ['settings' => []]);
```

For a complete list of all settings for the Accordion module, please visit: https://fomantic-ui.com/modules/accordion.html#/settings

gha_language: PHP


text:
# SBT Plugin to [SHOUTCLOUD.IO](http://shoutcloud.io) "ALL CAPS" Service

*Because sometimes SBT just wants to SHOUT.*

[ ![Download](https://api.bintray.com/packages/metasim/sbt-plugins/sbt-shout/images/download.svg) ](https://bintray.com/metasim/sbt-plugins/sbt-shout/_latestVersion)

## Install

Add the following to your sbt `project/plugins.sbt` file:

```scala
resolvers += Resolver.url(
  "shouting-at-bintray",
  url("https://dl.bintray.com/metasim/sbt-plugins"))(
    Resolver.ivyStylePatterns)
addSbtPlugin("metasim" % "sbt-shout" % "<IP_ADDRESS>.0.2")
```

Note: this plugin targets sbt 0.13.x.

## Usage

Add this to your `build.sbt` file:

```scala
enablePlugins(SHOUTplugin)
```

Your project now supports the `SHOUT` input task which use the [SHOUTCLOUD.IO](http://shoutcloud.io) service to convert text into ALL CAPS!!

    > SHOUT Finally a nano-service that makes sense!
    FINALLY A NANO-SERVICE THAT MAKES SENSE!

repository: metasim/sbt-SHOUT

repo_name: metasim/sbt-SHOUT


text:
Summary
===

## Sorting

### 1. Insertion Sort

Insertion Sort (Stable)

Shell Sort (Unstable)

### 2. Selection Sort

Selection Sort (Unstable)

Heap Sort (Unstable)

### 3. Comparison Sort

Bubble Sort (Stable)

Quick Sort (Unstable)

### 4. Merge Sort

Merge Sort (Stable)

### 5. Non-comparative Sort

Counting Sort (Stable)

Bucket Sort (TODO, Stable)

Radix Sort (TODO, Stable)

## Searching

Linear Search

Binary Search

Reference
===
1. Thomas H. Cormen. *Algorithms Unlocked*, 2013
2. Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, Clifford Stein. *Introduction to Algorithms*, 3rd, 2009
3. 俞勇. *数据结构: 思想与实现*, 1st, 2009

repository: Lywx/CppCommonAlgorithm

repo_name: Lywx/CppCommonAlgorithm


text:
# Cosmospora diploa (Berk. & M.A. Curtis) Rossman & Samuels, 1999 SPECIES

#### Status
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
in Rossman, Samuels, Rogerson & Lowen, Stud. Mycol. 42: 121 (1999)

#### Original name
Nectria diploa Berk. & M.A. Curtis, 1868

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Sordariomycetes/Hypocreales/Nectriaceae/Nectria/Nectria diploa/ Syn. Cosmospora diploa/README.md

repo_name: mdoering/backbone


text:
# Bones CSS Framework

Welcome to Bones!

Bones is a lightweight and flexible framework to help you create great-looking websites right out of the box.

## Background

### What is it?

It's a styling framework -- a set of tools to help you create good, clean websites without much CSS effort.

It is similar to [Zurb's Foundation](http://foundation.zurb.com/) and [Twitter's Bootstrap](http://twitter.github.io/bootstrap/). So why the heck would I rebuild what's already been done? Well, in short, I found myself spending a lot of time trying to undo some of the styles that come standard with Foundation and Bootstrap. I wanted Bones to be even more stripped-down and simple out of the gate, and leave creating anything fancy to you.

 As it grows up, it will get better at what it does. But it'll also get fatter. So we're going to strive to keep Bones a healthy, young lad (or lady) by trying to find a balance between flexibility, feature-rich and weight.

## Documentation

Documentation can be found in the `docs` directory within the repo. A doc site is in development.

## v2.0

We have several features we're looking to add by v2.0, which is already in development. Here's the running list:

* doc site
* templates
* better examples / example site

Of course, there's also a running list of features and functionality to be added to the framework itself.

## Contributing

Got a simple fix or feature to add?

1. Fork it
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 new Pull Request

Or looking to help but not sure what to do? Send me a note: [sean@rocktreedesign.com](mailto:sean@rocktreedesign.com).

repository: seancdavis/bones

repo_name: seancdavis/bones


text:
# vue2-undraw
Vue Illustration Components from https://undraw.co/
For any requests open an issue on https://github.com/netzfluencer/vue-undraw/issues

**Main Features**
* global default color setup
* component color prop for indivdual color on components instances
* general 'vue-undraw' class for global illustration styling
* indivual 'vue-undraw--{componentName}' class for indivual styling

## Installation
`npm install vue2-undraw`

## Setup
You can use the vue-undraw in multiple approaches. Keep in mind that the total size of all illustrations goes beyond 20mb. A global usage in vue projects is technical possible, but not generaly not recommended.

### 1. Register a component by referencing to the specific Source
This is the most simplest approach to keep depended projects as small as possible, by importing only the illustrations which are needed.
```
import UndrawAddColor from 'vue2-undraw/src/components/UndrawAddColor'

export default {
  components: {
    UndrawAddColor
  }
}
```

### 2. Register a component-module from 'vue2-undraw'
Similar to first approach. Benefits compared to first:
1. shorter and clearer imports
2. consistent illustrationnames

Feel free to take this approach if treeshaking is no problem. https://webpack.js.org/guides/tree-shaking/
```
import { UndrawAbstract, UndrawAddColor } from 'vue2-undraw'

export default {
  components: {
    UndrawAbstract
    UndrawAddColor
  }
}
```

### 3. Global installation (not recommended)
If project size does not need to be considered as much (e.g. in a design systems documentation env.) it is also possible to use the illustrations globally.

Just add this in your entrypoints js-file:
```
import * as VueUndraw from 'vue2-undraw'

Vue.use(VueUndraw)
```

## Color Setup
By default the svgs colors are inherting the svgs/parents text-color. You can overwrite this colors by using the `vue2-undraw` css-class or by setting it up in the installations options. (If you don't want to install the components globally you need to add the `noGlobalInstall: true` key too)
```
import * as VueUndraw from 'vue2-undraw'

Vue.use(VueUndraw, {color: '#777777', noGlobalInstall: true})
```

-----------

## Project Development
```
npm install
```

### Renaming svgs
Rename saved svgs from undraw.co in the _illustrations dir. Some manual adjustments need to get done (e.g. removing a handfull of '-').
```
npm run rename
```

### Component Creation
Create vue components from svgs. Some manual adjustments need to get done (e.g. syntax errors in components/index.js)
```
npm run components
```

### Compiles and minifies for production
```
npm run build
```

gha_language: Vue


text:
---
name: add-tutorial
about: Use this issue template if you want to add learning resources to fslab
title: 'Add tutorial:'
labels: 'Area: tutorial-addition, Type: enhancement'
assignees: ''

---

Thank you for taking the time to add learning resources to fslab. Please add a short summery of what your content will cover below.

## Summary

gha_language: F#


text:
# Sample REST CRUD API with Spring Boot, Mysql, JPA and Hibernate

## Steps to Setup

**1. Clone the application**

```bash
https://github.com/mhtarora17/BooksApp.git
```

**3. H2 Db is configured in application.properties**

+ open `src/main/resources/application.properties`

**4. Build and run the app using maven**

```bash
mvn package
java -jar target/spring-boot-assignment-mohit-0.0.1-SNAPSHOT.jar

```

Alternatively, you can run the app without packaging it using -

```bash
mvn spring-boot:run
```

The app will start running at <http://localhost:8080>.

## Explore Rest APIs

The app defines following CRUD APIs.

    GET /api/books
    	Url:
    		http://localhost:8080/api/books
		Input parameters:
		Response:
			[
    			{
        			"id": 1,
        			"bookName": "Mohit",
        			"authorName": "Mohit",
        			"createdAt": "2020-07-06T03:43:05.229+0000",
        			"createdBy": "Mohit",
        			"updatedAt": "2020-07-06T03:43:05.229+0000",
        			"updatedBy": "Mohit"
    			}
    		]

    POST /api/books
    	Url:
    		http://localhost:8080/api/book
		Input parameters:
			{
    			"id": 0,
    			"bookName": "Mohit",
    			"authorName": "Mohit",
    			"createdAt": null,
    			"createdBy": "Mohit",
    			"updatedAt": null,
    			"updatedBy": "Mohit"
			}
		Response:
			{
    			"id": 0,
    			"bookName": "Mohit",
    			"authorName": "Mohit",
    			"createdAt": null,
    			"createdBy": "Mohit",
    			"updatedAt": null,
    			"updatedBy": "Mohit"
			}

    PUT /api/book/{bookId}
    	Url:
    		http://localhost:8080/api/book
		Input parameters:
			bookId
		Body:
			{
    			"id": 0,
    			"bookName": "Mohit",
    			"authorName": "Arora",
    			"createdAt": null,
    			"createdBy": "Mohit",
    			"updatedAt": null,
    			"updatedBy": "Mohit"
			}
		Response:
			{
    			"id": 0,
    			"bookName": "Mohit",
    			"authorName": "Arora",
    			"createdAt": null,
    			"createdBy": "Mohit",
    			"updatedAt": null,
    			"updatedBy": "Mohit"
			}

    DELETE /api/book/{bookId}
    	Input parameters:
			bookId
		Response:
			{"deleted" : true}


text:
Privledge
======

#### Screenshot
**Privledge** is a proof of concept private permissioned distributed ledger for public key management written in Python 3.5.

![privledge screenshot](screenshot1.png "privledge screenshot")

---
=======
**Table of Contents**
- [Download](#download)
    - [Current Master](#current-master-zip)
    - [Github](#github)
- [Install](#install)
- [Usage](#usage)
- [Other Resources](#other-resources)
- [Credits](#credits)
- [License: MIT](#license-mit)

---

## Download
### [Current Master (zip)](https://github.com/elBradford/privledge/archive/master.zip)

### Github
```
$ git clone https://github.com/elBradford/privledge.git
```

---

## [Install](INSTALL.md)

## [Tutorial](TUTORIAL.md)

---

### [License: MIT](LICENSE.txt)

![privledge screenshot 2](screenshot2.png)

## [Usage](USAGE.md)

## Other Resources
4-part Blockchain overview
- [Part 0: Blockchain Background](https://bradford.la/2017/blockchain-0)
- [Part 1: Blockchain Origin Story](https://bradford.la/2017/blockchain-1)
- [Part 2: Blockchain Present and Beyond](https://bradford.la/2017/blockchain-2)
- [Part 3: Privledge](https://bradford.la/2017/blockchain-3)
- [![GitPitch](https://gitpitch.com/assets/badge.svg)](https://gitpitch.com/elBradford/privledge/master?grs=github&t=white)

[15:52 Video Demonstration](https://www.youtube.com/watch?v=ekFHV5K-Bog)

[![Privledge Demo Video](https://img.youtube.com/vi/ekFHV5K-Bog/0.jpg)](https://www.youtube.com/embed/ekFHV5K-Bog)

---

## Credits
- [Bradford Law](https://bradford.la)
- [Air Force Institute of Technology](https://www.afit.edu)

## [License: MIT](LICENSE.txt)

---

![privledge screenshot 2](screenshot2.png)

repository: dadatuputi/privledge

repo_name: dadatuputi/privledge


text:
---
layout: post
title: "Daily Digest #638"
type: digest
tags:
    - daily
    - development

description: ""
publish: false
---

- [Why are CEOs failing software engineers?](https://iism.org/article/why-are-ceos-failing-software-engineers-56)
- [Go Concurrency Example - Let's Build a Concurrent Download Manager - zero dependency](https://www.youtube.com/watch?v=vdhSk8vCx-k)
- [Kotlin 1.4 released to improve performance](https://stackoverflow.blog/2020/08/26/kotlin-1-4-released-to-improve-performance/)
- [Github Profile README Generator](https://rahuldkjain.github.io/gh-profile-readme-generator/)
- [A tale of webpage speed, or throwing away React](https://solovyov.net/blog/2020/a-tale-of-webpage-speed-or-throwing-away-react/)


text:
# Readme

Installs a full ELK stack on 1+ nodes (via `elk::[service]_install` recipies), and manages new nodes entering/leaving the ensemble via the `elk::reconfigure` recipe.

Not that each instance will have an entire ELK stack, although multiple connected instances will form an ElasticSearch cluster.

Test kitchen supported.

** NOTE: All of the default SSL certs are set to the string "FAKE". This is intentional, and will break functionality. Drop your own SSL certs in `templates/default` or use custom attributes to dynamically override. ***

## OpsWorks

### Lifecycle

```
    Setup: [java::default]
    Configure: [elk::reconfigure]
    Deploy: [elk::es_install, elk::logstash_install, elk::kibana_install, elk::cron_install]
    Undeploy: []
    Shutdown: []
```
Provisioning occurs through the `elk::[component]_install` recipes.

Version upgrades to individual components should be safe to run by changing the cooresponding attributes and re-running `elk::[component]_install`, but have not been fully tested (TODO).

No special care is necessary for de-provisioning.

### Permissions/IAM

If snapshot/prune is enabled (elk::cron_install is run) This stack (ie instance-profile) requires read+write access to the bucket defined in `node['elk']['elasticsearch']['s3_backup_bucket'] = "my-backup-bucket"`.

The standard/built-in opsworks-service-role is required for indirect aws-resource management (ELBs, Cloudwatch, Iam:Passrole)

### High-availability
This implementation achieves HA by registering all instances behind an ELB. A failure in a single instance will not trigger an outage.

### Scale
This implementation scales horizontally by leverging elasticsearch's built-in clustering support. Instances can be added and removed from the fleet dynamically, limited only by the limitiations of ElasticSearch. No downtime is required for these operations.

## What is all this? Just give me ELK!

If understanding the details about what's happening aren't a priority at the moment, follow these instructions on your target machine to set up a single node ELK:

  1. Install chef-dk (https://downloads.chef.io/chef-dk/)
  1. `git clone`
  1. `cd chef-elk/`
  1. `berks vendor cookbooks && cd cookbooks/`
  1. `chef-client -z -o elk::es_install,elk::logstash_install,elk::kibana_install,elk::reconfigure`

## Attributes

  - `node['java']['jdk_version'] = 8`
  - `node['elasticsearch']['version'] = '2.3.0'`
  - `node['elasticsearch']['install_type'] = :package`
  - `node['elk']['elasticsearch']['cluster_name'] = "my-es-cluster"`
  - `node['elk']['elasticsearch']['s3_backup_bucket'] = "my-backup-bucket"`
  - `node['elk']['elasticsearch']['visibility_period_days'] = 10`

  - `node['elk']['kibana']['nginx']['ssl_cert'] = nil  #nginx serves on :443 SSL, leave these as `nil` to use built-in self-signed certs`
  - `node['elk']['kibana']['nginx']['ssl_key'] = nil`
  - `node['elk']['kibana']['nginx']['htaccess'] = ["admin:$apr1$w/E23yd.$ylUt5OvroZKZrapOPsvZj1"]  #nginx basic auth: Default username/password is admin/password; use htpasswd to generate new logins and override this attribute`

Should be N/2+1 to prevent splitbrain scenarios, where N is the number of nodes in your cluster
  - `node['elk']['elasticsearch']['minimum_master_nodes'] = 1`

Doesn't really matter, but should be more than 1 for a cluster deployment. These are the gossip routers that other elasticsearch nodes talk to.
  - `node['elk']['elasticsearch']['discovery']['gossip_hosts_count'] = 2`

We're using Chef::Search to find other nodes (default find every other node)
  - `node['elk']['elasticsearch']['discovery']['search_query'] = "ipaddress:*"`

Logstash config:
  - `node['elk']['logstash']['conf']['input']`
  - `node['elk']['logstash']['conf']['output']`
  - `node['elk']['logstash']['conf']['filter']`

Logstash, Kibana installation info
  - `node['elk']['kibana']['version'] = "4.5.0-linux-x64"`
  - `node['elk']['kibana']['url'] = 'https://download.elastic.co/kibana/kibana/kibana-4.5.0-linux-x64.tar.gz'`
  - `node['elk']['kibana']['sha256'] = 'fa3f675febb34c0f676f8a64537967959eb95d2f5a81bc6da17aa5c98b9c76ef'`

  - `node['elk']['logstash']['version'] = "2.3.0"`
  - `node['elk']['logstash']['url'] = 'https://download.elasticsearch.org/logstash/logstash/logstash-2.3.0.tar.gz'`
  - `node['elk']['logstash']['sha256'] = 'd802803ac6dc7e9215b19764dd8fbaa74c75fa1d8bf387508fb0d0d8d36b0241'`

## TODO:
  - Version upgrade support+tests
  - Improve organization of templates in `templates/`

repository: vsudilov/chef-elk

repo_name: vsudilov/chef-elk


text:
---
title: Keeping Commits Clean with Auto Linting
description: Boost you development with some neat auto linting libraries.
resourceType: Documentation
personas:
  - Developer
labels:
  - NodeJS
  - Javascript
  - Dev Hack
author: Patrick Simonian
image: github:patricksimonian
---
> Avoiding the dreaded 'lint fix' commit!
# Keeping your commits clean with Husky and Lint Staged

Take a look at these two libraries for your node project to clean up linting.

The first one is called [Husky](https://www.npmjs.com/package/husky) and in conjunction with the second, [Lint-Staged](https://www.npmjs.com/package/lint-staged), they work together to automatically lint your code pre-commit.

## Husky

Husky provides an easy interface within your `package.json` to call functions and libraries on several different
_git based hooks_.

## Lint Staged

Is a tool that provides a __declarative__ way of calling linting functions based on file extensions. Again this
interface is found within your `package.json`.

## Getting Started

`npm install --save-dev husky lint-staged`

### Seeing it in action

Here is our sample package.json file with the two configurations side by side.

```json
"husky": {
    "hooks": {
      "pre-commit": "lint-staged"
    }
  },
  "lint-staged": {
    "*.js": ["eslint --fix", "git add"],
    "*.css": ["js-beautify --config .jsbeautifyrc -f *.css", "git add"]
  }
```

Let's pay attention to the __pre-commit__ declaration.

On __pre-commit__, the `lint-staged` library is called. This library, based on the configurations above
will lint and rewrite any files based on rules from external linting libraries. For our project we use
__`eslint/prettier`__ for our Javascript linting and __`js-beautify`__ for our CSS linting.

Atlast! No more `git commit -am "fix linting"`

repository: bcgov/devhub-app-web

repo_name: bcgov/devhub-app-web


text:
# Week 4

* Week 4 topics for Monday

  * {ref}`assign1_sol`

  * {ref}`week4:coords`

  * For Wednesday -- Assignment 2 part I: download your MYD03 geometery file and use it
    to plot a map that includes the corners of your swath.  Copy a png
    file with your map into the data_share folder

* Week 4 topics for Wednesday

  * MYD03 progress report

  * {ref}`week4:resample`

  * For Friday -- continue on Assignment 2 Part I when you get my working MYD03 file

  * Read [Stull Chapter 8](https://www.eoas.ubc.ca/books/Practical_Meteorology/prmet102/Ch08-satellite_radar-v102b.pdf) through page 224

* Topics for Friday

  * Some images from [Aqua](https://directory.eoportal.org/web/eoportal/satellite-missions/content/-/article/aqua)
  * We're switching over to [h5py](http://www.h5py.org/)
  * Introduce the [Archer Modtran website](http://climatemodels.uchicago.edu/modtran/)
  * Go over {ref}`schwartz`  Section 4.4.3 (Adding emission ...)
  * Assignment 2 due Wednesday, October 7
    - Hand in a Jupter notebook that uses python to solve:
      - Stull Chapter 2 -- A23, A24, A25, A26
      - Stull Chapter 8 -- A2, A4


text:
# GRAND-IQ Powershell Module
An **unoffical** Powershell module for the F5 BIG-IQ REST API interface.

The goal is to provide easy access to any BIG-IQ REST API via the core `Invoke-BIGIQRestRequest` function. As well as offer wrappers around the core function to give you familiar access to higher level BIG-IQ functionality such as virtual servers, pools, etc.

## Why the name 'GRAND-IQ'?
I'm not affiliated with the F5 company. So I use 'GRAND' in place of 'BIG' for the module name alone. If F5 wants to release an offical Powershell module for the BIG-IQ in the future, I'm not in their way. The functions, cmdlets, etc still use 'BIGIQ' to make it clear what's being used though.

## Installing

```
Install-Module GRAND-IQ
Import-Module GRAND-IQ
```

## Logging in

```
$yourCredential = Get-Credential
$loginReference = 'https://loginreference link' # See note below.
New-BIGIQAuthenticationToken -rootUrl 'https://url-to-your-big-iq' -credential $yourCredential -loginReference $loginReference
```

The session is stored within the script module and is used automatically. `New-BIGIQAuthenticationToken` outputs the session object (via `-PassThru`) and you can keep it in a variable for use later. This would be useful if you plan on querying multiple BIG-IQs within the same script.

> Get the login reference link by watching your network traffic when logging in via the web browser.

## Querying virtual servers example

```
# Must already be logged in via `New-BIGIQAuthenticationToken`
$result = Invoke-BIGIQRestRequest -path "/mgmt/tm/ltm/virtual"
$result.items
```

The above outputs the virtual servers currently available on your BIG-IQ:

```
kind                         : tm:ltm:virtual:virtualstate
name                         : foo-bar.mycorp.com_https
partition                    : Common
fullPath                     : /Common/foo-bar.mycorp.com_https
...
```

## Invoke-BIGIQRestRequest

This is the core function that provides familiar access to the BIG-IQ REST api. With very few exceptions (`New-BIGIQAuthenticationToken` for one) all wrapper functions will use this core function to communicate with the BIG-IQ. If you cannot find needed functionality in the wrapper functions (or it simply doesn't exist yet) you can use `Invoke-BIGIQRestRequest`. You will need to be familiar with the [BIG-IQ REST API](https://clouddocs.f5.com/products/big-iq/mgmt-api/v6.0/#) to do so.

Parameters
* path
    - The path to the BIG-IQ resource being queried or updated.
    - The REST method to be used.
* requestParameters
    - The powershell object to send in the body of the request. This gets converted to JSON.

gha_language: PowerShell


text:
# Forms

An HTML form is used to collect user input. The user input is most often sent to a server for processing. - [w3schools](https://www.w3schools.com/html/html_forms.asp)

## To do's

What things you should be careful about and styles you'll be using:

- Use **unordered list (ul)** to separate inputs from each other.

	- Styles you'll be adding,

	```
	form ul {
		padding-left: 0;
	}

	form li {
		list-style: none;
		margin-bottom: 20px;
	}
	```

- Use label to define which input is for what.

	- Styles you'll be adding,

	```
	label {
		display: block;
		cursor: pointer;
		color: #292929;
		padding-bottom: 8px;
	}
	```

- Use `id`, `name` attribute in inputs.

- Don't ruin your markup. Like, don't specify width and height for textarea in html. Do it in the CSS.

- **MOST IMPORTANTLY**

	- Be careful when using **checkbox** and **radio** inputs.

	- When, radio and checkboxes are checked, they send information to the server. But if they are not checked, they won't send **any** type of information to the server, which is a real mess. **Use proper error handling of the radio and checkbox inputs in server side langage.**

- Have proper understaing and when to use **GET** and **POST** method as needed.

repository: shafiswapnil/Html-Css

repo_name: shafiswapnil/Html-Css


text:
# Change Log

All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/) and uses [this changelog structure](http://keepachangelog.com/).

## [3.1.0] - 2018-09-06
--------------------

### Added
- Added h3_distance function.

### Changed
- Updated the core library to v3.1.0.

## [3.0.0] - 2018-07-24
--------------------

### Added
- First public release.