text:
# RenderEngine
render engine dll

## 3rdParty
* ImGui - https://github.com/ocornut/imgui
* GLFW3 - https://github.com/glfw/glfw
* volk - https://github.com/zeux/volk
* glad - https://github.com/Dav1dde/glad
* Vulkan Memory Allocator - https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
* stb_image - https://github.com/nothings/stb

repository: nalexandru/RenderEngine

repo_name: nalexandru/RenderEngine


text:
# Emergency staging pipeline optimizations

## Goals

As part of https://github.com/dotnet/arcade/issues/12261 we need to introduce emergency mode to Stage-DotNet and Stage-DotNet-Test pipelines that can be run to prepare a .NET release as fast as possible. Currently the critical stages in the pipeline depend on multiple validation stages (Source Code Validation, Validation, Required Validation) that run for a long time, which is one of the causes for the overall long run time of the pipeline. We need to implement a sped up version of the pipeline, skipping some of the validation jobs and running stages in parallel where possible.

## Proposed Implementation

The proposed implementation is introducing a "emergency switch" parameter in the Stage-DotNet pipeline. Stage dependencies can be rearranged according to this parameter. That will require no changes to the release pipeline that depends on the staging pipeline outputs. (Stage-DotNet is coded as a resourse in Release-DotNet-*). We can test the changes using the available testing pipeline (Stage-DotNet-Test) as it uses the same yaml.

Another approach was discussed - creating a separate pipeline that will contain the stages in the emergency order. This approach would require changes to the release pipeline and would be harder to maintain as changes to Stage-DotNet would also need to be mirrored to the new pipeline and that can cause divergence from the original in the future. Therefore, the "emergency switch" parameter is the better option.

The sequence of stages in the current pipeline is:

```mermaid
flowchart LR
  prep["Prep Ring \n <b>~30min</b>"] --> prep_override[Prep Ring Override]
  prep_override --> signing["Signing Ring \n <b>~50min</b>"]
  prep_override --> source_code_validation["Source Code Validation \n <b>~40min</b>"]
  source_code_validation --> source_code_validation_override[Source Code Validation Override]
  signing --> required_validation["Required Validation \n <b>~1h</b>"]
  signing --> validation["Validation \n <b>~5h</b>"]
  required_validation --> sbom_generation["SBOM Generation \n <b>~20m</b>"]
  required_validation --> required_validation_override[Required Validation Override]
  validation --> validation_override[Validation Override]
  required_validation_override --> publishing_v3_signed["Publish Post-Signing Assets \n <b>~1h20m</b>"]
  required_validation_override --> post_signing_publishing["Publish Signed Assets \n <b>~1h30m</b>"]
  required_validation_override --> vs_insertion["VS Insertion Ring \n <b>~50m</b>"]
  sbom_generation --> sbom_generation_override[SBOM Generation Override]
  vs_insertion --> vs_insertion_override[VS Insertion Override]
  vs_insertion_override --> cti_sign_off[Wait for Test Team Sign Off]
  cti_sign_off --> staging["Staging Ring \n <b>~1h10m</b>"]
  source_code_validation_override --> staging
  staging --> finalize_sign_off[Sign off for finalizing the release]
  finalize_sign_off --> finalize_staging[Finalize Staging Ring]
  finalize_sign_off --> publishing_v3_validated["Publish CTI Validated Assets \n <b>~1h20m</b>"]
  finalize_staging --> handoff_sign_off_dotnetcsainternal[Approve Publishing to Dotnetcsainternal]
  handoff_sign_off_dotnetcsainternal --> handoff_publishing_dotnetcsainternal["Handoff Publishing Ring (dotnetcsainternal)"]
  classDef default fill:#50C878, stroke:#023020;
  classDef Override fill:#ECFFDC, stroke:#023020;
  class prep_override,source_code_validation_override,required_validation_override,sbom_generation_override,vs_insertion_override,validation_override Override;
```
*Light colored stages are manual validation that overrides another stage (e.g. Prep - Prep Override). They are run if the corresponding stage fails or succeeds with issues and skipped otherwise.

If the parameter set to true, change the sequence of stages/jobs in the following way:

```mermaid
flowchart LR
  prep["Prep Ring \n <b>~30min</b>"] --> signing["Signing Ring \n <b>~50min</b>"]
  prep ---> source_code_validation["Source Code Validation \n <b>~40min</b>"]
  signing --> vs_insertion["VS Insertion Ring \n <b>~50m</b>"]
  signing --> required_validation["Required Validation \n <b>~1h</b>"]
  signing --> validation["Validation \n <b>~5h</b>"]
  signing --> sbom_generation["SBOM Generation \n <b>~20m</b>"]
  signing --> publishing_v3_signed["Publish Post-Signing Assets \n <b>~1h20m</b>"]
  signing --> post_signing_publishing["Publish Signed Assets \n <b>~1h30m</b>"]
  signing --> cti_sign_off[Wait for Test Team Sign Off]
  cti_sign_off --> staging["Staging Ring \n <b>~1h10m</b>"]
  staging --> finalize_sign_off[Sign off for finalizing the release]
  finalize_sign_off --> finalize_staging[Finalize Staging Ring]
  finalize_sign_off --> publishing_v3_validated["Publish CTI Validated Assets \n <b>~1h20m</b>"]
  classDef default fill:#50C878, stroke:#023020;
```

- The Staging Ring
  - skip the `validate-staging-inputs` and `validate_staging_outputs` step
  - dynamically change dependencies to
    - prep
    - prep_override
    - signing
    - cti_sign_off
  - dynamically change conditions
- VS Insertion Ring
  - skip `validate_vs_insertion_inputs` job
  - dynamically change dependencies to
    - prep
    - prep_override
- Publish Signed Assets
  - depends on:
    - signing
  - add a condition that signing was successful
- Publish Post-Signing Assets
  - depends on:
    - prep
    - prep_override
    - signing
  - remove required_validation conditions
- Validation Ring - no changes
- Sbom Generation Ring
  - depends on:
    - prep
    - prep_override
    - signing
  - no changes in conditions
- Required Validation Ring - no changes
- Source Code Validation - no changes
- Signing Ring
  - skip `validate_signing_inputs` step
- Prep Ring - no changes
- Configure stages to have no override on failure

## Risks

- the release pipeline is closely connected to the staging - Stage-DotNet is listed as a resource in Release-DotNet from which build artifacts are being downloaded, the release pipeline also expects that assets are published to certain feeds and storage acccounts. We need to check that all assets it needs are being published with the expected changes and in the expected location.

- make sure that the critical stages of Stage-DotNet have all the needed assets. It is possible that additional changes need to be made in the jobs consuming or publishing artifacts, but on a first glance validation stages don't produce outputs that are used in later stages.

## Testing

The change can be tested by running the Stage-DotNet-Test pipeline. It uses the same yml as Stage-DotNet but uploads assets to temporarily created feeds and blob storage containers so that we can run the pipeline multiple times without uploading to the official places. We should run it with the emergency switch on and off and make sure that
- stages are run in the correct order in both emergency and regular scenario
- adding the new parameter doesn't introduce any errors in the current staging process
- all stages from the diagram are run so that:
  - all files produced by the staging pipeline are published (to feeds and blob storage containers) in both the emergency and regular scenario
  - the build artifacts that are used by the release pipeline are published (`config.json`, `manifest.json`, `signed/*`, `signalr-signed/*`, `release-manifests/*`)

## Open Questions

1. How does the change need to be communicated?

2. Should we create a separate 1ES pool for the emergency pipeline to decrease wait time, also could we unite jobs with the same goal? (suggested by Djuradj)

license: MIT

repository: dotnet/arcade

branch_name: refs/heads/main

extension: md

gha_language: C#

gha_license_id: MIT

license_type: permissive

repo_name: dotnet/arcade


text:
# Embedding static files

Starting with Go 1.16 static files can be embedded directly into the built binary. This example demonstrates how to achieve that with a modern frontend build system by embedding the files in [frontend/build/](frontend/build/) and serving them from a web server.

You can try it by running the code and heading to http://localhost:8080/index.html

[See the code »](embed.go)

repository: janosdebugs/go-patterns

repo_name: janosdebugs/go-patterns


text:
---
layout: post
title: "Fast and Agile Vision-Based Flight with Teleoperation and Collision Avoidance on a Multirotor"
date: 2019-05-31 05:17:38
categories: arXiv_RO
tags: arXiv_RO
author: Alex Spitzer, Xuning Yang, John Yao, Aditya Dhawale, Kshitij Goel, Mosam Dabhi, Matt Collins, Curtis Boirum, Nathan Michael
mathjax: true
---

* content
{:toc}

##### Abstract
We present a multirotor architecture capable of aggressive autonomous flight and collision-free teleoperation in unstructured, GPS-denied environments. The proposed system enables aggressive and safe autonomous flight around clutter by integrating recent advancements in visual-inertial state estimation and teleoperation. Our teleoperation framework maps user inputs onto smooth and dynamically feasible motion primitives. Collision-free trajectories are ensured by querying a locally consistent map that is incrementally constructed from forward-facing depth observations. Our system enables a non-expert operator to safely navigate a multirotor around obstacles at speeds of 10 m/s. We achieve autonomous flights at speeds exceeding 12 m/s and accelerations exceeding 12 m/s^2 in a series of outdoor field experiments that validate our approach.

##### Abstract (translated by Google)

