text:
# Google Login

Login with Google allows users to login to any web app with their Google account.

 Navigate to APIs & Services, then Credentials. Add `http://localhost:8080/google/callback` as a valid OAuth2 Redirect URL.

## Example App

[main.go](main.go) shows an example web app that issues a client-side session cookie. Pass the client id and secret as arguments or set the `GOOGLE_CLIENT_ID` and `GOOGLE_CLIENT_SECRET` environment variables.

```
go run main.go -client-id=xx -client-secret=yy
2015/09/25 23:09:13 Starting Server listening on localhost:8080
```

Here's what the flow looks like.

### Authorization Flow

1. The "Login with Google" link to the login handler directs the user to the Google OAuth2 Auth URL to obtain a permission grant.
2. The redirection URI (callback handler) receives the OAuth2 callback, verifies the state parameter, and obtains a Token.
3. The success `http.Handler` is called with a `Context` which contains the Google Token and verified Google Userinfoplus struct.
4. In this example, that User is read and used to issue a signed cookie session.

repository: dghubble/gologin

gha_language: Go

repo_name: dghubble/gologin


text:
[![](https://travis-ci.org/Lucas-C/pre-commit-hooks-safety.svg?branch=master)](https://travis-ci.org/Lucas-C/pre-commit-hooks-safety)

A [pre-commit](http://pre-commit.com) hook to check your Python dependencies against [safety-db](//github.com/pyupio/safety-db).

It checks all files containing `requirements` in their name in the repo.

## Usage
```
-   repo: https://github.com/Lucas-C/pre-commit-hooks-safety
    sha: v1.1.3
    hooks:
    -   id: python-safety-dependencies-check
```

## Alternative local hook
You'll need to `pip install safety` beforehand:
```
-   repo: local
    hooks:
    -   id: python-safety-dependencies-check
        entry: safety
        args: [check, --full-report]
        language: system
        files: requirements
```

## Development

### Setup

    pip install -r dev-requirements.txt
    pre-commit install

### Releasing

1. Bump version in this file, `setup.py` & `.pre-commit-config.yaml`
2. `git commit -nam "Release $version" && git push && git tag $version && git push --tags`

license: MIT

repository: Julian/pre-commit-hooks-safety

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: Julian/pre-commit-hooks-safety


text:
# <%=$PLASTER_PARAM_ModuleName%>

<%=$PLASTER_PARAM_ModuleName%> is a PowerShell module that needs a description.

This project adheres to the Contributor Covenant [code of conduct](https://github.com/<%=$PLASTER_PARAM_GitUserName%>/<%=$PLASTER_PARAM_ModuleName%>/tree/master/docs/CODE_OF_CONDUCT.md).
By participating, you are expected to uphold this code. Please report unacceptable behavior to <%=$PLASTER_PARAM_Email%>.

## Features

- Downloadable!

## Documentation

Check out our **[documentation](https://github.com/<%=$PLASTER_PARAM_GitUserName%>/<%=$PLASTER_PARAM_ModuleName%>/tree/master/docs/<%=$PSCulture%>/<%=$PLASTER_PARAM_ModuleName%>.md)** for information about how to use this project.

## Installation

### Gallery

```powershell
Install-Module <%=$PLASTER_PARAM_ModuleName%> -Scope CurrentUser
```

### Source

```powershell
git clone 'https://github.com/<%=$PLASTER_PARAM_GitUserName%>/<%=$PLASTER_PARAM_ModuleName%>.git'
Set-Location .\<%=$PLASTER_PARAM_ModuleName%>
Invoke-Build
```

## Usage

### First example

```powershell
Import-Module .\bin\<%=$PLASTER_PARAM_ModuleName%>
```

Imports <%=$PLASTER_PARAM_ModuleName%> into the current session.

## Contributions Welcome!

We would love to incorporate community contributions into this project.  If you would like to
contribute code, documentation, tests, or bug reports, please read our [Contribution Guide](https://github.com/<%=$PLASTER_PARAM_GitUserName%>/<%=$PLASTER_PARAM_ModuleName%>/tree/master/docs/CONTRIBUTING.md) to learn more.

repository: bjarkirafn/JaDevPS

repo_name: bjarkirafn/JaDevPS


text:
.. meta::
   :description: Documentation on how to deploy Konfuzio on premises using Kubernetes and Helm.

# On-Premises Documentation

The recommended way to operate a production-ready and scalabe Konfuzio installation is via Kubernetes. An alternative and more light-weight deployment option is the [Single VM setup](/web/on_premises.html#alternative-deployment-options).

## Kubernetes

### Required tools

Before deploying Konfuzio to your Kubernetes cluster, there are some tools you must have installed locally.

#### kubectl

kubectl is the tool that talks to the Kubernetes API.kubectl 1.15 or higher is required and it needs to be compatible
with your cluster ([+/-1 minor release from your cluster](https://kubernetes.io/docs/tasks/tools/#before-you-begin)).

[> Install kubectl locally by following the Kubernetes documentation](https://kubernetes.io/docs/tasks/tools/#install-kubectl).

The server version of kubectl cannot be obtained until we connect to a cluster. Proceed
with setting up Helm.

#### Helm

Helm is the package manager for Kubernetes. Konfuzio is tested and supported with Helm v3.

##### Getting Helm

You can get Helm from the project's [releases page](https://github.com/helm/helm/releases), or follow other options
under the official documentation of [installing Helm](https://helm.sh/docs/intro/install/).

###### Connect to a local Minikube cluster

For test purposes you can use `minikube` as your local cluster. If `kubectl cluster-info`
is not showing `minikube` as the current cluster, use `kubectl config set-cluster
minikube` to set the active cluster. For clusters in production please visit the [Kubernetes
Documentation](https://kubernetes.io/docs/setup/production-environment/).

##### Initializing Helm

If Helm v3 is being used, there no longer is an `init` sub command and the command is
ready to be used once it is installed. Otherwise please upgrade Helm.

#### Next steps

Once kubectl and Helm are configured, you can continue to configuring your Kubernetes
cluster.

### Deployment

Before running `helm install`, you need to make some decisions about how you will run
Konfuzio. Options can be specified using Helm's `--set option.name=value` command
line option. A complete list of command line options can be found [here](https://helm.sh/docs/helm/). This guide will
cover required values and common options.

#### Selecting configuration options

In each section collect the options that will be combined to use with `helm install`.

##### Secrets

There are some secrets that need to be created (e.g. SSH keys). By default they will be
generated automatically.

##### Networking and DNS

By default, Konfuzio relies on Kubernetes `Service` objects of `type: LoadBalancer` to
expose Konfuzio services using name-based virtual servers configured with `Ingress`
objects. You'll need to specify a domain which will contain records to resolve the
domain to the appropriate IP.

`--set global.hosts.domain=example.com`

###### IPs

If you plan to use an automatic DNS registration service,you won't need any additional
configuration for Konfuzio, but you will need to deploy it to your cluster.

If you plan to manually configure your DNS records they should all point to a static IP.
For example if you choose `example.com` and you have a static IP of `<IP_ADDRESS>`, then
`konfuzio.example.com`, `registry.example.com` and `minio.example.com` (if using MinIO) should all resolve to
`<IP_ADDRESS>`.

_Include these options in your Helm install command:_

`--set global.hosts.externalIP=10.10.10.`

##### Persistence

By default the setup will create Volume Claims with the expectation that a dynamic
provisioner will create the underlying Persistent Volumes. If you would like to customize
the storageClass or manually create and assign volumes,please review the [storage
documentation](https://kubernetes.io/docs/concepts/storage/volumes/).

**Important** : After initial installation, making changes to your storage settings requires manually editing Kubernetes
objects, so it's best to plan ahead before installing your production instance of Konfuzio to avoid extra storage
migration work.

##### TLS certificates

You should be running Konfuzio using https which requiresTLS certificates. By default, the setup will install and
configure [cert-manager](https://github.com/jetstack/cert-manager) to obtain free TLS certificates. If you
have your own wildcard certificate, you already have cert-manager installed, or you have
some other way of obtaining TLS certificates. For the default configuration, you must
specify an email address to register your TLS certificates.

_Include these options in your Helm install command:_

`--set<EMAIL_ADDRESS>
##### PostgreSQL

By default this Konfuzio provides an in-cluster PostgreSQL database, for trial purposes
only.

**NOTE: This configuration is not recommended for use in production.**

- A single, non-resilient Deployment is used

You can read more about setting up your production-readydatabase in the PostgreSQL
documentation. As soon you have an external PostgreSQLdatabase ready, Konfuzio can
be configured to use it as shown below.

_Include these options in your Helm install command:_

`--set postgresql.install=false`
`--set global.psql.host=production.postgress.hostname.local`
`--set global.psql.password.secret=kubernetes_secret_name`
`--set global.psql.password.key=key_that_contains_postgres_password`

##### Redis

All the Redis configuration settings are configured automatically.

##### Persistent Volume

Konfuzio relies on object storage for highly-available persistent data in Kubernetes. By default, Konfuzio uses a
[persistent volume](https://kubernetes.io/docs/concepts/storage/persistent-volumes/) within the cluster.

##### Outgoing email

By default outgoing email is disabled. To enable it,provide details for your SMTP server
using the `global.smtp` and `global.email` settings. You can find details for these
settings in the command line options.

`--set global.smtp.address=smtp.example.com:587`
`--set global.smtp.AuthUser=username-here`
`--set global.smtp.AuthPass=password-here`

##### CPU, GPU and RAM Resource Requirements

The resource requests, and number of replicas for the Konfuzio components in this
setup are set by default to be adequate for a small production deployment. This is
intended to fit in a cluster with at least 16 vCPU with AVX2 support enabled, 32 GB of
RAM and one Nvidia GPU which supports at least CUDA10.1 and CUDNN 7.0. If you are
trying to deploy a non-production instance, you can reduce the defaults in order to fit
into a smaller cluster. Konfuzio can work withoutGPU, however runtime for extraction
and training of medium to large dataset will be significantly slower.

#### Deploy using Helm

Once you have all of your configuration options collected, we can get any dependencies
and run Helm. In this example, we've named our Helm release `konfuzio`.

`helm repo add konfuzio`
`helm repo update`
`helm upgrade --install konfuzio konfuzio/server \`
`--timeout 600s \`
`--set global.hosts.domain=example.com \`
`--set global.hosts.externalIP=<IP_ADDRESS> \`
`--set<EMAIL_ADDRESS>

You can also use `--version <installation version>` option if you would like to install
a specific version of Konfuzio. This will output the list of resources installed once the
deployment finishes which may take 5-10 minutes.

#### Monitoring the Deployment

The status of the deployment can be checked by running `helm status konfuzio` which
can also be done while the deployment is taking place if you run the command in
another terminal.

#### Initial login

You can access the Konfuzio instance by visiting the domain specified during
installation. If you manually created the secret for initial root password, you can use that
to sign in as `root` user. If not, Konfuzio would've automatically created a random
password for `root` user. This can be extracted by the following command (replace
`<name>` by name of the release - which is `konfuzio` if you used the command above).

`kubectl get secret <name>-konfuzio-initial-root-password`
`-ojsonpath='{.data.password}' | base64 --decode ; echo`

### Upgrade

Before upgrading your Konfuzio installation, you need to check the [changelog](./changelog_app.html)
corresponding to the specific release you want to upgrade to and look for any that might
pertain to the new version.

We also recommend that you take a backup first.

Upgrade Konfuzio following our standard procedure,with the following additions of:

1. Check the change log for the specific version you would like to upgrade to
2. Ensure that you have created a [PostgreSQL backup](https://www.postgresql.org/docs/11/backup.html) in the previous
   step. Without a backup, Konfuzio data might be lost if the upgrade fails.
3. Go through deployment section step by step
4. Extract your previous `--set` arguments with (see Action1)
5. Decide on all the values you need to set
6. Perform the upgrade, with all `--set` arguments extracted(see Action 2)
7. We will perform the migrations for the Database forPostgreSQL automatically.

_Action 1_

`helm get values konfuzio > konfuzio.yaml`

_Action 2_

`helm upgrade kofuzio \`
`--version <new version> \`
`-f konfuzio.yaml \`
`--set konfuzio.migrations.enabled=true \`
`--set ...`

## Alternative deployment options

### Single VM setup

Konfuzio can be configured to run on a single virtual machine, without relying on
Kubernetes. In this scenario, all necessary containers are started manually or with a
container orchestration tool of your choice.

We recommend a virtual machine with a minimum of 12vCPU (incl. AVX2 support) and
64GB of RAM and an installed Docker runtime. A NvidiaGPU is recommended but not
required. In this setup Konfuzio is running in the context of the Docker executor,
therefore there are no strict requirements for theVMs operating systems. However, we
recommend a Linux VM with Debian, Ubuntu, CentOS,or Redhat Linux.

The Konfuzio docker image can be downloaded via “docker pull”. We will provide you
with the credentials. This action requires an internet connection.

`> docker login registry.gitlab.com`
`> docker pull registry.gitlab.com/konfuzio/text-annotation/master:latest`

The internet connection can be turned off once the setup is complete. In case there is
no internet connection available during setup, the container must be transferred with an
alternative method as a file to the virtual machine.

Once you have configured your deployment configuration file, Konfuzio can be started
by passing these settings as environment variables.

`> docker run --env-file <local_path_to your_deployment_config>`
`registry.gitlab.com/konfuzio/text-annotation/master:latest`

We will support you in defining reasonable deploymentsettings for your scenario.

### Custom AI model training via CI pipelines

Konfuzio uses CI pipelines to allow users to run customAI model code securely. In case
the Kubernetes deployment option is not used, we recommend a dedicated virtual
machine to run these pipelines. The selected CI application needs to support Docker
and webhooks. The CI application needs network access to the Konfuzio installation.


text:
### [CVE-2017-7281](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-7281)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

An issue was discovered in Unitrends Enterprise Backup before 9.1.2. A lack of sanitization of user input in the createReportName and saveReport functions in recoveryconsole/bpl/reports.php allows for an authenticated user to create a randomly named file on disk with a user-controlled extension, contents, and path, leading to remote code execution, aka Unrestricted File Upload.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/ARPSyndicate/cvemon
- https://github.com/H4cksploit/CVEs-master
- https://github.com/RhinoSecurityLabs/CVEs
- https://github.com/lnick2023/nicenice
- https://github.com/merlinepedra/RHINOECURITY-CVEs
- https://github.com/merlinepedra25/RHINOSECURITY-CVEs
- https://github.com/qazbnm456/awesome-cve-poc
- https://github.com/sunzu94/AWS-CVEs
- https://github.com/xbl3/awesome-cve-poc_qazbnm456

repository: trickest/cve

branch_name: refs/heads/main

gha_language: HTML

gha_license_id: MIT

repo_name: trickest/cve


text:
# How to contribute

We definitely welcome feedback and contribution to Google API Core Tools! Here
is some guideline and information about how to do so.

## Legal requirements

In order to protect both you and ourselves, you will need to sign the
[Contributor License Agreement](https://cla.developers.google.com/clas).

### Contributing code
If you have improvements to Google API Core Tool, send us your pull requests!
For those just getting started, Github has a [howto](https://help.github.com/articles/using-pull-requests/).

repository: bjwatson/api-compiler

repo_name: bjwatson/api-compiler


text:
# Direction

Represents a cardinal direction (north, south, east, west) and (up and down).

## Diese Klasse importieren

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
```zenscript
import crafttweaker.api.util.Direction;
```

## Extending Enum<Direction>

Direction extends Enum<[Direction](/vanilla/api/util/Direction)>. That means all methods available in Enum<[Direction](/vanilla/api/util/Direction)> are also available in Direction

## Properties

| Name  | Type                                       | Has Getter | Has Setter |
| ----- | ------------------------------------------ | ---------- | ---------- |
| sides | [Direction](/vanilla/api/util/Direction)[] | true       | false      |
## Methoden

### rotateY

Rotates this direction on the Y axis

Return Type: [Direction](/vanilla/api/util/Direction)

```zenscript
Direction.rotateY() as Direction
<direction:north>.rotateY();
```

### rotateYCCW

Rotates this direction counter-clock wise on the Y axis

Return Type: [Direction](/vanilla/api/util/Direction)

```zenscript
Direction.rotateYCCW() as Direction
<direction:north>.rotateYCCW();
```

## Properties

| Name            | Type                                             | Has Getter | Has Setter |
| --------------- | ------------------------------------------------ | ---------- | ---------- |
| axis            | [DirectionAxis](/vanilla/api/util/DirectionAxis) | true       | false      |
| axisOffset      | int                                              | true       | false      |
| horizontalAngle | float                                            | true       | false      |
| horizontalIndex | int                                              | true       | false      |
| index           | int                                              | true       | false      |
| name            | string                                           | true       | false      |
| opposite        | [Direction](/vanilla/api/util/Direction)         | true       | false      |
| xOffset         | int                                              | true       | false      |
| yOffset         | int                                              | true       | false      |
| zOffset         | int                                              | true       | false      |

repository: noobanidus/CraftTweaker-Documentation

gha_language: CSS

repo_name: noobanidus/CraftTweaker-Documentation


text:
# Canvas-Link-Validator-Runner

## Description
This tool can take a course id or an account id and returns a CSV report with the number of broken links for a single course or an account full of courses.

## Links to Other Docs

- [Project Capture](./docs/ProjectCaptureDoc.md)
- [Key Components](./docs/KeyComponentsDoc.md)

## SetUp / How to Install

Install as a global tool.  No additional set up necessary.

## Important Notes

None.

## How to Use

### API (require as a module)

To use the core logic ```require('canvas-link-validator-runner')```

This will return a method that accepts the following parameters: ```courseId, boundaryDate, courseName```

Here is an example:

Require the validator
```
const linkValidator = require('canvas-link-validator-runner');
```

Use the link validator function. The link validator function takes 3 parameters.

- ```courseId``` - the courseId of the course you will be getting the broken links from. This will be an integer.
- ```boundaryDate``` - the date which is used to check if we should run the validator again, or if we should just get the results from the last validator. If the date of the boundaryDate is after the date of when the validator was last run for that course (we check the json object, *updated_at* key), then we will run the validator again. This will be a moment.js date.
- ```courseObject``` - any object that contains keys *courseObject.name* (string) for the course name and *courseObject.course_code* (string) for the course code. This is an optional parameter, but providing it will mean 1 less api call to get this information.

```
linkValidator(courseId, boundaryDate[, courseObject])
```

### Command Line

There are two commands that can be run: ```check-links-account``` and ```check-links-course```

#### check-links-account

```
check-links-account <subAccountId>
```

This command will check all the links in each course in an account. A question is asked to see if the user would like to include all subaccounts to that account or not.
A second question is asked to know how up to date you would like the report to be. (The last update could be within a week, 2 weeks, a month or you could opt to regenerate the report on the spot by selecting 'Now').

#### check-links-course

```
check-links-course <courseId>
```

This command will check all the links in only one course.
A question is asked to know how up to date you would like the report to be. (The last update could be within a week, 2 weeks, a month or you could opt to regenerate the report on the spot by selecting 'Now').

gha_language: JavaScript


text:
---
layout: post
title: "Scalable full screen background image"
date: 2010-04-28 07:52:00
comments: true
categories: Design
author: Glenn Roberts
avatar: /images/avatars/glenn.jpg
image: /images/artwork/notebook.jpg
headline: Were you trying to find a solution about applying one large and scalable background on a website? It can be a tough choice especially since one of the alternatives is Flash and anyone who appreciates usability and web standards will probably resent that very thought.
---
Recently I worked on a website for a [branding agency](http://freezing-light-25.heroku.com/) that required a bit more avant-garde design with a large background image that could resize according to the browser’s window size and resolution. My research showed that most of the non-flash websites were done by JavaScript, but there was something else that caught my attention – a solution done with straight HTML, CSS and guess what – tables! Yeah, I know, the old arch-nemesis of web design. We almost started forgetting they existed, but they pop-up from time to time, reminding us of the good old days of poorly designed websites. And yet it was a solution so simple it’s almost creative and I was urged to try it out.

The whole trick is to create a single cell table, and apply few styles to make the magic work.

Note: I will use HAML and SASS for the code. Read here if you want to learn more about it: [http://haml-lang.com/](http://haml-lang.com/).

{% codeblock lang:haml %}
#bg
  #bg_wrapper
    %table{ :cellspacing => "0", :cellpadding => "0" }
      %tbody
        %tr
          %td
            %img#background{ :src => "images/index.jpg" }
{% endcodeblock %}

So it’s just a simple table with an image nested inside. Now the magic comes with combining CSS, or in this case SASS:

{% codeblock lang:sass %}
body
  width: 100%
  height: 100%
  overflow: hidden
#bg, table, td
  #content
    width: 100%
    height: 100%
    overflow: hidden
  #bg_wrapper
    width: 200%
    left: -50%
    position: absolute
    top: -50%
    height: 200%
  td
    text-align: center
    vertical-align: middle
  #bg img
    margin: 0 auto
    min-height: 50%
    min-width: 50%
{% endcodeblock %}

After this you can continue styling the rest of the page with straight CSS without worrying about the background. Leave the table as it is and nest the rest of your DIV’s straight in the body.

repository: siyelo/blog

extension: markdown

repo_name: siyelo/blog


text:
# Quad Blog

Fourth iteration of my blog.

Some technologies used are: React, Fluxible, Koa, Webpack, Babel, and PostgreSQL.

## Dependencies

Must have PostgreSQL, iojs, and npm intalled.

The repo has been tested with the following versions:

* PostgreSQL v9.4.0
* iojs v2.3.1
* npm v2.11.3

Once the above dependencies are met, install project dependencies by cloning the repo and running `npm install`.

## Environments

Available environments are `development`, `production`, and `test`. Default is `development`.

Environment may be changed by setting `NODE_ENV`.

In order to generate a complete production build, run tasks and scripts with `NODE_ENV=production`.

## Tasks

Defined in `package.json`. Run tasks using `npm run [name]`.

* **clean** Erase `public` and `build` folder
* **build** Create production build for client and then for the server
* **build:client** Production build for the client
* **build:server** Production build for the server
* **db:create** Create database for environment
* **db:drop** Drop database for environment
* **db:migrate** Run database migrations for environment
* **dev** Start development environment
* **dev:client** Run webpack-dev-server to track client-side code
* **dev:server** Run webpack on server and watch output file with nodemon

## Scripts

Located in `scripts` folder. Run scripts by typing `./scripts/[script]`.

* **download-repo.js** Download repo to the output folder
* **update-posts.js** Update database with output folder posts
* **refresh-posts.js** Download the repo and update the database

**NOTE:** If unable to run the above scripts, try `iojs -r babel/register [script]`.

## Development

0.

repository: cesarandreu/quad-blog

repo_name: cesarandreu/quad-blog


text:
---
layout: default
---

# 1994-06-22 - Re: Unofficial Release

## Header Data

From: "Perry E. Metzger"<EMAIL_ADDRESS>To<EMAIL_ADDRESS>(Tom Rollins)

Message Hash: 09e3155483322830bafd1c1ea56eb3dd93019c9b22e08bfd61b0e8c785df272e

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1994-06-22 18:16:33 UTC

Raw Date: Wed, 22 Jun 94 11:16:33 PDT

## Raw message

```
{% raw  %}From: "Perry E. Metzger"<EMAIL_ADDRESS>Date: Wed, 22 Jun 94 11:16:33 PDT
To<EMAIL_ADDRESS>(Tom Rollins)
Subject: Re: Unofficial Release
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Tom Rollins says:
> I don't need an 8000 bit key, but, I don't want the pgp-key-server
> barfing on a 4096 bit key that I feel I need.
> How can you put a price on someones life. You don't know
> there situation. (think about OJ and fooling around with his wife)

Yup, you have it on me. I guess it is important to lower the
possibility of someone cracking your key by brute force from lower
than the odds that all the oxygen atoms in the room you are in will
spontaneously end up on the wrong side of the room to lower than the
odds that all the oxygen atoms in the world will end up on the wrong
side of the planet. After all, we are fooling with lives. Yup. That
infinitessimal safety margin is important. After all, someone who's
got billions of dollars to spend is very likely to waste it on doing
nothing but cracking your key -- listening in on your computer's
electromagnetic emissions, tapping your keyboard, or beating you up
would all be too complicated when there is an infinitesimal chance
that billions of dollars could crack your key directly.

> Tim May says:
> >If this was tongue in cheek, I missed it. Nobody in their right mind
> >will try a brute force attack on a 1024-bit key, let alone a 1200- or
> >2000-bit key. Unless there are flaws in PGP and/or RSA we haven't
> >heard about.
>
> So you or I won't try the crack. But then there are all those people who
> are being paid from tax dollars to do nothing else but crack.

And you know, who knows? Maybe they are in fact concealing more
computers than you could build with all the silicon in the solar
system in Fort Meade. Those feds, they are superhuman, you know?

Jeesh.

Perry

{% endraw %}
```

## Thread

+ Return to [June 1994](/archive/1994/06)

+ Return to<EMAIL_ADDRESS>(Russell Nelson)](/authors/nelson_at_crynwr_com_russell_nelson_)"
+ Return to "["Perry E. Metzger" <perry@imsi.com>](/authors/perry_e_metzger_perry_at_imsi_com_)"
+ Return to "[Roger Bryner <bryner@atlas.chem.utah.edu>](/authors/roger_bryner_bryner_at_atlas_chem_utah_edu_)"
+ Return to<EMAIL_ADDRESS>(Tom Rollins)](/authors/trollins_at_debbie_telos_com_tom_rollins_)"

+ 1994-06-22 (Wed, 22 Jun 94 10:54:57 PDT) - [Re: Unofficial Release](/archive/1994/06/f8450cd6152760cb30f25880b9c7edd2fa175603e77d192c1e327095fd226349) -<EMAIL_ADDRESS>(Tom Rollins)_
  + 1994-06-22 (Wed, 22 Jun 94 11:16:33 PDT) - Re: Unofficial Release - _"Perry E. Metzger"<EMAIL_ADDRESS>    + 1994-06-22 (Wed, 22 Jun 94 12:12:44 PDT) - [Re: Unofficial Release](/archive/1994/06/e73d9633f988adee64af1c336e0cabf04e728951eb20c1378522fc0ff1db8539) - _Roger Bryner<EMAIL_ADDRESS>      + 1994-06-22 (Wed, 22 Jun 94 12:15:42 PDT) - [Re: Unofficial Release](/archive/1994/06/b36e85fb203e060adcc071fd47c91b176eeeeac2f74f8e1c1d32a6300e81e76c) - _"Perry E. Metzger"<EMAIL_ADDRESS>        + 1994-06-22 (Wed, 22 Jun 94 12:20:40 PDT) - [Re: Unofficial Release](/archive/1994/06/535772a7159f541ae6ad27ff39ce4c133e4ec1d3172824868391ec7fa1b2d718) - _Roger Bryner<EMAIL_ADDRESS>          + 1994-06-22 (Wed, 22 Jun 94 12:35:16 PDT) - [Re: Unofficial Release](/archive/1994/06/f38eb6fb87a327987a9724f7e55b027eafda2cc189190637f7279ae2cbbaa639) - _"Perry E. Metzger"<EMAIL_ADDRESS>          + 1994-06-22 (Wed, 22 Jun 94 12:57:06 PDT) - [Re: Unofficial Release](/archive/1994/06/99381de3b7b7ccea9b3272dc35a0ee3f23219684e1c5aa509ddeaeeeb7de1fae) -<EMAIL_ADDRESS>(Russell Nelson)_


text:
# Troubleshooting

## Sidecar injection problems

Tarian pod agent runs as sidecar container in the monitored pod, watching and validating processes and files based on the registered constraints. In some cases the sidecar is not injected successfully. This describes how to resolve it.

### Understanding how a sidecar is injected

Firstly, it is really helpful to understand how the pod-agent sidecar is injected. Kubernetes has [admission controllers](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/) which intercepts requests to the Kubernetes API server prior to persistence of the object. The mutating admission controllers may validate and modify the objects they admit.

Kubernetes provides a way to extend the admission controller via a webhook through [MutatingAdmissionWebhook](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/). The webhook is registered using [MutatingWebhookConfiguration](https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#webhook-configuration) API object. In tarian, it's installed as a part of tarian-cluster-agent.

```bash
kubectl get MutatingWebhookConfiguration

kubectl get MutatingWebhookConfiguration tarian-cluster-agent -o yaml
```

If you use default installation, the content of the webhook configuration would be:

```yaml
webhooks:
- admissionReviewVersions:
  - v1
  clientConfig:
    service:
      name: tarian-cluster-agent-controller-manager
      namespace: tarian-system
      path: /inject-pod-agent
      port: 443
  rules:
  - apiGroups:
    - ""
    apiVersions:
    - v1
    operations:
    - CREATE
    resources:
    - pods
    scope: '*'
```

This means, on every pod created the webhook controller will send a webhook request to `tarian-cluster-agent-controller-manager.tarian-system.svc`, which is served by pods from `tarian-cluster-agent-controller-manager` deployment. These pods will modify the pod's spec to include a sidecar container (pod-agent).

### Sidecar is not injected silently (no error)

Enable log-level=debug to see more verbose logs.

```bash
helm upgrade tarian-cluster-agent tarian/tarian-cluster-agent --devel -n tarian-system --set clusterAgent.log.level=debug
```

After the rollout are completed, you should see more logs in tarian-cluster-agent-controller-manager:

```bash
kubectl logs deploy/tarian-cluster-agent-controller-manager -n tarian-system -f
```

Now when a webhook request comes, a log `handling a webhook request` should show up there. If there is no such log, a webhook is not coming to the pod.
See next sections for what could cause a webhook not coming to the service.

### The admission controller cannot connect to the webhook service

The default failurePolicy in tarian-cluster-agent MutatingWebhookConfiguration is `Ignore`, which means it ignores failure and the pod will still be created without mutation (sidecar is not injected silently). While this is good to prevent issue in production, it also hides the error message that's useful for debugging.

To debug, you can temporarily edit the tarian-cluster-agent MutatingWebhookConfiguration and set the failurePolicy to `Fail` and limit the scope to a specific
namespace so that other namespaces can still work.

```bash
kubectl edit MutatingWebhookConfiguration tarian-cluster-agent
```

change to this:

```yaml
webhooks:
- failurePolicy: Fail
  namespaceSelector:
    matchExpressions:
    - key: kubernetes.io/metadata.name
      operator: In
      values: ["default"]
  rules:
  - apiGroups:
    - ""
    apiVersions:
    - v1
    operations:
    - CREATE
    resources:
    - pods
    scope: "Namespaced"
```

Now when a pod is created and the webhook failed, an error will be returned for example:

```
Error from server (InternalError): error when creating "dev/config/monitored-pod/register.yaml": Internal error occurred: failed calling webhook "tarian-cluster-agent.k8s.tarian.dev": Post "https://tarian-cluster-agent-controller-manager.tarian-system.svc:443/inject-pod-agent?timeout=10s": dial tcp <IP_ADDRESS>:443: connect: connection refused
```

Then we check why the connection is refused. Is the pod ready? Is there any network policy? Is there any firewall?

### Certificate related errors

```
Error from server (InternalError): error when creating "dev/config/monitored-pod/register.yaml": Internal error occurred: failed calling webhook "tarian-cluster-agent.k8s.tarian.dev": Post "https://tarian-cluster-agent-controller-manager.tarian-system.svc:443/inject-pod-agent?timeout=10s": x509: certificate signed by unknown authority
```

Tarian webhook server (deployment name: `tarian-cluster-agent-controller-manager`) by default manages the certificate needed by the webhook admission controller. It's configured in tarian-cluster-agent `MutatingWebhookConfiguration`, in `caBundle`. In rare condition, the `caBundle` field might not be updated yet so that the CA doesn't match with the one used by the webhook server.

If that's the case, you can try delete the pod in tarian-cluster-agent-controller-manager deployment. A new pod will be created and will try update the caBundle.


text:
# employee-tracker

## Description

This is an employee database system created using NodeJS and MySQL. This was a good exercise for me as it really solidified my knowledge of working with Node and Inquirer. I had some difficulty with the MySQL syntax and getting lists to populate into my arrays properly, but I really feel like with more practice it will become easier and simpler to grasp.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Credits](#credits)
- [License](#license)

## Installation

Copy all files to your hard drive and run "npm i" from the command line of your console or terminal. You can the run the program by typing in "node server.js". You may have to initialize the database first.

## Usage

Below is a link to a short video demonstrating functionality:

- https://drive.google.com/file/d/1IObMDRaj9Tzbk_HLdYPcuyYuDoGX-tOZ/view

## Credits

Collaborators:

- Nick Strong
- Chip Long
- Andrew Tirpok
- Zach Wahrer

Tech Used:

- MySQL
- NodeJS
- Inquirer

## License

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

Copyright (c) [2021] [TJ Courey]

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.

## Features

Database tables for employees, roles, and departments. Command line user interface.

## How to Contribute

No contribution necessary but feedback is always welcome. Feel free to contact me here or at<EMAIL_ADDRESS>

repository: TJCourey/employee-tracker

repo_name: TJCourey/employee-tracker


text:
---
layout: post
title: Using MultiGroupBy with Scalding
category: en
tags: scalding cascading hadoop bigdata
location: Nuremberg
comments: true
---

# {{ page.title }}

18 November 2014 - Nuremberg

## TL;DR

Scalding `.groupBy` and `.join` operations can be combined into single operation
using [MultiGroupBy](https://github.com/LiveRamp/cascading_ext#multigroupby)
from [Cascading extension](https://github.com/LiveRamp/cascading_ext), which
improves the job performance. Scalding job example using MultiGroupBy can be
found [here][scaldingexamples].

## Introduction

Let's imagine we have two data sources. The first data contains the purchase
record of the users per time and per geographical State. This data is formatted
as following, `<user_id, timestamp, state,
purchases>`. The second data contains the user demographic information.
For this particular example, it only contains user age, `<user_id, age>`

The main goal of this map reduce job is to count the number of purchases per
state and per age group.

In Scalding we can implement this job as,

{% highlight scala %}
class MultiGroupByExample1(args: Args) extends Job(args) {
  // ...

  val Purchases =
    Tsv(purchasesPath, ('USERID, 'TIMESTAMP, 'STATE, 'PURCHASE))
    .read

  val UserAges =
    Tsv(userAgesPath, ('USERID, 'AGE))
    .read

  val MyJob = Purchases
    .groupBy('USERID, 'STATE) { _.size('COUNT) }
    .joinWithSmaller('USERID -> 'USERID, UserAges)
    .groupBy('STATE, 'AGE) { _.sum[Int]('COUNT) }
    .write(Tsv(outputPath))
}
{% endhighlight %}

This is elegant and concise solution however it is not very efficient.

## The Problem

In Scalding each `.groupBy` and `.join` operation introduces another map reduce
phase.  That is with the code above, data will be shuffled, sorted and reduced
three times before finishing the computation. Therefore, when there are very
big data to be processed, the overall job performance
will be very inefficient.

Luckily we can do better!

## MultiGroupBy Operation

The desired solution is to perform aggregation operations while joining two data
sources. Fortunately, it can be achieved using **MultiGroupBy** operation. In
the rest of this blog I will show how to use MultiGroupBy in Scalding by
reducing the three steps from above job into single map reduce phase.

> Recently I was reading [tips for optimizing Cascading
flows](http://nathanmarz.com/blog/tips-for-optimizing-cascading-flows.html) and
recalled [Cascading extensions](https://github.com/LiveRamp/cascading_ext)
project which I saw several months ago.  It offers additional operations on top
of Cascading. Here I will only show MultiGroupBy (maybe BloomJoin in some other
blog post). It is great!

The API of MultiGroupBy is defined [here][cascadingext] It accepts two pipes,
two fields definitions as joining fields, renamed join field(s) and aggregation
operation. We will have to write Cascading multi buffer operation in Java, but
it is worth the effort.

The updated Scalding job will be as below,

{% highlight scala linenos %}
import com.liveramp.cascading_ext.assembly.MultiGroupBy

class MultiGroupByExample2(args: Args) extends Job(args) {
  // ...

  val MyJob =
    new MultiGroupBy(
      Array(UserAges, Purchases),
      Array(new Fields("USERID"), new Fields("USERID")),
      new Fields("USERID"),
      new MyMultiBufferOp(new Fields("STATE", "AGE", "COUNT"))
    )
    .discard('USERID)
    .write(Tsv(outputPath))
}
{% endhighlight %}

Because MultiGroupBy performs join operation, it keeps the join fields.
Therefore, on line 13 we just discard *'USERID* column.

> Please notice the smooth Scala/Scalding and Java/Cascading interop. *new
> Fields("USERID")* and *'USERID* are the same.

Next we write our multi buffer operation, **MyMultiBufferOp**.

{% highlight java linenos %}
import com.liveramp.cascading_ext.multi_group_by.MultiBuffer;
import org.apache.commons.collections.keyvalue.MultiKey;

public class MyMultiBufferOp extends MultiBuffer {
    // ...
    @Override
    public void operate() {
        // First pipe: UserAges <USERID, AGE>
        Iterator<Tuple> userAges = getArgumentsIterator(0);
        if (!userAges.hasNext()) {
            return ;
        }
        Tuple userAgesTuple = userAges.next();
        int user_age = userAgesTuple.getInteger(1); // second field is age
        // Data structure to store the count
        MultiKey key = null;
        Map<MultiKey, Integer> countMap = new HashMap<MultiKey, Integer>();
        // Second pipe: Purchases <USERID, TIMESTAMP, STATE, PURCHASES>
        Iterator<Tuple> purchases = getArgumentsIterator(1);
        while (purchases.hasNext()) {
            Tuple purchasesTuple = purchases.next();
            int state = purchasesTuple.getInteger(2); // third column is state
            key = new MultiKey(state, user_age);
            if (countMap.containsKey(key)) {
                countMap.put(key, countMap.get(key) + 1);
            } else {
                countMap.put(key, 1);
            }
        }
        // We just calculated <STATE, AGE, COUNT> results stored in 'countMap'
        // Now we just have to emit COUNT, because we gave <STATE, AGE>
        // as grouping names when calling this buffer operation
        for (Map.Entry<MultiKey, Integer> entry : countMap.entrySet()) {
            key = entry.getKey();
            int state = (Integer) key.getKey(0);
            int age = (Integer) key.getKey(1);
            int count = entry.getValue();
            emit(new Tuple(state, age, count));
        }
    }
}
{% endhighlight %}

First, we obtain tuple iterators for the two data sources. Then we keep updating
the hashmap `HashMap(<state, age>, count)` until exhausting iterators values.
Finally, we emit the hashmap contents as results for this buffer operation.

You can find the full code [here][multiscala] and [here][multijava] multi buffer
operation. In order to test the MultiGroupBy example you will have to assembly
fat jar and run it on Hadoop environment.

## Conclusion

In find this kind of patterns, join after or before groupBy, a lot in our map
reduce job chains. Using MultiGroupBy we achieved considerable performance
increase. Additionally, it resulted in efficient cluster utilization.

I strongly believe this operation should be default in both Cascading and
Scalding.

{% include tweet.html %}

[scaldingexamples]: https://github.com/morazow/ScaldingExamples/tree/master/src/main/scala/com/morazow/multigroupby
[multiscala]: https://github.com/morazow/ScaldingExamples/tree/master/src/main/scala/com/morazow/multigroupby
[multijava]: https://github.com/morazow/ScaldingExamples/tree/master/src/main/java/com/morazow/multigroupby
[cascadingext]: https://github.com/LiveRamp/cascading_ext/blob/master/src/main/java/com/liveramp/cascading_ext/assembly/MultiGroupBy.java#L35-L55


text:
# Using QARiB models

## Using ktrain
[ktrain](https://github.com/amaiya/ktrain) is a wrapper around huggingface that can be used easily to load and fine-tune BERT models. It can be used to load QARiB models. Example usage:

### Binary/multi-class classification
```bash
import ktrain
from ktrain import text
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID";
os.environ["CUDA_VISIBLE_DEVICES"]="0";
categories = ['class1', 'class2', 'class3'] #classes present in the data
MODEL = "drive/My Drive/qarib-models/ckpt-1950000" #either name of BERT model or path to BERT model

def print_evaluation(gold_labels, predicted_labels):
    ## computes overall scores (accuracy, f1, recall, precision)
    accuracy = accuracy_score(gold_labels, predicted_labels) * 100
    f1 = f1_score(gold_labels, predicted_labels, average = "macro") * 100
    recall = recall_score(gold_labels, predicted_labels, average = "macro") * 100
    precision = precision_score(gold_labels, predicted_labels, average = "macro") * 100
    a = [accuracy, precision, recall, f1]
    return a

# read train, dev and test file.
# train_X, dev_X, test_X are arrays of strings. train_y, dev_y, test_y are arrays of labels
# It's not necessary to transform labels into one hot representation or any other format
train_X, train_y = readfile("train.tsv")
dev_X, dev_y = readfile("dev.tsv")
test_X, test_y = readfile("test.tsv")

t = text.Transformer(MODEL_PATH, maxlen=55, class_names=categories)
trn = t.preprocess_train(train_X, train_y)
val = t.preprocess_test(dev_X, dev_y)

model = t.get_classifier()
learner = ktrain.get_learner(model, train_data=trn, val_data=val, batch_size=64)
# train for 3 epochs
learner.fit_onecycle(8e-5, 3)
predictor = ktrain.get_predictor(learner.model, preproc=t)
predicted_labels = clf.predict(test_input)
print_evaluation(test_labels, predicted_labels)
```
### Multi-label classification
```bash

import ktrain
from ktrain import text
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID";
os.environ["CUDA_VISIBLE_DEVICES"]="0";
categories = ['class1', 'class2', 'class3'] #classes present in the data
MODEL = "drive/My Drive/qarib-models/ckpt-1950000" #either name of BERT model or path to BERT model

def evaluate(labels, predictions):
  scores = {}
  scores['jaccard'] = jaccard_score(labels, predictions, average="samples")
  scores['f1'] = f1_score(labels, predictions, average="macro")
  all_accs = []
  for i in range(labels.shape[-1]):
    scores[f'accuracy-{i}'] = accuracy_score(labels[:, i], predictions[:, i])
    all_accs.append(scores[f'accuracy-{i}'])
  scores['accuracy'] = np.mean(np.array(all_accs))
  return scores

# read train, dev and test file.
# train_X, dev_X, test_X are arrays of strings.
# train_y, dev_y, test_y are two dimensional arrays of shape (n_samples, n_classes).
# each row contains n_classes indicator variables to represent whether a label exists or not.
train_X, train_y = readfile("train.tsv")
dev_X, dev_y = readfile("dev.tsv")
test_X, test_y = readfile("test.tsv")

t = text.Transformer(MODEL_PATH, maxlen=55, class_names=categories)
trn = t.preprocess_train(train_X, train_y)
val = t.preprocess_test(dev_X, dev_y)

model = t.get_classifier()
learner = ktrain.get_learner(model, train_data=trn, val_data=val, batch_size=64)
# train for 3 epochs
learner.fit_onecycle(8e-5, 3)
predictor = ktrain.get_predictor(learner.model, preproc=t)

# the predictor provides probability of each class being present. which then should be mapped to labels.
predicted_probas = clf.predict(test_X)
predicted_labels = []
for i in range (len(predicted_probas)):
  row = []
  for j in range (len(categories)):
      if predicted_probas[i][j][1] >= 0.5:
          row.append(1)
      else:
          row.append(0)
  predicted_labels.append(row)
predicted_labels = np.array(predicted_labels)
print(evaluate(test_labels, predicted_labels))
```

repository: rnajim/QARiB

repo_name: rnajim/QARiB


text:
# latex-template

To create a new project by using this template execute:

```bash
proj="new"
mkdir -p "${HOME}/Projects/Latex/${proj}"
cd "${HOME}/Projects/Latex/${proj}"
git init
git submodule add git@github.com:arturasl/latex-template.git latex-template
cd latex-template/scripts
./init.bash
```

This will create a new project called "new" in Projects/Latex directory and fill it with some stub files.

In order to build project install [Vagrant] and [VirtualBox]. After that you should be able to execute `make` in project root to build your project.

# Automatic pdf generation

This template will automatically generate `pdf` files from various formats and allow to easily import them to your project.

## [DIA]

Place all your `*.dia` files in `dia` directory. They will be accesable in `LaTeX` by macro:

```latex
\includeobj{dia:yourfile}
```

## [Graphviz]

Place all your `*.dot` files in `dot` directory. They will be accessible in `LaTeX` by macro:

```latex
\includeobj{dot:yourfile}
```

`*.dot` files may include command which will be used for converting individual `*.dot` files.
Place such command on the first line of file as a comment:

```dot
//cmd: neato
digraph G{
  A -> B
}
```

## [Inkscape]

Same as [Dia], but use [Inkspace].

## PNG

Same as [Dia], but use `png` image format.

## [gnuplot]

This template allows to easily create [gnuplot] line plots.
In order to do that put `*.csv` files of form:

```csv
X axis label,Y axis label,additional parameters to `pdfcairo` terminal if any
Line 1 label,Line 2 label,...,Line n label
x val 1,line 1 y(x1), line 2 y(x1), ... line n y(x1)
x val 2,line 1 y(x2), line 2 y(x2), ... line n y(x2)
...
x val m,line 1 y(xm), line 2 y(xm), ... line n y(xm)
```

to `gpline` directory and add this macro to your `LaTeX` file:

```latex
\includeobj{gpline:yourfile}
```

## Code

Insert highlighted code by adding code files to `pseudocode` directory and putting comment to them, indicating which formater to use.
For example:

```sql
-- sqlcode
select * from my table
```

to include generated `pdf` file to `LaTeX` use:

```latex
\includeobj{pseudocode:yourfile}
```

[Vagrant]: http://www.vagrantup.com/
[VirtualBox]: https://www.virtualbox.org/
[Dia]: https://wiki.gnome.org/Apps/Dia/
[Graphviz]: http://graphviz.org/
[Inkscape]: http://inkscape.org/
[gnuplot]: http://www.gnuplot.info/

repository: arturasl/latex-template

repo_name: arturasl/latex-template


text:
---
title: "Supercharging Your Terminal [Updated 16/03/2023]"
date: 2018-12-25T08:58:00Z
draft: false
tags:
  - shell
  - zsh
---
Merry Christmas everyone 🎅🏻🎄

For today's blog post, I am re-publishing an article I originally wrote for my company blog on 7th May 2017.

---

In all likelihood, since I started using a Mac, I have been using the stock Terminal with the **Pro** theme. This has mostly suited me well, but there are a handful of things I always thought could be improved.

Inspired by a [blog post](https://medium.com/salesforce-ux/iterm2-with-zsh-shell-5944ee0502ac) and colleague at work who recently showed me their shell, reignited my interested in updating my setup. This article is the result of the steps I used to set up my terminal.

- Install the excellent [iTerm2](http://www.iterm2.com) which brings some nifty features.

- On newer versions of macOS, simply update the version of `zsh` by:
```bash
brew install zsh zsh-completions
```

- On older versions of macOS (before Catalina I believe), setup `zsh` as default shell. Snipped from the [setup instructions](https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH):
```bash
brew install zsh zsh-completions
echo "/usr/local/bin/zsh" >> /etc/shells
chsh -s $(which zsh)
```

- Install [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh#via-curl):
```bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
```

- Download and Install [Powerline Fonts](https://github.com/powerline/fonts):
```bash
git clone git@github.com:powerline/fonts.git
./install.sh
```

- Change font used in iTerm2 to **Roboto Mono Light for Powerline**

- Edited my `~/.zsh` file:
  - Change `ZSH_THEME` from 'robbyrussell' to '[agnoster](https://github.com/agnoster/agnoster-zsh-theme)'
 - Add `DEFAULT_USER="<your username>"` to stop seeing **user@host**
 - Update the plugins so `plugins=(git git-flow git-extras web-search)`

- Changed colour present in iTerm2 to '[Darkside](https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Darkside.itermcolors)'

---

Once all this is done, this is what your shell should look like:

![Supercharged Terminal](supercharged-terminal.00098f4453b2b35616830d7f192c7e07d4ca5821ef2cad7108102636a8e51e0d.png)

You can see the time, current working directory and git status in my prompt. Also, notice the git status showing the current branch `master`, tag `v0.3`, the `●` representing changes and lastly the `?` to signify a new file. Pretty cool, huh?

---

_Update_: Found this interesting counter [article](https://joshtronic.com/2017/02/12/you-may-not-need-oh-my-zsh/) since posting

_Update 2_: Installing the [Shell Integration](http://iterm2.com/documentation-shell-integration.html) enables extremely handy shortcuts like Cmd+Shift+A to select previous commands output and _Auto Command Completion_

_Update 3_: `zsh` is now the default shell in macOS, so clarified that switching shells only relates to the older versions


text:
# Adept Secret Sharing (ADSS)

A CLI tool and library implementation of adept secret sharing (ADSS) as described
by Bellare, Dai and Rogaway in [Reimagining Secret Sharing: Creating a Safer and
More Versatile Primitive by Adding Authenticity, Correcting Errors, and Reducing
Randomness Requirements](https://eprint.iacr.org/2020/800).

## Usage

### CLI

Install by downloading pre-built binaries on the [releases
page](https://github.com/jakecraige/adss/releases) or it install from source
with `go install github.com/jakecraige/adss`.

```sh
# Split the secret into a 2-of-3 sharing. First we create a file with the
# secret, it can be of any type, not just txt.
$ echo "some secret" > /tmp/secret.txt
$ adss split -threshold 2 -count 3 -out-dir /tmp -secret-path secret.txt
Share written to: tmp/share-0.json
Share written to: tmp/share-1.json
Share written to: tmp/share-2.json
Complete.

# We can recover by providing all shares. It prints to stdout in base64 by
# default, so we decode it with base64 for this example.
$ adss recover --share-paths /tmp/share-0.json,/tmp/share-1.json,/tmp/share-2.json | base64 -d
some secret

# We can also store the result in a file
$ adss recover --share-paths /tmp/share-0.json,/tmp/share-1.json,/tmp/share-2.json -out-path /tmp/recovered-secret.txt
$ cat /tmp/recovered-secret.txt
some secret

# We can also recover by providing only two
$ adss recover --share-paths /tmp/share-0.json,/tmp/share-1.json | base64 -d
some secret

# If we manually modify the secret value of one of the shares and attempt
# recovery, we are warned about the invalid share but we still recover it.
$ adss recover --share-paths /tmp/share-0.json,/tmp/share-1.json,/tmp/share-2-modified.json | base64 -d
WARN: Invalid share at ./tmp/share-2-modified.json
some secret
```

### Library

```golang
// Split the secret into shares. The shares can be json serialized with the
// golang marshaller to be persisted on disk.
as := adss.NewAccessStructure(2, 3)
secret := []byte("the secret")
ad := []byte("the associated data")
shares, err := adss.Share(as, secret, ad)
if err != nil {
  return err
}

// Given a set of shares, attempt to recover the secret. If it can be recovered
// it returns the secret and the set of shares that were valid inputs. If it
// cannot be recovered, an error is returned.
secret, validShares, err := adss.Recover(shares)
if err != nil {
  return err
}

fmt.Printf("%s", secret)
if len(validShares) < len(shares) {
  fmt.Println("Some shares were invalid")
}
```

## Security

This is a work-in-progress implementation and should not be used in any
production systems. It _does not_ currently match the paper so it does not
provide many of the guarantees required by ADSS. It has also received no
security reviews so it should not be trusted until it has.

repository: jakecraige/adss

repo_name: jakecraige/adss


text:
# OTA Downloader

[Chinese](README_ZH.md) | English

## 1. Introduction

This software package is a firmware downloader for OTA upgrade. The downloader provides multiple firmware download methods. Developers can flexibly choose the upgrade method according to their own needs. Each upgrade method only needs to call a function or command once. The currently supported download methods are as follows:

- HTTP/HTTPS protocol download firmware
- Ymodem protocol download firmware

### 1.1 License

OTA Downloader package complies with Apache2.0 license, please refer to `LICENSE` file for details.

### 1.2 Dependency

- RT-Thread 3.0+
- FAL package support
- Ymodem download method depends on Ymodem component
- HTTP/HTTPS download method depends on webclient software package

## 2. How to open OTA Downloader

To use OTA downloader package, you need to select it in the package manager of RT-Thread. The specific path is as follows:

```
RT-Thread online packages
    IoT-internet of things --->
        [*] The firmware downloader which using on RT-Thread OTA component --->
            [*] Enable OTA downloader debug
            [*] Enable HTTP/HTTPS OTA
                (http://xxx/xxx/rtthread.rbl) HTTP OTA URL
            [*] Enable Ymodem OTA
```

The detailed description of the package options is as follows:

| Option | Description |
|-|-|
| Enable OTA downloader debug | Enable firmware downloader debug mode |
| Enable HTTP/HTTPS OTA | Enable HTTP/HTTPS protocol download firmware function |
| Enable Ymodem OTA | Enable Ymodem protocol download firmware function |

After selecting the options you need, use RT-Thread's package manager to automatically update, or use the `pkgs --update` command to update the package to the BSP.

## 3. Use OTA Downloader

After opening the OTA downloader package and selecting the corresponding function option, it will be added to the BSP project for compilation when the BSP is compiled.
Burn the program to the target development board, and the user can find the corresponding command in the FinSH terminal. The upgrade methods currently supported by the software package are as follows:

| Function | Function call | Execute command |
|---|---|---|
| Use HTTP/HTTPS protocol firmware upgrade | `void http_ota(uint8_t argc, char **argv)` | `http_ota` |
| Use Ymodem protocol firmware upgrade | `void ymodem_ota(uint8_t argc, char **argv)` | `ymodem_ota` |

### 3.1 Ymodem protocol firmware upgrade command line demonstration

It is recommended to use Xshell which supports Ymodem protocol. After entering the `ymodem_ota` command in the terminal, right-click the mouse and find the YMODEM send option to send the file in the menu bar. The specific steps are as follows:

![ymodem_ota](docs/figures/ymodem_ota.png)

### 3.2 HTTP/HTTPS protocol firmware upgrade command line demonstration

Enter the `http_ota http://xxx/xxx/rtthreadf.rbl` command in the terminal. After executing the command, the firmware will be downloaded from the link `http://xxx/xxx/rtthreadf.rbl`. The specific steps are shown in the figure below:

![http_ota](docs/figures/http_ota.png)

## 4. Matters needing attention

 1. Make sure there is a downloader partition in the FAL.
 2. When upgrading firmware with Ymodem protocol, please use tools that support Ymodem protocol.
 3. When upgrading the firmware with HTTP/HTTPS protocol, make sure that the remote link address is available.

## 5. Reference materials

> "RT-Thread OTA User Manual": docs/RT-Thread-OTA User Manual.pdf

## 6. Contact & Thanks

* Maintenance: RT-Thread development team
* Homepage: https://github.com/RT-Thread-packages/ota_downloader

gha_language: C


text:
FTC0248
=======

Code for FTC Team 248's Robot. This includes all Teleop and Autonomous programs.

How to use this code
--------------------

This code requires a little bit to compile correctly. First, you need RobotC 3.54. It hasn't been confirmed to work in any older or newer version. Next, you need the latest version of [Xander's Driver Suite](http://botbench.com/blog/robotc-driver-suite/), placed in a subdirectory of this one called "Driver Suite".

License
-------

MIT

Copyright (c) 2013 Pope John XXIII High School Robotics Team

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:
# Wake Up!

## Introduction @unplugged

Show different moods on your<EMAIL_ADDRESS>
![Show mood on the screen](/static/tutorials/wake-up/show-mood.gif)

## Step 1 @fullscreen

Open the ``||brick:Brick||`` Toolbox drawer. Drag out a ``||brick:show mood||`` block onto the Workspace, and place it into the ``||loops:on start||`` block. You should hear and see the block click into place.

```blocks
brick.showMood(moods.sleeping)
```

## Step 2

Notice your EV3 Brick is snoring with eyes closed in the simulator! Let’s wake it up. Open the ``||brick:Brick||`` Toolbox drawer again. Drag out **2** more ``||brick:show mood||`` blocks and drop them into the ``||brick:on start||`` block also.

```blocks
brick.showMood(moods.sleeping)
brick.showMood(moods.sleeping)
brick.showMood(moods.sleeping)
```

## Step 3

In the second ``||brick:show mood||`` block, click on the drop-down menu to select the tired mood.

![Show mood dropdown selections](/static/tutorials/wake-up/show-mood-dropdown-1.png)

```blocks
brick.showMood(moods.sleeping)
brick.showMood(moods.tired)
brick.showMood(moods.sleeping)
```

## Step 4

In the third ``||brick:show mood||`` block, click on the drop-down menu to select the love mood.

![Show mood dropdown selections](/static/tutorials/wake-up/show-mood-dropdown-2.png)

```blocks
brick.showMood(moods.sleeping)
brick.showMood(moods.tired)
brick.showMood(moods.love)
```

## Step 5

Now, plug your EV3 Brick into the computer with the USB cable, and click the **Download** button at the bottom of your screen. Follow the directions to save your program to the brick.

gha_license_id: NOASSERTION


text:
---
layout: default
---

# 1996-10-05 - Paths of trust in PGP

## Header Data

From: Aviel Rubin<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 15926b622a11953f77525067cda90f8687ae956402ec9d36a6fcdf5608a66cff

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-10-05 17:48:03 UTC

Raw Date: Sun, 6 Oct 1996 01:48:03 +0800

## Raw message

```
{% raw  %}From: Aviel Rubin<EMAIL_ADDRESS>Date: Sun, 6 Oct 1996 01:48:03 +0800
To<EMAIL_ADDRESS>Subject: Paths of trust in PGP
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

There is a really cool service being offered on the web. It allows
users to trace the paths of trust between two keys in the PGP world.
It is worth checking out:

  http://www.research.att.com/~reiter/PathServer/

This is a good way to find the paths you want in the web of trust.
For example, you can type in your key id, and the key id of a new,
candidate key, and you will find all of the signature paths
from your key to the new key. You'll be surprized at how connected
the graph is.

Avi

{% endraw %}
```

## Thread

+ Return to [October 1996](/archive/1996/10)

+ Return to "[Aviel Rubin <rubin@usenix.ORG>](/authors/aviel_rubin_rubin_at_usenix_org_)"
+ Return to "["William H. Geiger III" <whgiii@amaranth.com>](/authors/william_h_geiger_iii_whgiii_at_amaranth_com_)"

+ 1996-10-05 (Sun, 6 Oct 1996 01:48:03 +0800) - Paths of trust in PGP - _Aviel Rubin<EMAIL_ADDRESS>  + 1996-10-06 (Mon, 7 Oct 1996 07:30:06 +0800) - [Re: Paths of trust in PGP](/archive/1996/10/d1ba139bfd0a9c5a9cae66af96c16f118bbc568cda824993326d31389bdc6039) - _"William H. Geiger III"<EMAIL_ADDRESS>


text:
MODIFIED VERSION. ALLOW TO USE SECOND KEY TO OPEN/CLOSE CAR AND SHARE GARAGE (USE /givekey ID)

# What is this?
An ESX garage system with vehicle preview, easy to setup and configure.
More info in the cfx.re topic: https://forum.cfx.re/t/esx-free-esx-beetlegarage-garages-with-vehicle-preview-marbella-vice-style/2993846

## Requirements
* [ESX Legacy](https://github.com/esx-framework/es_extended/tree/legacy) (Tested with 1.1 and 1.2)
* [esx_vehicleshop](https://github.com/esx-framework/esx_vehicleshop)
* OneSync

## Features
* Easy to setup and configure.
* Vehicle preloading and preview (also including the vehicle modifications).
* Multiple spawn points per garage.
* Locale support.

## Installation
- Import the "import_me.sql" into your database.
- Start the resource with "start esx_beetlegarage" after putting it into your resources folder.
- Easy as that!

# Frequently asked questions
## How to add garages?
There is an example in the config.lua of how to do it, check it out.

## Is this optimized?
Yes, it is. 0.01ms while idling and 0.2ms while near the markers. The vehicle preview is not CPU intensive **IF** vehicle preloading is enabled.

## What is ReleaseMemory and LoadOnlyRequested?
**You probably dont need this**. These 2 options are for servers that have badly optimized vehicle mods. ReleaseMemory will unload the vehicle models from the memory when the player leaves the garage, making the player load them again when it enters the garage again.
LoadOnlyRequested will free the memory when changing vehicle instead of doing it when you leave the garage, just like esx_vehicleshop.


text:
Application

MyWords V1.0

Actually, this application is made for programmers. You can store your word translations which you don't know. If you are going to take an exam or prepare for one, you will need this app. When you have learnt a new word, add it to the app and save :)

Eclipse Mars and MySQL 5.7 used for making this app. Just import to your Eclipse Workspace, create a DB and start to use it.

DB properties you can change in MySQLConnector.java file!

AUTHOR

Application, Base and GUI Improvements

Kamal Abdullayev

CONTACT

<EMAIL_ADDRESS>

LICENCE

Apache License, Version 2.0


text:
---
layout: post
title: "Episode 154: Why am I terrible at picking candidates and how soon can I quit my job?"
date: 2019-04-22 12:00:00 -0700
guid: 9985a3d3-a6e8-4a57-926c-7db741449485
duration: "30:27"
length: 26082331
file: "https://dts.podtrac.com/redirect.mp3/download.softskills.audio/sse-154.mp3"
categories: episode
enable_comments: true
---

This episode is sponsored by the O'Reilly Velocity conference. Register today and use discount
code SKILLS for a 20% discount:
{{ site.velocity_marketing_url }}.

In this episode, Dave and Jamison answer these questions:

1. I keep getting asked to interview new candidates. But my interview feedback history is pretty bad. I've said yes to hiring:

   * Someone who's super smart, but drives me absolutely crazy with constant argument and may cause me to take the time-honored Soft Skills advice and quit my job.
   * My boss at my former company, who DID drive me to quit my job.
   * My first (and only) hire back when I was a people manager, who turned out to be terrible, but I was told I had to keep him around because "it would look bad" to fire my first hire.

   What should I do? Is it acceptable to just keep turning down interview requests? I've wandered into a tech lead position, so I suspect I can't dodge them forever. But I don't want to keep suggesting bad hires just for the sake of getting more interview practice.

   Thanks for all the advice and the laughs! I've been a regular listener for a couple years.

2. How long do I need to wait before bailing on a new job I don't like? More than a month? It's not totally miserable: the people are nice and the company has good prospects. But the technical decisions of the team lead to daily frustrations for me.

repository: soft-skills-engineering/website

branch_name: refs/heads/gh-pages

repo_name: soft-skills-engineering/website


text:
---
hrs_structure:
  division: '1'
  volume: '4'
  title: '13'
  chapter: 211F
  section: 211F-13
type: hrs_section
tags:
  - Government
menu:
  hrs:
    identifier: HRS_0211F-0013
    parent: HRS0211F
    name: 211F-13 Limitations on debt owed to corporation
weight: 36075
title: Limitations on debt owed to corporation
full_title: 211F-13 Limitations on debt owed to corporation
---
**[§211F-13] Limitations on debt owed to corporation.** Not more than $5,000,000 in financial assistance, excluding rights and royalties under a venture capital agreement, shall be provided to any one enterprise at any time. The direct investments of the corporation shall not exceed five per cent of the assets of the corporation, excluding rights and royalties under a venture capital agreement, provided that by a two-thirds vote of the board this amount may be increased to a limit of twenty-five per cent of the total assets of the corporation. [L 1990, c 110, pt of §3]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
# Python textui package
Text-based UI builder for Python

Full documentation provided at https://firsttempora.github.io/Python-textui/

## Quickstart

Install from `pip`: `pip install --user textui`

The `uielements` module contains individual `user_*` functions that can be
used to interactively get values:

```
from textui import uielements

>>> uielements.user_input_list('Choose your favorite fruit', ['Apple', 'Banana', 'Cherry'])
Choose your favorite fruit
A empty answer will cancel.
   1: Apple       2: Banana       3: Cherry
Enter 1-3: 2
'Banana'

>>> uielements.user_input_date('When did the Eagle land on the moon?')
When did the Eagle land on the moon?
Enter in one of the formats: yyyy-mm-dd
Entering nothing will cancel
--> 1969-07-20
datetime.datetime(1969, 7, 20, 0, 0)
```

`uielements` also contains a series of `opt_user_*` functions that will decide if the
user needed to be queried based on the given value, or check is the value is valid:

```
# If the value None is given, it is assumed
# that the user need to provide a value
>>> uielements.opt_user_input_list('Choose your favorite fruit', None, ['Apple', 'Banana', 'Cherry'])
Choose your favorite fruit
A empty answer will cancel.
   1: Apple       2: Banana       3: Cherry
Enter 1-3: 2
'Banana'

# If a non-None value is given, it is checked.
# So long as it is valid, it is returned.
>>> uielements.opt_user_input_list('Choose your favorite fruit', 'Apple', ['Apple', 'Banana', 'Cherry'])
'Apple'

# If not valid, an error is raised automatically
>>> uielements.opt_user_input_list('Choose your favorite fruit', 'Watermelon', ['Apple', 'Banana', 'Cherry'])
Error thrown using UIErrorWrapper
UIValueError: The value Watermelon is invalid. It must be one of: Apple, Banana, Cherry
```

repository: firsttempora/Python-textui

repo_name: firsttempora/Python-textui


text:
# Same configuration file with different content in different environments

This solution is explained in detail in the Codeyourinfra project blog post [How to deal with the same configuration file with different content in different environments](http://codeyourinfra.today/how-to-deal-with-the-same-configuration-file-with-different-content-in-different-environments). Check it out!

## Problem

The dev team has to deploy the application in different QA environments. The application requires a properties file where the database string connection is defined. In each environment the database string connection is different. This is just an example of the same configuration file with different content in different environments.

## Solution

Instead of having a version of the same configuration file for each environment, it's possible to maintain just one, including all the values required in every environment ([config.json](config.json)). This metadata is then used during the single Ansible playbook's execution ([playbook.yml](playbook.yml)) that sets the configuration file's content, specific to each environment.

## Test

First of all, turn on the 3 VMs that represent the QA environments, executing the command `$ vagrant up`. After that, execute the command `$ ansible-playbook playbook.yml -i hosts`. Finally, in order to check the configuration file's content of every environment, execute the command `$ ansible qa -m shell -a "cat /etc/conf" -i hosts`.

If you prefer to test automatically, just run `$ ./test.sh`. Likewise, if you prefer to test against EC2 instances, rather than local VMs, just run `$ cd aws/ && ./test.sh`.

### Important

The test was done in the environment described in the table below.

Software | Version
--- | -----
Host OS | OS X El Capitan 10.11.6
VMs OS | Ubuntu 14.04.3 LTS
Vagrant | 2.0.0
VirtualBox | 5.1.30
VirtualBox Extension Pack | 5.1.28
Ansible | <IP_ADDRESS>

In addition, the test requires Internet connection, for the **minimal/trusty64** Vagrant box downloading. Depending on the Internet connection speed, the test environment can last more than you expect to be up and running, in the first time.

repository: bhanukasn/codeyourinfra

repo_name: bhanukasn/codeyourinfra


text:
# Neo Script Documentation
	- The grammar uses a C-like syntax, but it is somewhat similar to Lua script.
	- It was developed in Visual Studio Pro 2022 C++.
	- After some more features are added, port to C#

### License
	MIT license
	NeoScript is free software.
	The only requirement is that if you do use NeoScript, then you should give us credit by including the copyright notice somewhere in your product or its documentation.

### Sample
	- console / hello: print hello.
	- console / callback: Function calls between C ++ and Neo scripts.
	- console / map_callback: maps the function to the Neo script table and finds and calls the function at runtime.
	- console / 9_times: This is a sample of a Multiplication table.
	- console / string: this is an example of string.
	- console / map: Sample Dictionary usage.
	- console / list: Sample List usage.
	- console / slice_run: Executes every part of the script that is produced by the script in sequential order of a certain time or command.
	- console / time_limit: Processes a script function call to exit after a certain period of time.
		Unlike console / slice_run, console / time_limit does not execute after the next frame.
	- console / divide_by_zero: Exception handling.
	- console / delegate: Function pointer support.
	- console / meta: this is an example of using meta
	- console / coroutine: an example of using coroutines.
	- console / mudule: this is an example of using module.

### var data structure
	- null: the variable has no value (if the variable is not initialized or "var a;" or "var a = null;")
	- bool: store true / false value
	- int: Save 4-byte signed integer value
	- double: 8-byte floating point storage
	- string
	- list
	- map : Dictionary

### Neo Scrit reserved words
	- var: Save the value as a variable name later
	- fun: Notice the start of the function
	- import: prefixed to fun and declared to call a c ++ function
	- export: can be prepended to fun and the function can be called from external (c ++)
	- system: support for a set of built-in functions.
	- tostring (x): change the value of x variable to string
	- toint (x): change the value of x variable to int
	- tofloat (x): change the value of x variable to double
	- tosize (x): Returns the number in the table if the variable x is a table, or 0 if it is not a table
	- totype (x): return the data type of the variable x as a string
	- sleep (x): Pause as much as the value of x (1 second for 1000)
	- return [x]: Return x value
	- break: causes for / foreach / while loop to exit
	- if (x) / else: same as c ++
	- for / while: same as c ++
	- For foreach: talbe variable only. Must be foreach (var a, b in table)
	- true / false: value stored in a variable of type bool
	- null: no value
	- ++ / - Same as c ++ (variable value is incremented by 1 or decremented by 1)
	- && / || : Same as c ++
	- > / < / >= / <= : same as c ++
	- x..y: return the combined string of x and y strings

### Built-in system function use system.
	## Basic
	- abs (x): same as c ++
	- acos (x): same as c ++
	- asin (x): same as c ++
	- atan (x): same as c ++
	- ceil (x): same as c ++
	- floor (x): same as c ++
	- sin (x): same as c ++
	- cos (x): same as c ++
	- tan (x): same as c ++
	- log (x): same as c ++
	- log10 (x): same as c ++
	- pow (x, y): same as c ++
	- deg (x): radian -> degree
	- radian (x): degree -> radian
	- sqrt (x): same as c ++
	- srand (x): same as c ++
	- rand (): same as c ++
	- print (x): print string x
	- clock ():  return time
	- load ():  load module scipt
	- pcall (x) : run mdule script
	- sys_meta(x,y) : bind the y function of var x.
	- coroutine_create (): coroutine create and return (suspended mode )
	- coroutine_resume (x): suspended coroutine active
	- coroutine_status (x): coroutine state string return

    ## string
	- len (): Return the length of the string
	- find (x): Retrieve x string return position (same as c ++)
	- sub (x, y): convert x string  offset to y number of strings and return
	- upper () : convert to uppercase and return
	- lower () : convert to lowercase and return
	- trim () : trim space erase (left, right)
	- ltrim () : trim space erase (left)
	- rtrim () : trim space erase (right)
	- replace (x, y) : find x and change y
	- split (x) : string split from x and return list

	## list
	- len () : return the length of list item count
	- resize (x) : list item resize
	- append (x, [y]) : list item insert (y value is index)

	## map
	- reserve (x) : allocate x number of buffers.
	- sort () : sort table value
	- keys() : put the keys into a set data structure and return it.
	- values() : put the values into a set data structure and return it.

	## set
	- len () : return count set item

### Comment
	- // one-line comment
	- / * * / is a multi-line range comment

#### Neo Script Code Image
![](/docs/img/vs001.png)

#### Neo Script Output Image
![](/docs/img/vs002.png)

repository: hangulcode/NeoScript

repo_name: hangulcode/NeoScript


text:
---
title: Codeigniter Installation for Beginners
author: Team Koding
categories: [frameworks platforms, codeigniter, php]

template: page.toffee
---

# Codeigniter Installation for Beginners

Before you continue reading this guide why not try a more easy way, using the [Koding Package Manager (kpm)](http://learn.koding.com/guides/getting-started-kpm/) and install Codeigniter using just one command:

```
kpm install codeigniter
```

***

In this article we will go over installing Codeigniter for beginners.

## What is Codeigniter?

Codeigniter may be old hat to some, but the tried and true frameworks tend to hold their own for quite a long time, and for good reason. It is polished, has an extensive history, and above all has a large community to back it up.

## So how do i get started with Codeigniter?

Before you begin make sure you are in your Web folder:

```
cd Web
```

First you will need to download the latest version of Codeigniter using the following command, in your Terminal:

```
wget https://github.com/bcit-ci/CodeIgniter/archive/2.2-stable.zip
```

After that you'll need to unzip the file using the command:

```
unzip 2.2-stable.zip
```

Next we need to rename the folder to a more friendly one:

```
mv CodeIgniter-2.2-stable codeigniter
```

You will now be able to access Codeigniter by following a similar URL:

```
http://KODING_USERNAME.koding.io/codeigniter
```

Find out more about your VM hostname [here](http://learn.koding.com/faq/vm-hostname/).

Koding comes with Apache by default, so Codeigniter _just works_.

As you can see, setting up CodeIgniter is a pretty simple process.

If you encounter any issues or have any questions please drop us an email [here](mailto:support@koding.com).

repository: WebDevelopmentStudioWebAristan/kdlearn

repo_name: WebDevelopmentStudioWebAristan/kdlearn


text:
# Composite Design Pattern

### Contextualization / Problem

### Intent

> Compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions of objects uniformly.

### How does it work?

### Pros

-

### Cons

-

license: Unlicense

repository: aputhin/design-patterns-study

repo_name: aputhin/design-patterns-study


text:
# JCS_DestroyObjectWithScreen

Destroy the gameobject when the object is no longer render on the screen.

## Variables

| Name                    | Description         |
|:------------------------|:--------------------|
| mDestroyWhenOutOfScreen | Trigger event flag. |

gha_language: C#


text:
This is a library for a serial text 16 channel PWM Dimmer with fade and delay

name=Dimmer
version=NA - see github for release tag
author=Simon Fawell<EMAIL_ADDRESS>maintainer=Simon Fawell<EMAIL_ADDRESS>sentence=A library library for a 16 channel PWM Dimmer.
url=http://simonfawell.wordpress.com/category/dimmer/
url=https://github.com/fawells/Dimmer
architectures=Nano, Mega

Dependancy on Adafruit_PWMServoDriver - https://github.com/adafruit/Adafruit-PWM-Servo-Driver-Library/

  Pick one up today in the adafruit shop!
  ------> http://www.adafruit.com/products/815

These displays use I2C to communicate, 2 pins are required to
interface. For Arduinos, thats SCL -> Analog 5, SDA -> Analog 4

Adafruit invests time and resources providing this open source code,
please support Adafruit and open-source hardware by purchasing
products from Adafruit!

Written by Limor Fried/Ladyada  for Adafruit Industries.
BSD license, check license.txt for more information
All text above must be included in any redistribution

To download. click the DOWNLOADS button in the top right corner, rename the uncompressed folder Adafruit_PWMServoDriver. Check that the Adafruit_PWMServoDriver folder contains Adafruit_PWMServoDriver.cpp and Adafruit_PWMServoDriver.h

Place the Adafruit_PWMServoDriver library folder your <arduinosketchfolder>/libraries/ folder. You may need to create the libraries subfolder if its your first library. Restart the IDE.

repository: fawells/Dimmer

repo_name: fawells/Dimmer


text:
# Changelog

### 0.6.0

Added support for AMD.

### 0.5.0

Added `generateNumberDigits` to generate a number based on it's digits. Added `getRandomItem` to return a randomly selected item in an array.

### 0.4.0

Made the library available to run on the browser.

### 0.3.0

Added ability to generate an array of random numbers to `generateNumber`.

### 0.2.0

Added default parameters to `generateNumber`.

### 0.1.0

Initial release

repository: dimitriwalters/randomit

repo_name: dimitriwalters/randomit


text:
# Statbars
The API for statbar HUD elements is based off of the main API, however, it makes things even easier when it comes to manipulating the statbar HUDs. The main reason why this sub-API makes things easier, is that it presents a table for each statbar element, suited with several functions to manipulate it without requiring that the identification of the element be provided each time you make a change.

#### `list_statbar`
__Usage:__ `hudlib.list_statbar(<player (userdata or string)>)`

Lists all statbar elements attached to a player.

#### `get_statbar`
__Usage:__ `hudlib.get_statbar(<player (userdata or string)>, <hud name (string)>)`

Returns a table containing all of the helpers which allow manipulation of the text element. Helpers can be called in this method: `hudlib.get_statbar(...):remove()` (see below for all available helpers).

__Helpers:__
- `remove()` - removes the statbar HUD element
- `hide()` - hides the statbar
- `show()` - shows the statbar (if it is hidden)
- `set_pos(name)` - sets position of statbar
- `set_texture(texture)` - set statbar texture
- `set_dir(dir)` - set direction in which statbar should be shown (0 draws from left to right, 1 draws from right to left, 2 draws from top to bottom, and 3 draws from bottom to top)
- `set_offset(x, y)` - set statbar offset
- `set_size(x, y)` - set statbar size
- `set_min(min)` - set statbar minimum
- `set_max(max)` - set statbar maximum
- `set_status(num)` - set number in between minimum and maximum to indicate how many halves of the specified texture should be shown
- `get_status()` - get status number

#### `add_statbar`
__Usage:__ `hudlib.add_waypoint(<player (userdata or string)>, <hud name (string)>, <definition (table)>)`

Adds a statbar HUD element and returns the helper table described in the `get_waypoint` documentation above. Automatically sets the type of the element. The statbar text can be set with the `texture` attribute, the minimum/maximum/start number of halves of the specified texture to display can be set with the `min`/`max`/`start` attributes. You can set a background for a statbar by setting the `background` attribute to the texture you'd like to use. In order for statbar backgrounds to work properly, you must also set the `max` attribute. See documentation for `add` in `HUD.md` for information on other custom attributes.

repository: octacian/hudlib

repo_name: octacian/hudlib


text:
---
title: Attributes
overview: Explains the important notion of attributes, which is a central mechanism for how policies and control are applied to services within the mesh.

order: 10

layout: docs
type: markdown
---
{% include home.html %}

The page describes Istio attributes, what they are and how they are used.

## Background

Istio uses *attributes* to control the runtime behavior of services running in the service mesh.
Attributes are named and typed pieces of metadata describing ingress and egress traffic and the
environment this traffic occurs in. An Istio attribute carries a specific piece
of information such as the error code of an API request, the latency of an API request, or the
original IP address of a TCP connection. For example:

	request.path: xyz/abc
	request.size: 234
	request.time: 12:34:56.789 04/17/2017
	source.ip: <IP_ADDRESS>
	target.service: example

## Attribute vocabulary

A given Istio deployment has a fixed vocabulary of attributes that it understands.
The specific vocabulary is determined by the set of attribute producers being used
in the deployment. The primary attribute producer in Istio is Envoy, although
specialized Mixer adapters and services can also generate attributes.

The common baseline set of attributes available in most Istio deployments is defined
[here]({{home}}/docs/reference/config/mixer/attribute-vocabulary.html).

## Attribute names

Istio attributes use Java-like fully qualified identifiers as attribute names. The
allowed characters are `[_.a-z0-9]`. The character `"."` is used as namespace
separator. For example, `request.size` and `source.ip`.

## Attribute types

Istio attributes are strongly typed. The supported attribute types are defined by
[ValueType](https://github.com/istio/api/blob/master/mixer/v1/config/descriptor/value_type.proto).


text:
This is where actual applications are.
We build programs here, and eventually abstract logic into more generic utility code.
Ideally we don't want different applications sharing the same code here.
Additionally, code here should be very specific to the program.
Anything generic needs abstracted out of the directory.

Tools may include:
- useful desktop tools
- programs for my job
- fun games
- learning tools
- example programs for various libraries

anything with a main() basically

LD_PRELOAD ideas:
https://github.com/gaul/awesome-ld-preload (everything)
https://github.com/ColumPaget/enhancer (everything)
https://github.com/scriptum/libpreload (everything)
https://github.com/zardus/preeny (everything)
https://github.com/kpu/usage (process hooks)
https://github.com/tharina/heap-tracer (memory hooks)
https://github.com/linuxthor/fml (memory hooks)
https://github.com/xroche/squandersnitch (memory hooks)
https://github.com/MageSlayer/bumpmalloc (memory hooks)
https://github.com/samsk/log-malloc2 (memory hooks)
https://github.com/em-/sleepless (time hooks)
https://github.com/majek/fluxcapacitor (time hooks)
https://github.com/wolfcw/libfaketime (time hooks)
https://github.com/vi/timeskew (time hooks)
https://github.com/df7cb/sdate (time hooks)
https://github.com/gordol/ld_preload-sounds (sound memory hooks)
https://github.com/progandy/fakeuser (user hooks)
https://github.com/robn/everybody-root (user hooks)
https://github.com/whitequark/unrandom (random hooks)
https://github.com/AGWA/force-urandom  (random hooks)
https://github.com/droberson/exec-logger (execve hooks)
https://github.com/starius/nonetwork (network hooks)
http://netjail.sourceforge.net/ (network hooks)
https://github.com/jwilk/getenvy (env hooks)
https://github.com/AdamSimpson/set_pid (pid hooks)
https://github.com/smerritt/flockit (file hooks)
https://github.com/jacereda/fsatrace (file hooks)
https://github.com/stewartsmith/libeatmydata (file hooks)
https://github.com/raoz/libstfu (console hooks)
https://github.com/nchong/cudahook (cuda hooks)
https://github.com/paulproteus/whydidyouleave (exit hooks)
https://github.com/penma/explain_preload (crash info)
https://github.com/dextero/stacktracer  (crash info)
https://github.com/EvanED/jitgdb (crash info)
https://github.com/jarusified/ld_experiments

PTRACE ideas:
https://github.com/aleden/ptracetricks (everything)
https://github.com/tom-code/ptrace (everything)
https://github.com/obs145628/ptrace-tests (trace)
https://github.com/dicej/profile (profiler)
https://github.com/toddlipcon/pmp (profiler)

repository: luxe/unilang

gha_language: Fancy

repo_name: luxe/unilang


text:
Name: Saiteja Rawulwar

EID: sr48332

Team Number:F12

## Questions

1. Why does your program need a setup and a loop?

    The set up initializes the inputs and outputs of the board and the loop keeps the code running without constant manual input.

2. What is the downside to putting all your code in a loop?

    The code will run indefinetely, even at times you don't want it to

3. Why does your code need to be compiled?

    A compiler translates a computer program fom one language to another, input to output.

4. When lowering the frequency in procedure A, step 4, what is going wrong? Brainstorm some solutions. Dimmers exist in the real world. What is their solution?

    The period is increasing between the on and off states, making the LED constantly blink till asked to stop. The period needs to be shorter and to do this you must increase the frequency. In the real world, dimmers run at very high frequency so the blinking is not visible to the naked eye.

5. Why do you need to connect the logic analyzer ground to the ESP32 ground?

    Connecting the logic analyzer to ground on the ESP32 completes the circuit, only when the circuit is complete can you do anything with it. Just being connected to the port means the circuit is open and incomplete.

6. What is the difference between synchronous and asynchronous communication?

    Synchronous transmissions are synchronized by an external clock while asynchronous transmissions are synchronized by special signals along the transission medium. Synchronous needs a constant stream of data, while asynchronous does not.

7. Profile of UART: Sent X bytes in Y time

    Sent 8 bits in 0.7745 ms

8. Profile of SPI: Sent X bytes in Y time

    Sent 5 bits in 0.146 ms

9. Why is SPI so much faster than UART?

    SPI is synchronous while UART is asynchronous, meaning SPI can run as fast as needed and while UART sends info at speed limited by the input parameters

10. list one pro and one con of UART

    pro: takes user input
    con: slower than other forms of communication

11. list one pro and one con of SPI

    pro: faster communication
    con: requires greater number of parts

12. list one pro and one con of I2C

    pro: can use multiple slave devices
    con: requires pullup resistors

13. Why does I2C need external resistors to work?

    I2C lines are open drain.

## Screenshots

Procedure A, step 1:
![Put path to your image here ->](img/Lab1_Blink.png)

Procedure A, step 4:
![Put path to your image here ->](img/Lab1_Dimmer.png)

Procedure B, UART:
![Put path to your image here ->](img/UART1.png)

Procedure B, SPI:
![Put path to your image here ->](img/SPI.png)


text:
## Spring Reactor

This module contains articles about Spring Reactor

## Relevant articles:

- [Introduction to Spring Reactor](https://www.baeldung.com/spring-reactor)

repository: gtaillyLM/tutorials

repo_name: gtaillyLM/tutorials


text:
## EMC Unity Configuration and Management

- Requires Ansible 2.2 or newer

This Ansible module provides access to configure and manage EMC Unity storage appliance.

To use this module, follow the sample tasks in test.yml, test-1.yml, and test-2.yml.
To run the sample tasks, change the option values to fit your system, and then run:

    ansible-playbook test.yml
    ansible-playbook test-1.yml
    ansible-playbook test-2.yml

After the completion of the Ansible task in test-1.yml, your system may reboot to sync with
the NTP server. Please wait until the Unity system comes back online before running test-2.yml.

To cap the initial setup of Unity, here is the sample task in test.yml:

    - name: Initial setup
      dellemc_unity:
        unity_hostname: "<IP_ADDRESS>"
        unity_username: admin
        unity_password: Password123#
        unity_updates:
          - {resource_type: system, id: '0', isEulaAccepted: true}
        unity_password_updates:
          - {username: admin, password: Password123#, new_password: Password123!}
        unity_license_path: /home/labadmin/unity.lic

The options 'unity_hostname', 'unity_username' and 'unity_password' are mandatory for every task using the 'dellemc_unity' module.
The task's other options does the following in the order presented below:

1. Accept the EULA of the Unity system;
2. Update the default password of the Unity system admin user;
3. Upload license to Unity.

For updating and querying the Unity system, please refer to the sample task in test-1.yml:

    - name: Updates and queries
      dellemc_unity:
        unity_hostname: "<IP_ADDRESS>"
        unity_username: admin
        unity_password: Password123!
        unity_updates:
          - {resource_type: user, name: test1, password: Welcome1!, role: administrator}
          # - {resource_type: user, id: 'user_test1', role: 'operator'}
          - {resource_type: remoteSyslog, id: '0', enabled: True, address: '<IP_ADDRESS>:515', protocol: 1, facility: 0}
          - {resource_type: dnsServer, id: '0', addresses: [<IP_ADDRESS>, <IP_ADDRESS>]}
          - {resource_type: ntpServer, id: '0', addresses: [<IP_ADDRESS>, <IP_ADDRESS>], rebootPrivilege: 2}
          # - {resource_type: user, id: 'user_test1', action: 'delete'}
        unity_password_updates:
          # - {username: test1, password: Welcome1!, new_password: Welcome2!}
        unity_queries:
          # - {resource_type: user, id: 'user_test1', fields: 'role.id'}
          - {resource_type: remoteSyslog, id: "0", fields: 'address,protocol,facility,enabled'}      # id parameter has to be of the string type
          - {resource_type: dnsServer, fields: "domain, addresses, origin", page: 1, per_page: 100}
          - {resource_type: ntpServer, id: "0", fields: addresses}      # id parameter has to be of the string type

For an update or query option, the 'resource_type' attribute is mandatory, and the combination of 'id' and 'action' attributes indicate what type of update or query operation is intended. For updates:

1. If 'id' is present, then it is an update of the resource instance represented by the ID. The default action is 'modify', which can be omitted.
2. If 'id' is missing, there are two possibilities. If the 'action' attribute is present, then this is a class-level update; otherwise, if the 'action' attribute is missing, then this update is to create a new instance of the resource type.

For queries:

1. If 'id' is present, then it is a query of the specific instance; otherwise,
2. If 'id' is missing, then it is a query of a collection of instances of the resource type.

For more details of the query/update URL parameters, see "Unisphere Management REST API Programmer's Guide". For more details of the update arguments, see "Unisphere Management REST API Reference Guide". Each parameter or argument is an attribute in an update option.

Password updates are distinct from other updates, because you can neither query nor compare passwords. Therefore, there is a separate type of update only for passwords. In this case, you only provide the username, current password, and new password of the user that you wish to update.

To delete a resource instance, you use an update option with the resource type, instance ID, and the action 'delete'. Here is the sample task in test-2.yml:

    - name: Updates and queries
      dellemc_unity:
        unity_hostname: "<IP_ADDRESS>"
        unity_username: admin
        unity_password: Password123!
        unity_updates:
          - {resource_type: user, id: 'user_test1', action: 'delete'}

To create a pool, you have to first run the action 'recommendAutoConfiguration', then create pools according to the recommendation, and later you can update the pool. The following three sample updates should be run in three tasks in sequence:

        unity_updates:
          - {resource_type: pool, action: 'recommendAutoConfiguration'}
          - {resource_type: pool, name: 'performancePool', 'addRaidGroupParameters': [{"dskGroup" : {"id" : "dg_3"}, "numDisks" : 6, "raidType" : 48879, "stripeWidth" : 0}], 'attributes': ['name']}
          - {resource_type: pool, id: pool_1, name: 'testPool', description: 'test pool'}

To configure ESRS, you have to run the following updates in a series of tasks in sequence, and then you can run a query for the ESRS parameters:

        unity_updates:
          - {resource_type: systemInformation, id: '0', contactFirstName: 'Joe', contactLastName: 'Smith', locationName: 'Test Site', contactEmail<EMAIL_ADDRESS>contactPhone: '123-456-7890'}
          - {resource_type: esrsParam, id: '0', action: checkNetwork}
          - {resource_type: esrsParam, id: '0', action: requestAccessCode}
          - {resource_type: esrsParam, id: '0', action: getAvailableSites, accessCode : "243857"}
          - {resource_type: esrsParam, id: '0', "siteId" : "324546"}
        unity_queries:
          - {resource_type: esrsParam, fields: 'enabled,isCentralized,status, statusDescription::@enum(status)'}

repository: dadlex/ansible-dellemc-unity

gha_language: Python

repo_name: dadlex/ansible-dellemc-unity