text:
## decode-salesforce-signedrequest
#### A browser module to decode Salesforce signed-request from Salesforce Canvas

### Usage
This library exports a `signedRequest` object when used as a global, or defines a `signedRequest` module when used along with an AMD compatible loader.

### Installation

```bash
  bower install --save decode-salesforce-signedrequest
```

#### Usage with browserify

```javascript
 var signedRequest = require('decode-salesforce-signedrequest');

 // json will have Salesforce context
 var json = signedRequest.decode('YOUR_SIGNED_REQUEST');
```

#### Usage with AMD

```javascript
  require('signedRequest', function(signedRequest) {
    // json will have Salesforce context
    var json = signedRequest.decode('YOUR_SIGNED_REQUEST');
  });
```

#### Usage as a global

```javascript
   // json will have Salesforce context
   var json = signedRequest.decode('YOUR_SIGNED_REQUEST');
```

### Test
0. Install dependencies `bower install`
1. Open the file on `test/index.html`.
2. See your test run (and pass!)

### License
MIT


text:
# SnakeOS

This is the game snake, bootable on a x86_64 CPU, written completely in rust. Its foundation is following the very interesting [Writing an OS in Rust](https://os.phil-opp.com/) blog which I would recommend everybody who is interested in this kind of stuff.

But it's not just snake. Thanks to @MoZhonghua its now possible to add different games to the OS and to play them. So apart from snake you can also enjoy a round of 2048.

![screenshot](./screenshots/screenshot.png)

## Features

* Play snake or 2048 on any x86_64 CPU
    * Let's have fun!
* Dynamic memory management
    * The snake can grow!
* Interrupt handling
    * We can read the keyboard!
* Async/Await support
    * We can update the world and read user input at the same time!
* Only 226kB kernel size
    * You can even put this on a 8-inch floppy disk!
* All the infrastructure you need to implement and play a game
    * You can implement your own game!

## Build it

Use the Makefile to build the game.
The only dependencies are `podman` and `buildah` which are used to setup the build environment.

```
make snakeos.img
```

This will first setup a build container with the necessary dependencies and then build the game.

Alternatively, you can use the rust compiler directly with some tricks applied:

```
rustup override set nightly
rustup toolchain install nightly
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
rustup component add llvm-tools-preview
cargo run \
    --release \
    --target x86_64-custom.json \
    -Zbuild-std=core,alloc \
    -Zbuild-std-features=compiler-builtins-mem -- \
        --no-run
ln -sf target/x86_64-custom/release/boot-bios-snakeos.img snakeos.img
```

To now run the game, you can use the following command:

```
make run
```

which will actually run `qemu-system-x86_64 --enable-kvm -drive format=raw,file=snakeos.img` for you. From here you can use either `w`, `a`, `s` and `d` or the arrow keys to control the snake.

## Screenshots

![welcome](./screenshots/welcome.png)

![2048](./screenshots/2048.png)

license: MIT

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
# Decision Logs

The decision logs table enables you to view all decisions made by the PDPs managed in the project. By viewing what the authorization decision was, you can analyze how effectively your authorization policy is being implemented and determine whether or not it is necessary to "tweak" the policy.

To help you find a specific decision or group of decisions, it is possible to filter the data displayed in the table by using several built-in build.security [filters](decision-log-filters.md).

![](../../.gitbook/assets/decisionlog.png)

### Decision Log Columns

Each line of the table includes the following information for each authorization request/response that was sent to and received from the PDPs:

      Filter name
      Filter description

      Decision

Displays the syntax of the decision that was made by the PDP. You can
          hover over a value in the Decision column to display the full decision
          syntax.

You can click the > arrow to expand each decision to view greater
          details about the decision. These details include:

Decision ID

Metrics (and duration)

Input

Result

Rule Evaluation (only visible when Rule Tracing is
            enabled)

For more information on the expanded decision view, see Decision Details.

      Timestamp (UTC)
      The Timestamp (UTC) column displays the timestamp assigned to this decision.
        Format is MM/DD/YYYY, H:MM:SS AM (or PM).

      Policy
      Lists which policy was used in the decision process.

      PDP Name
      The name of the PDP, as it exists in the control plane, responsible for
        determining the authorization decision.

      PEP Address
      The PEP IP address to which the PDP's decision was sent for enforcement.

      Path
      The path used to send the policy against which the authorization request
        is evaluated.

      Cache Hit Ratio
      For policies that include calls to external data sources (eg. databases),
        the Cache hit Ratio indicates the amount of cache hits out of the
        total requests made during the evaluation of this policy.

      Duration (msec)
      The duration of the decision process as calculated from the request arrival
        time to the time that the PDP sends the decision result to the PEP (in
        msec).

repository: RavenZZ/docs

branch_name: refs/heads/master

gha_license_id: MIT

repo_name: RavenZZ/docs


text:
# Svarog
Simple program to measure hourly productivity using specifically formatted CSV files utilizing JAVAFX for a simple GUI.
Created for learning purposes.

## How to install
Folder "Runnable" can be downloaded and executed directly using the provided .exe file.

## How it works
The program requires some basic inputs: employee names, specific queues worked (our specificic queues from Zendesk were
used in the context of the tool), HubStaff (time management tool) tasks.
Once the data is entered into the code, the program will require the CSV files generated by those external tools
in order to make the calculation.
The CSV file required by ProductivityCSVReader has a specific format used internally at my place of work and
will probably not be applicable in other situations.

## Licensing
The code in this project is licensed under MIT license.

repository: antorus/svarog

repo_name: antorus/svarog


text:
# docker-selinux-playground

An selinux playground for docker containers and the `--security-opt` switch. Depicts some selinux basics regarding docker, container isolation, MCS labels, a custom selinux domain type and seccomp.

A [walk-through](https://github.com/de-wiring/docker-selinux-playground/blob/master/docs/README.md) can be found in `docs/`

## License
The MIT License (MIT)
Copyright (c) 2015 Andreas Schmidt

repository: de-wiring/docker-selinux-playground

gha_language: Shell

repo_name: de-wiring/docker-selinux-playground


text:
# Anker Soundcore Spirit X
See [usage instructions](https://github.com/jaakkopasanen/AutoEq#usage) for more options and info.

### Parametric EQs
In case of using parametric equalizer, apply preamp of **-4.0dB** and build filters manually
with these parameters. The first 5 filters can be used independently.
When using independent subset of filters, apply preamp of **-4.0dB**.

| Type    | Fc      |    Q | Gain    |
|:--------|:--------|:-----|:--------|
| Peaking | 15 Hz   | 0.37 | -5.2 dB |
| Peaking | 67 Hz   | 0.28 | -4.9 dB |
| Peaking | 267 Hz  | 1.26 | 5.5 dB  |
| Peaking | 776 Hz  | 2.22 | 3.4 dB  |
| Peaking | 5160 Hz | 2.91 | -4.6 dB |
| Peaking | 988 Hz  | 4.35 | 0.9 dB  |
| Peaking | 2073 Hz | 1.07 | -1.4 dB |
| Peaking | 2669 Hz | 3.18 | 1.8 dB  |
| Peaking | 7011 Hz | 3.63 | -0.8 dB |
| Peaking | 7305 Hz | 5.73 | 2.8 dB  |

### Fixed Band EQs
In case of using fixed band (also called graphic) equalizer, apply preamp of **-3.2dB**
(if available) and set gains manually with these parameters.

| Type    | Fc       |    Q | Gain    |
|:--------|:---------|:-----|:--------|
| Peaking | 31 Hz    | 1.41 | -8.1 dB |
| Peaking | 62 Hz    | 1.41 | -4.8 dB |
| Peaking | 125 Hz   | 1.41 | -3.7 dB |
| Peaking | 250 Hz   | 1.41 | 3.3 dB  |
| Peaking | 500 Hz   | 1.41 | 1.2 dB  |
| Peaking | 1000 Hz  | 1.41 | 1.9 dB  |
| Peaking | 2000 Hz  | 1.41 | -0.6 dB |
| Peaking | 4000 Hz  | 1.41 | -2.3 dB |
| Peaking | 8000 Hz  | 1.41 | -0.1 dB |
| Peaking | 16000 Hz | 1.41 | 0.1 dB  |

### Graphs
![](https://raw.githubusercontent.com/jaakkopasanen/AutoEq/master/results/rtings/avg/Anker%20Soundcore%20Spirit%20X/Anker%20Soundcore%20Spirit%20X.png)

path: /results/rtings/avg/Anker Soundcore Spirit X/README.md


text:
<!--
# This file is automatically generated by the `jsarch`
# module. Do not change it elsewhere, changes would
# be overriden.
-->
# Architecture Notes

## Transform per suffixes

The idea is to recursively traverse a JavaScript object
 tree in order to find some suffixes and apply transformations
 to it.

We choose to use a functionnal signature but for performance
 reasons, we mutate the given object in place. This is then
 your responsibility to ensure that those side effects won't
 mess your app.

[See in context](./index.js#L8-L18)

### Performance tip

To avoid unecessary string comparison, we
        just skip it when the key is shorter than
        the suffix.

[See in context](./index.js#L56-L61)

repository: nfroidure/transform-per-suffixes

gha_language: JavaScript

repo_name: nfroidure/transform-per-suffixes


text:
---
title: Understanding Python's slice notation
type: story
tags: python,list
authors: maciv
cover: blog_images/python-slice-notation.jpg
excerpt: Learn everything you need to know about Python's slice notation with this handy guide.
---

#### Python slice notation

- Understanding Python's slice notation (this blog post)
- [Understanding Python's slice assignment](/blog/s/python-slice-assignment)

### Basic syntax

Python's slice notation is used to return a list or a portion of a list. The basic syntax is as follows:

```py
[start_at:stop_before:step]
```

Where `start_at` is the index of the first item to be returned (included), `stop_before` is the index of the element before which to stop (not included) and `step` is the stride between any two items.

All three of the arguments are optional, meaning you can omit any of them. For example:

```py
nums = [1, 2, 3, 4, 5]

nums[1:4]     # [2, 3, 4]   (start at 0, stop before 4)
nums[2:]      # [3, 4, 5]   (start at 0, stop at end of list)
nums[:3]      # [1, 2, 3]   (start at 0, stop before 3)
nums[1:4:2]   # [2, 4]      (start at 1, stop before 4, every 2nd element)
nums[2::2]    # [3, 5]      (start at 2, stop at end of list, every 2nd element)
nums[:3:2]    # [1, 3]      (start at 0, stop before 3, every 2nd element)
nums[::2]     # [1, 3, 5]   (start at 0, stop at end of list, every 2nd element)
nums[::]      # [1, 2, 3, 4, 5] (start at 0, stop at end of list)
```

As you can probably tell from the examples above, the default values are `start_at = 0`, `stop_before = len(nums)`, `step = 1`.

> An idiomatic way to shallow clone a list would be using `[:]` (e.g. `nums_clone = nums[:]`).

### Negative values

All three of the arguments also accept negative values. For `start_at` and `stop_before`, a negative value means counting from the end of the list instead of counting from the start. For example `-1` would represent the last element, `-2` the second last element etc. For example:

```py
nums = [1, 2, 3, 4, 5]

nums[1:-2]    # [2, 3]      (start at 1, stop before 2nd to last)
nums[-3:-1]   # [3, 4]      (start at 3rd to last, stop before last)
```

A negative `step` means that the list is sliced in reverse (from end to start). This also means that `start_at` should be greater than `stop_before` and that `stop_before` in the context of a reverse stride is more like `stop_after` if you are looking at the list non-reversed. For example:

```py
nums = [1, 2, 3, 4, 5]

nums[::-1]    # [5, 4, 3, 2, 1]   (reversed)
nums[4:1:-1]  # [5, 4, 3]   (reversed, start at 4, stop after 1)
nums[-1:1:-2] # [5, 3]      (reversed, start at last, stop after 1, every 2nd)
```

### Empty slices

Bear in mind that slice notation is very forgiving, so you'll get an empty list if the arguments' values are out of the list's range. For example:

```py
nums = [1, 2, 3, 4, 5]

nums[6:8]     # []
nums[:-10]    # []
```

[Continue on Understanding Python's slice assignment](/blog/s/python-slice-assignment)

**Image credit:** [amoon ra](https://unsplash.com/@amoonra?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)


text:
# Activityko
An activity logger for rails 5. It provides view helpers to render basic format of activity.

## Installation

```ruby
gem 'activityko'
```

And then execute:

    $ bundle
Then generate model and migration files

    $ rails g activityko:install
    $ rake db:migrate

## Usage
### Owner of the Activity
Add this to your ```User``` model
```ruby
class User < ApplicationRecord
  act_as_loggable
end
```
This will add ```create_activity(action, options={})``` method to your model
### Object of the Activity
Then, make all possible objects of ```Activity``` an activty object.

```ruby
class Group < ApplicationRecord
  act_as_activity_object
end
class Location <ApplicationRecord
  act_as_activity_object
end
```
or
``` ruby
class ApplicationRecord < ActiveRecord::Base
  act_as_activity_object
end
```

An ```activity_name``` method is added to all activity objects.

The ```User``` model is also an activity object.

### View Helpers
User ``` basic_activity ``` method to display an activity

```ruby
<% @activities.each do |a| %>
  <%= basic_activity %>
<% end %>
```
or
basic_activity also accepts ```block```
```ruby
<% basic_activity @activity do%>
  <%= activity_subj %>
	<%= activity_action %>
	<%= activity_dir_obj %>
	<%= activity_prep %>
	<%= activity_prep_obj %>
	<%= activity_time %>
<% end %>
```

You can customize each activity output by using ```render_activity```. Inspired by [Public Activity](https://github.com/chaps-io/public_activity)  gem. Check it out.

```ruby
  <%= render_activity @activity%>
```
File structure
```
app:
  views:
    activities:
      <activity_obj_model>:
        _<activity_action>.html.erb
```
## Contributing

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

## License

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

repository: neume/activityko

repo_name: neume/activityko


text:
# quorum_intersection
A tool for verifying the quorum intersection property of the stellar network. It accepts data in JSON format compatible with https://www.stellarbeat.io/nodes/raw . Use --help parameter to see available options. WARNING: the problem of finding disjoint quorums in stellar's network configuration is NP-hard.

Details of the algorithm can be found here: https://arxiv.org/abs/1902.06493

## Getting Started
### Prerequisites
Tools and libraries required to build this project:
* g++ 5.4.0
* boost_graph 1.58.0
* boost_log 1.58.0
* boost_program_options 1.58.0
* cmake 3.5.1
### Build Instructions
```console
mkdir build;
cd build;
cmake ../;
cmake --build .;
```
### Example Session
```console
curl "https://www.stellarbeat.io/nodes/raw" | ./quorum_intersection -v
```
Expected Output:
```console
'true' if all quorums of a given configuration intersect. 'false' otherwise..
```


text:
# Playing with cockroachdb

## Ingredients
* GNU make based cockroach cluster setup
* non root cockroach db image

## Requirements
* docker
* docker-compose >= 3.8 support
* local psql client

## Usage

### First create/start the cluster

This
* generates certs
* starts a cluster
* inits the cluster (if new)
* configures cluster settings
* creates a user dba

```
make start-cluster
```

### Connect to cockroachdb dashboard
```
xdg-open http://localhost:8080
```

### Connect to cockroachdb via psql client
```
psql postgresql://root@localhost:26257?sslmode=disable
```

### Destroy cluster
```
make destroy-cluster
```

## License
[MIT](./license.txt)

repository: cbuschka/cockroachdb-eval

repo_name: cbuschka/cockroachdb-eval


text:
# Discoteq

discoteq -- discover services from service registries

## Synopsis

`discoteq` [`-c` *config-file*] [`-k` *chef-key*] [`-s` *chef-server*]
 [`-E` *chef-environment*] [`-u` *chef-client-name*] [*file*]

## Description

`discoteq(1)` is a tool for service discovery integration. Its job is to
attach your application to all those fancy service coordination systems
that are popping up. In an ideal world, you wouldn't need discoteq. But
when you've got to iterate into something better, discoteq can help.

Unlike most other tools in the space, `discoteq(1)` does not handle
scheduling, templating, triggering reloads, or other complex behaviour.
Other tools exist for these problems: `cron(8)`, `tilt(1)`, `kill(1)`,
&c.

## The simplest thing that could possibly work

    apt-get install discoteq
    cat >/etc/discoteq.json <<EOF
    {
        "services": {
            "myface-fascade": {
                "role": "myface-lb"
            },
            "myface": {
                "role": "myface"
            },
            "myface-db-master": {
                "query": "role:myface-db AND tag:master"
            },
            "myface-db-slave": {
                "query": "role:myface-db AND tag:slave"
            },
            "myface-cache": {
                "role": "myface-cache"
            },
            "statsd": {
                "role": "statsd",
                "include_chef_environment": false,
                "attrs": {
                    "hostname": "cloud.private_ipv4",
                    "port": "statsd.port"
                }
            }
        }
    }
    EOF

    discoteq < /etc/discoteq.json > /var/lib/discoteq/services.json
    cat /var/lib/discoteq/services.json
    {
        "services": {
            "myface-fascade": [
                {
                    "hostname": "myface-lb.example.net"
                }
            ],
            "myface": [
                {
                    "hostname": "myface-001.example.net"
                }
            ],
            "myface-db-master": [
                {
                    "hostname": "myface-db-001.example.net"
                }
            ],
            "myface-db-slave": [
                {
                    "hostname": "myface-db-002.example.net"
                },
                {
                    "hostname": "myface-db-003.example.net"
                }
            ],
            "myface-cache": [
                {
                    "hostname": "myface-cache-001.example.net"
                }
            ],
            "statsd": [
                {
                    "hostname": "<IP_ADDRESS>",
                    "port": 8126
                }
            ]
        }
    }

As you can see, you just need to drop a config file, run `discoteq` with
an output file, and it will populate the file with the host attributes
you need.

This assumes the some (somewhat unlikely) defaults for speaking to a
chef server.

## Installation

Eventually, the installation process should be:

    add-apt-repository ppa:discoteq/discoteq
    apt-get update
    apt-get install discoteq

But today you'll need a [working go development environment][], and you
can install with:

    go get github.com/discoteq/discoteq-go

## Usage

By default, `discoteq(1)` expects config as its standard input, and
writes its service map to standard output. Of course, a few things
occasionally need to be specified for your particular environment.

## Options

`-c` *config-file*
:   config file path, default `"/etc/discoteq.json"`

`-E` *chef-environment*
:   Chef environment query scope, default:
    `node.chef_environment || "_default"`

`-k` *chef-key*
:   Chef client key file path, default: `"/etc/chef/client.pem"`

`-s` *chef-server*
:   Chef server URL, default: `"http://localhost:4545"`

`-u` *chef-client-name*
:   Chef client username, default: `node.fqdn`

## Supported queries types

Each service query needs to return a list of service host records, each of which must have a `hostname` attribute.

```js
[
  {
    "hostname": "myface-002.example.net",
    "port": 8080
  },
  {
    "hostname": "myface-003.example.net",
    "port": 8081
  }
]
```
As such, queries need a way to select a set of hosts and a way to extract key-value pairs for each.

At the moment, the only type of query supported are Chef searches of the `node` index.

`query`
: Chef search query.

`role`
: Shorthand for a `query` of `role:{role}`.

`tag`
: Shorthand for a `query` of `tag:{tag}`.

`include_chef_environment`
: whether to append `"AND chef_environment:{chef-environment}"` to the query. Defaults to true.
  The `chef-environment` comes from the `-E` parameter, or defaults to `"_default"`

`attrs`
: Map of exported key onto an attribute key. Nested attributes may be accessed by combining the keys with a `.`, eg: setting the `hostname` attribute from `node['cloud']['private_ipv4']` can use the notation `"attrs": { "hostname": "cloud.private_ipv4" }`. `attrs` defaults to `{"hostname": "fqdn"}` and will merge the default with any provided attrs.

## Templating from JSON

Of course, your app probably doesn't expect its services in the format
discoteq provides. Perhaps you're currently using chef to populate a
config file using ERB, and it seems awfully inconvenient to have to
change your app to accommodate this tool.

Fear not! The ever powerful [`tilt(1)`][] templating tool will handle
your needs! Simply specify your data and template files and it will
print the rendered text to standard out.

``` {.sh}
discoteq < /etc/discoteq.conf > /etc/myface.json
tilt -d /etc/myface.json myface-template.erb > $APP/myface.config
```

## How do I make it act like [`confd`][]?

[`confd`][] is an awesome tool that tries to solve similar problems to
discoteq. But while `confd` is a one-stop-shop for configuration
management, discoteq requires you to use existing tools to do similar
things.

### How to I schedule discoteq to update files?

At the moment discoteq only supports polling data stores, so scheduling
updates is just a matter of frequency. Ye olde [`crontab(5)`][] is more
than equipped for your needs.

    */5 * * * *  /usr/local/bin/discoteq \
                 < /etc/discoteq/services-conf.json \
                 > /var/lib/discoteq/services.json

### My app doesn't understand discoteq's JSON, how do I populate a template with it?

Your favorite templating language probably already has a command line
client that you can use:

-   [`tilt(1)`][] is a ruby gem that supports a [large number of
    template formats][], and has recently been updated to accept JSON
    input. This is currently our recommended tool for [ERB][]
    templating.
-   [`mustache(1)`][] is the ubiquitous logic-less templating language
    available on every platform ever. This accepts a YAML data input, so
    JSON is fine.

We'd also like to create command-line tools for [jinja][] and
[`test/template`][].

### What if an invalid config file is generated? How do I avoid breaking everything?

Config file check-and-swap is a common problem and deserves a common
solution. At the moment we don't know a good tool to recommend. If you
know of one, please let us know! If you want to build one yourself, we'd
love to help!

### What if someone else is touching the file? Couldn't this lead to inconsistant behaviour?

`flock(1)` allows you to create exclusive locks for writes and shared
locks for reads. It's designed to be used in shell scripts and is
probably easier to use than modifying your existing programs to have
mutual exclusion.

On Linux, you can use the [util-linux `flock(1)`][]. If you aren't on
Linux, we've developed a [portable `flock(1)`][] which supports Darwin,
FreeBSD and Illumos.

### How do I trigger my service when the config updates?

[`fswatch(7)`][] can trigger events whenever a file changes, either as a
one-off or for every event.

    $ fswatch -1 /var/lib/discoteq/services.json |
      xargs -n1 -I% echo "Hello, %!" &
    $ touch /var/lib/discoteq/services.json
    Hello, /var/lib/discoteq/services.json!

Of course this depends triggers on every modification of inode state,
not file contents. Make sure not to touch files you aren't actually
changing!

### That sounds lovely, but what does a real solution look like?

Yeah, tying all this together can be… exciting.

Run this script through a process manager like [`runit`][] or
[`systemd`][]:

``` {.sh}
#!/bin/sh
# myface-cfg-update - watch for service updates
#   and safely load them into myface

BASE=myface
TEMP=`mktemp -t $BASE.XXXXXXXXXX` || exit 1

SERVICE_MAP=/var/lib/discoteq/services.json
TEMPLATE=/opt/myface/config.erb
CONFIG=/etc/myface.cfg
DAEMON=myface

# watch for service info changes in registry
# re-eval config template
# verify generated config is valid
# swap if valid and different
# reload if swapped
fswatch -1 $SERVICE_MAP &&
  tilt -d $SERVICE_MAP $TEMPLATE > $TEMP &&
  myface --check-cfg $TEMP &&
  flock $CONFIG diffswp $TEMP $CONFIG &&
  service $DAEMON reload
```

With this in your [`crontab(5)`][]:

    */5 * * * *  /usr/local/bin/discoteq \
                 < /etc/discoteq/services-conf.json \
                 > /var/lib/discoteq/services.json

  [working go development environment]: http://blog.golang.org/organizing-go-code
  [`tilt(1)`]: https://github.com/rtomayko/tilt/blob/master/man/tilt.1.ronn
  [`confd`]: http://www.confd.io/
  [`crontab(5)`]: http://crontab.org/
  [large number of template formats]: https://github.com/rtomayko/tilt/blob/master/docs/TEMPLATES.md
  [ERB]: https://github.com/rtomayko/tilt/blob/master/docs/TEMPLATES.md#erb
  [`mustache(1)`]: https://mustache.github.io/mustache.1.html
  [jinja]: http://jinja.pocoo.org/
  [`test/template`]: http://golang.org/pkg/text/template/
  [util-linux `flock(1)`]: http://linuxmanpages.net/manpages/fedora20/man1/flock.1.html
  [portable `flock(1)`]: https://github.com/discoteq/flock
  [`fswatch(7)`]: https://github.com/alandipert/fswatch
  [`runit`]: http://smarden.org/runit/index.html
  [`systemd`]: http://freedesktop.org/wiki/Software/systemd/

license: ISC

repository: discoteq/discoteq-go

repo_name: discoteq/discoteq-go


text:
---
title: 'Class 7'
currentMenu: classes
---

## Agile: Sprint Review and Retrospective

Additionally, you'll conduct a [Sprint Retro](../../articles/agile-ceremonies/#retrospective-and-sprint-review) to close down the sprint.

Be prepared to talk about:
- The user stories you completed this sprint.  **We expect you to complete at least one user story every week.**
- The user stories you planned to finish, but couldn't this sprint. Briefly mention what blocked you, and how you can resolve the issue next sprint.
- What you learned.

## Project Module

In class 7, we'll discuss [Project Presentation](../../assignments/project-presentation/). This assignment is a way for you to start organizing your thoughts around your project. This will help prepare yourself to talk about your project with other developers. Outside of the project presentation you should focus on completing as many user stories as possible for your project.

## Agile: Sprint Kickoff

We have reviewed our last sprint, and now we need to plan our work for our final sprint. A [sprint kickoff](../../articles/agile-ceremonies/#sprint-kickoff) is your chance to decide what you will be working on this sprint.

Take a few minutes to look over your user stories. If you still have plenty of user stories, work on prioritizing those stories. You should choose user stories that have a higher priority for this sprint. If you don't have many user stories, take some time to write new user stories.

When you are ready for the Sprint Kickoff be prepared to:
- Talk about the user stories you are planning on completing this sprint.
- Discuss the priority of these stories.
- Set a goal to have X number of stories completed by next week to discuss in the Standup.

## Career Module

There is no new Career Module work. If you need to make up a Mock Interview, or Live Coding assignment, free time will be provided. Check your grades on Canvas, if you are missing a grade, or have a 0 for Live Coding, or Mock Interview ask your Mentor if you can make up one of these assignments.

repository: mrantry/liftoff

repo_name: mrantry/liftoff


text:
# middleman-kss

[![Code Climate](https://codeclimate.com/github/Darep/middleman-kss.png)](https://codeclimate.com/github/Darep/middleman-kss)
[![Build Status](https://travis-ci.org/Darep/middleman-kss.png?branch=master)](https://travis-ci.org/Darep/middleman-kss)

`middleman-kss` provides [KSS][kss] helpers for
[Middleman](http://middlemanapp.com/). With these helpers, you can easily
insert KSS styleguide blocks. Great for creating styleguides or design
guidelines.

P.S. This gem was mainly created to be used with my
[middleman-styleguide-template][template], which I use for creating styleguides
and other documentation.

## Requirements

`middleman-kss` has currently only been tested with Middleman 3.2.0.

## Installation

Add this line to your Middleman project Gemfile:

    gem 'middleman-kss'

And then execute:

    $ bundle

Open your `config.rb` and add the required settings:

```ruby
set :markdown_engine, :redcarpet
activate :kss, :kss_dir => 'stylesheets/external'
```

Note: The :kss_dir should be set so all the `url('...')`s in your CSS map correctly.

Create a `styleblocks`-directory under `source/`

    $ mkdir source/styleblocks

And read the next chapter for usage instructions.

## Usage

Okay, here's the deal:

1. Write your CSS\* in [KSS][kss]
2. Insert your CSS into the directory you specified as your `kss_dir` in `config.rb`
3. Create individual style blocks into `source/styleblocks`
    - Name them like this: `_buttons.html.erb`, you know
4. Include the CSS files in the styleguide HTML
5. Use the helper (documentation below) to print the style blocks

See my [middleman-styleguide-template][template] for examples!

\* You can use Sass, SCSS or LESS, too :)

## Configuration

Here is a full extension activation string with all the configuration variables and default options:

```ruby
activate :kss, :kss_dir => 'stylesheets',
  :styleblock_path => 'styleblocks',
  :custom_styleguide_block => false,
  :styleguide_block_file => '_styleguide_block.html.erb'
```

If you want to create a custom styleguide block file, refer to the [default styleguide block file](https://github.com/Darep/middleman-kss/blob/master/lib/middleman-kss/_styleguide_block.html.erb) for help.

### Helpers

**styleblock** <%= styleblock 'filename', [section: '1.1'] %>

Renders the styleblock named `filename`.

*Optional:* `section` parameter maps the
rendered styleblock to a KSS section, which will expand the section into a fully
documented KSS styleblock with all the available classes and such.

Examples:

```erb
<%= styleblock 'buttons' %>
<%= styleblock 'buttons', section: '1.1' %>
```

## Contributing

Contributions are most welcome! And well-tested and documented contributions are
more welcome than others ;)

1. [Fork the repository][fork]
2. [Create a branch][branch] (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. [Create a pull request][pr]

[kss]: https://github.com/kneath/kss
[template]: https://github.com/Darep/middleman-styleguide-template
[fork]: http://help.github.com/fork-a-repo/
[branch]: http://learn.github.com/p/branching.html
[pr]: http://help.github.com/send-pull-requests/

repository: Darep/middleman-kss

repo_name: Darep/middleman-kss


text:
Github Service Status Extension

		Stay on top of the status of github.com and its status messages.

## Preview
The extension fetches data from the official [rss channel](https://status.github.com/messages.rss) of Guthub,
otherwise uses the index page of [status.github.com](https://status.github.com/messages) as a source. The extension updates its state every minute.

![](.media/preview_1.png)
![](.media/preview_2.png)

## Github Issues

|Icon| Description|
|---|:---:|
|![](.media/s_init.png)| Initial state of the extension. The extension has not yet got data from Github.
|![](.media/s_good.png)| Github works without any issues
|![](.media/s_minor.png)| Some minor issue occurred.
|![](.media/s_major.png)| Some major issue occurred.

## Collaboration

Please, feel free to ask any questions that you have about using and developing the extension.

---
Good luck.

repository: anein/github-status-extension

repo_name: anein/github-status-extension


text:
IPQualityScore IP Address Reputation & Proxy Detection Golang DB Reader

Flat File Version 1.0

        Our flat file proxy detection database allows you to lookup important details about any IP address using a straight forward library. Simply install the reader, download a database and instantly check IP addresses against our large volume of data.

    Click here to see the full Golang IPQualityScore flat file database documentation or click here for a more in depth explanation of what our proxy detection database does.

Installation

        Installation can be achieved via go's built in package manager like such:

go get github.com/IPQualityScore/GoIPQSDBReader

Usage

        Using our flat file database system to lookup an IP address is simple:

ip := "<IP_ADDRESS>";

reader, err := GoIPQSDBReader.Open("IPQualityScore-Reputation-IPV4-Database.ipqs");
if(err != nil){
    panic(err);
}

record, err := reader.Fetch(ip); // Returns a IPQSRecord struct. See further documentation below.
if(err != nil){
    panic(err);
}

if(record.IsProxy){
    fmt.Println(ip + " is a proxy!");
}

IPQSRecord Struct Fields

        Depending on which database file you receive some of these fields may be unavailable. If the field in question is unavailable in your database it will default to Golang's default value for that type.

						Field
						Type
						Description

						record.IsProxy
						bool
						Is this IP address suspected to be a proxy?  This can include data center ranges which can become active VPNs at any time. The "proxy" status will always be true when this value is true.

						record.IsTOR
						bool
						Is this IP suspected of being a TOR connection? This can include previously active TOR nodes and exits which can become active TOR exits at any time. The "proxy" status will always be true when this value is true.

						record.IsCrawler
						bool
						Is this IP associated with being a confirmed crawler from a mainstream search engine such as Googlebot, Bingbot, Yandex, etc. based on hostname or IP address verification.

						record.IsBot
						bool
						Indicates if bots or non-human traffic has recently used this IP address to engage in automated fraudulent behavior. Provides stronger confidence that the IP address is suspicious.

						record.RecentAbuse
						bool
						This value will indicate if there has been any recently verified abuse across our network for this IP address. Abuse could be a confirmed chargeback, compromised device, fake app install, or similar malicious behavior within the past few days.

						record.IsBlacklisted
						bool
						This value will indicate if the IP has been blacklisted by any 3rd party agency for spam, abuse or fraud.

						record.IsPrivate
						bool
						This value will indicate if the IP is a private, nonrouteable IP address.

						record.IsMobile
						bool
						This value will indicate if the IP is likely owned by a mobile carrier.

						record.HasOpenPorts
						bool
						This value will indicate if the IP has recently had open (listening) ports.

						record.IsHostingProvider
						bool
						This value will indicate if the IP is likely owned by a hosting provider or is leased to a hosting company.

						record.ActiveVPN
						bool
						Identifies active VPN connections used by popular VPN services and private VPN servers.

						record.ActiveTOR
						bool
						Identifies active TOR exits on the TOR network.

						record.PublicAccessPoint
						bool
						Indicates if this IP is likely to be a public access point such as a coffee shop, college or library.

						record.ConnectionType.Raw
						int

                                A numerical representation for the suspected type of connection for this IP address. It is generally reccomended you call the ToString() function listed below instead of using this value, but it is available as an option.

                                                #
                                                Enum Description

                                                1
                                                Residential IP

                                                2
                                                Mobile IP

                                                3
                                                Corporate IP

                                                4
                                                Data Center IP

                                                5
                                                Educational IP

						record.ConnectionType.ToString()
						int

                                A string representation for the suspected type of connection for this IP address. (Residential, Mobile, Corporate, Data Center, Education or Unknown)

						record.AbuseVelocity.Raw
						int

                                How frequently the IP address is engaging in abuse across the IPQS threat network. Can be used in combination with the Fraud Score to identify bad behavior. It is generally reccomended you call the ToString() function listed below instead of using this value, but it is available as an option.

                                                #
                                                Enum Description

                                                1
                                                Low Recent Abuse IP

                                                2
                                                Medium Recent Abuse IP

                                                3
                                                High Recent Abuse IP

						record.AbuseVelocity.ToString()
						int

                                How frequently the IP address is engaging in abuse across the IPQS threat network. Values can be "high", "medium", "low", or "none".

						record.Country
						string

                                Two character country code of IP address or "N/A" if unknown.

						record.City
						string

                                City of IP address if available or "N/A" if unknown.

						record.ISP
						string

                                ISP if one is known. Otherwise "N/A".

						record.Organization
						string

                                Organization if one is known. Can be parent company or sub company of the listed ISP. Otherwise "N/A".

						record.ASN
						int

                                Autonomous System Number if one is known. Zero if nonexistent.

						record.Timezone
						string

                                Timezone of IP address if available or "N/A" if unknown.

						record.Latitude
						float32

                                Latitude of IP address if available or 0.00 if unknown.

						record.Longitude
						float32

                                Longitude of IP address if available or 0.00 if unknown.

						record.FraudScore
						map[int]int

                                A map containing multiple possible fraud scores. The key is the "strictness level" of the query and can be 0, 1 or 2. Some databases may contain 1 entry, others all 3. It is reccomended that you use the lowest strictness for Fraud Scoring. Increasing this value will expand the tests we perform. Levels 2+ have a higher risk of false-positives.

Usage Notes

        Each database only holds either IPv4 or IPv6 data. Therefore you may need two instances of the reader available depending on your use case.

repository: IPQualityScore/GoIPQSDBReader

repo_name: IPQualityScore/GoIPQSDBReader


text:
# Architecture of InstantSearch

InstantSearch is inspired by the MVVM architecture.

This is an overview of the architecture:

```
View <--> ViewModel <--> Binder <--> Interactor/Model
                           |
                           V
                         Builder
```

Widgets can mean two things, depending on how modular you want your components to be:

1. It can be the View

```
WidgetV <--> WidgetVM <--> Binder <--> Searcher
                             |
                             V
                           Builder
```

In this first case, we offer a better modular architecture where a WidgetVM can be reused
for different kind of widgets, for example: a collectionView and tableView can share
the same VM since the business logic is exactly the same, only the layout changes.
In that case, the Widget is independent of InstantSearchCore and WidgetVM is independent of UIKit.

2. It can be the View and the ViewModel

```
WidgetVVM <--> Binder <--> Searcher
                 |
                 V
              Builder
```

In this second case, we offer an easier way to create new widgets since the widget has access
to the searcher and all of its method. The downside here is that we can't reuse the business logic
through a VM. The upside is that it's easy for 3rd party devs to create their own widgets and plug into IS.
In that case, the Widget is dependent on both InstantSearchCore and UIKit.

We note that the View and the ViewModel depend on abstract delegates, which makes them reusable and testable.

To explain the remaining 2 components:

1- **Binder**: plays a role of exposing all possible search events, whether from the Searcher or other widgets,
and making them available for ViewModels or Views so that they can tune in.
In a way, it is like an observable that knows about all search events, and it will send the search events to
the observers that decided to tune in. We decided to go with delegation to offer a clean safe interface.
It also makes sure to call the Builder methods on the Widgets that fit case 1 mentioned above

2- **Builder**: plays the role of spinning up the WidgetVM for the WidgetV, takes care of injecting the concrete implementations into the WidgetV and the WidgetVM, and finally links the delegates of the WidgetV, WidgetVM and the Searcher

repository: mohsinalimat/instantsearch-ios

repo_name: mohsinalimat/instantsearch-ios


text:
[Git page](https://github.com/PenguinRage/BouncingBalls)

## Preview

{% capture images %}
    https://raw.githubusercontent.com/PenguinRage/BouncingBalls/master/BouncingParticles/images/balls.png
    https://raw.githubusercontent.com/PenguinRage/BouncingBalls/master/BouncingParticles/images/balls2.png
{% endcapture %}
{% include gallery images=images caption="examples of application" cols=2 %}


text:
# Conditional Policy Enforcement

This sample demonstrates conditional policy enforcement on
the Apigee API Platform.  Conditional policy enforcement enables
you to execute a policy based on a condition defined on a flow.

The condition in this sample evaluates a custom HTTP header called
“responsetime”. When “true”, a Python script is executed, which
populates custom response headers with metrics from the Apigee gateway.

For a complete list of redefined variables that you can use to build
 conditional logic, please see:

http://apigee.com/docs/api/predefined-variables

For instructions on constructing conditional statement with those variables, please see:

http://apigee.com/docs/api/conditional-operators

# Set up

* The username and password that you use to login to enterprise.apigee.com.
* The name of the organization in which you have an account. Login to
  enterprise.apigee.com and check account settings.

You can obtain a free account at https://accounts.apigee.com/accounts/sign_up

# Configure

Update `/setup/setenv.sh` with your environment details

# Import and deploy sample project

To deploy, run `$ sh deploy.sh`

To test, run `$ sh invoke.sh`

# Get help

For assistance, please use [Apigee Support](https://community.apigee.com/content/apigee-customer-support).

Copyright © 2014, 2015 Apigee Corporation

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

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

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

repository: carlosfrias/api-platform-samples

repo_name: carlosfrias/api-platform-samples


text:
# Changelog - rm-glob

### 0.0.5

__Changes__

- packaging: add choco package, add deb/rpm repositories

__Contributors__

- mh-cbon

Released by mh-cbon, Sat 30 Jul 2016 -
[see the diff](https://github.com/mh-cbon/rm-glob/compare/0.0.4...0.0.5#diff)
______________

### 0.0.4

__Changes__

- travis: deploy key was incorrect

__Contributors__

- mh-cbon

Released by mh-cbon, Sat 23 Jul 2016 -
[see the diff](https://github.com/mh-cbon/rm-glob/compare/0.0.3...0.0.4#diff)
______________

### 0.0.3

__Changes__

- packaging: add rpm/deb/msi support
- changelog: init
- README: update install section
- release: update release script

__Contributors__

- mh-cbon

Released by mh-cbon, Sat 23 Jul 2016 -
[see the diff](https://github.com/mh-cbon/rm-glob/compare/0.0.2...0.0.3#diff)
______________

### 0.0.2

__Changes__

- update release scripts

__Contributors__

- mh-cbon

Released by mh-cbon, Thu 16 Jun 2016 -
[see the diff](https://github.com/mh-cbon/rm-glob/compare/0.0.1...0.0.2#diff)
______________

### 0.0.1

__Changes__

- Initial release

__Contributors__

- mh-cbon

Released by mh-cbon, Thu 16 Jun 2016 -
[see the diff](https://github.com/mh-cbon/rm-glob/compare/8840b20dca057a9e53334078ccaf326d7a120820...0.0.1#diff)
______________

repository: mh-cbon/rm-glob

repo_name: mh-cbon/rm-glob


text:
### [CVE-2020-28021](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-28021)
![](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

Exim 4 before 4.94.2 has Improper Neutralization of Line Delimiters. An authenticated remote SMTP client can insert newline characters into a spool file (which indirectly leads to remote code execution as root) via AUTH= in a MAIL FROM command.

### POC

#### Reference
- https://www.exim.org/static/doc/security/CVE-2020-qualys/CVE-2020-28021-MAUTH.txt

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
### Homework #4:
___
![](files/0001.jpg)
___
![](files/0002.jpg)
___
### Solutions
<!-- html library writer:
1. Clone the repo
2. `cd` to `homework_3`
3. Run `./install.sh`
    * This will creat the `Saeed_html_file.html` inside the `web_app` folder. -->

---
*Some useful links that you might check before/while solving the homework:*


text:
# gethub

![](https://f.cloud.github.com/assets/846194/628861/8090cb46-d104-11e2-84eb-7878aa9057d0.gif)

## Overview
[![Build Status](https://api.travis-ci.org/pearkes/get.png?branch=master)](https://travis-ci.org/pearkes/gethub)

`gethub` helps you keep all of your git repositories that have GitHub
remotes up to date.

## Installation

You can download a binary, `deb` or `exe`, depending on your platform.

- darwin/386: [[binary](http://gethub.jack.ly/0.1.3/darwin_386/gethub_0.1.3_darwin_386.zip)]
- darwin/amd64: [[binary](http://gethub.jack.ly/0.1.3/darwin_amd64/gethub_0.1.3_darwin_amd64.zip)]
- linux/386: [[deb](http://gethub.jack.ly/0.1.3/linux_386/gethub_0.1.3_i386.deb)] [[binary](http://gethub.jack.ly/0.1.3/linux_386/gethub_0.1.3_linux_386.tar.gz)]
- linux/amd64: [[deb](http://gethub.jack.ly/0.1.3/linux_amd64/gethub_0.1.3_amd64.deb)] [[binary](http://gethub.jack.ly/0.1.3/linux_amd64/gethub_0.1.3_linux_amd64.tar.gz)]
- linux/arm: [[deb](http://gethub.jack.ly/0.1.3/linux_arm/gethub_0.1.3_armel.deb)] [[binary](http://gethub.jack.ly/0.1.3/linux_arm/gethub_0.1.3_linux_arm.tar.gz)]
- windows/386: [[exe](http://gethub.jack.ly/0.1.3/windows_386/gethub_0.1.3_windows_386.zip)]
- windows/amd64: [[exe](http://gethub.jack.ly/0.1.3/windows_amd64/gethub_0.1.3_windows_amd64.zip)]

To determine your platform:

    uname -sm

On Darwin, you can copy the binary to your bin:

    cp ~/path/to/gethub /usr/local/bin/

Or, if you have [Go](http://golang.org/) installed:

    go install github.com/pearkes/gethub

## Getting Started

    $ gethub authorize

This asks you where you want to clone your repositories as well
as creating an OAuth token for future GitHub requests.

The next time you run a `gethub`, all of your new repositories
will be cloned and your existing repositories will be fetched.

It's useful if you have a lot of repos and may not have an
internet connection.

Never leave home without running `gethub`.

## Directory Structure

It's opinionated about how you organize your repositories.

    ├── pearkes
    │   ├── gethub
    │   ├── tugboat
    │   └── jack.ly
    ├── mitchellh
    │   └── vagrant
    ├── amadeus
    │   └── html7
    ├── someorg
    │   └── bigproject
    └── someotherorg
        └── biggerproject

Basically, your repositories will be name-spaced according
to who the owner is on GitHub.

## Behind the Curtain

    $ gethub

1. Checks to see if the necessary requirements for `gethub` exist,
like it's `~/.gethubconfig` file.
2. Makes sure the path to your repositories looks ok.
3. Clones any repositories that are missing.
4. Runs `git fetch` in repositories that exist.

## Configuration

Configuration is stored in a `.gethubconfig` file in your home directory.
(`~/.gethubconfig`)

### Ignored Repositories

Sometimes you don't want to retrieve that gigantic project that
someone committed `.mov` files to.

    [ignores]
    repo: icloud, facebook, pearkes/bootstrap
    owner: adobe

## Contributing

Check out the [contributing guide](CONTRIBUTING.md).


text:
# Action.Convert

***All methods in this section are called from _.Action***

### Func\<object\> ToFunction(Action action);
Converts the given action into a function which performs the action then returns null. Useful for overloading functions to accept both Func and Action inputs.
```csharp
Action action = () => Console.WriteLine("I'm hit!");

object result = _.Action.ToFunction(action); // prints "I'm hit!" and result == null
```

gha_language: C#


text:
# Lab-08-LINQ
CODE: LINQ for Code Fellows 401 C#/ASP.NET assignment

**Author**: Earl Jay Caoile

**Version**: 1.0.0

## Overview
This console app shows manipulation of a JSON file using LINQ. It takes listings of
properties and breaks them down into neighborhoods.

## Getting Started
The following is required to run the program.
1. Visual Studio 2017
2. The .NET desktop development workload enabled
3. NewtonSoftJson (external NuGet package) required for this application.

## Example
![Lab 08 Screenshot](Lab08-SS.jpg)

## Happy path
- play app in Visual Studio
- read initial input
- press key for further input
- repeat last step until the exit message displays
- smile and close the app

## Architecture
This application is created using ASP.NET Core 2.0 Console applicaitons.

*Language*: C#

*Type of Applicaiton*: Console Application

## Change Log
06-15-2018 9:00 AM - initial scaffolding

06-15-2018 10:00 AM - converted JSON file into a string

06-15-2018 1:00 PM - managed to turn string into an object

06-15-2018 1:30 PM - managed to turn string into an object

06-15-2018 2:00 PM - finished first 3 queries

06-15-2018 4:00 PM - finished last two combo queries

06-15-2018 5:20 PM - readme complete


text:
# Trunk

![](https://img.shields.io/badge/trunk.css-1.0.0-brightgreen.svg) ![](https://img.shields.io/badge/License-MIT-blue.svg) ![](https://img.shields.io/badge/size-~4kB-9c27b0.svg)

[Webpage](http://akzhy.com/shelf/trunk) | [Demo page](http://trunk.akzhy.com/)

Trunk is a lightweight css framework that aims to achieve responsive grid layout. Trunk follows the same method as that of materialize to achieve this.

## Usage

Download the files and include it as follows
```html
<link href="dist/trunk.min.css" rel="stylesheet" type="text/css"/>
```

Or include from jsdelivr
```html
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/akzhy/trunk/dist/trunk.min.css"/>
```

### Grid

Grids are created in the same way as that of Materialize.css

A basic grid can be created as follows

```html
<div class="container">
    <div class="row">
        <div class="col s12 m6 l4 xl3"></div>
    </div>
</div>
```

Equal height columns can be created by adding the class `flex` to `.row`
```html
<div class="container">
    <div class="row flex">
        <div class="col s12 m4"></div>
        <div class="col s12 m4"></div>
        <div class="col s12 m4"></div>
    </div>
</div>
```

### Buttons

Buttons can easily be created with the btn class. There are four different types of buttons, adding the btn class alone will produce the default style, other styles are primary, secondary and danger.

```html
<button class="btn">Default Button</button>
<button class="btn primary">Primary Button</button>
<button class="btn secondary">Secondary Button</button>
<button class="btn danger">Danger Button</button>
```

### Utility Classes

There are a few utility classes, such as

 * `.full-width` - For applying 100% width
 * `.hidden` - For applying display none
 * `.center` - On `.row.flex`, this will center the columns horizontally

repository: akzhy/trunk

repo_name: akzhy/trunk


text:
# HomeOffice
Use this simple Java programm for your home office, to move your mouse.

The Java program moves your mouse pointer every two minutes to a random position. Compile this file to a .jar file or use a wrapper to create a .exe file and put it in the startup routine of your computer.

A pre compiled .jar file can be found [here](https://github.com/NerdyStuff/HomeOffice/blob/master/MouseMove.jar).

This program is for fun purpose only 😉.

repository: NerdyStuff/HomeOffice

repo_name: NerdyStuff/HomeOffice


text:
# dat-adsb :satellite:

This is an SDR app that recieves ADS-B radio signals from aircraft :airplane: :helicopter: and writes that data to a Dat archive. All of the radio and demodulation work in this app is being handled by a couple of great utilities written by [Thomas Watson](https://github.com/watson). If you are interested quickly getting up and running mapping flights, and arn't too interested in all this p2p stuff, I highly suggest checking out his excellent app [AirplaneJS](https://github.com/watson/airplanejs).

## Requirements
### Hardware
You will need an RTL-SDR dongle with the RTL2832U chip (when searching RTL-SDR most of them will have this chip). [rtl-sdr.com](https://www.rtl-sdr.com/buy-rtl-sdr-dvb-t-dongles/) has some very nice options available (some custom built for ADS-B reception in mind), but any cheap RTL2832U RTL-SDR dongle should work.
**Be sure you get an antenna!**
Many dongles will come packaged with one, but not all. Ideally the antenna should be acceptable for 1090MHz reception, but even the cheapies that come with some dongles will work (but your range will suffer). You can of course build your own, and [rtl-sdr.com has a great overview](https://www.rtl-sdr.com/adsb-aircraft-radar-with-rtl-sdr/) (scroll to the ADSB-Antennas section) of antennas commonly used for this purpose.

### Software
You will need [librtlsdr](https://github.com/steve-m/librtlsdr) on your system.

##### Linux
Debian flavours:
```
apt-get-install librtlsdr-dev
```
Arch flavours:
_Installing the [rx_tools package](https://aur.archlinux.org/packages/rx_tools/) from aur is the easiest._
```
pacaur -S rx_tools
```
##### Mac (Homebrew)
```
brew install librtlsdr
```
##### Windows
:question::confused::question:

## Use
This application is intended to be run in the background as a service.  However initially it is helpful to run this application manually. This allows you to be sure everything is working correctly, as well as allowing you to see the dat key the data is published to (although you can find this later too).
```
Found Rafael Micro R820T tuner
Provisioning Radio...
Max available gain is: 49.6
Setting gain to: 49.6
Gain reported by device: 49.6
Exact sample rate is: 2000000.052982 Hz
Serving dat://879a67f30e8ccd117c731c9eb4d7f45a8200bcc58bffa20c77855e3980ecaf72
```

### Station Info
The 'station' object in `package.json` allows you to provide a name and a brief description string for your ADS-B station.
```json
  "station": {
    "name": "My Cool ADS-B Station",
    "desc": "Running a Raspberry Pi using a simple dipole antenna."
  }
```
This information (along with some stats on the radio) will be published in the root of the dat archive in the `station.json` file.


text:
# deno-rollup-react-example

An example of how you can use [Rollup](https://github.com/cmorten/deno-rollup/) with [Opine](https://github.com/asos-craigmorten/opine/) and [React](https://reactjs.org/) in [Deno](https://deno.land/).

This example uses [ejs](https://github.com/syumai/dejs) templates to create the HTML markup, serves static assets for styles, and performs server-side rendering of the React application. The application itself makes use of experimental Suspense for data-fetching which demonstrates "render-as-you-fetch", retrieving data from an API the server hosts.

The client and server assets are bundled using Rollup.

## Usage

Install the Rollup CLI with:

```console
deno install -f -q --allow-read --allow-write --allow-net --allow-env --unstable<EMAIL_ADDRESS>```

And follow any suggestions to update your `PATH` environment variable.

The client bundle can then be generated using:

```console
rollup -c rollup.client.config.ts
```

And the server bundle can be generated using:

```console
rollup -c rollup.server.config.ts
```

Finally the bundled application can be run using:

```console
deno run --allow-net="<IP_ADDRESS>:3000" --allow-read="./" ./bin/mod.js
```

Check out the running application on <http://localhost:3000>! :tada:

repository: cmorten/deno-rollup-react-example

repo_name: cmorten/deno-rollup-react-example


text:
---
rule:
  aip: 134
  name: [core, '0134', request-resource-field]
  summary: Update RPCs must have a field for the resource in the request.
permalink: /134/request-resource-field
redirect_from:
  - /0134/request-resource-field
---

# Update methods: Resource field

This rule enforces that all `Update` standard methods have a field in the
request message for the resource itself, as mandated in [AIP-134][].

## Details

This rule looks at any message matching `Update*Request` and complains if
the field of the resource's type is not named properly.

## Examples

**Incorrect** code for this rule:

```proto
// Incorrect.
message UpdateBookRequest {
  // Field name should be `book`.
  Book payload = 1;
  google.protobuf.FieldMask update_mask = 2;
}
```

**Correct** code for this rule:

```proto
// Correct.
message UpdateBookRequest {
  Book book = 1;
  google.protobuf.FieldMask update_mask = 2;
}
```

## Disabling

If you need to violate this rule, use a leading comment above the field.
Remember to also include an [aip.dev/not-precedent][] comment explaining why.

```proto
message UpdateBookRequest {
  // (-- api-linter: core::0134::request-resource-field=disabled
  //     aip.dev/not-precedent: We need to do this because reasons. --)
  Book payload = 1;
  google.protobuf.FieldMask update_mask = 2;
}
```

If you need to violate this rule for an entire file, place the comment at the
top of the file.

[aip-134]: https://aip.dev/134
[aip.dev/not-precedent]: https://aip.dev/not-precedent

repository: RocketDonkey/api-linter

repo_name: RocketDonkey/api-linter


text:
# /r/churning Flair Selector

This is a site that allows users of a subreddit to select flair. This was specifically made for /r/churning but can be easily adapted to any other subreddit. The announcement for this service was made [here]().

## Set up

Create a file called `config.js`. It should have the following format:

```js
module.exports = {
  web_app_secret: "",
  web_app_id: "",
  redirect: "",
  mod_username: "",
  mod_password: "",
  mod_script_id: "",
  mod_script_secret: "",
  subreddit: ""
};
```

You must first navigate to the apps page for the account you want to handle the flair selection. That URL is https://www.reddit.com/prefs/apps/.

When there, you need to create **2** apps. You must create a web app (which will handle the retrieval of user profile information) and you must also create a personal script app. You will have 2 sets of app IDs and secrets. The personal script is what is actually used to set the user flair.

Note that the user must A) be a mod of the subreddit and B) must have the `flair` permission.

| Key | Value |
| -------- | -------- |
| web_app_secret | Web application secret |
| web_app_id | Web application id |
| redirect | Redirect url (i.e. while developing, http://localhost:3000, while in prod https://churning.us)|
| mod_username | Username of mod account |
| mod_password | Password of mod account |
| mod_script_id | Personal script id |
| mod_script_secret | Personal script secret |
| admin_pass | HTTP Auth password for the admin page |
| subreddit | Subreddit that the user is a mod of |

## Development

Copy and paste the following section to get started.

```bash
git clone git@github.com:jonluca/Churning-Flair-Selector-Site.git
cd Churning-Flair-Selector-Site
echo 'module.exports = {
        web_app_secret: "",
        web_app_id: "",
        redirect: "",
        mod_username: "",
        mod_password: "",
        mod_script_id: "",
        mod_script_secret: "",
        admin_pass: "",
        subreddit: ""
      };' > config.js
yarn install
```

Fill out the sections in `config.js`, then start the application with `npm start` or `node bin/www`.

The other part you'll need to change is the front end filtering logic in `public/js/main.js`. Currently it assumes a format similar to that in `public/data/flairs.json`, which is for airports, since this application was originally made for /r/churning. You'll want to change the logic around displaying, filtering, and retrieving the various flair options.

## Maintenance

This is currently maintained by @jonluca on GitHub and /u/JonLuca on reddit. Feel free to fork this and modify it for your subreddit. This site is provided with the MIT license.

repository: jonluca/Churning-Flair-Selector-Site

repo_name: jonluca/Churning-Flair-Selector-Site


text:
# NINJA

## Summary

Notes on building with Ninja

## Resources

[Manual](https://ninja-build.org/manual.html)

## Ninja Build

#### Control Output / Parallel Jobs

only run one job at a time. Ninja defaults to running in parallel.

```bash
ninja -C build -j 1
```

#### Verbose Mode

```bash
ninja -v -C build
```

## Ninja Test

## Ninja Tools

All commands should be run from the directory containing the file `build.ninja`

#### Browse Dependency Graph

\*\* haven't gotten this to work yet

default port is `8000`

```bash
ninja -t browse --port=8000
```

disable opening web browser

```bash
ninja -t browse --port=8000 --no-browser mytarget
```

#### Targets

print list of targets

```bash
ninja -t targets
```

#### Commands

print list of commands in build

```bash
ninja -t commands
```

#### Compilation Database

```console
ninja -t compdb cxx > compile_commands.json
```

repository: evanharmon/eph-headspace

repo_name: evanharmon/eph-headspace


text:
</br>

##### Create an ApplicationBackupSchedule called `backupschedule` which uses the pre-existing schedulepolicy called `testpolicy`.

###### Make use of the below the template located in `/root/app-schedule.yaml`. Enter the below parameters while creating this object:

       namespace: mysql-app
       backupLocation: mysql,
       schedulePolicyName: testpolicy,
       namespaces: mysql-app,
       reclaimPolicy: Delete
Once edited, create it.

``` kubectl create -f /root/app-schedule.yaml```{{execute}}

Once created, wait for backup to complete.

```kubectl get applicationbackup -n mysql-app```{{execute}}

(It may take a moment for the script to verify the action when clicking Continue)

repository: portworx/katacoda-scenarios

repo_name: portworx/katacoda-scenarios


text:
angular
=======

Learning angularjs beyond fiddling, typically with node.js and express

todo - starting with the angular todo sample, add updates and deletes,
       then persistence in mongodb through a node.js/express back end.
       (Note: index.html, todo.js, todo-app.js are newer than
       index2.html, todo2.js, todo-app2.js)

rovi - experiment with the Rovi metadata and search APIs.  Use a node.js/
       express back end to more-or-less pass through requests.
       Originally a necessity since Rovi does not support CORS or JSONP,
       it also moves URL building details out of the client and allows
       the API key and secret to be "hidden" in server environment
       variables.  The original code is messy, but it will be improved
       to use more features of angular, with more code moved into services.

repository: pynewb/angular

repo_name: pynewb/angular


text:
---
author: "Adam Presley"
date: 2011-11-10T11:12:00Z
tags: ["fun", "funny", "oops"]
title: "Ooops! Skype and a Bad Template"
slug: "ooops-skype-and-a-bad-template"
---

While signing up for Skype today I noticed a slight bug in the form. I'm
betting they actually want the asterisk character itself. Templating
gone wrong!

![Skype Bad Template Screenshot](http://s3.amazonaws.com/www.adampresley.com/posts/skype-bad-template.jpg)


text:
# Auto-tag orders that are ready to ship

Tags: Auto-Tag, Orders, Shipping

Use this task to tag orders, as they are created, if every single line item is related to a variant that's in stock. Optionally, choose to tag qualifying unfulfilled orders whenever an inventory level is updated.

* View in the task library: [usemechanic.com/task/auto-tag-orders-that-are-ready-to-ship](https://usemechanic.com/task/auto-tag-orders-that-are-ready-to-ship)
* Task JSON, for direct import: [task.json](../../tasks/auto-tag-orders-that-are-ready-to-ship.json)
* Preview task code: [script.liquid](./script.liquid)

## Default options

```json
{
  "ignore_line_items_not_fulfilled_manually__boolean": null,
  "order_tag_to_add__required": "ready-to-ship",
  "scan_unfulfilled_orders_when_inventory_is_updated__boolean": null,
  "test_mode__boolean": null,
  "run_every_10_minutes__boolean": null,
  "run_hourly__boolean": null
}
```

[Learn about task options in Mechanic](https://docs.usemechanic.com/article/471-task-options)

## Subscriptions

```liquid
shopify/orders/create
mechanic/user/trigger

{% if options.scan_unfulfilled_orders_when_inventory_is_updated__boolean %}
  shopify/inventory_levels/update
{% endif %}

{% if options.run_every_10_minutes__boolean %}
  mechanic/scheduler/10min
{% elsif options.run_hourly__boolean %}
  mechanic/scheduler/hourly
{% endif %}
```

[Learn about event subscriptions in Mechanic](https://docs.usemechanic.com/article/408-subscriptions)

## Documentation

Use this task to tag orders, as they are created, if every single line item is related to a variant that's in stock. Optionally, choose to tag qualifying unfulfilled orders whenever an inventory level is updated.

This task tags orders, as they are created, if every single line item is related to a variant that has a total inventory level of 0 or more.

Enable "Ignore line items not fulfilled manually" to skip line items that you do not fulfill yourself from within Shopify. (This means that orders that consist _entirely_ of these line items will never be tagged by this task.)

Enable "Scan unfulfilled orders when inventory is updated" to tag qualifying orders whenever an inventory level is updated. Use caution with this option: if your inventory updates are high-frequency, this may not be a good idea. :) Use "Run hourly" instead.

## Installing this task

Find this task [in the library at usemechanic.com](https://usemechanic.com/task/auto-tag-orders-that-are-ready-to-ship), and use the "Try this task" button. Or, import [this task's JSON export](../../tasks/auto-tag-orders-that-are-ready-to-ship.json) – see [Importing and exporting tasks](https://docs.usemechanic.com/article/505-importing-and-exporting-tasks) to learn how imports work.

## Contributions

Found a bug? Got an improvement to add? Start here: [../../CONTRIBUTING.md](../../CONTRIBUTING.md).

repository: Ferrallv/mechanic-tasks

repo_name: Ferrallv/mechanic-tasks


text:
# Link Inflater

### An open-source Chrome extension for expanding shortened URLs.

Utilizes the [Link Inflater](https://linkinflater.herokuapp.com) to expand
shortened URLs. This is useful for when you encounter shortened URLs, but
you're not sure where the URL is going to take you to.

The extension is a simple context menu that is created when the user right-clicks
on selected text, or a hyperlink in Chrome. When the user clicks on the context
menu item that is created, the extension goes out to the Link Inflater API and
requests the expanded URL. The expanded url is then displayed to the user in a
JavaScript prompt window.

***

The extension source code is available for the community to make improvements
to, and I am always looking for people to add value to the tools that we share
as a community. If you have suggestions, or improvements that you'd like to see
in the extension, pleaes clone the repository and submit a pull request. I am very
responsive in getting back to people.

This code is licensed under the MIT license, but please honor all copyright information
by including the license text in all versions of the code.

© Jacob Heater 2016

repository: JacobHeater/ChromeExtensions

repo_name: JacobHeater/ChromeExtensions


text:
> ⚠ Deprecated - This Craft CMS 2.x plugin is no longer supported.

<img src="https://github.com/bymayo/login-count/raw/master/screenshots/icon.png" width="50">

# Login Count for Craft 2.x

Login Count is a Craft CMS plugin that allows you to track how many times your users have logged in.

It is useful to show specific messages to users or promotions after X amount of logins.

## Install

- Add the `logincount` directory into your `craft/plugins` directory.
- Navigate to `Settings -> Plugins` and click the "Install" button.

## Features

- Set a 'delay' between each time a user logs in (Default: 3 hours)
- Access 'totals' and 'absolute totals' regardless of the delay
- Option to ignore login counts if the user logs in via the control panel

## Templating

There are two available methods:

- `.total()` Outputs the total login count (Taking in to account the login time delay)

```HTML
{{ craft.logincount.total(currentUser) }}
```

- `.totalAbsolute()` Outputs the total login count

```HTML
{{ craft.logincount.totalAbsolute(currentUser) }}
```

Both methods need to have a user object passed to it, such as `currentUser`

## Roadmap

- Extend the User view to show counts in the table view

## Credits

Password by Adnen Kadri from the Noun Project (https://thenounproject.com/adnen.kadri/)

repository: bymayo/craft-login-count

repo_name: bymayo/craft-login-count


text:
---
topic: "Kronos Tips"
desc: "Useful Tips about logging in your hours in Kronos - attention, first time paid tutors!"
---

# How to log your hours?

* Step 1. Log in to Kronos: https://logon.timekeeping.ucsb.edu/wfc/navigator/logon or https://timekeeping.ucsb.edu

  * In this view, you can see all the hours ou logged for the current pay period. If you want to look at past pay periods, or set a custom range of dates you want to view the hitsory for, use the arrow in the top right corner.

* Step 2. To log your hours, select a day you want to record hours for, and click "Pay Code". Select "Hours Worked"

* Step 3. In the next column, place the number of hours you would like to record for that day. It does not need to be an integer value.

* Step 4. When done filling your hours, go to the top right corner and click on the diskette icon to save your changes to the timecard.

* Step 5. At the end of the pay period, make sure the information you entered is accurate, and confirm the total number of hours worked (will be summed on the right). You then need to approve your timecard. Go to the top left corner, click on the checkmark, and sleect "Approva Timecard". The table will turn orange. Your timecard is then reviewed by your supervisor and the CS Department employee to write you a paycheck. You will normally get paid in 2 weeks minus two days since the end of a pay period.

For admins - pictures [source](https://drive.google.com/drive/folders/1Vcy6Vno4iHhyEgyh26stjTX4PrZshh68):


text:
# Awesome Truffle Plugins
[![Awesome](https://awesome.re/badge.svg)](https://awesome.re)

This repository features a list of awesome Truffle plugins for any purpose. Because the total number of Truffle plugins is quite limited, the list is currently not structured by category, but it might be in the future. If you'd like to contribute to the list, please check out the [contributing guide](/CONTRIBUTING.md) before creating your Pull Request.

## The List

* [truffle-plugin-verify](https://github.com/rkalis/truffle-plugin-verify) - Verifies smart contracts on Etherscan.
* [truffle-security](https://github.com/ConsenSys/truffle-security) - Runs MythX security analysis on smart contracts.
* [truffle-contract-size](https://github.com/IoBuilders/truffle-contract-size) - Displays the size of smart contracts in kilobytes.

repository: gnidan/awesome-truffle-plugins

repo_name: gnidan/awesome-truffle-plugins


text:
A Software Framework for analyzing OpenStreetMap Contributions
==============================================================
Who mapped where, when, and with whom?

# Setup

The ```setup``` directory contains detailed information on installation for Linux and Mac OS X.  The dependencies are many and somewhat unruly, but we promise it's worth it.

Once dependencies are all installed, running ```bundle install``` from the root of this repository should handle the rest.  _Note,  if you bundle install, you most likely need to add ```bundle exec``` before all of the commands_.

Additionally, there is a virtual machine by Tom Gertin (@d3nexter) which has the dependencies installed: [https://github.com/d3netxer/osmbox](https://github.com/d3netxer/osmbox).

# Analysis Window

An analysis window is a YAML document which defines file locations, database names, and the questions that you'd like to ask of the framework. A basic analysis window looks like this:

	title: 'Chicago 2015'
	pbf_file: '/data/osm_files/splitter_exports/north-america/illinois.osm.pbf'
	database: chicago-2008-10
	start_date: '2008-01-01'
	end_date:   '2010-12-31'
	bbox: '-87.940101,41.643919,-87.523984,42.023022'
	write_directory: '/data/www/chicago'
	Node Questions:
	 - number_of_nodes_edited_by_new_mappers
	 - number_of_nodes_edited_by_experienced_mappers
	Changeset Questions:
	 - changesets_x_day
	User Questions:
	 - total_user_count
	Bbox Questions:
	 - bbox_geojson_geometry

# Command Line Framework Use

There are a series of ```rake tasks``` which run all of the software standalone if you want a command line usage.  Otherwise, see section below on API usage.

### 1. Importing Data

All of the cutting and importing is bundled into one rake task:

	rake new ~/my_osm_questions/my_analysis_window.yml

The individual processes that ```rake new``` runs can be run separately as:

	rake cut                    # Write appropriate configuration file and cut ...
	rake import:pbf             # Import PBF File (Nodes, Ways, Relations)
	rake import:changesets      # Import Changesets
	rake import:users           # Import Users
	rake import:notes           # Import Notes

### 2. Run Questions

Once the data is imported to Mongo, you can begin to run the questions.

	rake questions:all ~/my_osm_questions/my_analysis_window.yml

This task runs all of these questions tasks, which can also be called individually:

	rake questions:bbox         # Run BBox Questions
	rake questions:changesets   # Run Changeset Questions
	rake questions:multi_users  # Run Multi-User Questions
	rake questions:nodes        # Run Node Questions
	rake questions:notes        # Run Notes Questions
	rake questions:users        # Run User Questions
	rake questions:ways         # Run Way Questions

### 3. Analyze Data

All of the questions were written out as **JSON** to the ```write_directory``` in the configuration file.

	$ls /data/www/chicago/json
		number_of_nodes_edited_by_experienced_mappers.json
		number_of_nodes_edited_by_new_mappers.json
		changesets_x_day.json
		bbox_geojson_geometry.json
		total_user_count.json

	$cat data/www/chicago/json/total_user_count.json
		{"Total User Count":238}

### 4. Use [OSMDOWN](http://github.com/project-epic/osmdown) to display results

An EPIC-OSM Oriented markdown language and compiler for generating static, interactive HTML docs with d3 and Leaflet (© [OpenStreetMap](http://openstreetmap.org) Contributors):

![OSMDOWN Changesets](setup/osmdown-changesets.png)
![OSMDOWN Tags](setup/osmdown-tags.png)

# API Usage

After including the ruby library, you can call questions directly:

	o = OSMHistory.new(analysis_window: 'sample-awconfig.yml')
	aw = o.analysis_window

	aw.bounding_box.geojson_geometry.to_json
	# => {"type":"Polygon","coordinates" [[[-105.3424072,39.946595], ...

	aw.new_contributors.count
	# => 85

	q  = QuestionAsker.new(analysis_window: aw)
	q.run('number_of_experienced_users')
	# => Running Function: number_of_experienced_users...Up to QM...Success

The final command created the JSON file: ```number_of_experienced_users.json``` in the ```write_directory```/```json``` as specified in the ```sample-awconfig.yml```.

# License

Distributed Under the MIT License<br>
© 2015 The Regents of the University of Colorado

repository: Project-EPIC/epic-osm

gha_language: Jupyter Notebook

repo_name: Project-EPIC/epic-osm


text:
## Authorization Server URL

This is a message that a web based plugin should implement. A web based plugin uses an external authorization server for authentication. For this request the plugin should return the URL of the external authorization server to which GoCD redirects the user for authentication.

Request name

`go.cd.authorization.authorization-server-url`

Request body

> The plugin will receive the following JSON body which is a list of all auth configs configured for the plugin —

```json
{
  "auth_configs": [{
    "id": "github_oauth",
    "configuration": {
      "url": "http://git_hub.com",
      "client_id": "jd9no0f",
      "client_secret": "0njfg8fgmfvufv"
    }
  }],
  "authorization_server_callback_url": "http://my_go_server/go/plugin/my_plugin_id/authenticate"
}
```

| Key                                 | Type     | Description                                                                                |
|-------------------------------------|----------|-----------------------------------------------------------------------------------------------------------------|
| `auth_configs`                      | `Object` | This key contains list of `<authconfig>` configured for the plugin.                                             |
| `authorization_server_callback_url` | `String` | This key contains the GoCD url to which the authorization server should redirect on a successful authentication |

Response Body

> An example response body:

```json
{
  "authorization_server_url": "http://external_auth_server_url/login?redirect_url=http://my_go_server/go/plugin/my_plugin_id/authenticate&client_id=hdfjh3r&client_secret=vbvdv1493",
  "auth_session": {
    "key": "value"
  }
}
```

The response body will contain the following JSON elements:

| Key                        | Type     | Description                                                                                |
|----------------------------|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `authorization_server_url` | `String` | The external authorization server URL to which GoCD redirects the user for authentication.                                                                                |
| `auth_session`             | `Object` | A flat object/dictionary with string keys and values that will be stored against the users session and passed back to the plugin when [fetching the access token](#fetch-access-token). (optional) |

The plugin is expected to return status `200` if it can understand the request.

The `auth_session` field can be used to store some state against the user who is initiating the login flow. This state, if provided, will then be subsequently passed back to the plugin when [fetching an access token](#fetch-access-token). The main purpose for this is to allow the plugin to later verify that the user who initiated the login flow is the same one who is completing it in redirect-based authentication flows.

For example, a plugin could store a random value which it expects the authorization server to reflect back to the GoCD server in HTTP request parameters after the user has authenticated with the external server later redirecting to the GoCD server. During [Fetch Access Token](#fetch-access-token) the plugin can compare contents of the `auth_session` to the request parameters, or use them in fetching the access token to provide additional security mitigations.

A specific example within redirect flows are the *OAuth2*  `state` and the *OIDC* `nonce` parameters which if supported by the authorization server/identity provider are generally generated by the client relying party (GoCD in this case) prior to redirecting to the external server, and then validated after redirect back to the relying party. For `state` this would be done by comparing a generated value stored within the `auth_session` pre-redirect to a request parameter post-redirect. For the `nonce` by storing within the `auth_session` and then comparing to that within the returned ID token by the external authorization server.


text:
# Go Filesystem
Distribted Object Store implemented by golang, inspired by Haystack

![](https://img.shields.io/badge/language-golang-blue.svg)
![](https://img.shields.io/badge/license-MIT-000000.svg)
![](https://img.shields.io/github/tag/silentred/gofs.svg)
[![codebeat badge](https://codebeat.co/badges/d8a8e19c-ee50-419d-8bf1-60133dfe446e)](https://codebeat.co/projects/github-com-silentred-gofs-master)

## Roadmap
- Store
    - [x] needle
    - [ ] superblock
    - [ ] store
    - [x] index
    - [ ] compact
    - [ ] metrics
- Meta
    - [ ] manage store meta data in etcd
    - [ ] manage bucket meta data
    - [ ] manage file meta data in KV
    - [ ] metrics
- Proxy
    - [ ] file CRUD (interact with Meta and Store)
- Pitchfork
    - use prometheus instead
- Cache
    - use nginx
- Cmd Tool
    - [ ] validate superblock
    - [ ] validate index
    - [ ] cluster status

## Design

For simplicity, combine Store, Meta, Proxy in one binary. Cache could handle most requests and protect Store, so both read and write are not frequent operations. Proxy could barely be the bottle neck, because Store reads and writes directly to file system.

repository: silentred/gofs

repo_name: silentred/gofs


text:
---
layout: post
title: U.S. shutdown
date: 2019-1-9
categories: English
tags:
---

+ 群消息搜索：当天日期---12.19
+ ![]({{ site.url }}/assets/img/english/.jpg)

# No progress towards ending U.S. shutdown in Trump meeting with lawmakers

+ 特朗普与国会议员会晤，结束美国政府关门一事未取得任何进展

1. No agreement came out of a meeting between U.S. congressional leaders and President Donald Trump on Wednesday to end a partial government shutdown now in its 12th day as the president stuck to his demand for $5 billion (3.97 billion pounds) in border wall funding fiercely opposed by Democrats.周三，美国政府关门的第 12 天，国会领导人和总统唐纳德·特朗普进行了会晤，就结束政府部分关门一事未能达成一致。因为特朗普总统坚持要求国会拨款 50 亿美元（39.7 亿英镑），用于边境墙建设，这一要求遭到了民主党的强烈反对。
   + came out

2. Trump’s demand for $5 billion in funding for a wall along the U.S.-Mexico border triggered the shutdown affecting about a quarter of the federal government and 800,000 federal workers.特朗普要求拨款 50 亿美元来修建美墨边境墙，引发了此次政府关门，影响到大约四分之一的联邦政府部门和 80 万名联邦政府员工。
   +

3. Before meeting with lawmakers, Trump said the shutdown would last for “as long as it takes” as he pushes for wall money as part of any legislation to reopen agencies shuttered when their funding lapsed on Dec. 22.

在会见议员之前，特朗普表示政府关门“无论多久都行”，同时，他要求任何旨在重启政府机构的法案都必须包含建墙经费，这些政府机构在去年 12 月 22 日资金中断时关闭。

“We know that we have a challenge along the border,” said Kevin McCarthy, the top House Republican. “We want to solve that issue. We want to make sure we open this government up. And I think at the end of the day, the president, listening to him, he wants to solve this as well.”

众议院共和党领袖凯文·麦卡锡表示，“我们知道在边境线问题上，我们面临挑战。我们想解决这个问题，确保政府能够重新开门。据总统所言，我认为说到底，他也想解决这个问题。”

Trump made the border wall a key part of his presidential campaign. Before meeting with the Democrats, Trump called the border a “sieve,” provided an estimate of the U.S. illegal immigrant population far higher than the figures most experts cite and made disputed comments about progress towards building a wall.

边境墙是特朗普总统竞选的关键部分。在会见民主党人之前，特朗普称边境为“筛子”，他对美国非法移民人口的估算远远高于大多数专家引用的数字，此外，他对修建边境墙的进展作出的评论也引起过不小的争议。

The $5 billion Trump is seekingwould cover only a portion of the money needed for a border wall, a project estimated to cost about $23 billion. Trump had said Mexico would pay for the wall, but Mexico has refused.

特朗普要求的 50 亿美元，还只是修建边境墙所需费用的一部分。这个项目估计耗资约 230 亿美元。特朗普曾表示墨西哥将为边境墙买单，但墨西哥拒绝了。


text:
## Wallet Operation
The following describes the operation of a hypothetical wallet built using the gRPC API.

#### Server Trusting Wallet
*Startup*
- Make a `GetBlockchainInfo` call to get the current best hash and height.
- For each address in the wallet's key chain make a `GetAddressTransactions` call. If there are any hits, extend the keychain, make another `GetAddressTransactions` call for the new address. Repeat until there are no more hits.
- Calculate the wallet's UTXOs by iterating over all the returned transactions. For each output which matches an address, build the UTXO and add it to a UTXOs list. Next iterate over the transaction again. This time for each input spending a matched output, delete the UTXO from the UTXO list. The remaining UTXOs will be the full list of the wallet's UTXOs. There is a `GetAddressUnspentOutputs` RPC call but this is much less efficient and slower than just calculating the UTXOs locally.

*Operation*
- Subscribe to the `SubscribeTransactionStream` RPC. This endpoint pushes a transaction whenever a new unconfirmed transaction comes in or an unconfirmed transaction is confirmed. Update the wallet's transactions accordingly.
- Subscribe to the `SubscribeBlocks` RPC. When a new message is received, for each disconnected block iterate over the wallet's transaction, if any transactions were mined in this block, set the confirmation count to zero. If these transaction re-confirm they will be sent in a `TransactionNotification`. For each connected block, update the best hash and height and update the confirmation count for each transaction. Persist the hash and height to disk.

*Next startup*
- Make a `GetBlockInfo` for the last saved block hash. Make sure the block is still in the best chain (confirmations > 0). If so make the `GetAddressTransactions` like before but using the last saved block hash as the start block. If it's not in the best chain, re-download all transactions from the genesis as there was a reorg.

### SPV Wallet
Similar operation as above with the following exceptions:

*Startup*
- Make consecutive `GetHeaders` calls, constructing the block locator appropriately, to sync the header chain to the tip. Validate the header chain.
- For each confirmed transaction make a  `GetMerkleProof` to download the merkle proof. Validate the proof.

*Operation*
- Upon receving a `BlockNotification` disconnect or connect the headers to your chain as appropriate.
- Upon receiving a `TransactionNotification` for a confirmed transaction request the merkle proof using the `GetMerkleProof` RPC.

*Next startup*
- Sync the headers to the tip using `GetHeaders`. If there was a reorg while you were away, find the reorg block and set the confirmations of any transaction that confirmed after the reorg point to zero. Make your `GetAddressTransactions` call starting from the reorg block.

repository: gcash/bchd

gha_language: Go

gha_license_id: ISC

repo_name: gcash/bchd


text:
# Storm Test Runner

## Test cases and Test steps

Storm uses a custom format for defining Test cases. Test cases are plain JS *object literals* that contain instructions for the Storm Test Runner.

Each _Test case_ consists of a number of _Test steps_. Each step performs a certain _action_, and for each step a specific _result_ is expected. Test steps are executed in sequence. And as long as every test step passes, the test runner will move on to the next step.

If all Test steps pass (i.e. the result of each step is according to expectations) the test case is considered successful.

Storm Test Runner is capable of running _multiple tests_ in sequence. Unless the code in a Test case itself produces a fatal error, the test runner will move on to the next Test case independent of the result (success or failure).

### Basic structure of a Test case

Let's start with the most basic format of a test case.

At the bare minimum every test case has at least a **title**, a **description** and an `Array` of **steps** (optionally this can be an `Object` as well (see [advanced use cases](###Advanced))).

```js
{
  // each test case has a unique (!) title
  title: 'Short title to indicate what the test case is about',
  // each test case also has a description
  description: 'Longer description to explain more details',
  // an array of test steps
  steps: [
  ],
}
```

### Test steps

Each test step is an _object_ with a set of instructions for the Test Runner. It gives the Test Runner a function to execute, and informs what to expect as a result.

A test step at the very least has:
- a **description** that explains what the step does
- a **test function** to be executed
- an **assert value** or a **validate function** to evaluate the _expected results_ of the test function

Optionally you can specify a **parameter** or an `array` of **parameters** that will be passed as arguments to the test function.

A test function should *always* return a value. This returned value is compared with the value set in the assert property (be aware that assert uses **Strict Equality Comparison**).

In the case of a validate function, the return value is passed as an argument to this function. A validate function should return `true` (when the result is as expected) and `false` (when it doesn't match expectations).

Some examples to illustrate the different options:

```js
{
  title: 'Basic',
  description: 'Basic Test Case',
  steps: [{
    description: 'Simple test and assert',
    // test function to be executed, always returns a value
    test() {
      // do something useful here ..
      return true
    },
    // assert that the test function returns true
    assert: true,
  },
  {
    description: 'Use a single parameter',
    test(x) {
      return x * 2
    },
    params: 1,
    // assert that the test function returns 1 * 2
    assert: 2,
  },
  {
    description: 'Pass multiple parameters to the test function',
    test(x, y) {
      return x * y
    },
    // multiple params as an array
    params: [2, 3],
    // assert that the test function returns (2 * 3)
    assert: 6,
  },
  {
    description: 'Validate with a custom validate function',
    test() {
      return 'storm test runner',
    },
    // validate receives the result from the test-function as it's first argument and returns true or false
    validate(result) {
      return result.length === 17
    }
  }],
}
```

### Asynchonous steps

The Test runner is built to work with both _synchronous_ and _asynchronous_ test steps. In the examples above all **test functions** returned their results right away. But often in real test scenarios, this is not the case.

For example when fetching results from a Set Top Box (STB) there will be some delay. In these cases the test function should return a `Promise` instead. When a promise is returned by the test function, the *assert* or *validate function* will only be invoked after the Promise is `resolved` (or `rejected` in case of an error, off course).

```js
{
  // ...
  steps: [
    {
      description: 'Asynchonous test step returning a Promise',
      test() {
        return new Promise((resolve, reject) => {
          // make a request to the STB (note: this is example code!)
          request('/deviceinfo/version')
            .then(result => {
              resolve(result)
            }).catch(err => {
              reject(err)
            })
        })
      },
      assert: 'v1.0.1',
    }
  ]
}
```

### Failing and passing steps

It's important to remember that the Test Runner expects every step to pass. As long as a step passes the runner will move to the next step, until it reaches the end. Whenever a step fails, the Test Runner will stop the execution (of that Test case) immediately and the entire Test Case will be marked as failed.

This means that test steps after a failing steps will *not* be executed. When running multiple Test cases however, the Test runner _will_ move on to the next Test cases, even when a Test case is marked as not successful.

### Test Case Features

So far we've only looked at some basic Test cases, but Storm Test Runner has several features that allow for complex Test cases.

- [Sleeping](./features/sleeping.md)
- [Setup and Teardown](./features/setup-teardown.md)
- [Repeating](./features/repeat.md)
- [Context](./features/context.md)
- [Data](./features/data.md)
- [Log](./features/log.md)
- [Test Case Validation](./features/test-case-validation.md)
- [Nested Test Cases](./features/nested.md)
- [Executing http calls](./features/http-calls.md)
- [Assertion helper](./features/assertion-helper)
- [ThunderJS helper](./features/thunderjs-helper)

### Advanced

Todo

repository: WebPlatformForEmbedded/Storm

repo_name: WebPlatformForEmbedded/Storm


text:
_Do you have a contribution?  We welcome contributions, but please ensure that you read the following information
before issuing a pull request.  Also refer back to this document as a checklist before issuing your pull request._

# Before You Start

## Understanding the Basics

If you don't understand what a *pull request* is, or how to submit one, please refer to the [help documentation][]
provided by GitHub.

## Contributor License Agreement

We require all contributions, to be covered under the Dojo Foundation's [Contributor License Agreement][cla].  This can
be done electronically and essentially ensures that you are making it clear that your contributions are your
contributions, you have the legal right to contribute and you are transferring the copyright of your works to the Dojo
Foundation.

If you are an unfamiliar contributor to the committer assessing your pull request, it is best to make it clear how
you are covered by a CLA in the notes of the pull request.  The committer will [verify][claCheck] your status.

If your GitHub user id you are submitting your pull request from differs from the Dojo Community ID or e-mail address
which you have signed your CLA under, you should specifically note what you have your CLA filed under (and for CCLA
that you are listed under your companies authorised contributors).

# Submitting a Pull Request

The following are the general steps you should follow in creating a pull request.  Subsequent pull requests only need
to follow step 3 and beyond:

1. Fork the repository on GitHub
2. Clone the forked repository to your machine
3. Create a "feature" branch in your local repository
4. Make your changes and commit them to your local repository
5. Rebase and push your commits to your GitHub remote fork/repository
6. Issue a Pull Request to this repository
7. Your Pull Request is reviewed and merged into the repository

## Coding Style and Linting

Dojo has a very specific [coding style][styleguide].  All pull requests should adhere to this.

## Inline Documentation

Dojo has an inline API documentation called [DojoDoc][].  Any pull request should ensure it has updated the inline
documentation appropriately or added the appropriate inline documentation.

## Test Cases

If the pull request changes the functional behaviour or is fixing a defect, the unit test cases should be modified to
reflect this.  The committer reviewing your pull request is likely to request the appropriate changes in the test
cases.  Dojo utilises its own test harness called [D.O.H.][] and is available as part of the [dojo/util][] repository.

It is expected that you will have tested your changes against the existing test cases and appropriate platforms prior to
submitting your pull request.

## Licensing

All of your submissions are licensed under a dual "New" BSD/AFL license.

[help documentation]: http://help.github.com/send-pull-requests
[cla]: http://dojofoundation.org/about/cla
[claCheck]: http://dojofoundation.org/about/claCheck
[styleguide]: http://dojotoolkit.org/reference-guide/developer/styleguide.html
[DojoDoc]: http://dojotoolkit.org/reference-guide/developer/markup.html
[D.O.H.]: http://dojotoolkit.org/reference-guide/util/doh.html
[dojo/util]: https://github.com/dojo/util

repository: spicecoder/DwisJS

repo_name: spicecoder/DwisJS