##### URL
[http://arxiv.org/abs/1905.13419](http://arxiv.org/abs/1905.13419)

##### PDF
[http://arxiv.org/pdf/1905.13419](http://arxiv.org/pdf/1905.13419)

branch_name: refs/heads/master


text:
---
title: Run with Playwright
sub_title: Execute your tests with Microsoft Playwright
parents: ['Playwright']
keywords: ['headless', 'Playwright']
---

## 🌀 About Playwright

Playwright is a Node library to automate the Chromium, WebKit and Firefox browsers with a single API. It enables cross-browser web automation that is ever-green, capable, reliable and fast.

Headless is supported for all the browsers on all platforms.

Codeceptjs-BDD integrates the Playwright with WebDriver.

## 🚀 To run on Playwright

If you have setup framework through the Codeceptjs-BDD [CLI](/01-getting-started/1-quick-start/), then you'd have an option to select Default driver. If it is default, then you can follow the [execution](/06-execution/1-run-locally/) documentation. If it is not default, then you can pass `DRIVER` command shown below,

You can also define `DRIVER` environment variable in your `dev.codecept.secrets` file which won't be commmitted to the source contol and becomes your personalized local development environment.

```bash

# file: config/dev.codecept.secrets

# ... Other ENV variables

# DRIVER ENV
DRIVER = playwright

# ... Other ENV variables

```

Alternatively, you can pass `DRIVER` value at the runtime,

```bash

DRIVER=Playwright yarn acceptance

```

Default browser for Playwright is `chromium`

But, if you have defined your default driver as Playwright, then you do not need to pass `DRIVER` command, and you can simply run your tests with below commands,

**Run Headless**

```bash
yarn acceptance
```

To run on Playwright's Safari or WebKit,

```bash

yarn acceptance --profile safari
yarn acceptance --profile webkit

```

To run on Playwright's Firefox,

```bash
yarn acceptance --profile firefox
```

**Run with Head: SHOW**

Add `SHOW` enviornment varialbel to run with the Head. It will launch the browser.

```bash

SHOW=true yarn acceptance

```

#### 👉 Please note: Playwright support was added from the version 4

### + Add Playwright support for existing framework before version 4

Please note: The Playwright support was included with the `codeceptjs-configure@4` version. If you have previous version installed, please update your `codecept.conf.js` declaration and dependencies as defined [here](https://github.com/gkushang/codeceptjs-bdd/blob/develop/packages/codeceptjs-cucumber/codecept.conf.js#L1-L7) and update your config creation as defined [here](https://github.com/gkushang/codeceptjs-bdd/blob/develop/packages/codeceptjs-cucumber/codecept.conf.js#L42).

And, install below dependencies

```bash
yarn add codeceptjs-configure@^4 -D
```

repository: mubbashir/codeceptjs-bdd

repo_name: mubbashir/codeceptjs-bdd


text:
# ABCpy

ABCpy is a scientific library for approaximate Bayesian computation (ABC)
written in Python. It addresses the needs of domain scientists and data
scientists by providing

* a fully modularized framework that is easy to use and easy to extend, and
* a non-intrusive, user-friendly way to parallelize inference computations

## Main Features

* Quickly infer parameters for already existing models
* Quickly integrate your model into the framework
* Easily parallelize the inferrence computation when models become complex

## Getting Started
* [User Documentation](http://abcpy.readthedocs.io/en/latest/README.html)
* [Reference](http://abcpy.readthedocs.io/en/latest/abcpy.html)

## License
ABCpy is published under the BSD 3-clause license, see [here](LICENSE).

## Contribute
You are very welcome to contribute to ABCpy.

If you want to contribute code, there are a few things to consider:
* a good start is to fork the repository
* know our [branching strategy](http://nvie.com/posts/a-successful-git-branching-model/)
* use GitHub pull requests to merge your contribution
* consider documenting your code according to the [NumPy documentation style guide](https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt)
* consider writing reasonable [unit tests](https://docs.python.org/3.5/library/unittest.html)

In case of any questions, feel free to contact one of us:
* Ritabrata Dutta, University of Lugano
* Marcel Schoengens, CSCS, ETH Zurich

## Status
[![Documentation Status](https://readthedocs.org/projects/abcpy/badge/?version=latest)](http://abcpy.readthedocs.io/en/latest/?badge=latest)
[![Build Status](https://travis-ci.org/eth-cscs/abcpy.svg?branch=master)](https://travis-ci.org/eth-cscs/abcpy)

repository: AjayTalati/abcpy

repo_name: AjayTalati/abcpy


text:
---
layout: post
title: Liber Doona Cover
category: Music
image:
   feature: liberdoonacover.jpg
   teaser: liberdoona400x250.jpg
comments: true
---

A crazy idea while doing the washing up:

A photomosaic doona cover of a Latin Mass scene using pages from the Liber Usualis!

I've installed [metapixel](https://github.com/schani/metapixel).

To turn [liberusualis.pdf](http://www.musicasacra.com/music/) into a folder full of jpgs:

    mkdir liberusrc
    for i in {0001..2333}; do convert -density 300 ~/Documents/Library/liberusualis.pdf[$i] -resize 500 -gravity center -crop 440x730+0+0 +repage liberusrc/liberu$i.jpg; echo $i; done

That last line takes a Long Time to run for my Core 2 vPro HP Compaq computer.  The upside of slow computers is that the compile time facilitates other activities such as documentation, food preparation and domestic maintenance.

Metapixel also requires a destination directory:

    mkdir liberudst

Then the next step should be something like:

    metapixel-prepare -r liberusrc liberudst --width=440 --height=730

Drumroll please...

    metapixel --metapixel suitablephoto.jpg awesomemosaic.png -l liberudst -s 10

Now, the thing I should have checked in the beginning:

Duvet Covers (125 DPI):

 * 8570x11250 pixels for the twin duvet (including bleeding)
 * 11000x11000 pixels for the queen duvet (including bleeding)
 * 13500×11462 pixels for the king duvet (including bleeding)

So if I'm working with multiples of 440x730, then for my image to be big enough for the biggest duvet cover, then I'm looking at a mosaic about 30x15 pages.  That's not so big after all!

I guess the next question is, where to find a suitable photo!

**UPDATE:** the finished product is [available here](http://www.redbubble.com/people/veronicabrandt/works/15071278)


text:
# Reading
Fellow B12er [Daniela Retelny](http://danielaretelny.com/)'s final chapter of her thesis is on [Flash Organizations](http://hci.stanford.edu/publications/2017/flashorgs/flash-orgs-chi-2017.pdf). We read her and her collaborators' CHI paper on the topic.

# Questions I have going in (answers in italics)
* How much structure comes from the initial scaffold laid down by the person forming the organization, and how much comes from forks/teams? *a lot changed---566 branches, lots of help from hired team leads*
* How much fluidity in membership does this model see vs. traditional organizations and vs. Flash Teams? *way more churn than traditional organizations---not necessarily a benefit for a company, but good for a project. Would be cool to see hybrid organization or restructured organization from internal company team members.*
* How does promotion work? Is there a notion of demotion? What does it look like when the task you are working on gets "refactored?" *no instances of tasks getting deleted---only added. the only organizational refactor was a promotion from eng to manager, so less confict there.*
* What does a branch/merge conflict look like in a running organization? *didn't see as much organizational conflict---usually around the details/order of executing tasks.*
* How does leadership/expertise come into play? A Tech Lead leads a team of engineers, but does Foundry help in determining who the Tech Lead should be?
* How much did each of the Flash Organizations cost in terms of human labor? How would this compare to hiring a small agency to solve the problem? *EMS = $46,191, True Story = $6,650, Enterprise=$36,604*

# Notes
* Current crowd workflows can't handle complex and open-ended goals, like
creating a game or web application
* Take inspiration from modern organizations because they have to create large
groups to pursue complex open ended goals
* The paper describes two challenges to structuring crowds like organizations:
  * *Asset specificity*. To address this challenge, the paper structures
  workers in a de-individualized role hierarchy
      * Workers coordinate based on clear understanding of what each person's
      role is and what that role entails.
  * *Organizational structures need to be continuously reconfigured so that
  the organization can adapt as work progresses.* To address this challenge,
  the paper introduces a model for handling reconfigurations to the
  organizational structure.
* Computational organizational structures
  * Role structures
  * Specifies what skills are required
  * Arranges roles into hierarchy - encodes authority and decision rights
  * Roles can be assigned tasks.
* Reconfigurable organizational structures
  * Organizations must be able to adapt to changing circumstances, but in a
  coordinated way to avoid conflicting adaptations.
  * This paper borrows from software version control to handle changes to
  organizational structure: changes are submitted as pull requests similar to
  that used in git.
  * The version-controlled data are the roles, teams and task details, stored
  as hierarchical objects
* On-demand hiring
  * Create panels of workers pre-approved for certain skills.
  * When an opening appears, fill the opening with a worker from the appropriate
  panel.
* Evaluated system with three cases:
  * EMS Trauma Report - used the crowd to create a prototype mobile and web
  application for EMTs to report trauma injuries from an ambulance en route to
  the hospital.
  * True Story - used the crowd to design, manufacture and playtest a
  storytelling card game and an accompanying mobile app
  * Enterprise Workshop Planning Portal - used the crowd to create an
  enterprise web portal to administer client workshops
* There was a lot of PRs submitted for adaptations to the organizational
structure (566 over 6 weeks).
* Hired 75 workers on-demand across the three organizations. Median time of
13.7 minutes to fill a role.
* Organizations used rehiring functionality to rehire members for new tasks -
reduces amount of onboarding
* Challenge: skill fit of workers were unreliable - quality hiring was an issue
* Qualitative feedback from workers: 1) liked structure---worked with contractor work habits, 2) disliked time limits, 3) wanted to know when work was coming down the pipeline, when to be available, etc.

# 3 Takeaways
* Flash Organizations are role-based (e.g., movie crews) rather than asset-specific (i.e., requiring Jane on a particular team) to facilitate fast hiring based on skills/roles.
* Organizational change (hierarchical structure, roles, new tasks, task changes) can be proposed by anyone like a Pull Request on GitHub, and are reviewed by the leader of the team that the submitter is on. Reviewed changes/branches can be merged into the master organization, which results in new hiring, etc.
* In three applications (an EMS Android app, an actually manufactured/crowdfunded card game, an enterprise workshop web application), a leader used Flash Organizations to accomplish their goal satisfactorily in six weeks!

# Things that went unanswered (answers in italics)
* How are these real world deployments more complex than building a mobile app (flash teams)?
* Did personality / working style of individuals affect the quality / speed of
work? *It does play a factor, but isn't explored as much in this paper. Future work is looking at creating more effective teams with time*
* How did workers react to the strict hierarchy? *One interesting thing that happened is a bunch of (re)organization happened in Slack, and researchers would have to remind workers to go update structure in Foundry. We see this in Orchestra as well.*

# Questions for B12 to ponder (answers in italics)
* What did we learn from our experience with experts in Orchestra that aligns
with the learnings from this paper? What doesn't align? *volume of work, knowing when it's coming. frustrations around tasks going away too quickly.*
* What techniques from Foundry can we adapt and use in Orchestra? *our workflows should be more adaptive to customer input (e.g., single-page vs. multi-page website). Foundry has better support for finer-granularity tasks. Ran into issues with task scope being all over the place, but erring toward being more specific.*
* Do we have (will we have) tasks that require Flash Organizations? What might
they be?

# Interesting aspects of the discussion
* The fast hiring, despite needing more improvements for hiring quality,

# Other references
[Flash Organization slides](http://hci.stanford.edu/publications/2017/flashorgs/chi2017-flashorgs-final.pdf)


text:
---
layout: post
title: "Bash script coding"
excerpt: "Walk though the tricks used in a script to install, configure, and run many programs."
tags: [API, devops, evaluation]
Categories: Devops
filename: bash-coding.md
image:
  feature: https://cloud.githubusercontent.com/assets/300046/14612210/373cb4e2-0553-11e6-8a1a-4b5e1dabe181.jpg
  credit: And Beyond
  creditlink: http://www.andbeyond.com/chile/places-to-go/easter-island.htm
comments: true
---
{{ page.excerpt }}

{% include _toc.html %}

This page dives into the technical ideosycracies of the "mac-setup-all.sh" bash script file which installs apps on Macs.

This tutorial picks up from this README to the mac-setup script tutorial,
which provides someone new to Macs specific steps to configure and run scripts to install apps on Macs. So first finish reading that about "shbangs" and grep for Bash shell versions.

NOTE: This page is still actively under construction (as of April 26, 2018).

## File Names

The Windows operating system makes use of the "extension" or last part of the file name to the right of a dot.

Shell scripts have an extension of ".sh". But that is actually unnecessary.

## Comments and Shebang

In Linux, the first line of the file defines the program used to process the file and the folder path to it. Shell scripts are processed by the bash program built in to Linux operating systems. Bash stands for "Born again shell".

     #!/bin/bash

In Linux, the "#" is called pound or sharp character in music. It precedes all comments.

In Linux, the "!" is called bang or "exclaimation point".

The two characters "#!" is called a "shebang".

Files that want to use a newer version of Bash look to a different folder:

     #!/usr/local/bin/bash

   For more on this, see https://scriptingosx.com/2017/10/on-the-shebang/

## Where did that come from

PROTIP: The name of the file is added as a comment in the code for debugging purposes, to know where a file came from.

## Debugging

To obtain debugging:

     <tt>#!/bin/bash -x</tt>

https://medium.freecodecamp.org/sh-silence-your-bash-scripts-by-coding-your-own-silent-flag-c7e9f8b668a4

## Traps

The Bash trap command catches signals so it can execute some commands when appropriate,
such as
cleaning up temp files before the script finishes, called an
exit trap.

cleanup() {
    err=$?
    echo "Cleaning stuff up..."
    trap '' EXIT INT TERM
    exit $err
}
sig_cleanup() {
    trap '' EXIT # some shells will call EXIT after the INT handler
    false # sets $?
    cleanup
}

The above cleanup function is invoked when INT TERM occurs to trigger the function,
at the bottom of the script:

trap cleanup EXIT
trap sig_cleanup INT QUIT TERM

This statement in the script...

trap 'ret=$?; test $ret -ne 0 && printf "failed\n\n" >&2; exit $ret' EXIT

## Set "Strict Mode"

set -o nounset -o pipefail -o errexit  # "strict mode"

 <tt>pipefail</tt> means that when the program encounters an exit code != 0, the exit code for the pipeline (Bash script) becomes != 0.

E.g. pipefail can be useful to ensure `curl does-not-exist-aaaaaaa.com | wc -c` doesn't exit with exit code 0..!>

## Indent 3 spaces

It's an asthetic choice.

Google's Style Guide
calls for two spaces.

But three spaces make the line indent under if align better.
And the if statement is the most common in the script.

## Homebrew

## Lint Shellcheck

Coding in this script is linted using ShellCheck online at
shellcheck.com or installed from
https://github.com/koalaman/shellcheck

To override the triggering of one of its particular rules so that it does not appear as an error,
a line like this is added

# shellcheck disable=SC2059

## Time start and elapsed

To determine elapsed time, time stamps are captured and the start and end of the script:

Near the script's beginning, the MacOS <tt>date</tt> command is used to obtain a starting time stamp:

TIME_START="$(date -u +%s)"

This yields a number counting the number of seconds since the Jan 1, 1970 epoch point in time.

The output is like "1524256274", which is the number of seconds since the "epoch" of January 1, 1970.

At the end of the script, the END timestamp is obtained for use in calculating the
time elapsed during the script run.

Since there may be relationships among several files, all files changed in the same run have the same timestamp.

The file name of the backup contains a date and time stamp in ISO 8601 format such as:

   <tt>mac-setup-all.sh.2018-04-22T19:26:20-0600-18.log</tt>

The coding uses the bash date and RANDOM commands (for microseconds):

LOG_DATETIME=$(date +%Y-%m-%dT%H:%M:%S%z)-$((1 + RANDOM % 1000))
LOGFILE="$HOME/$THISPGM.$LOG_DATETIME.log"

## Logging to file

When AWS launches an instance, user data scripts and cloud-init directives can be specified to run during the first boot cycle. The console sends to:

   <tt>/var/log/cloud-init-output.log<tt>

However, the script is designed so the historical record of each run pops up at the end of the script.
This is so you can easily scroll and search through the document, something that is difficult on the Console.

What sends statements to a file is this:

echo "something" >>$LOGFILE

The file name of the log file contains a date in ISO 8601 format,
so multiple editions of the file can be sorted by date.

The file is put in the user's $HOME folder so that logs don't accumulate unnoticed in an obscure location.

Logs are not sent to the Linux <tt>/var/log</tt> folder because on a Mac its default owner for permissions is root:

ls -ld /var/log
drwxr-xr-x  54 root  wheel  1728 Apr 21 05:01 /var/log

The script outputs logs to a file.

This is so that during runs, what appears on the command console are only what is relevant to debugging the current issue.

At the end of the script, the log is shown in an editor to enable search through the whole log.

## Sudo and Password

To disable inputting password, add this below line in sudoers file:

sudo visudo
yourusername ALL=(root) NOPASSWD: /usr/sbin/installer install

NOTE: An XML file can be used to specify inputs.

## Disk Space Free and Used

Near the script's beginning, the MacOS <tt>df</tt> command is used to obtain the number of blocks available at the start of run:

FREE_DISKBLOCKS_START="$(df | sed -n -e '2{p;q}' | cut -d' ' -f 6)"

At the end of the script, the END variable is obtained for use in calculating the
space used during the script run.

## Functions for dependencies

QUESTION: What are good Bash libraries with common functions?
Libraries for bash are not common.
One is /etc/rc.d/functions on RedHat-based systems.
The file contains functions commonly used in sysV init script.

NOTE: Bash libraries are scarce is due to limitation of Bash functions.

NOTE: Bash's "functions" have several issues:

Code reusability: Bash functions don't return anything; they only produce output streams. Every reasonable method of capturing that stream and either assigning it to a variable or passing it as an argument requires a SubShell, which breaks all assignments to outer scopes. (See also BashFAQ/084 for tricks to retrieve results from a function.) Thus, libraries of reusable functions are not feasible, as you can't ask a function to store its results in a variable whose name is passed as an argument (except by performing eval backflips).

Scope: Bash has a simple system of local scope which roughly resembles "dynamic scope" (e.g. Javascript, elisp). Functions see the locals of their callers (like Python's "nonlocal" keyword), but can't access a caller's positional parameters (except through BASH_ARGV if extdebug is enabled). Reusable functions can't be guaranteed free of namespace collisions unless you resort to weird naming rules to make conflicts sufficiently unlikely. This is particularly a problem if implementing functions that expect to be acting upon variable names from frame n-3 which may have been overwritten by your reusable function at n-2. Ksh93 can use the more common lexical scope rules by declaring functions with the "function name { ... }" syntax (Bash can't, but supports this syntax anyway).

## GITS_PATH

NOTE on testing if a variable is blank.

   if [[ ! -z "${newdir// }" ]]; then  #it's not blank

## Disk space used

Available space on disk is obtained using command:

FREE_DISKBLOCKS_START=$(df | sed -n -e '2{p;q}' | cut -d' ' -f 6)

The avaiable value is captured from 2nd line, 6th item: 190920080 of the response:

Filesystem   1024-blocks      Used Available Capacity iused               ifree %iused  Mounted on
/dev/disk1s1   488245284 294551984 190920080    61% 2470677<PHONE_NUMBER>852305130    0%   /

The number of blocks needs to be converted to MB (megabytes).

## File Descriptors

Most services such as databases need more file descriptors than the <tt>2048</tt> default on MacOS. We can see the current limit with this command:

ulimit -n

Use the tee command to concatenate to the bottom of the <tt>/etc/profile</tt> file:

'ulimit -n 10032' | sudo tee -a /etc/profile

A reboot is necessary for this to take.

http://bencane.com/2013/09/16/understanding-a-little-more-about-etcprofile-and-etcbashrc/

## Save backup

See "Reliable Writes" in https://www.greenend.org.uk/rjk/tech/shellmistakes.html

A script overwrites files only after saving a backup copy,
naming the file with a suffix of ".bak"

## Brew Package Path Linkages

When we run brew install, it adds new packages to a folder under:

   <tt>/usr/local/Cellar/</tt>

For example, running <tt>brew install sonar</tt> creates a new folder:

   <tt>/usr/local/Cellar/sonarqube/7.1</tt>

   (Notice in this case the path contains "sonarqube" rather than "sonar".)

PROTIP: It's best that version numbers not be hard-coded into scripts.

QUESTION: How do we access the folder using a path that doesn't have a version number?

One of the great reasons for using Homebrew is that it automatically creates a symlink from where it installs so that you can execute a command from any folder, such as:

   <tt>sonar console</tt>

Also, when my bash script wants to know if <tt>brew install sonar</tt> has been run already, it runs:

   <tt>command -v sonar</tt>

If it has not be installed, nothing is returned. If it has been installed, the response is a path such as "/usr/local/bin/sonar".

BLAH: However, we cannot visit that path using <tt>ls /usr/local/bin/sonar</tt>:

-bash: cd: /usr/local/bin/sonar: Not a directory

When we execute <tt>brew link sonar</tt>, it reports:

Warning: Already linked: /usr/local/Cellar/sonarqube/7.1

When we look for "sonar" in the file system using this:

find / -name sonar 2>/dev/null

two paths are reported:

/usr/local/bin/sonar
   /usr/local/Cellar/sonarqube/7.1/bin/sonar

However, a find for sonarqube yields:

/usr/local/opt/sonarqube
    /usr/local/var/homebrew/linked/sonarqube

PROTIP: So we use that URL found in the full path to the conf file to edit.

### GPG Keys for RVM

NOTE:
To verify the legitimacy of a RVM release being downloading, use the <tt>gpg</tt> command
to contact a public key server (using protocol hkp://) and give it the RVM project's public key
which was supposedly signed with its matching private key:

gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
    rvm get stable

If the response is "gpg: keyserver receive failed: Server indicated a failure"
see https://cbabhusal.wordpress.com/2016/09/08/rvm-installation-issue-public-key-download-issue/

### MySQL config files

After brew installs mysql, this message appears:

A "/etc/mysql/my.cnf" from another install may interfere with a Homebrew-built
server starting up correctly.

There is no folder, but there is folder <tt>/usr/local/etc/my.cnf</tt>.

NOTE: By default, the OS X installation does not use a my.cnf, and MySQL just uses the default values. To set up your own my.cnf, you could just create a file straight in /etc.

OS X provides example configuration files at /usr/local/mysql/support-files/

BLAH: Thus I do not recommend using MySQL and to avoid installing it.
The same errors are occuring for MariaDB as well.
So let's just use Postgresql instead to avoid wasting time and headache.
Go to another blog for advice on this terrible program.

## Editors

Other apps look to the enviornment variable EDITOR for the commnand to use for displaying text.

export EDITOR='subl -w'

   "-w" causes the command to not exit until the file is closed.

## Scape web page for URL

Most packages setup their installer for easy installation by creating an entry in Homebrew website.

Some don't do that, such as Gatling. So we have to "scrape" their webpage to obtain the URL that is downloaded when a user manually clicks "DOWNLOAD" on the webpage. An analysis of the page (at gatling.io/download) shows it is one of two URLs which download the bundle.zip file.

DOWNLOAD_URL="gatling-version.html"; wget -q "https://gatling.io/download/" -O $outputFile; cat "$outputFile" | sed -n -e '/<\/header>/,/<\/footer>/ p' | grep "Format:" | sed -n 's/.*href="\([^"]*\).*/\1/p' ; rm -f $outputFile

   The code above (from Wisdom Hambolu) pulls down the page. The grep filters out all but the line containing "Format:" which has a link to "zip bundle".  The sed function extracts out the URL between the "href=".

Alternately, Python programmers have a utility called "Beautiful Soup"
https://medium.freecodecamp.org/how-to-scrape-websites-with-python-and-beautifulsoup-5946935d93fe
installed by pip install BeautifulSoup4

Within the Python program:

import urllib2
from bs4 import BeautifulSoup
quote_page = ‘http://www.bloomberg.com/quote/SPX:IND'
page = urllib2.urlopen(quote_page)
soup = BeautifulSoup(page, ‘html.parser’)
name_box = soup.find(‘h1’, attrs={‘class’: ‘name’})
name = name_box.text.strip() # strip() is used to remove starting and trailing
print name
# get the index price
price_box = soup.find(‘div’, attrs={‘class’:’price’})
price = price_box.text
print price

Others:
* https://www.joyofdata.de/blog/using-linux-shell-web-scraping/
* http://www.gregreda.com/2013/03/03/web-scraping-101-with-python/
* http://www.analyticsvidhya.com/blog/2015/10/beginner-guide-web-scraping-beautiful-soup-python/
* https://github.com/ContentMine/quickscrape

## Install from GitHub Releases

Some apps do not have Homebrew but have installers in GitHub. An example is:

   https://github.com/pact-foundation/pact-go/releases

Unlike a brew command, which downloads into its own folder no matter what folder you're in,
the destination folder for downloads using curl needs to be specified in the command
or it goes to the current folder.

To download outside Homebrew, right-click the link for "Darwin" to copy for pasting it in a curl command such as:

curl "$DOWNLOAD_URL" -o "$GATLING_HOME/gatling.zip"  # 55.3M renamed

   DOWNLOAD_URL="https://github.com/pact-foundation/pact-go/releases/download/v0.0.12/pact-go_darwin_amd64.tar.gz"

The trouble is that

Alternately, the wget command can be used if it has been installed earlier.

Either way, the "gunzip" file needs to be unzipped and verified.

unzip pact-go_darwin_amd64.tar.gz

    Unzip the package into a known location,
     ensuring the pact-go binary is on the PATH, next to the pact folder.
    Run pact-go to see what options are available.
    Run go get -d github.com/pact-foundation/pact-go to install the source packages

## Return Codes

This command returns the result code set by the previous command:

   <tt>echo $?</tt>

Zero (0) is the normal return code. So check for non-zero.

1 AWS S3 commands return if one or more S3 transfers failed.

2 AWS returns if it cannot parse the previous command due to missing required subcommands or arguments or unknown commands or arguments.

## Process start/stop/kill

There are several ways to start processes:

   * Invoke the program's cli command, such as <tt>redis-cli start</tt>
   * Invoke the brew services start command
   * Invoke <tt>launchctl load $HOME/Library/LaunchAgents/homebrew.mxcl.mongodb.plist</tt>

Examples to stop processes:

   * redis-cli stop
   * brew services stop command
   * launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null

The typical caveats from a brew install is, for example:

To have launchd start sonarqube now and restart at login:
  brew services start sonarqube
Or, if you don't want/need a background service you can just run:
  sonar console

During installation, few installers create a Plist file to define a service that MacOS brings up automatically on boot-up.

The preference is to use an approach which enables orderly saving of what may be in memory. This is preferrable to using a kill command which can be too abrupt.

To kill a process within Terminal stopped while presenting a process, press command+. (period).
But in a script, first obtain the PID:

PID="$(ps -A | grep -m1 '/postgresql' | grep -v "grep" | awk '{print $1}')"
kill $PID

   PROTIP: The "/" in the process name is sometime added if there are several ("child") processes related to the one PID. Bringing that down would bring down the others automatically.
   For example:

86700   ??  Ss     0:00.00 postgres: checkpointer process
86701   ??  Ss     0:00.07 postgres: writer process
86702   ??  Ss     0:00.05 postgres: wal writer process
86703   ??  Ss     0:00.04 postgres: autovacuum launcher process
86704   ??  Ss     0:00.05 postgres: stats collector process
86705   ??  Ss     0:00.00 postgres: bgworker: logical replication launcher
86698 s000  S      0:00.04 /usr/local/Cellar/postgresql/10.3/bin/postgres -D /usr/local/var/postgres
87259 s001  S+     0:00.00 grep postgres

   PROTIP: The <tt>grep -v "grep"</tt> filters out the grep process itself.
   Killing/stopping the "postgresql" process also stops several "postres:" automatically.

## Variables

0. Define a variable:

   MY_VARIABLE="x"

0. Clear out a variable as if it was not defined:

   unset MY_VARIABLE

0. Test a variable:

\# PROTIP: -z tests for zero value (empty).  -v is only available on new versions of Bash.
if [ -z "$MY_ZONE" ]; then  # not empty
   MY_ZONE="us-central1-b"  # set default value.
fi
echo "**** MY_ZONE=\"$MY_ZONE\""

0. Define new verbs so different colors are displayed at various levels of concern:

function echo_ok { echo -e '\033[1;32m'"$1"'\033[0m'; }
function echo_warn { echo -e '\033[1;33m'"$1"'\033[0m'; }
function echo_error  { echo -e '\033[1;31mERROR: '"$1"'\033[0m'; }
echo_ok "Install starting. You may be asked for your password (for sudo)."

0. If Xcode is not installed, exit the program (quit):

# Require xcode or quit out:
xcode-select -p || exit "XCode must be installed! (use the app store)"

0. Set permissions

cd ~
mkdir -p tmp
echo_ok "Setting permissions..."
for dir in "/usr/local /usr/local/bin /usr/local/include /usr/local/lib /usr/local/share"; do
	sudo chgrp admin $dir
	sudo chmod g+w $dir
done

0. Make sure Homebrew is installed:

# homebrew
export HOMEBREW_CASK_OPTS="--appdir=/Applications"
if hash brew &> /dev/null; then
   echo_ok "Homebrew already installed"
else
   echo_warn "Installing homebrew..."
   ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi

0. The meanjs sample app requires MongoDB to be running, so this code makes that so
   by concatenating a control keyword text to a variable:

   if echo "$TRYOUT_KEEP" | grep -q "mongodb"; then
      echo "mongodb already in string";
   else
      echo "$TRYOUT_KEEP,mongodb";  # add to string
   fi
   if echo "$TRYOUT" | grep -q "mongodb"; then
      echo "mongodb already in string";
   else
      echo "$TRYOUT,mongodb";  # add to string
   fi
   MONGODB_INSTALL

   Before calling MONGO_INSTALL, we mark the strings that brings up the MongoDB service
   and keeps it running rather than shutting it down (the default action).

## Multiple terminals

When a service is started by a shell script within a terminal, no additional commands can be entered while the service runs.

So additional terminal sessions are needed to invoke the client or other services.

The options to do that depend on the operating system.

On Mac, the "open" command is unique to Macs.

   open -a Terminal.app crazy.sh

   * See https://stackoverflow.com/questions/19440007/mac-gnome-terminal-equivalent-for-shell-script

To make the terminal stay when the command exits:

   In xterm, there is a -hold flag.

In Fedora:

   gnome-terminal -e command

   * https://help.gnome.org/users/gnome-terminal/stable/

   * See https://askubuntu.com/questions/46627/how-can-i-make-a-script-that-opens-terminal-windows-and-executes-commands-in-the

   * https://askubuntu.com/questions/484993/run-command-on-anothernew-terminal-window

   * https://stackoverflow.com/questions/42444615/how-to-write-a-shell-script-to-open-four-terminals-and-execute-a-command-in-each

   In gnome-terminal, go to Edit -> Profile Preferences -> Title. Click the Command tab. Select Hold the terminal from the drop-down menu labelled When command exits. You should create a new profile for that and execute with

   gnome-terminal --window-with-profile=NAMEOFTHEPROFILE -e command

Alternately:

   konsole -e command

   In konsole there is a --noclose flag.

Pretty much

   terminal -e command

## Eclips IDE plug-ins

http://download.eclipse.org/releases/juno

Within Eclipse IDE, get a list of plugins at Help -> Install New Software -> Select a repo -> select a plugin -> go to More -> General Information -> Identifier

eclipse -application org.eclipse.equinox.p2.director \
-destination d:/eclipse/ \
-profile SDKProfile  \
-clean -purgeHistory  \
-noSplash \
-repository http://download.eclipse.org/releases/juno/ \
-installIU org.eclipse.cdt.feature.group, \
   org.eclipse.egit.feature.group

   "Equinox" is the runtime environment of Eclipse, which is the reference implementation of OSGI.
   Thus, Eclipse plugins are architectually the same as bundles in OSGI.

   Notice that there are different versions of Eclipse repositories, such as "juno".

   PROTIP: Although one can install several at once, do it one at a time to see if you can actually use each one.
   Some of them:

   org.eclipse.cdt.feature.group, \
   org.eclipse.egit.feature.group, \
   org.eclipse.cdt.sdk.feature.group, \
   org.eclipse.linuxtools.cdt.libhover.feature.group, \
   org.eclipse.wst.xml_ui.feature.feature.group, \
   org.eclipse.wst.web_ui.feature.feature.group, \
   org.eclipse.wst.jsdt.feature.feature.group, \
   org.eclipse.php.sdk.feature.group, \
   org.eclipse.rap.tooling.feature.group, \
   org.eclipse.linuxtools.cdt.libhover.devhelp.feature.feature.group, \
   org.eclipse.linuxtools.valgrind.feature.group, \

   NOTE:
   A feature group is a list of plugins and other features which can be understood as a logical separate project unit
   for the updates manager and for the build process.

## Testing

https://medium.com/wemake-services/testing-bash-applications-85512e7fe2de

https://github.com/sstephenson/bats

## Java tools via Maven, Ant

Apps added by specifying in JAVA_TOOLS are GUI apps.

Most other Java dependencies are specified by manually added in each custom app's pom.xml file
to specify what Maven downloads from the Maven Central online repository of installers at

   http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22org.dbunit%22

Popular in the Maven Repository are:

   * yarn for code generation. JHipster uses it as an integrated tool in Java Spring development.
   * DbUnit extends the JUnit TestCase class to put databases into a known state between test runs. Written by Manuel Laflamme, DbUnit is added in the Maven pom.xml (or Ant) for download from Maven Central. See http://dbunit.wikidot.com/
   * mockito enables calls to be mocked as if they have been creted.
   Insert file java-mockito-maven.xml as a dependency to maven pom.xml
   See https://www.youtube.com/watch?v=GKUlQMrbtHE - May 28, 2016
   and https://zeroturnaround.com/rebellabs/rebel-labs-report-go-away-bugs-keeping-your-code-safe-with-junit-testng-and-mockito/9/

   * TestNG
   See http://testng.org/doc/download.html
   and https://docs.mendix.com/howto/testing/create-automated-tests-with-testng

   When using Gradle, insert file java-testng-gradle as a dependency to gradle working within Eclipse plug-in
   Build from source git://github.com/cbeust/testng.git using ./build-with-gradle

TODO: The Python edition of this will insert specs such as this in pom.xml files.

## Pkg silent install

Although Microsoft's DotNet Core for Mac has a brew formula for the CLI,
its SDK is installer is only available using a Pkg.

So we use a command for installing that silently:

echo "$SUDO_PASS" | sudo installer -store -verbose -verboseR -allowUntrusted -pkg "$DOTNET_PROJ/$PKG" -target /

   The -target value of / is not a path but a device listed by the df command.

There is also the platypus or pkginastall libraries.

## Extract version from webpage

To automate "Download .NET SDK" for Mac from page https://www.microsoft.com/net/learn/get-started/macos#install

curl -s https://www.microsoft.com/net/learn/get-started/macos#macos

extracts the entire page.

grep -B1 "Download .NET SDK"
 obtains one line before the text "Download .NET SDK", which is the two lines:

<a onclick="recordDownload('.NET Core', 'dotnet-sdk-2.1.105-macos-x64-getstarted-installer')"
href="https://download.microsoft.com/download/2/E/C/2EC018A0-A0FC-40A2-849D-AA692F68349E/dotnet-sdk-2.1.105-osx-gs-x64.pkg"
class="btn btn-primary">Download .NET SDK</a>

grep href
 filters just the lines with href.

grep -Eo "(http|https)://[a-zA-Z0-9./?=_-]*"
 specifies Extended functionality using the Regular Expression
to obtain the URLs (one URL for .exe and one URL for .pkg).

grep -E "*.pkg"
 filters the lines to just the one ending with "pkg" file extension (not .exe).

The "basename" command obtains the file name from a file path variable.

PKG_LINK=$(curl -s https://www.microsoft.com/net/learn/get-started/macos#macos | grep -B1 "Download .NET SDK" | grep href | grep -Eo "(http|https)://[a-zA-Z0-9./?=_-]*" | grep -E ".pkg")

## Jenkins server

To start the Jenkins server to a specified port:

jenkins --httpPort=$JENKINS_PORT  &

   The "&" puts the process in the background so that the script can continue running.

Several other methods (which don't work now) are presented on the internet:

   * <tt>sudo service jenkins start</tt>

   *
   This blog, on Dec 29, 2014 recommends

sudo defaults write /Library/Preferences/org.jenkins-ci httpPort "$JENKINS_PORT"
   sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
   sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist

The command "jenkins" above is actually a bash script that invokes Java:

#!/bin/bash
   JAVA_HOME="$(/usr/libexec/java_home --version 1.8)" \
   exec java  -jar /usr/local/Cellar/jenkins/2.113/libexec/jenkins.war "$@"

The code within "$(...)" is run to obtain the value. In this case, it's:

/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home

   The link above is the folder where MacOS keeps the Java SDK.
   Java executables (java, javac, etc.) are in the bin folder below that location.

The path to jenkins.war and jenkins-cli.war executable files are physcally at:

ls /usr/local/opt/jenkins/libexec

### Mac Plist file for Jenkins

Instead of specifying the port in the command, change the configuration file.

On MacOS, services are defined by plist files containing XML,
such as this for Jenkins server:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>Label</key>
    <string>homebrew.mxcl.jenkins</string>
    <key>ProgramArguments</key>
    <array>
      <string>/usr/libexec/java_home</string>
      <string>-v</string>
      <string>1.8</string>
      <string>--exec</string>
      <string>java</string>
      <string>-Dmail.smtp.starttls.enable=true</string>
      <string>-jar</string>
      <string>/usr/local/opt/jenkins/libexec/jenkins.war</string>
      <string>--httpListenAddress=<IP_ADDRESS></string>
      <string>--httpPort=8080</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
  </dict>
</plist>

The "1.8" is the version of Java,  described below.

The "httpPort=8080" default is customized using this variable in secrets.sh:

      JENKINS_PORT="8082"  # default 8080

The above is file <tt>homebrew.mxcl.jenkins.plist</tt> within folder
<tt>/usr/local/opt/jenkins</tt> installed by brew.
The folder is a symlink created by brew to the physical path where brew installed it:

      /usr/local/Cellar/Jenkins/2.113/homebrew.mxcl.jenkins.plist

The "2.113" means that several versions of Jenkins can be installed side-by-side.
This version number changes over time. So it is captured by command:

JENKINS_VERSION=$(jenkins --version)  # 2.113

The folder is actually a symlnk which points to the physical folder defined by:
JENKINS_CONF="/usr/local/Cellar/Jenkins/$JENKINS_VERSION/homebrew.mxcl.jenkins.plist"

The path is defined in a variable so simplify the sed command to make the change:

         sed -i "s/httpPort=8080/httpPort=$JENKINS_PORT/g" $JENKINS_CONF
               # --httpPort=8080 is default.

### Jenkins GUI in browser

The command to view the server in the default internet browser (such as Safari, Chrome, etc.) is:

open "http://localhost:$JENKINS_PORT"

   It's "http" and not "https" because a certificate has not been established yet.

When executed the first time, Jenkins displays this screen:

However, we don't want to open it from the command line script, but from a GUI automation script.

### Jenkins GUI automation

The script invokes a GUI automation script that opens the file mentioned on the web page above:

/Users/wilsonmar/.jenkins/secrets/initialAdminPassword

   "/Users/wilsonmar" is represented by the environment variable named $HOME or ~ symbol,
   which would be different for you, with your own MacOS account name.
   Thus, the generic coding is:

JENKINS_SECRET=$(<$HOME/.jenkins/secrets/initialAdminPassword)

The file (and now $JENKINS_SECRET) contains a string in clear-text like "851ed535fd3249ab95a274d23242655c".

We then call a GUI automation script to get that string to paste it in the box labeled "Administrator Password"
based on the id "security-token" defined in this HTML:

<input id="security-token" class="form-control" type="password" name="j_password">

   This was determined by obtaining the outer HTML from Chrome Developer Tools.

The call is:

python tests/jenkins_secret_chrome.py  chrome  $JENKINS_PORT  $JENKINS_SECRET

We use Selenium Python because it reads and writes system environment variables.

Use of Selenium and Python this way requires them to be installed before Jenkins and other web servers.

### Jenkins shutdown (kill)

To shut down Jenkins,

PID="ps -A | grep -m1 'jenkins' | awk '{print $1}'"
   fancy_echo "Shutting downn jenkins $PID ..."
   kill $PID

The above is the automated approach to the manual on recommended by many blogs on the internet:

   Some say in Finder look for Applications -> Utilities -> Activity Monitor

   Others say use command:

ps -el | grep jenkins

   Two lines would appear. One is the bash command to do the ps command.

   The PID desired is the one that lists the path used to invoke Jenkins,
   described above:

/usr/bin/java -jar /usr/local/Cellar/jenkins/2.113/libexec/jenkins.war

kill 2134

   That is the equivalent of Windows command "taskkill /F /PID XXXX"

   There is also:

sudo service jenkins stop

Either way, the response expected is:

INFO: JVM is terminating. Shutting down Winstone

## Python GUI Automation

If the title is not found an error message like this appears on the console:

  File "tests/jenkins_secret_chrome.py", line 30, in <module>
    assert "Jenkins [Jenkins]" in driver.title  # bail out if not found.
AssertionError

### Delay to view

Some put in a 5 second delay:

time.sleep(5)

Use of this feature requires a library to be specified at the top of the file:

import sys

### Screen shot picture

Some also take a photo to "prove" that the result was achieved:

driver.save_screenshot('jenkins_secret_chrome.py' +utc_offset_sec+ '.png')

We put the name of the script file in the picture name to trace back to its origin.
We put a time stamp in ISO 8601 format so that several png files sort by date.

utc_offset_sec = time.altzone if time.localtime().tm_isdst else time.timezone
datetime.datetime.now().replace(tzinfo=datetime.timezone(offset=utc_offset_sec)).isoformat()

The long explanation is https://docs.python.org/2/library/datetime.html

### End of script

NOTE:

   * webDriver.Close() - Close the browser window that currently has focus
   * webDriver.Quit() - Calls Dispose()
   * webDriver.Dispose() Closes all browser windows and safely ends the session

driver.quit() means that someone watching the script execute would only see the web app's screen for a split second.

   We prefer to use id rather than name fields because the HTML standard states that id's are
   supposed to be unique in each web page.

## Groovy

Other similar scripts (listed in "References" below) run

http://groovy-lang.org/install.html

## Scape for Fonts in GitHub

Some developers have not put their stuff from GitHub into Homebrew. So we need to read (scrape) the website and see what is listed, then grab the text and URL to download.

Such is the situation with font files at
https://github.com/adobe-fonts/source-code-pro/releases/tag/variable-fonts
The two files desired downloaded using the curl command are:

* https://github.com/adobe-fonts/source-code-pro/releases/download/variable-fonts/SourceCodeVariable-Italic.ttf
* https://github.com/adobe-fonts/source-code-pro/releases/download/variable-fonts/SourceCodeVariable-Roman.ttf

The files are downloaded into where MacOS holds fonts available to all users: <tt>/Library/Fonts/</tt>

ITerm2 can make use of these font files.

## Kill processes

*

kill-port() { kill -kill "$(lsof -t -i :$1)"; }

This function is called using:

free-port 3000

## Say text out loud

At the bottom of the script is a MacOS command that translates text into voice through the spearker:

say "script ended."  # through speaker

This is good if the script runs so long that you can do other things.

But it's not good if you're sitting around other people.

## References

The cannonical place for documentation is:

   * http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
   * http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_02_03.html
   for Debugging bash scripts
   * https://www.tldp.org/LDP/abs/html/abs-guide.html

https://en.wikipedia.org/wiki/Shell_script

https://www.cheatography.com/davechild/cheat-sheets/linux-command-line/
http://overapi.com/shellscript

https://jasonjwilliamsny.github.io/wrangling-genomics/01-automating_a_workflow.html

https://www.greenend.org.uk/rjk/tech/shellmistakes.html

http://wiki.bash-hackers.org/commands/builtin/set

https://www.digitalocean.com/community/tutorials/how-to-use-bash-s-job-control-to-manage-foreground-and-background-processes

https://github.com/Bash-it/bash-it
a collection of community Bash commands and scripts for Bash 3.2+. (And a shameless ripoff of oh-my-zsh 😃)
Includes autocompletion, themes, aliases, custom functions, a few stolen pieces from Steve Losh, and more.

https://github.com/denysdovhan/bash-handbook

Packt BOOK: Pro Bash Programming: Scripting the Linux Shell (Expert's Voice in Linux) 1st ed. Edition
by Chris F.A. Johnson

## More on DevOps #

This is one of a series on DevOps:

{% include devops_links.html %}


text:
## [1.1.11](https://github.com/Otanikotani/view-github-actions-idea-plugin/compare/1.1.10...1.1.11) (2022-04-25)

### Bug Fixes

* **feat:** Update to 2022.1 idea ([9a51654](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/9a516542274b9fac6e1c087617ed86a02e6e1c15))

## [1.1.10](https://github.com/Otanikotani/view-github-actions-idea-plugin/compare/1.1.9...1.1.10) (2022-04-25)

### Bug Fixes

* **feat:** Update to 2022.1 idea ([8faa596](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/8faa59650afac0eb1cfd3b0ce565796aaa1a2e32))
* **feat:** Update to 2022.1 idea ([e99d6f9](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/e99d6f9408b52cfbfc67321b734afe6aa0d7c9b8))
* **feat:** Update to 2022.1 idea ([d1a3d95](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/d1a3d957f4bc5c5b69bf2dbcd623002df8d2bffb))
* **log:** Catch up getting logs ([a0c7b9e](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/a0c7b9e6699f09765bc224d17df681996b7690dd))
* **log:** Drop log value on reload ([6a45086](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/6a4508635ba6560af6922472883b7bcd755aee99))

## [1.1.9](https://github.com/Otanikotani/view-github-actions-idea-plugin/compare/1.1.8...1.1.9) (2020-12-02)

### Bug Fixes

* **feat:** Fix the log parsing, fix logger ([87cf7f8](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/87cf7f8ecb9eb26fc3539157ac086b0c587e3d47))

## [1.1.8](https://github.com/Otanikotani/view-github-actions-idea-plugin/compare/1.1.7...1.1.8) (2020-11-17)

### Bug Fixes

* **feat:** Bump to support latest IDEA ([fb4d646](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/fb4d646df208fe0891736dc65bcda4b27d741e7e))

## [1.1.7](https://github.com/Otanikotani/view-github-actions-idea-plugin/compare/1.1.6...1.1.7) (2020-11-17)

### Bug Fixes

* **feat:** Bump to support latest IDEA ([2690ea8](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/2690ea830ba2d2e2c2e652623f156edc54073729))

## [1.1.6](https://github.com/Otanikotani/view-github-actions-idea-plugin/compare/1.1.5...1.1.6) (2020-08-23)

### Bug Fixes

* **feat:** Bump to support 2020.2 ([d08a407](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/d08a407703f5958223879a0963e26a1da5305932))
* **feat:** Bump to support build verify check 2020.2 ([5f8c851](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/5f8c8512134c91ff4bc7109a4e1bf38e8dcbbb90))

## [1.1.5](https://github.com/Otanikotani/view-github-actions-idea-plugin/compare/1.1.4...1.1.5) (2020-07-11)

### Bug Fixes

* **log:** Add debug logging ([49c998b](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/49c998bdeeefe4f6d2bebbbb0ce6cc9248575ebb))

## [1.1.4](https://github.com/Otanikotani/view-github-actions-idea-plugin/compare/1.1.3...1.1.4) (2020-05-03)

### Bug Fixes

* **build:** Fix indentation ([a25a393](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/a25a39306ca665997a2002f97c768eef8c63b3e0))
* **feat:** Bump to support 2020.1 ([07f0ac0](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/07f0ac029246440188c825106281bf59eb86e22d))

## [1.1.3](https://github.com/Otanikotani/view-github-actions-idea-plugin/compare/1.1.2...1.1.3) (2020-04-11)

### Bug Fixes

* **doc:** Update plugin xml documentation ([ad3886e](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/ad3886e8a8d6dac9cb217a7496334a55ea987a52))
* **plugin:** Bump versions ([fb316e2](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/fb316e2fa6689b7fd903d5a831d9b826524904d4))

## [1.1.2](https://github.com/Otanikotani/view-github-actions-idea-plugin/compare/1.1.1...1.1.2) (2020-03-24)

### Bug Fixes

* **log:** Add a message about log unavailability ([0c304c1](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/0c304c1a2b4e8c65ce47c99d87f0f58b3c1bd025))

## [1.1.1](https://github.com/Otanikotani/view-github-actions-idea-plugin/compare/1.1.0...1.1.1) (2020-03-17)

### Bug Fixes

* **log:** Unzip the correct file ([ba9c06f](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/ba9c06ff096f511aabd89ecece2582224404018b))

# [1.1.0](https://github.com/Otanikotani/view-github-actions-idea-plugin/compare/1.0.0...1.1.0) (2020-03-17)

### Features

* **workflow:** Add Open In Browser action ([6ea7ebd](https://github.com/Otanikotani/view-github-actions-idea-plugin/commit/6ea7ebd34a8b27e97c7e235bcef4663aadfd54c2))

# [1.0.0](https://github.com/Otanikotani/view-github-checks-idea-plugin/compare/0.1.0...1.0.0) (2020-03-17)

* Brand new workflows-based plugin (#30) ([fc2a791](https://github.com/Otanikotani/view-github-checks-idea-plugin/commit/fc2a79151d5696d8474bb76788ecaea58ce3505b)), closes [#30](https://github.com/Otanikotani/view-github-checks-idea-plugin/issues/30)

### BREAKING CHANGES

* This is a completely different API than the Checks API

* chore: rename checks to worfklows

* More renaming

* Split layout

* fix: proportion keys

* feat: copy-pasta from PRs

* feat: copy-pasta from PRs

* feat: copy-pasta from PRs

* fix(account): Login only on PR

Since GITHUB_ACCOUNT_TOKEN_CHANGED is private we have no chances to listen to it and thus no chances to react to the account change directly. Thus - just ask the user to go to the Pull Requests tab and login there and then refresh

* fix(account): Login title fixed

* feat(account): Finally showing something in the UI

* feat(datacontext): Simplification of the data context

* fix(workflow): workflows list related objects in a single place

* fix(workflow): simplify workflow list classes

* fix(api): use data classes

* fix(workflow): load just once

* chore(workflow): single also block

* chore(workflow): show workflow runs

* Change text in the action.

* Only workflow runs

* fix(runs): look of workflow run list items

* fix(runs): look of workflow run list items

* fix(runs): list looks ok

* feat(log): first build log (just fake data)

* feat(log): first build log (just fake data)

* feat(log): first build log (just fake data)

* feat(log): fetching data from github

* feat(log): fetching the real log

* fix(naming): rename everything to say WorkflowRun instead of Workflow

* chore(naming): remove those ugly Impl one interface only classes

* chore(naming): remove those ugly Impl one interface only classes

* feat(log): print via console element

* feat(log): colored log output

* feat(workflows): add popup for github workflow run list

Add reload

* feat(reload): add reload actions for workflows and workflow log

* chore(reload): remove unnecessary action

* feat(workflow): Add refresh buttons

* feat(list): Color improvements

* feat(list): Fix date and workflow name fields

* feat(list): Add statuses and icons

* feat(list): Icons size fix

Co-authored-by: Tofik Mamishov<EMAIL_ADDRESS>
# [0.1.0](https://github.com/Otanikotani/view-github-checks-idea-plugin/compare/v0.0.5...0.1.0) (2020-02-28)

### Features

* add gradle properties for versioning ([d7f4794](https://github.com/Otanikotani/view-github-checks-idea-plugin/commit/d7f4794ce93dbf247634f7c7a104943b4dbebf1d))
* add semantic release ([528acf7](https://github.com/Otanikotani/view-github-checks-idea-plugin/commit/528acf76eb8f281d9218bbd85e2602122c2e3c19))

gha_language: Kotlin


text:
# iHCF - Hardcore Factions Core #

iHCF is a well rounded HCF core developed by primarily by DoctorDark
for various servers (Para, IPVP, etc). It improves the game-play of factions while increasing
the challenge of the game.

This plugin is currently not in use by the IPVP network and as such updates and
 bug fixes may be far and few. I make no promises on the state of the code and it
 being bug free, this repository is primarily for educational purposes. However,
 reporting issues are always welcome as it allows the community to see what bugs
 are present in the current build.

## Compilation ##
Compilation requires the following be fulfilled:

* [Java 8](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
* [Maven 3](http://maven.apache.org/download.html)
* You will need to verify that the following resources have been installed:
    * [IPVP PaperSpigot 1.7.10](https://github.com/IPVP-MC/Paper-1.7)
    * [iBase](https://github.com/IPVP-MC/iBase)
    * Newbies: Installation instructions provided at the links above

Once these tasks have been taken care of, compilation via `mvn clean install` will result in `core/target/iHCF.jar` being created.

## License ##
This software is available under the following licenses:

* MIT

## Notes ##
To whom it may concern,

As the owner of the former HCF server "IPVP" previously available at IPVP.org, of which the iHCF software was created/modified/given to/for as witnessed in the original stub commit by DoctorDark [here](https://github.com/IPVP-MC/iHCF/commit/dcab2972de84481ea88ee2fbefdcd5be9eb9aaea), please heed the following.

As per the [MIT license that this plugin is under](/LICENSE.txt), this software is available for any person to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software. Please consider this note as my giving explicit permission to any persons for the aforementioned claims as defined by the license.

This note may also be considered as giving explicit permissions for redistribution/modification/sublicensing as specified in rules 5.4 (`"Do not offer or sell anything you do not own or have the right to redistribute."`) and 6.6 (`"Do not attempt to sell/leak or otherwise redistribute content which is not both unique and owned by you"`) of the MCM Rules as seen [here](https://www.mc-market.org/wiki/rules/). Additionally, this note may also be considered as granting any applicable rights (as defined by the license) for the software which may be required by MCM staff as per the MCM Redistribution Rights requirements (see [here](https://www.mc-market.org/wiki/redistribution-rights/)).

Saint

repository: retarders/iHCF

repo_name: retarders/iHCF


text:
---
title: Community Resources
---
We’re committed to supporting and growing the community around Great Expectations. It’s not enough to build a great tool. We want to build a great community as well.

Open source doesn’t always have the best reputation for being friendly and welcoming, and that makes us sad. Everyone belongs in open source, and Great Expectations is dedicated to making you feel welcome.

### Get in touch with the Great Expectations team
Join our public slack channel here: [join slack](https://greatexpectations.io/slack). We’re not always available, but we’re there and responsive an awful lot of the time.

### Ask a question
Slack is good for that, too: [join slack](https://greatexpectations.io/slack).

### File a bug report or feature request
If you have bugfix or feature request, please [upvote an existing issue](https://github.com/great-expectations/great_expectations/issues) or [open a new issue](https://github.com/great-expectations/great_expectations/issues/new) on GitHub and we’ll see what we can do.

### Contribute code or documentation
We welcome contributions to Great Expectations. Please start with our [Contributing guide](/docs/contributing/contributing) and don’t be shy with questions!


text:
# Critical Algorithm Studies

Twitter book club on the theme of critical algorithm studies

Twitter @algorithm_club

*Reading list: [http://socialmediacollective.org/reading-lists/critical-algorithm-studies](http://socialmediacollective.org/reading-lists/critical-algorithm-studies)/*

repository: gabelula/critical-algorithm-studies

repo_name: gabelula/critical-algorithm-studies


text:
# DANBO: Disentangled Articulated Neural Body Representations via Graph Neural Networks

```
@inproceedings{danbo_eccv22,
author = {Shih-Yang Su and Timur Bagautdinov and Helge Rhodin},
title = {DANBO: Disentangled Articulated Neural Body Representations via Graph Neural Networks},
booktitle = {The European Conference on Computer Vision (ECCV)},
pages = {107--124},
year = {2022}
}
```

links
- [springer](https://link.springer.com/chapter/10.1007/978-3-031-20086-1_7)
- [ecva](https://www.ecva.net/papers/eccv_2022/papers_ECCV/html/4883_ECCV_2022_paper.php)
- [arxiv](https://arxiv.org/abs/2205.01666)
- [project](https://lemonatsu.github.io/danbo/)

gha_language: Jupyter Notebook


text:
JS-Vertical_Menu
================

This jQuery plugin provides a vertical menu with easy use and totally customisable by CSS

Author Homepage:      http://djhv92.wix.com/dennishernandez<br />

How to use it?
==============

Just add this in your html

$('document').ready(function(){
	$('.menu').vertical_menu();
});

This plugin has options and sets default values:

* slideUp: "medium",
* slideDown: "slow",
* easingUp: "swing",
* easingDown: "swing"

You can customize your vertical menu like:

$('document').ready(function(){
	$('.menu').vertical_menu({
		slideUp: "medium",
		slideDown: "slow",
		easingUp: "swing",
		easingDown: "swing"
	});
});

All the options are not required and you can put the easing name or number.
For more information about:

* slideUp() : https://api.jquery.com/slideUp/
* slideDown() : https://api.jquery.com/slideDown/
* easing : http://api.jqueryui.com/easings/

Dependencies
=============
This plugin has these dependencies:

* jquery-1.10.2.js
* jquery-ui.js (1.10.4)

Repo Contents
=============

* index.html
* vertical_menu.js
* vertical_menu_style.css
* README

MIT Open Source License
=======================

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:
Thank you for contributing to Reach UI! Please fill in this template before submitting your PR to help us process your request more quickly.

- [ ] Use a meaningful title for the pull request. Include the name of the package modified.
- [ ] Test the change in your own code (Compile and run).
- [ ] Add or edit tests to reflect the change (Run with `yarn test`).
- [ ] Add or edit Storybook examples to reflect the change (Run with `yarn start`).
- [ ] Ensure formatting is consistent with the project's Prettier configuration.
- [ ] Add documentation to support any new features.

This pull request:

- [ ] Creates a new package
- [ ] Fixes a bug in an existing package
- [ ] Adds additional features/functionality to an existing package
- [ ] Updates documentation or example code
- [ ] Other

If creating a new package:

- [ ] Make sure the new package directory contains each of the following, and that their structure/formatting mirrors other related examples in the project:
  - [ ] `examples` directory
  - [ ] `src` directory with an `index.tsx` entry file
  - [ ] At least one example file per feature introduced by the new package
  - [ ] Base styles in a `style.css` file (if needed by the new package)

repository: reach/reach-ui

gha_language: TypeScript

repo_name: reach/reach-ui


text:
# STAG-CNS
An Order-Aware Conserved Non-coding Sequences (CNS) Discovery Tool For Arbitrary Numbers of Species

# Compile the Program
g++ -o stagCNS stagCNS.cpp -std=c++11

# Input
The first n ( n = number of sequences) lines contain some additional information about the genes. It contains seven fields separated by space. The fields are gene name, chromosome ID, forward(+)/reverse(-) strand, range of 10kbp upstream, rage of 10kbp downstream respectively. Please check the sample test file (input.fasta).

# Run the program
./stagCNS -file fasta_file -mem minimum_CNS_length  -out prefix_output_file   >  out.txt

Example: ./stagCNS -file  input.fasta  -mem 8   -out TEST  > out.txt

# Outputs
1. TEST_CNS_8.csv (contains CNS information)
2. TEST_MEM_1_8.csv (contains all MEMs)
3. TEST_MEM_2_8.csv (contains all MEMs without serial number)
4. TEST_LPMEM_8_csv (contains all CNSs without actual chromosome location )
5. TEST_MEM_8.html  (used for browser visualization )
6. TEST_LPMEM_8.html (used for browser visualization)
7. out.txt (contains all console outputs and error logs)

The first file contains the CNS information. The other files are used for visualization.

# Visualization
Two ways to visualiza the output

1. Using XDAT:
   Run the collowing command on command line

   java -jar xdat.jar

   It will open an window where the TEST_MEM_2_8.csv and TEST_LPMEM_8_csv  files can be uploaded (data) to see the visualizations
   (chart->parallel coordinate set).
   Don't forget to change the settings (import settings) to accept comma separated files.

2. Using browser (firefox)
 Run the following commands:

     firefox TEST_MEM_8.html

     firefox TEST_LPMEM_8.html

3. Gobe Visualization will be added


text:
# is601faq1

Introduction

HoneypotRecaptcha

 Google Recaptcha/Honeypot is a system-designed to esatblish that a computer user is human.
It is use to prevent un-authorised atempts from spams.

1. Basic Installation in PHP

Add composer: composer require google/recaptcha "~1.1"

2.Create g-reCaptcha

https://google.com/recaptcha/admin#list

Register a new site:

Add label

choose the type of recaptcha as reCAPTCHA V2

select domain Herrokuapp

click on register

3.After Registration

You will get Site key and Secret key.

4.Backend Integration

 Created controller and added secret key.

Add links to app.blade.php

https://www.google.com/recaptcha/api.js

Add Bootstrap link:"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"

Add j.query:"https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js

Add verification to form that without enter the required data and click on recaptcha you will not be able to press the register button and return to same page.

<Add verification form for reCaptcha

Added site key in register.blade.php

5.Validation

Run your application on heroku and you should be able to see the recaptcha on your register page

6.Validate user authentication

Enter your email and password and do not click on recaptcha, you should not be able to register your form.

7.Test

Run phpunit to verify the recaptcha test

create an unit test to check invalid recaptcha or user missed to click on recaptcha. According to that it give the success or failed/error. For example: if the user does not click on the recaptcha field/checkbox before click on the register button , the button will not work and navigate back to the same page as he/she has to click on the the g-reCaptcha field. And when you enter all required field along with recaptch field/checkbox you will successfully able to click on the register button and able to navihate to home page.

Created a feature test to check the recaptch "I'm not a humman" is empty or not and also check the status that it display on the register page.

8.My herokuapp

https://is601faq9.herokuapp.com/


text:
# Project 6 Openclassrooms - SnowTricks

## Parcours développeur d'application - PHP/Symfony

[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1f553232691c49d5aeebc3477a768098)](https://www.codacy.com/app/HDoumali/Project6_SnowTricks?utm_source=github.com&utm_medium=referral&utm_content=HDoumali/Project6_SnowTricks&utm_campaign=Badge_Grade)

### Context

This project was realized as part of my studies of application developer - PHP / Symfony.
Project 6 is the development of the community site "SnowTricks" using the Symfony framework.

To see the website code on github : https://github.com/HDoumali/Project6_SnowTricks.

### Installation

For the realization of the site, I used WAMP which you can download at the following address: www.wampserver.com.

Step 1 : Clone the Github repository :
- https://github.com/HDoumali/Project6_SnowTricks.git

Step 2  : Open the file app/Config/parameters and insert the following parameters :
- database_name: project6 (project 6 bu default, you can choose name for the database)
- database_user: Enter your username for access to the mysql databse ("root" by default)
- database_password: Enter your password for access to the mysql database ("root" or "null" by default)

Step 3 : Creation of the database using the following command :
- php bin/console doctrine:database:create

Step 4 : Creation of database datas with fixtures using the following command :
- php bin/console doctrine:fixtures:load

gha_language: PHP


text:
# Proxy Server

This is a Proxy Server for Node.js submitted as the [pre-work](http://courses.codepath.com/snippets/intro_to_nodejs/prework) requirement for CodePath.

Time spent: [2h]

Completed:

* [X] Required: Requests to port `8000` are echoed back with the same HTTP headers and body
* [X] Required: Requests/reponses are proxied to/from the destination server
* [X] Required: The destination server is configurable via the `--host` `--port`
* [X] Required: The destination server is configurable via the `x-destination-url` header
* [X] Required: Client requests and respones are printed to stdout
* [X] Required: The `--log` argument outputs all logs to the file specified instead of stdout

Walkthrough Gif:
[Add walkthrough.gif to the project root]

![Video Walkthrough](walkthrough.gif)

repository: agois/node-proxy

repo_name: agois/node-proxy


text:
# String Session Generator Exclusively for Bot Developers

[![Open Source? Yes!](https://badgen.net/badge/Open%20Source%20%3F/Yes%21/blue?icon=github)](https://github.com/)

[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/Naereen/StrapDown.js/blob/master/LICENSE)

## Demo (For testing and also for NooBs)

**String Session** [![Run on Repl.it](https://repl.it/badge/github/death-angel-141/String-Session-Generator)](https://HastyCornsilkRecovery.loda6969.repl.run)

**Drive Token** [![Run on Repl.it](https://repl.it/badge/github/death-angel-141/String-Session-Generator)](https://CraftySeagreenMethod.loda6969.repl.run)

## Make Your Own Session Generator

1) Create a new account in https://repl.it/

2) Create or clone files from the repository. (cloning only the ```main.py``` file would be sufficient)

3) Generate API Key and API HASH from  https://my.telegram.org, for more information visit https://core.telegram.org/api/obtaining_api_id.

4) After completing all those steps,wait until it asks for API ID and HASH,enter that. Then After That Enter Your Phone Number in International format or the Bot Token.

5) It will send an OTP in the registered telegram account associated with the phone number,enter that.

# Boom 💣 Your String Session Has Been Generated

gha_language: Python


text:
react-map-gl | Docs

React Components Suite for Mapbox GL JS.

In addition to exposing MapboxGL functionality to React apps, react-map-gl also integrates seamlessly with [deck.gl](https://uber.github.io/deck.gl).

### Installation

    npm install --save react-map-gl

* `browserify` - react-map-gl is extensively tested with `browserify` and works without configuration.

* `webpack 2` - Most of the provided react-map-gl examples use webpack 2. For a minimal example, look at the [exhibit-webpack](https://github.com/uber/react-map-gl/tree/master/examples/exhibit-webpack) folder, demonstrating a working demo using `webpack 2`.

* `create-react-app` - At this point configuration-free builds are not possible with webpack due to the way the mapbox-gl-js module is published. You will need to eject your app and add an alias to your webpack config, as shown in the exhibit-webpack.

There's many other ready-to-run [examples](https://github.com/uber/react-map-gl/blob/master/examples) you can take a look at if you need more inspiration.

### Example

```js
import {Component} from 'react';
import ReactMapGL from 'react-map-gl';

class Map extends Component {
  render() {
    return (
      <ReactMapGL
        width={400}
        height={400}
        latitude={37.7577}
        longitude={-122.4376}
        zoom={8}
        onViewportChange={(viewport) => {
          const {width, height, latitude, longitude, zoom} = viewport;
          // Optionally call `setState` and use the state to update the map.
        }}
      />
    );
  }
}
```

### About Mapbox Tokens

To show maps from a service such as Mapbox you will need to register on their website in order to retrieve an access token required by the map component, which will be used to identify you and start serving up map tiles. The service will be free until a certain level of traffic is exceeded.

There are several ways to provide a token to your app, as showcased in some of the example folders:

* Modify the source directly
* Set the `MapboxAccessToken` environment variable
* Provide it in the URL, e.g `?access_token=TOKEN`

But we would recommend using something like [dotenv](https://github.com/motdotla/dotenv) and put your key in an untracked `.env` file, that will then expose it as a `process.env` variable, with much less leaking risks.

### Redux Usage

If you're using redux, it is very easy to hook this component up to store state in the redux state tree.
The simplest way is to take all properties passed to the `onViewportChange` function property and add them
directly into the store. This state can then be passed back to the `<ReactMapGL>` component without any transformation.

You can even use the package [redux-map-gl](https://github.com/Willyham/redux-map-gl) to save you some writing.

gha_language: Ruby


text:
# PAT Token Smart Contract #

Standard Token Ethereum Smart Contracts.  Copyright © 2017 by ABDK Consulting.

**Author:** Mikhail Vladimirov<EMAIL_ADDRESS>
## How to Build ##

In order to build PAT Token Smart Contract you need the following software
to be properly installed on your system:

1. Oracle JRE 8+
2. Apache Ant 1.9.7+
3. Solidity 0.4.11+
4. Geth 1.6.5+

To build PAT Token Smart Contract, do the following:

1. Checkout sources of PAT Token Smart Contract
2. Go to the root folder of PAT Token Smart Contract sources, i.e. to the
   folder containing this `README.md` file
3. Copy `build.properties.sample` file into `build.properties` and
   edit it as necessary
4. Run the following command: `ant build`
5. After successful build, `target` directory will contain compiled contract
   as well as ABI definition files

## How to Run Tests ##

After successful build you may want to run tests via `ant test` command.

repository: Bit-Nation/Pangea-Arbitration-Token-PAT

repo_name: Bit-Nation/Pangea-Arbitration-Token-PAT


text:
# Platform Plugin

This is go package that must be used to create a platform plugin so that wio can include this at run time.
This plugin will communicate over GRPC and each platform will perform their own designed tasks.

To use this package
```golang
import "github.com/wio/platform-plugin/shared"
```

## Interface
This package defines a generic interface that each platform must use. Failing to do that will result in platform being invalid.
Interface defined is:
```golang
// Greeter is the interface that we're exposing as a plugin.
type Platform interface {
    // This will create an example project and provides executables to execute
    CreateExampleProject(*ProjectInformation) ([]ExecutableInformation, error)

    // Creates build files for the project and provides executables to execute
    BuildProject(*TargetInformation) ([]ExecutableInformation, error)

    // Creates hardware specific files and provides executables to execute
    RunProject(information *RunInformation) ([]ExecutableInformation, error)
}
```

## Things to Note
### Handle only 3 major things
Essentially each plugin will hande 3 things:
* Creating an example project
* Creating build files for the project
* Executing the project

### Command Execution
Execution of external commands is handled by wio and no external command must be called by a platform. Hence, everytime a function is called for a platform, it can return a list of executable information that can be used by wio to execute commands.

### Logs
If a plugin wants to print anything, you will have to use a provided `logger`. If you do not use it, your output will not be registered. To use logger:
```golang
import "github.com/wio/platform-plugin/output"

// Logger function
output.Info("Hi")
output.Warn("Warning")
output.Fatal("Error")
ouput.Verb("Verbose")

// Regular ouput
output.Print("No new line")
output.Println("new line")
output.Printf("Formatted line %s", "here")
```

### Platform.json
Each plugin must have a `platform.json` file. This file provides information about the plugin and essentially helps `wio` determine configurations.

```json
{
  "name": "platform-atmelavr",
  "exec": "avr"
}
```
* Make sure `exec` tag is properly set to the name of the executable

### Creating a server
Plugin is a server to wio which is a client. This means you will have to add some boiler code to make sure plugin is properly defined.
```golang
// Create a plugin to communicate
    plugin.Serve(&plugin.ServeConfig{
        HandshakeConfig: shared.Handshake,
        Plugins: map[string]plugin.Plugin{
            "platform-name": &shared.PlatformPlugin{Impl: &PlatformStruct{}},
        },

        // A non-nil value here enables gRPC serving for this plugin...
        GRPCServer: plugin.DefaultGRPCServer,
    })
```
* This must be added to your main function
* In plugins, the name of the plugin must be the same as the one defined in `platform.json`. This is because client needs to know which plugin to call.

## Example
Example of a server looks like this:
```golang
package main

import (
    "github.com/hashicorp/go-plugin"
    "plugins/shared"
    "plugins/output"
)

type AvrPlatform struct {
}

func (p *AvrPlatform) CreateExampleProject(information *shared.ProjectInformation) ([]shared.ExecutableInformation, error) {
   output.Info("Populated Example Project")
    return nil, nil
}

func (p *AvrPlatform) BuildProject(information *shared.TargetInformation) ([]shared.ExecutableInformation, error) {
    output.Info("Building the project")
    output.Info("Platform Name: " + information.Platform)

    return []shared.ExecutableInformation{{
        CommandName: "Deep",
    }}, nil
}

func (p *AvrPlatform) RunProject(information *shared.RunInformation) ([]shared.ExecutableInformation, error) {
    output.Info("Running the project")
    return []shared.ExecutableInformation{{
        CommandName: "Deep",
    }}, nil
}

func main() {
    output.Info("Plugin Started")

    // Create a plugin to communicate
    plugin.Serve(&plugin.ServeConfig{
        HandshakeConfig: shared.Handshake,
        Plugins: map[string]plugin.Plugin{
            "platform-atmelavr": &shared.PlatformPlugin{Impl: &AvrPlatform{}},
        },

        // A non-nil value here enables gRPC serving for this plugin...
        GRPCServer: plugin.DefaultGRPCServer,
    })
}

```

For a detailed example, check [tests directory](https://github.com/wio/platform-plugin/tree/master/tests/)

repository: wio/platform-plugin

repo_name: wio/platform-plugin


text:
# lita-answers

A Lita handler for a question answering (QA) system. Allows you to use CRUD operations.
More functionality is coming soon...

## Installation

Add lita-answers to your Lita instance's Gemfile:

``` ruby
gem "lita-answers"
```

## Usage

You could perform simple CRUD operations:
*CREATE* `remember 'question?' with 'answer.'`
*READ* `all questions`
*READ* `answer 'question?'`
*UPDATE* `change 'question?' to 'new answer.'`
*DELETE* `forget 'question?'`

## License

[MIT](http://opensource.org/licenses/MIT)

repository: shevipang/lita-answers

repo_name: shevipang/lita-answers


text:
# Description
It is a memory management system using “binary buddies” strategy.
This program includes two files “memory_manager.c” and “memory_manager.h”. I also provided a test program “Test.c” for debug and to test how is it works. A makefile for compiler is also provided.

This program has following functions:

### int start memory( int size )
This function will initialize a memory space with “size” bytes. The memory space includes a header and the available free space. The header storages the information of the free space. As we using binary buddies, the available free space will be size of (2^i). To keep this size, there may some space be wasted.

For example, if the user allocates a memory space with 3000 bytes:

![start_memory](http://i.v2ex.co/8r3SPtn7.png)

### void *get memory( int size )
To allocate a memory partition with “size” bytes in it. Each memory partition has a header to storage the memory information, so the actual size of memory partition is (2^i) that includes “user required size” + “header size”.

![get_memory](http://i.v2ex.co/0E8dQ6pA.png)

### void release memory( void *p )
To release memory partition referenced by pointer “p” back to free space and combine the free space partitions if possible (with binary buddies rule).

### void *grow memory( int size, void *p )
First, the program will find the memory partition with the pointer “p”. Then, the program will backup current memory status. After that, the memory partition will be released and the program will try to find a new place for the partition with the new size. If the program finds a suitable space, it will copy the memory content to the new space. Otherwise, it will recover the old memory status from the backup.

### void *pregrow memory( int size, void *p )
Similar with the grow_memory(). But any extra space is allocated at the front of the partition.

### void end memory( void )
Release the memory space and then exit the program.

# Test Case
I provided a test program to show how this memory manager program works. In each step, this program will show the memory status graphically.
## Usage:
function: command

get_memory: add <size>

grow_memory: grow <new size> <pointer>

pregrow_memory: pregrow <new size> <pointer>

release_memory: release <pointer>

end_memory: end

# License
This program is released under the MIT License
http://opensource.org/licenses/MIT


text:
Twitter Downloader Brick
==================
This brick can be used to download data from twitter accounts. Currently only entities are account and tweet.

## Description

This part of documentation is covering only the Twitter downloader. The overall information about the connectors structure can be found in connectors metadata gem documentation [link](https://github.com/gooddata/gooddata_connectors_metadata/tree/bds_implementation).

## Deployment

The deployment on Ruby Executor infrastructure can be done manually.

### Manual deployment

1. Pack the app store folder apps/twitter_downloader_brick. The zip should contain only files, not the directory itself.
2. Deploy the ZIP on the gooddata platform by Data Admin Console [link] (https://secure.gooddata.com/admin/disc/)
3. Create the schedule and put mandatory configuration options to schedule parameters. Mandatory parameters are specified in info.json file.
4. Run the schedule

## How it works

The Twitter downloader scan accounts you specify in configuration. As main configuration is used remote file(see twitter_accounts_file).  After logging of necessary details regarding your account, it starts to gather information about accounts and tweets created from this accounts.
All the information regarding user and tweets are gathered through getters of objects.

## Configuration

This section is containing information about the Twitter downloader section of the configuration.json file.

## Entity configuration

There are some special configurations possible for the Twitter downloader on entity level. The example entity configuration can look like this:

### Example

    "account": {
      "global": {
          "collection": "account",
          "prefix": "account",
          "custom": {
              "hub": [
                  "id"
                ]
            },
          fields:[
            {
              "id": "screen_name",
              "name": "screen_name",
              "type": "string-32",
              "object":"user"
            },
            {
              "id": "date",
              "name": "date",
              "type": "string-32",
              "command": "now"
            }
          ]
      }
    }

## Twitter configuration

Configuration consists of 4 parts.

entities - part you specify entities you want to download.
         - fields are differentiated by object/command attribute
            -object attribute is using 'id' attribute of object 'user'
            -command is custom field
                - possible values
                    -now => returns current date YYYY/MM/DD
                    -now+n => returns future or past date depending on n
                    -'xyz' => returns 'xyz'
credentials - part you specify twitter credentials to twitter account used to scan other twitter accounts.
twitter_accounts - accounts you want to scan and tweet to download considering date options

### Example

    "twitter": {
            "entities": [
                "account",
                "tweet"
            ],
            "credentials": {
                "consumer_key": "",
                "consumer_secret": "",
                "access_token": "",
                "access_token_secret": ""
            },
            "twitter_accounts_file": "twitter_accounts.csv",
            "twitter_accounts": [
                {
                    "id": "JeremyClarkson",
                    "date_from": "2016/07/01"
                },
                {
                    "id": "ClashofClans",
                    "date_from": "2016/07/01"
                },
                {
                    "id": "RichardHammond",
                    "date_from": "2016/07/01"
                }
            ]
        }