text:
# InstCov Internal Implementations

The internal Implementation of InstCov is based on Clang. It operates on Clang
AST. It recursively traverses the AST, and when a conditional statement node is
visited, it instruments necessary recording code into the original source code
using clang::Rewriter.

The current implementation works with Clang 3.6.

## Implementation choices

Theoretically, there are three possible implementation strategies:

* Source-to-source transformation, which means to insert new text into the
original source code;

* AST-level instrumentation, which means to modify the AST to add new recoding
AST nodes;

* CFG-level instrumentation, which means to insert new statements or basic
blocks into the CFG. Note that in this solution, the CFG might have broken a
conditional statement into multiple basic blocks with conditional
jumps. Therefore it may be hard to align the CFG-level jumps with the
source-level conditional statements.

We choose the first strategy in InstCov, since libclang does not recommend users
to modify the AST (it is not safe and may cause serious problems), and clang CFG
does not have information to map the BB branches back to the source code
(ref. Zhenbo Xu).

There are two choices to implement InstCov, either add it into the frontend
actions of Clang, or make it a stand-alone tool using libclang. We choose the
later one, since the first option actually integrates InstCov into Clang, and
the program must be compiled using Clang, which might have platform-related
issues.

## Overall workflow

<img src="./InstCov_Workflow.png" height="500" />

## Important Clang classes/methods used

In our implementation, the following clang classes/methods are very important:

* `ClangTool`: this is used when creating a standalone tool based on libclang;

* `RecursiveASTVisitor`: an infrastructure in libclang, which provides a
  mechanism to visit the AST tree recursively;

* `Rewriter`: a class provided by libclang, which is used to insert text into
  the original source code;

* `Stmt`: class for statements in clang;

* `Expr`: class for expressions in clang, inherited from `Stmt`;

* `getLocStart()`: a method to get the starting location of the first token in a
  `Stmt` or `Expr`;

* `getLocEnd()`: a method to get the starting location of the last token in a
  `Stmt` or `Expr`, usually used with `Lexer::getLocForEndOfToken()`;

* `dumpPretty()`: this method is used to dump an `Stmt` into the original source
language.

* `PresumedLoc`: the original source location, which is computed using the
  `#line` directives.

A notable thing is that, when using `getLocEnd()`, the returned `SourceLocation`
might not always be the last location of a statement. If the statement
terminates with right brace `}`, then the location will be fine. However if a
statement terminates with semicolon `;`, then `getLocEnd()` will return the
beginning of the token before `;`. This is not a desired behavior, so we need to
use `clang::Lexer` to search backwards to find a `;` token. This may be awkward,
but it seems to be the only way.

## Instrumentation Basics (See developer's guides for more information)

### What is Instrumented?

We need to dump corresponding record into a log file when some point is
visited. We need to assign each recording point a unique number for
identification. We are planning to assign each conditional statement and each
expression a unique id. (This feature is currently not implemented)

What is actually instrumented into the source code is a function calling the
InstCov runtime library to log corresponding records or do runtime checks.

Here we give each program entity (decisions & conditions) a UUID (128-bit
unsigned integer). The instrumented function is a C-function, which has the
following form:

    #ifdef __cplusplus
    extern "C" {
    #endif  // __cplusplus
    void foo(uint64_t uuid_high, uint64_t uuid_low[, <additional arguments>]);
    #ifdef __cplusplus
    }
    #endif  // __cplusplus

For instrumentation for MC/DC analysis, the additional arguments is a branch ID.
We use `1` for the true branch and `0` for the false branch.

Trace files begin with a magic string. All dumping is in binary format and is
64-bit aligned.

### Which Files to Instrument?

Sometimes we only want to instrument some of these files, however the
preprocessor contains all the included files. We usually don't care about the
included files. It is almost always a bad idea to write function definitions in
the header (except VERY SIMPLE C++ class methods). Thus, we want to let the user
to instrument those files they want. There are two possible implementations I
have tried.

#### Expanding the macros only, and then instrument

This seems very desirable choice, since Clang provides a smart preprocessing
option that enables you to expand the macros only and not the included files.
However, this may be problematic if there are some macro that defines to itself.

For example, I have encountered such situation in `<stdio.h>` in Ubuntu
distribution, which has the following line:

	#define stdin stdin

So, this idea is not good, since the macro will be expanded again, and the
source location of `stdin` is still inside a macro.

#### Do a full preprocess, and then instrument

Now we know that the file should be preprocessed only once, thus we need to work
on a fully preprocessed file. Fortunately, a preprocessed files has `#line`
directives indicating the original source location (file and line number) before
expansion. LibClang uses these directives to guess the location in the original
file, which is called the *presumed* location. We use the presumed file name
to determine whether the file need to be instrumented.

### Debug information

The debug information file contains the UUID and source location of entry, as
well as additional information.  Debug information files also begin with a magic
string, and is 64-bit aligned.

### Trace format

Trace files consist of a magic string and a sequence of record entries, each
record entry contains a UUID and additioal information if applicable. Trace
files are also 64-bit aligned.

## Instrumentation for function coverage The instrumentation for function
coverage is quite easy. We just need to add a logging function at the beginning
of each function body.

## Instrumentation and analysis for MC/DC

### Instrumenting the decisions

#### `if` statement

Since `if` statement allows variable declaration in the condition, we'd better
not modify the condition.

We have identified several patterns of `if` statement, and tackle each of them:

* If the `then` or `else` branch is a single statement (i.e. terminating with
`;`), we surround the statement with braces `{}` and add a `instcov_dump_dc()` call
just before the statement;

* If the `then` branch is a compound statement (i.e. surrounded with `{}`), we
just insert a `instcov_dump()` after `{`;

* If the `else` branch is missing, we add

		else instcov_dump();

  just after the then block.

#### `while` statement

Since `while` statement allows variable declaration in the condition, we'd
better not modify the condition.

We have identified several patterns of `while` statement, and tackle each of
them:

* If the loop body is a single statement (i.e. terminating with `;`), we
surround the statement with braces `{}` and add a `instcov_dump()` call just
before the statement;

* If the loop body is a compound statement (i.e. surrounded with `{}`), we just
insert a `instcov_dump()` after `{`;

* We insert a `instcov_dump()` call just after the loop body to record that the
loop condition is evaluated to false.

#### `for` statement

The treatment for `for` statements are exactly the same with `while` statement.

#### `do` statement

The treatment for `do` statements is a little bit tricky. The reason why it is
different is that the first iteration is unconditional, and no record should be
logged.

To instrument a `do` statement we surround the loop condition with parentheses
`()`, and change it into a tenary operator. Suppose the original form is:

	do { } while (cond);

The instrumented code will be (we use `0` and `1` for C-compatibility):

	do { } while ((cond) ? (instcov_dump(), 1) : (instcov_dump(), 0));

### Instrumenting Conditions

For recording MC/DC coverage, we need to record the evaluation of conditions in
each decision (`if/for/while/do` statement).  Note that the evaluation of
logical expressions has the short-circuit symptom. Thus some conditions may not
be evaluated. However, for MC/DC recording, we need to record each condition of
the decision.  In InstCov, we collect all the atomic expressions, and dump their
evaluation result before the decision is evaluated. A consequence of this
treatment is that some condition may be evaluated twice. If some conditions has
side effects (such as `++a > 0`), then the instrumented code will have different
behavior with the original one.

Suppose the original condition expression in the conditional statement is
`a && (b || c)`, which has decisions `a`, `b` and `c`. The trasformed condition
expression will be:

	(a ? (dump(), 1) : (dump(), 0)) &&
	((b ? (dump(), 1) : (dump(), 0)) ||
	(c ? (dump(), 1) : (dump(), 0)))

A special case is in C++, `if` and `while` conditions may have variable
declaration. If the initializer expression is not boolean, then the
instrumentation may change the program behavior. We need to check whether the
initializer expression is of boolean type, and instrument the expression if the
answer is yes.

### Organizing the traces

Note that the trace file only contains a sequence of UUID-bid pairs.  We need
to associate them with each other in MCDC coverage analysis.

We need to first read the debug information from `.dbginfo`
files, then read the trace file, and organize the trace entries.

The trace entries are restructured into several tree structures. The root node
of each tree is a decision. The leaf nodes are conditions. Other non-leaf nodes
are sub-decisions (**sub-decisions are currently not supported, the tree has
only one layer** ).

When a new entry is read from the trace file, we go upwards to find the root
node, and set up a tree of empty slots. The tree is built according to the debug
information. Each slot needs to be filled with a corresponding trace
entry. After the root node (decision) is filled, the total information for a
visit to the root decision is completed, and is dumped as tree format. Then we
starts over, reads new entries, build and dumps new slot trees.

Sometimes a node outside the tree may be read, or the node may be already filled
inside the current tree. This means that the new node is definitely in a deeper
function call. To deal with this, we use a stack structure to store the
incompleted trees, if the current tree cannot accept the new node, we construct
a new tree with the root of the new node, and push it into the stack. If the
decision of the top tree is read, then the top tree is complete. We store the
top tree, and pop it from the stack. Note that this can be guaranteed correct
since we always dump the conditions in a fixed order, and then dump the decision
in the end.

### Analyzing MC/DC coverage

After we obtained the execution records, the next problem is how to analyze the
MC/DC coverage on it. Our goal is to do it right and fast.

Firstly, each test case may visit a decision multiple times. We need to
distinguish between different visits. We mark each visit by the test ID and
visit ID. Here we call the evaluation result of the decision and the conditions
for each visit a *evaluation vector*.

In the resulting log file, some conditions may be missing. To find maching MC/DC
pairs, we first check each evaluation vector pair to see whether the decision is
evaluated to different results. If yes, we then check whether there are exactly
one condition evaluated to different results. If some condition of either
evaluation vector is not evaluated, we consider the condition is evaluated to
same values in the two evaluation vectors (i.e. `TT/FF/TX/FX/XT/XF/XX` are
considered matching values). We denote unevaluated conditions with
`X`. Here are some examples:

	FTXXX => T
	FFFFF => F
	 *       *

This means the two evaluation vectors is an MC/DC pair on the second condition.

	FTXXX => T
	FFTXX => T
	 *

The two evaluation vectors do not form an MC/DC pair since the decision is
evaluated to same values.

	FTFFX => T
	TTTXT => F
	* *      *

The two evaluation vectors do not form an MC/DC pair since two decisions are
evaluated to different values

In instcov, we use the several enhancements to reduce the matching cost:

1. The decision visits are grouped by different decisions. We only compare
within the same decision.

2. The decision visits are grouped by different evaluation vectors. After the
   grouping, we obtain the set of all unique evaluation vectors of each
   decision. We compare each pair of unique evaluation vectors, thus the
   decision visits having the same evaluation vectors will not be compare over
   and over again.

## `switch` statement instrumentation

The implementation for `switch` statement recording is a little bit awkward.
The most difficult part is that the execution can escape to the next switch case
if the current switch case has no break statements. Therefore, if we only inject
a `dump()` function at the front of each switch case body, one execution may
have multiple dumps.

The solution for this is to set up a flag before the switch statement is
executed. Before dumping a record, we need to check the flag in advance, and
then flip the flag. Note that the flag name uses the UUID to avoid conflict.

Suppose the original program piece is:

	switch (var) {
	case value1:
	case value2:
		body1;
	default:
		body2;
	}

The instrumented code would be (note the leading semicolon, which is used to
avoid syntax error after jump labels):

	;int flag = 1;
	switch (var) {
	case value1:
	case value2:
		if (flag == 1) {
			dump();
			flag = 0;
		}
		body1;
	default:
		if (flag == 1) {
			dump();
			flag = 0;
		}
		body2;
	}

## Developer FAQs

Here are some useful tips for building InstCov with LLVM/Clang. It is a little
bit tedious, but EVERY entry is very important and will save you a lot of time
on tackling building issues. Please read carefully.

### Prerequisites

* `gcc-4.7` or higher or `clang` (in a word, a compiler that supports `c++11`)
* `cmake` (I guess 3.0 or higher?)
* `ninja`: a fast build tool similar to `make`. See
[here](http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html).
* `uuid-dev` (for Linux): UUID library used by InstCov
* `libxml2-dev` (for Linux)
* `MSVC 2012` or later (for Windows)

### Easy set up

We have provided a easy set up script. Use `set_up_cmake.sh` in Linux/OS X
and `set_up_cmake.bat` in Windows. The usage is:

    <path-to-set-up-cmake> <x86|x64> [<static|dynamic> <llvm-root-dir>] (for Windows)
	<path-to-set-up-cmake> <static|dynamic> <llvm-root-dir> (for Linux/OS X)

Argument `<x86|x64>` specifies compiling 32-bit or 64-bit executables.  Argument
`<static|dynamic>` specifies linking with static or dynamic runtime library
(must be `dynamic` for OS X). Argument `<llvm-root-dir>` specifies the root
directory of llvm.

For Windows, you can call the script with only the 1st argument. The
environmental variables will be set, and the makefiles won't be generated. This
is quite convenient since you have to set up the variables each time you open a
new command line window before building.

For Linux and OS X, it is usually hard to get the cross-compilation done. Thus
we do not allow compile x86 executables on a x64 machine, or vice versa.

### Setting up your build environment

You need to unpack `llvm` and `clang`, and put `clang` into `llvm/tools`.
Afterwards, you unpack or clone the source code of `instcov`, and put it into
`llvm/tools/clang/tools/extra` (another way is to create a soft link using `ln
-s`). After this, you need to add the following line to
`llvm/tools/clang/tools/extra/CMakeLists.txt` (or create the file if not exist):

	add_subdirectory(instcov)

Now we need to invoke `cmake` to generate the Makefiles. For me, I prefer an
out-of-source build. Suppose you are in the root source directory of `llvm`, and
you want to build in a directory in `build`.

	cd ../
	mkdir build && cd build
	cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ../llvm
	ninja

If you want to save build time, please add `-DLLVM_TARGETS_TO_BUILD="X86"`, so
that LLVM will only build targets for x86 machines.

On Windows, you might need to run `<path-to-visual-studio>/VC/vcvarsall.bat` to
set your environmental variables correct before running `cmake` and `ninja`.  To
perform a 32-bit build, call `vcvarsall.bat` with argument `x86`.  To perform a
64-bit build, call `vcvarsall.bat` with argument `amd64`.  By default, the
platform toolset in VS 2012+ is set to `vc110` or so. The resulting executable
won't be compatible to Windows XP. Please reference
[here](http://blogs.msdn.com/b/vcblog/archive/2012/10/08/10357555.aspx).
Alternatively, you can use the Visual Studio generator in `cmake`.  In this
case, you need to go into the project properties of `ALL_BUILDS`, and change the
platform toolset into `vxxx_xp` in `Configuration Properties -> Generate`.

### The `llvm` source on my Mac OS X doesn't compile

On OS X, you need to download the `libcxx` and `libcxx-abi` (I'm not sure
`libcxx-abi` is mandatory) from the LLVM project releases page, unpack them, and
put them in directory `llvm/projects`.  This is a common issue encountered by
developers on OS X, but it is rarely discussed on available mailing lists or
developer communities.

### Building on Ubuntu Linux

You need at least gcc-4.7 to build the source code. If your Ubuntu source does
not have it, you can add the following PPA to your APT sources:

	deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu YOUR_UBUNTU_VERSION_HERE main
	deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu YOUR_UBUNTU_VERSION_HERE main

To specify your new compiler for `cmake`, you need to change the following
command:

	cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ../llvm

into:

	CC=gcc-4.7 CXX=g++-4.7 cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ../llvm

### Building static clang/llvm/instcov executables

On OS X, it cannot be done.

On Linux, you need to add `-DLLVM_BUILD_STATIC=ON` and
`-DLIBCLANG_BUILD_STATIC=ON` into the `cmake` command.  Besides, the original
BFD `ld` has a problem (may be a bug for static linking), you can install
`binutils-gold` to fix it. It is an official linker replacement for `ld`.
Additionally, please make sure you have `libz-dev` or `zlib1g-dev` installed
(otherwise an `inflate` undefined error will occur during linking).

On Windows, you need to add `-DLLVM_USE_CRT_RELEASE=MT`. Don't use
`-DLLVM_BUILD_STATIC=ON` and `-DLIBCLANG_BUILD_STATIC=ON`.

### Cross-compiling for i386 machines on a 64-bit Ubuntu

Since 64-bit Ubuntu does not come with a 32-bit version `libxml2` and
`uuid-dev`, PLEASE compile the source on a native 32-bit Ubuntu. I did not found
any solution for the missing 32-bit package.

### Adjustmenting CMake variables

Sometimes you need to change some CMake variables and build. There is no need to
delete everything and run CMake with the new arguments again. You just need to
run `ccmake ../llvm`, and it will opens up an interactive UI for changing CMake
variables and reconfigure. After you made changes to some variables, press `c`
and then `g`. Everything should be ready if your new configurations are correct.

Note that `ccmake` is not available on Windows.

### Using LLVM CommandLine Options

LLVM has already provided a library to write your own command line
options. Please reference [here](http://llvm.org/docs/CommandLine.html).


text:
# problem-solving-and-programmer-thinking

A project containing examples related to problem solving and programmer thinking.

This repository contains examples and information gathered from reading or online learning.
## Resources

- [Thinking like a programmer](https://www.amazon.com.au/Think-Like-Programmer-Anton-Spraul/dp/1593274246)

## How is the repository setup

Currently there is no particular way this repository is setup, this is due to there only really being content from the one resource. Because of this its likely to change over time.

license: MIT

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
---
title: Our Mission
meta: >-
  Maynooth Town Football Club's primary focus is on player welfare and
  development, to be inclusive of the community; and to provide equal
  opportunities for participation, development and achievement in football at
  all levels.
keywords: 'Maynooth,Town,Football Club, Community, Inclusivity'
image: /img/screenshot-2020-02-09-at-19.12.04.png
statements:
  - heading: Welfare and Development
    imageUrl: /img/the-ball-488714_1920.jpg
    text: >-
      Our primary focus is on player welfare and development; to be inclusive of
      the community; and to provide equal opportunities for participation,
      development and achievement in football at all levels.
  - heading: Active Participation
    imageUrl: /img/34706981_1891653880897767_1043212642409250816_n.jpg
    text: >-
      We promote and support the sustainable development of our club through the
      active participation of our valued members.
  - heading: High Standards
    imageUrl: /img/screenshot-2020-02-09-at-19.09.55.png
    text: >-
      We aspire to the highest standards in governance, management,
      accountability and volunteering.
  - heading: Continuous Development
    imageUrl: /img/download.jpeg
    text: >-
      We strive to attract, support and manage the professional, technical and
      financial resources necessary to achieve our goal for continuous
      development; and to uphold our standards and facilities. We do all of this
      for the benefit of our members and the wider community.
  - heading: Codes of Principles & Best Practice
    imageUrl: /img/65054141_2539400102789805_2308267329273724928_n.jpg
    text: >-
      Maynooth Town FC is a community club that supports the opportunity for all
      young players in our community to participate in, develop their skills and
      enjoy soccer at a level appropriate to their ability.

      The Club have drawn up a Code of Principles & Best Practice document to
      outline what we regard as best practice for our club. We invite everyone
      to become familiar with these principles.

      If your son or daughter is interested in playing soccer, please contact
      the Club Secretary, Miriam Murphy, on<PHONE_NUMBER> or by email:
<EMAIL_ADDRESS>

      **Download the Code of Principles & Best Practice document**
      [**here**](https://raw.githubusercontent.com/SalvoLunar/maynooth-fc-hugo/master/site/static/img/mtfc-code-of-principles-and-best-practice-nov2020.pdf)**.**

      **MTFC Executive | November 2020**
---

repository: SalvoLunar/maynooth-fc-hugo

branch_name: refs/heads/master

gha_language: CSS

gha_license_id: MIT

repo_name: SalvoLunar/maynooth-fc-hugo


text:
In the context of a package, the `parameter` keyword is a synonym for the
`localparam` keyword.
This rule encourages the author to consider that the constant may not be
overridden and convey that explictly.

See also:
- **parameter_in_generate**

The most relevant clauses of IEEE1800-2017 are:
- 6.20.4 Local parameters (localparam)
- 26 Packages

repository: dalance/svlint

gha_language: Rust

repo_name: dalance/svlint


text:
# baseball-game-prediction
Python language using sci-kit learn and Selenium to scrape mlb websites and collection information to get inputs and outputs to potentially predict who will win the next game.

# What is the goal of this project?
The machine learning model is designed to essentially predict which team is going to win the game

# How will the data be collected?
- A python script will navigate through https://www.espn.com/mlb/schedule/_/20190320
- It will iterate through and collect the scores and that will be the outputs we want from the data
- Each game has information that will essentially be our inputs for the model to train on
- This is going be a work of web scraping to collect that data and store it into a type of data format (JSON, CSV, etc

# What kind of machine learning algorithm is being used?
Linear Regression Model because the inputs have a strong correlation on the output of the game

# What are the steps for the project?
Step 1: Using Selenium package to create a webdriver to open the desired web page to scrape
```
path_to_chromedriver = 'chromedriver.exe'
browser = webdriver.Chrome(executable_path=path_to_chromedriver)
date = datetime.datetime(2019, 3, 20)
date = date.strftime('%Y%m%d')
url = 'https://www.espn.com/mlb/schedule/_/date/{}'.format(date)
browser.get(url)
```

repository: mike-gallego/selenium-scrape-mlb-games

repo_name: mike-gallego/selenium-scrape-mlb-games


text:
# Vue with Webpack

A [Vue.js](https://https://vuejs.org) 2.0 and [Webpack](https://webpack.github.io) template with the following plugins for [SPA](https://en.wikipedia.org/wiki/Single-page_application) functionality:
* [vue-loader](https://github.com/vuejs/vue-loader)
* [vue-resource](https://github.com/vuejs/vue-resource)
* [vue-router](https://github.com/vuejs/vue-router)
* [vuex](https://github.com/vuejs/vuex)
* [vuex-router-sync](https://github.com/vuejs/vuex-router-sync)

### Usage

```bash
$ git clone https://github.com/Gangwolf/vue-with-webpack.git my-project
$ cd my-project
$ npm install
$ npm start
```

### What's Included

- `npm start`: Webpack + vue-loader.

- `npm build`: build with HTML/CSS/JS minification.

This template was forked from [vue-cli](https://github.com/vuejs/vue-cli), for detailed explanation on how things work, view the [docs for vue-loader](http://vuejs.github.io/vue-loader).

### Fork It And Make Your Own

You can fork this template to create your own boilerplate.

1. Fork it: https://github.com/Gangwolf/vue-with-webpack/fork
2.  Push it: `git push origin my-new-feature`

repository: Gangwolf/vue-with-webpack

repo_name: Gangwolf/vue-with-webpack


text:
# drone-s3

[![Build Status](http://beta.drone.io/api/badges/drone-plugins/drone-s3/status.svg)](http://beta.drone.io/drone-plugins/drone-s3)
[![Image Size](https://badge.imagelayers.io/plugins/drone-s3:latest.svg)](https://imagelayers.io/?images=plugins/drone-s3:latest 'Get your own badge on imagelayers.io')

Drone plugin to publish files and artifacts to Amazon S3. For the usage information and a listing of the available options please take a look at [the docs](DOCS.md).

## Build

Build the binary with the following commands:

```
export GO15VENDOREXPERIMENT=1
export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=0

go build -a -tags netgo
```

## Docker

Build the docker image with the following commands:

```
docker build --rm=true -t plugins/s3 .
```

Please note incorrectly building the image for the correct x64 linux and with GCO disabled will result in an error when running the Docker image:

```
docker: Error response from daemon: Container command
'/bin/drone-s3' not found or does not exist..
```

## Usage

Build and publish from your current working directory:

```
docker run --rm                     \
  -e PLUGIN_SOURCE=<source>         \
  -e PLUGIN_TARGET=<target>         \
  -e PLUGIN_BUCKET=<bucket>         \
  -e AWS_ACCESS_KEY_ID=<token>      \
  -e AWS_SECRET_ACCESS_KEY=<secret> \
  -v $(pwd):$(pwd)                  \
  -w $(pwd)                         \
  plugins/s3 --dry-run
```


text:
# broccoli-sass2scss

The broccoli-sass2scss plugin transpiles `.sass` files to `.scss` files with
[sass2scss](https://github.com/ArnaudRinquin/sass2scss) with some syntax updates by j-mcnally.

## Installation

```bash
npm install --save-dev broccoli-sass2scss
```

## Usage

```js
var sass2scss = require('broccoli-sass2scss')
var sourceTrees = [app, config, 'vendor'].concat(broccoli.bowerTrees());
var appAndDependencies = mergeTrees(sourceTrees, { overwrite: true });
appAndDependencies = sass2scss(appAndDependencies);
var styles = preprocessCss([appAndDependencies], prefix + '/styles', '/assets');
```

This has only been tested with Ember-Cli but should work with any Broccoli project. It basically add the step/middleware of translating sass files to scss so that libsass can handle them.


text:
# tiddlypom
A web application for hosting your own [TiddlyWiki](https://tiddlywiki.com/),
written in Go.

This is an attempt at implementing a server for [TiddlyWiki](https://tiddlywiki.com/).
The idea is you can run this application on your own server. It is heavily
inspired by https://github.com/rsc/tiddly but with data stored in SQLite instead
of Google App Engine.

## Why?
My stomach turns at the thought of installing NodeJS and npm on my VPS. I imagine
there are ways of packaging a JavaScript application into a single executable,
but that's not the default.

I know, this app isn't as good as the one that comes with TiddlyWiki itself.
Plugins are more difficult to manage, there are various hacks around the system
tiddlers, who knows what other functionality is broken. But this is fun.

### Authentication
The assumption is that this is installed on your own server so that you can access
it from anywhere. With that in mind, the application is secured.

It's a bit unfriendly, you need to create two files in the same folder as the
web application executable: 1) .config and 2) users.gob.

.config should contain a JSON object with one property, "pepper":

    {
        "pepper": "[your value goes here]"
    }

That pepper value and the users.gob file can be generated with the included
cmd/admin application.

repository: etitcombe/tiddlypom

repo_name: etitcombe/tiddlypom


text:
# Battleships

A Battleships game made for a TOP assignment, intended to teach one about Jest TDD.

## Made with:

Web: React, Jest, HTML, CSS, JavaScript

Tools: Autodesk 3ds Max, Adobe Photoshop, Ableton Live

## Game flow:

![image](https://user-images.githubusercontent.com/52622303/73218894-8eb4c200-4163-11ea-9f11-51eda48dd695.png)

## How to run

Install: `npm install`

Run: `npm start`

Tests: `npm test`

## Credits:

Main button and selection click sounds: https://www.premiumbeat.com/blog/free-sci-fi-hud-computer-sfx/

Battleship sunk sound: http://soundbible.com/1472-Depth-Charge.html

repository: martink-rsa/Battleships

gha_language: JavaScript

repo_name: martink-rsa/Battleships


text:
# Generic Measures

The default `Measure` class is specifically designed around using measures where the underlying values are represented by the JavaScript `number` type. However, it may be desirable to want measures where the values have different numeric types. For example, one might want measures with arbitrary precision or measures on the rational numbers. Creating such a measure class can be accomplished by using the `createMeasureType` function.

## Example

Suppose we have our own number type:

```ts
class WrappedNumber {
    constructor(public readonly value: number) {}

    foo(): WrappedNumber { ... }
}

function wrap(value: number) {
    return new WrappedNumber(value);
}
```

Now we're going to create our own measure type that operates on `WrappedNumber` types, let's call it `WrappedMeasure`:

```ts
import { createMeasureType, GenericMeasure, Unit } from "safe-units";

type WrappedMeasure<U extends Unit> = GenericMeasure<WrappedNumber, U>;
const WrappedMeasure = createMeasureType({
    one: () => wrap(1),
    neg: x => wrap(-x),
    add: (x, y) => wrap(x.value + y.value),
    sub: (x, y) => wrap(x.value - y.value),
    mult: (x, y) => wrap(x.value * y.value),
    div: (x, y) => wrap(x.value / y.value),
    pow: (x, y) => wrap(x.value ** y),
    compare: (x, y) => x - y,
    format: x => `${x}`,
});
```

We can then use this class just as we would use `Measure`, except anywhere we'd expect a `number` we now expect a `WrappedNumber`.

## Breakdown

Let's deconstruct this example to explain what's going on. First we start with this type definition:

```ts
type WrappedMeasure<U extends Unit> = GenericMeasure<WrappedNumber, U>;
```

This line isn't strictly necessary, but it is often useful to have our `WrappedMeasure` available as a type. The next line `const WrappedMeasure = ...` creates a value for wrapped measures. Having a type for the measure is useful for writing generic functions on wrapped measures. All this line does is bind the numeric type of `GenericMeasure`. Similarly, the `Measure` type has the following definition:

```ts
type Measure<U extends Unit> = GenericMeasure<number, U>;
```

After we've defined the type of `WrappedMeasure` we now define the class itself by calling `createMeasureType`. This function takes an object which let's the generic measure type know how to perform operations on our numeric type.  Most of these operations should be self-explanatory, however some require some further explanation:

- `one`: A function with no arguments that simply returns the 1 value or multiplicative identity of your number system. This is used to construct base units whose values are implicitly one.
- `pow`: This function is slightly different from the rest of the arithmetic operations in that it doesn't take to values of type `N`, instead its signature is: `pow: (base: N, power: number) => N`. The `power` argument is a JavaScript `number` but will only ever be an integer between -5 and 5, inclusive. This is due to the computational limitations of the library that we need to be specific in the kinds of exponents we can handle.
- `compare`: A function that returns a negative `number` if its first argument is less than its second, a positive `number` if its first argument is greater than its second, and `0` if the arguments are equal.

##  Usage

The returned `WrappedMeasure` now behaves just like `Measure` does except in the domain of wrapped numbers. This means we can call `WrappedMeasure.dimension` or `WrappedMeasure.of` just as expected. It's important to note that the provided quantities and units (`Length`, `Time`, `meters`, `seconds`, etc) will need to be redefined for other measure types as these types are all specific to `number`.

## Static Methods

By default, generic measures come with a set of static methods that can be applied to measures of all numeric types. However, certain static methods may only make sense for a given numeric type. For example the `Measure.trunc` method exists because `Math.trunc` applies to `number` types. To add static methods to a generic measure type, simple pass an object as a second argument to `createMeasureType`:

```ts
declare function foo(value: WrappedNumber): WrappedNumber;
declare const mass: WrappedMeasure<{ mass: "1" }>;

const WrappedMeasure = createMeasureType({ ... }, {
    foo: wrapUnaryFn(foo),
});

WrappedMeasure.foo(mass);
```

repository: timjb/safe-units

repo_name: timjb/safe-units


text:
Immagine this FASTA file (`input.fa`):

```
>seq1;group=1
SEQUENCE
>seq2;group=2
SEQUENCE
>seq3;group=1
SEQUENCE
```

```bash
st split -o "group_{a:group}.fa" --adelim ";" input.fa
```

This will create the files `group_1.fa` and `group_2.fa`. In more
complicated scenarios, variables may be combined for creating nested subfolders
of any complexity.

repository: markschl/seqtool

repo_name: markschl/seqtool


text:
---
layout: default
permalink: docs/escape.html
---

# Char Escaping

Stylus lets you escape characters. This effectively turns them into identifiers, allowing them to be rendered as literals.

For example:

```stylus
body
  padding 1 \+ 2
```

Compiles to:

```css
body {
  padding: 1 + 2;
}
```

Note that Stylus requires that `/` is parenthesized when used in a property:

```stylus
body
  font 14px/1.4
  font (14px/1.4)
```

yields:

```css
body {
  font: 14px/1.4;
  font: 10px;
}
```

repository: stylus/stylus

branch_name: refs/heads/dev

repo_name: stylus/stylus


text:
---
title: "eco"
feed: hide
tags: writer
---

umberto eco (5 january 1932) wrote about [[philosophy]], [[semiotics]], [[fascism]]. he was born in alessandria. he studied at the university of turin and wrote a thesis on [[aquinas]]. he was friends with [[barthes]]. he was an [[atheist]].

## translation

eco thinks [[translation]] is not just about rendering a text from language _A_ to language _B_, but in making also the culture of _A_ accessible to the culture of _B_.

repository: ashwinreddy/blog

repo_name: ashwinreddy/blog


text:
# sous-singularity
Singularity API client, for use with Sous

## Components:

- *swaggering* is a Swagger 1.2 code generator library.
- *swagger-client-maker* is the CLI tool that uses the above.
`swagger-client-maker <source services.json> <target directory>`
will create DTOs and operation methods as indicated by the `service.json` and api JSON files.
- *client* is the HTTP client libraries used by the generated API.
- *client/jq-scripts* and *client/process_api.sh* are helpers to clean up the Sigularity JSON;
Singularity's generated JSON files are... not completely valid Swagger,
so they need a little massage before they're used.

repository: tranhungt/sous

repo_name: tranhungt/sous


text:
# Shoal margin collapses (DOI: 10.5281/zenodo.1472212)
Associated to the paper called: Effect of perturbations by shoal margin collapses on the morphodynamics of a sandy estuary, Journal of Geophysical Research - Earth Surface.

This resporatory contains the Matlab-code that was build to simulate shoal margin collapses in a numerical morphodynamics model (Delft3D) simulation.
Some code lines are associated to Delft3D matlab codes, which should be installed in advance.

Included in this repository are the matlab-script to run the Delft3D (with stopping for adding shoal margin collapses,
matlab-script that adds shoal margin collapses to the bed elevation (incl. eroded scar and associated deposit) based on analysis of the Western Scheldt by Van Dijk et al., 2017 Location and probability of shoal margin collapses in a sandy estuary, Earth Surface Processes and Landforms (doi:\10.1002/esp.4395).
Median bed elevation for the Western Scheldt (used to determine shoal margins)
Shapefile of the Region of Interest.

Initial model setup is not applied for the Western Scheldt, but was provided by Deltares and Rijkswterstaat.

repository: fansofrivers/shoalmargincollapses

gha_language: Matlab

repo_name: fansofrivers/shoalmargincollapses


text:
# Copy-StatusCakeHelperContactGroup

## SYNOPSIS
Copies the settings of a StatusCake ContactGroup

## SYNTAX

### CopyById
```
Copy-StatusCakeHelperContactGroup [-APICredential <PSCredential>] -ID <Int32> -NewName <String> [-WhatIf]
 [-Confirm] [<CommonParameters>]
```

### CopyByName
```
Copy-StatusCakeHelperContactGroup [-APICredential <PSCredential>] -Name <String> -NewName <String> [-WhatIf]
 [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
Creates a copy of a contact group which can be specified by name or id.
The new name of the contact group must not already exist for the command to be successful.

## EXAMPLES

### EXAMPLE 1
```
Copy-StatusCakeHelperContactGroup -Name "Example" -NewName "Example - Copy"
```

Create a copy of a contact group called "Example" with name "Example - Copy"

## PARAMETERS

### -APICredential
Credentials to access StatusCake API

```yaml
Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: (Get-StatusCakeHelperAPIAuth)
Accept pipeline input: False
Accept wildcard characters: False
```

### -ID
ID of the Contact Group to be copied

```yaml
Type: Int32
Parameter Sets: CopyById
Aliases:

Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False
```

### -Name
Name of the Contact Group to be copied

```yaml
Type: String
Parameter Sets: CopyByName
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -NewName
Name of the copy of the Contact Group

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

## NOTES

## RELATED LINKS

[https://github.com/Oliver-Lii/statuscake-helpers/blob/master/Documentation/ContactGroups/Copy-StatusCakeHelperContactGroup.md](https://github.com/Oliver-Lii/statuscake-helpers/blob/master/Documentation/ContactGroups/Copy-StatusCakeHelperContactGroup.md)

repository: Oliver-Lii/statuscake-helpers

gha_language: PowerShell

repo_name: Oliver-Lii/statuscake-helpers


text:
---
GENERATOR: 'Mozilla/4.5 \[en\] (X11; I; IRIX 6.3 IP32) \[Netscape\]'
Generator: Microsoft Word 98
Template:
    Macintosh HD:Applications:Microsoft Office 98:Word Custom
    Install:Microsoft Office 98:Templates:Web Pages:Blank Web Page
title: EXTRACT
---

> **EXTRACT/SURFMESH**\
>
>
> > This routine extracts the boundary of a mesh. If the original mesh
> > is a solid mesh, it extracts the surface mesh.  If it is a surface
> > mesh, it extracts the edge mesh. If the interface elements have
> > "parent-child" nodes, then only the parent nodes and elements are
> > extracted.  Not all attributes in the input mesh object are created
> > or initialize in the output mesh object.  Among the array-valued
> > attributes,  only xic,yic,zic,itet,jtet,itetoff,itettyp, and icr1
> > are set. imt is set to 1. The  icontab array is copied from the
> > input mesh object to the output mesh object.\
> > \
> > Six new element based attributes, **itetclr0, itetclr1, idelem0**
> > and **idelem1, idface0, idface1** are added to the output mesh
> > indicating the material numbers (itetclr) on each side of the mesh
> > faces, i.e., the color of elements that existed on each side of a
> > face in the original mesh. The convention is that the normal points
> > into the larger material id (itetclr) material.
> > [itetclr0]{style="font-weight: bold;" indicates the color of the
> > elements on smaller itetclr value side (the inside) of the face
> > normal (0 if the face is on an external boundary) and
> > [itetclr1]{style="font-weight: bold;" indicates the color of the
> > elements on the outside of the normal. The attributes **idelem0**
> > and **idelem1** record the element numbers of the input mesh that
> > produced the lower dimensional output mesh. The attributes
> > [idface0]{style="font-weight: bold;" and
> > [idface1]{style="font-weight: bold;" record the local face number
> > of the input mesh objects.\
> > [\
> >                    ]{style="font-family: monospace;"\
> > [                   ------>
> > normal]{style="font-family: monospace;"\
> > [                   ]{style="font-family: monospace;"\
> > [       itetclr = 1    itetclr =
> > 2]{style="font-family: monospace;"\
> > [      itetclr0 = 1   itetclr1 = 2\
> >       element\# = 1   element\# = 2\
> >       idelem0  = 1   idelem1  =
> > 2]{style="font-family: monospace;"\
> > \
> > A node attribute, [idnode0]{style="font-weight: bold;", records the
> > node number of the input mesh object node.\
> > \
> > In addition another element attribute called[ facecol
> > ]{style="font-weight: bold;"is added to the elements of the new
> > mesh. The [facecol ]{style="font-weight: bold;"attribute is a model
> > face number constructed from the
> > [itetclr0]{style="font-weight: bold;" and
> > [itetclr1]{style="font-weight: bold;" attributes. The way the
> > [facecol]{style="font-weight: bold;"  attribute is constructed does
> > not guarantee that the same [facecol]{style="font-weight: bold;"
> > value will not be given to two disjoint patches of mesh faces.
> >
> > If the keyword **external** is supplied, only the exterior surface
> > mesh will be extracted.  i.e., the interior interfaces between
> > materials will not be extracted.  The default is for the interior
> > interfaces to be extracted as well.\
> >
> > The itp array of the input mesh object must be correctly set prior
> > to calling
> > [extract]{style="font-family: Courier New,Courier,monospace;". To
> > insure itp is correctly set a call to
> > [resetpts/itp]{style="font-family: Courier New,Courier,monospace;"
> > may be required.\
> >
> \
>      FORMAT:
>
>
> [extract/surfmesh/1,0,0/]{style="font-family: Courier New,Courier,monospace;"cmo\_out/\[cmo\_in\]/\[external\]

\


text:
### 0.0.13
  * Change handling errors. If you throw ApiError in methods, you should return ```vow.reject``` instead. (**breaks backward compatibility**)
  * Add tests for examples.
  * Improve batch speed (using next tick for modern browsers).

### 0.0.12
  * Build on `npm prepublish`

### 0.0.11
  * Change package name: ```baby-loris-api``` -> ```bla```  (**breaks backward compatibility**).

### 0.0.10
  * Find api methods synchronously.

### 0.0.9
  * Delete using express session for search parameter value (**breaks backward compatibility**).
  * Fix bug when the batch method does not proxy request to submethods.

### 0.0.8
  * Add a possibility to pass an Api instance to the middleware. [#22](../../issues/22)
  * Proxy express request to a method. [#20](../../issues/20)
  * Export namespace instead of paths on file system.

### 0.0.7
  * Add ```setOption``` method. [#9](../../issues/9) (**breaks backward compatibility**)
  * Add batch support for the client side. [#10](../../issues/10)
  * Add more examples. [#6](../../issues/6), [#11](../../issues/11)
  * Add a special example for enb project. [#12](../../issues/12)
  * Add a contribution guide. [#18](../../issues/18)
  * Add AMD support and global for the client (remove ym dependency). [#16](../../issues/16)
  * Build baby-loris-api.min.js for each npm release. [#15](../../issues/15)
  * Remove jquery and inherit dependecies for the client. [#13](../../issues/13), [#14](../../issues/14)
  * Fix coverage calculating.

### 0.0.6
  * Add Features part and link to the [demo project](https://github.com/tarmolov/weatherpic).
  * Use json for body in post requests (**breaks backward compatibility**).
  * Fix a couple of issues: [#5](../../issues/5), [#7](../../issues/7)

### 0.0.5
  * Add ym to peerDependencies.
  * Strict a node engine. Works properly only with node >= 0.10.x.

### 0.0.4
  * Fix misprint in peerDependencies.

### 0.0.3
  * Add ```Array``` type.
  * Fix bugs: [#1](../../issues/1), [#2](../../issues/2), [#3](../../issues/3), [#4](../../issues/4).

### 0.0.2
  * Add the licence (MIT).
  * Add a test coverage.
  * Middleware looks up params in ```req.session```, too. See [express-session](https://github.com/expressjs/session) for more details.

### 0.0.1
  * Add the server side implementation (Api class, ApiMethod class, ApiError class).
  * Add the express middleware (provide access from the frontend side and can generate documentation for all api methods).
  * Add the frontend side implementation (Api class, ApiError class).
  * Add examples for each major cases.
  * Add tests and validation for the server side, for the frontend side, and for the middleware.
  * Add documentation.

repository: dmikis/bla

repo_name: dmikis/bla


text:
# Collembolispora barbata Marvanová, Pascoal & Cássio, 2003 SPECIES

#### Status
ACCEPTED

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

#### Published in
in Marvanová & Cássio, Cryptog. Mycol. 24(4): 341 (2003)

#### Original name
Collembolispora barbata Marvanová, Pascoal & Cássio, 2003

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# Translations

[Translation attributes](https://app.lokalise.com/api2docs/curl/#resource-translations)

## Fetch translations

[API doc](https://app.lokalise.com/api2docs/curl/#transition-list-all-translations-get)

```js
const translations = lokaliseApi.translations().list({
  project_id: project_id,
  filter_is_reviewed: 0,
  filter_lang_id: 803,
  page: 2,
  limit: 1
});

translations.items[0].translation_id;
```

Please note that if you would like to filter translations by their language, you have to provide *language ID*, not language ISO code, as it is shown in the example above!

## Fetch a single translation

[API doc](https://app.lokalise.com/api2docs/curl/#transition-retrieve-a-translation-get)

```js
const translation = await lokaliseApi.translations().get(translation_id, {project_id: project_id});

translation.key_id;
```

## Update translation

[API doc](https://app.lokalise.com/api2docs/curl/#transition-update-a-translation-put)

```js
const translation = await lokaliseApi.translations().update(
  translation_id,
  {translation: 'updated'},
  {project_id: project_id}
);

translation.translation_id;
```

repository: lokalise/node-lokalise-api

gha_language: TypeScript

gha_license_id: NOASSERTION

repo_name: lokalise/node-lokalise-api


text:
# Infrastructure as a Code using AWS CLI

## Setup
- Create and configure required networking infrastructure using the AWS CLI. Script should take STACK_NAME as a parameter and creates the following :
  - Virtual Private Cloud (VPC) resource called STACK_NAME-csye6225-vpc
  - Internet Gateway resource called STACK_NAME-csye6225-InternetGateway-
  - Internet Gateway to STACK_NAME-csye6225-vpc VPC
  - Public Route Table called STACK_NAME-csye6225-public-route-table
  - Public route in STACK_NAME-csye6225-public-route-table route table with destination CIDR block <IP_ADDRESS>/0 and STACK_NAME-csye6225-InternetGateway as the target
  - Revoke the default Security Group for VPC created and modify the rules for TCP on port 22 and 80 i.e. HTTP and SSH.

Create the script for the network infractrcuture setup

Usage: `./csye6225-aws-networking-setup.sh [StackName]`

## Teardown
- This Script should delete all networking resources using AWS CLI. Teardown script will read all resources ID form [StackName].log and delete them by using AWC CLI.
- Don't forget provide the correct STACK_NAME

Create the script for the network infractrcuture Teardown

Usage: `./csye6225-aws-networking-teardown.sh [StackName]`


text:
## Bugsense Modular Input v0.1

## Overview

This is a Splunk modular input add-on for monitoring your Bugsense Projects.

## Dependencies

* Splunk 5.0+
* Supported on Windows, Linux, MacOS, Solaris, FreeBSD, HP-UX, AIX

## Setup

* Untar the release to your $SPLUNK_HOME/etc/apps directory
* Restart Splunk
* Browse to "Data inputs -> Bugsense" and set your Bugsense Auth Token and Project ID for the stanzas.

## Logging

Any log entries/errors will get written to $SPLUNK_HOME/var/log/splunk/splunkd.log

## Troubleshooting

* You are using Splunk 5+
* Look for any errors in $SPLUNK_HOME/var/log/splunk/splunkd.log

## Contact

This project was initiated by Alex Kompotis

Email
<EMAIL_ADDRESS>

gha_language: Python


text:
# Kalabox Pantheon App
## Overview

By default Kalabox can pull apps from and push apps to Pantheon... but this is much more than basic push/pull integration. Kalabox will build out a local Pantheon environment for each app. This means `solr`, `redis`, `ssl` and `terminus` all work just like they do on Pantheon. You can also use `drush`, `wp-cli`, `ssl` and toggle `php` version. YAY!

**NOTE:** This 'create' functionality actually comes from the core kalabox-pantheon plugin.

## Tools and working with your code

You can run various Pantheon-helpful tools like terminus. To see a list of all the things run `kbox` from inside of your app directory.

```bash
Usage: kbox <command> [-- <options>]

Global commands that can be run from anywhere
  create
      pantheon     Creates a Pantheon app.
  env              Print Kalabox environmental vars.
  list             Display list of apps.
  update           Run this after you update your Kalabox code.
  version          Display the kbox version.

Actions that can be performed on this app
  config           Display the kbox application's configuration.
  destroy          Completely destroys and removes an app.
  pull             Pull down new code and optionally data and files.
  push             Push up new code and optionally data and files.
  rebuild          Rebuilds your app while maintaining your app data.
  restart          Stop and then start a running kbox application.
  services         Display connection info for services.
  start            Start an installed kbox application.
  stop             Stop a running kbox application.

Options:
  -h, --help     Display help message.                                 [boolean]
  -v, --verbose  Use verbose output.                                   [boolean]

```

## Pulling from Pantheon

You can refresh your local code and even your database and files by running `kbox pull` from inside of your Pantheon app.

```
kbox pull -- -h
Options:
  -h, --help     Display help message.
  -v, --verbose  Use verbose output.
  --database     Pull DB from an env. Options are dev, test, live and none
  --files        Pull files from an env. Options are dev, test, live and none
  --newbackup    True to generate a new DB backup
```

**Important:** To avoid slow pulls on larger sites, Kalabox pulls from Pantheon's database backups, instead of the active database. If you would like to retrieve the most recent version of your database, you will need to indicate y when asked Retrieve latest DB instead of most recent backup? (y/N) or use the --newbackup flag.

## Pushing to Pantheon

You can easily push up code and even your database and files by running `kbox push`.

```bash
Options:
  -h, --help     Display help message.                                 [boolean]
  -v, --verbose  Use verbose output.                                   [boolean]
  -m, --message  Tell us about your change                              [string]
  --database     Push DB to specific env. Options are dev and none      [string]
  --files        Push files to a spefic env. Options are dev and none   [string]
```

## Connecting to your database

You can connect to your database using a third-party tool such as SequelPro
or SqlWorkbench. To get the connection info run `kbox services` from inside a running pantheon app.

```
kbox services
[
  {
    "name": "edge",
    "project": "playbox",
    "url": [
      "http://edge.playbox.kbox",
      "https://edge.playbox.kbox"
    ]
  },
  {
    "name": "appserver",
    "project": "playbox",
    "url": [
      "http://playbox.kbox",
      "https://playbox.kbox"
    ]
  },
  {
    "name": "db",
    "project": "playbox",
    "credentials": {
      "database": "pantheon",
      "user": "pantheon",
      "password": "",
      "host": "<IP_ADDRESS>",
      "port": "32783"
    }
  },
  {
    "name": "solr",
    "project": "playbox"
  },
  {
    "name": "redis",
    "project": "playbox"
  }
]
```

Your connection info will be listed in the DB object. This information
may change between restarts.

```json
  {
    "name": "db",
    "project": "playbox",
    "credentials": {
      "database": "pantheon",
      "user": "pantheon",
      "password": "",
      "host": "<IP_ADDRESS>",
      "port": "32783"
    }
  }
```

## Using CLI tools

We package a lot of common CLI tools into your app. You can use most of these
more or less like you would if you had them natively installed. Here is a
brief example of doing an `npm install` on a theme.

```bash
cd /path/to/my/pantheon/app
cd code/sites/all/themes/kalatheme
kbox npm install
```

## Edge

To see what your site is like/how it behaves hitting the pantheon varnish
edge you can go to `http(s)://edge.myapp.kbox`. **Note that this
will likely interfere with your code sharing since varnish will be serving
you back a cached page and not what is actually on your appserver.**

## SSL

You can use `https` by just typing in `https://myapp.kbox` in your browser. We self-sign the certs so you will need to allow this in your browser.

Pantheon's ssl layer is at the edge so if you want to test SSL in a more
realistica way you should route your traffic through our edgeserver at https://edge.myapp.kbox.

## SOLR

Apache Solr comes in each local Pantheon environment. You can use it the exact same way as you do on Pantheon.

https://pantheon.io/docs/articles/sites/apache-solr/

## Redis

Just follow the same instructions from Pantheon to get redis to work locally.

https://pantheon.io/docs/articles/sites/redis-as-a-caching-backend/

The TL;DR for Drupal 7 (on php 5.3) here is

1. Install the [redis module](http://drupal.org/project/redis) (only 2.x supported)
2. Use this code snippet in settings.php

```php
// All Pantheon Environments.
if (defined('PANTHEON_ENVIRONMENT')) {
  // Use Redis for caching.
  $conf['redis_client_interface'] = 'PhpRedis';
  $conf['cache_backends'][] = 'sites/all/modules/redis/redis.autoload.inc';
  $conf['cache_default_class'] = 'Redis_Cache';
  $conf['cache_prefix'] = array('default' => 'pantheon-redis');
  // Do not use Redis for cache_form (no performance difference).
  $conf['cache_class_cache_form'] = 'DrupalDatabaseCache';
  // Use Redis for Drupal locks (semaphore).
  $conf['lock_inc'] = 'sites/all/modules/redis/redis.lock.inc';
}
```

## Xdebug

xdebug is set up on your php appserver. Here is an example SublimeText 2 config (similar settings have been tested on Codebug, Eclipse, and other debugging tools). Note that you may need to launch it in the browser the first time using XDEBUG_SESSION_START=1 as a query parameter (ex: http://my-app.kbox/some-page?XDEBUG_SESSION_START=1). If breakpoints aren't working in your debugger, try inserting xdebug_break() in your code.

```json
{
  "folders":
  [
    {
      "path": "/local/path/to/my/code"
    }
  ],
  "settings":
  {
    "xdebug":
    {
      "max_children": 32,
      "max_depth": 16,
      "pretty_output": true,
      "path_mapping":
      {
        "/code/": "/local/path/to/my/code/"
      },
      "port": 9000,
      "url": "http://mysite.kbox/"
    }
  }
}
```

## Other Resources

* [API docs](http://api.kalabox.me/)
* [Test coverage reports](http://coverage.kalabox.me/)
* [Kalabox CI dash](http://ci.kalabox.me/)
* [Mountain climbing advice](https://www.youtube.com/watch?v=tkBVDh7my9Q)
* [Boot2Docker](https://github.com/boot2docker/boot2docker)
* [Syncthing](https://github.com/syncthing/syncthing)
* [Docker](https://github.com/docker/docker)

-------------------------------------------------------------------------------------
(C) 2016 Kalabox Inc and friends


text:
---
title: Approximate Count Distinct function in calculated metrics
description: Learn how to create a calculated metric using the Approximate Count Distinct function, which returns the approximated distinct count of dimension items for a selected dimension.
feature: Calculated Metrics
kt: 1910
role: User
level: Beginner
exl-id: d3594ed7-b90e-4f97-89c7-3e6c75534136
---
# Approximate Count Distinct function in calculated metrics {#approximate-count-distinct-function-in-calculated-metrics}

Learn how to create a calculated metric using the Approximate Count Distinct function, which returns the approximated distinct count of dimension items for a selected dimension.

>[!VIDEO](https://video.tv.adobe.com/v/23722/?quality=12&learn=on)

You can use the metric shown in this video in any report to understand the count of one dimension against values of other. A very common use case would be to use this function to create a Customer IDs metric, which you could then use in any report to see how many customers apply to the different dimension values.


text:
Django TarView
==============

[![Build Status](https://travis-ci.org/luckydonald/django-tarview.svg)](https://travis-ci.org/luckydonald/django-tarview)[![On PyPI](https://img.shields.io/pypi/v/django-tarview.svg)](https://pypi.python.org/pypi/django-tarview)
A simple Django base view to stream file-like-objects as .tar archive.
Python 2.7 and 3 ready.

Installation
------------

    pip install django-tarview

Usage and examples
------------------

To create a tar download view:

 * Extend `BaseTarView`
 * implement `get_files`
 * That's it

The `get_files` method must return a list (or iterator) of file-like objects.

Example with a ContentFile:

```python
from tarview.views import BaseTarView

from django.core.files.base import ContentFile
from django.utils.six import b  # or use b"foo" instead.

class JustTextFilesView(BaseTarView):
    """
    Generate a tar with 10 files 'fileX.txt' with a simple text,
    using Djangos ContentFile
    """
    def get_files(self):
        for i in range(0,10):
            file_like = ContentFile(b("This is file %d." % i), name="file%d.txt" % i)
            yield file_like
```

Or pull them from a database like this:

```python
from tarview.views import BaseTarView

from reviews import Review

class CommentsArchiveView(BaseTarView):
    """Download at once all comments for a review."""

    def get_files(self):
        document_key = self.kwargs.get('document_key')
        reviews = Review.objects \
            .filter(document__document_key=document_key) \
            .exclude(comments__isnull=True)

        return [review.comments.file for review in reviews if review.comments.name]
```

View configuration
------------------

By default, the downloaded file is named `download.tar` you can set a custom name
by setting the `tarfile_name` parameter.

```python

class TarView(BaseTarView):
    tarfile_name = 'something.tar'
```

Testing
-------

Django TarView uses [tox, the testing automation tool](https://tox.readthedocs.org/en/latest/),
to run tests.

To launch tests:

    pip install tox
    tox

Author
------

Crafted with love by luckydonald.
Modification of [Thibault Jouannic](http://www.miximum.fr)'s work.


text:
# DDS Tunnel

Set up DDS Tunnels between computers behind NATs.

1. [Asymmetric NAT](#asymmetric-nat)
1. [Symmetric NAT](#symmetric-nat)

### Asymmetric NAT

This configuration is for two computers behind NATs (or firewalls), where one can port-forward a single port to be accessed by the other computer.

This correspond to the configuration described in the "Asymmetric Communication Across NATs" section of the [RTI Routing Service 5.3.1 Manual][rti-5.3.1-manual-pdf].

[rti-5.3.1-manual-pdf]: https://community.rti.com/static/documentation/connext-dds/5.3.1/doc/manuals/routing_service/RTI_Routing_Service_UsersManual.pdf

#### Example:

Computers `A`, `B` are behind NATs. `A` can port forward its internal port 7500 to router port 7400 for `B` to access. The `B`-accessible IP address of `A` is `<IP_ADDRESS>`.

Run this on `A`:

```bash
python3 start-tunnel.py server --internal_port=7500 --public_address=<IP_ADDRESS>:7400
```

Run this on `B`:

```bash
python3 start-tunnel.py client --server_address=<IP_ADDRESS>:7400
```

#### Custom Domain ID

To use a domain other than `0`, use the `--domain_id` param:

```bash
python3 start-tunnel.py --domain_id 31 server --internal_port=7500 --public_address=<IP_ADDRESS>:7400
python3 start-tunnel.py --domain_id 31 client --server_address=<IP_ADDRESS>:7400
```

#### Heartbeat

Heartbeats are sent from `TCPWANClient` to `TCPWANServer` periodically to check the health and latency of the connection. If you'd like to disable the heartbeat feature, add `--no-heartbeat` to the end of the script invocation.

### Symmetric NAT

This configuration is for two computers behind firewalls that do not support port-forwarding. This setup **requires a relay bridge** accessible by both computers.

#### Example

Relay Bridge:

Suppose that we have a bridge set up at `<IP_ADDRESS>` that exposes ports `7500` and `7501`.

Run this on one computer. This will connect domain 50 with the relay bridge:

```bash
python3 rti/dds-tunnel/start-tunnel.py --domain_id 50 client --server_address <IP_ADDRESS>:7500 --heartbeat_type initiator
```

Run this on the other computer. This will connect domain 35 with the relay bridge:

```bash
python3 rti/dds-tunnel/start-tunnel.py --domain_id 35 client --server_address <IP_ADDRESS>:7501 --heartbeat_type responder
```

- The `--heartbeat_type` parameter is interchangeable, as long as one of them is an initiator and the other a responder.

repository: WATORACE/dds-tunnel

repo_name: WATORACE/dds-tunnel


text:
# Guild Wars 2 Armory

[![Build Status](https://travis-ci.org/madou/armory-app.svg?branch=master)](https://travis-ci.org/madou/armory-app)
[![Dependencies](https://david-dm.org/madou/armory-app.svg)](https://david-dm.org/madou/armory-app)
[![Dev Dependencies](https://david-dm.org/madou/armory-app/dev-status.svg)](https://david-dm.org/madou/armory-app?type=dev)
[![codecov](https://codecov.io/gh/madou/armory-react/branch/master/graph/badge.svg)](https://codecov.io/gh/madou/armory-app)
[![Discord](https://img.shields.io/badge/discord-GW2Armory-blue.svg)](https://discord.gg/3BRbV7b)

> Guild Wars 2 Armory is an easy way to find, view, and share users, characters, and guilds with your friends on your mobile and PC! Join today and start sharing!

## Quick Start

```bash
git clone https://github.com/madou/armory-app.git
cd armory-app
yarn install # See https://yarnpkg.com/lang/en/docs/install/
cp src/config/local.sample.js src/config/local.js # local.js isn't checked in so you'll have to make one yourself.
```

### Testing

Run `tdd` for unit tests.

```bash
npm run tdd
```

Run `dev` for development and `start` for production.

### Website

```bash
npm run dev
npm start
```

### Embeds

Run `dev:embeds` for development and `start:embeds` for production.

```bash
npm run dev:embeds
npm run start:embeds
```

## Notes for Local Development

- When locally make sure you add a `local.js` to the `src/env/` folder. Look at `local.sample.js` for help. This isn't checked in deliberately so we can play with local settings without affecting git history.
- If needed you can get the api over at [armory-back](https://github.com/madou/armory-back). You will have to update your `config/local.js` to point to `localhost` if running the api locally.
- We use `pre-commit` to run commands before checking in. This will run `npm test` which covers linting, flow errors, and tests.

## Deployments

### To gw2armory.com

When a tagged commit is found a release to production is triggered in Travis.

To get a tagged commit run the following command in `master`:

```bash
npm version major|minor|patch
```

This will increment the version, update CHANGELOG.md (anything under Unreleased will be moved to a version), and push commits/tags to git.

### To preview.gw2armory.com

Standard npm version is used for deployments.

### Redux Dev Tools

Enabled in dev mode only, [go install the extension](http://extension.remotedev.io/) and then open it while running the armory locally.

## Pull Requests

Feel like contributing? Look at the [issues](https://github.com/madou/armory-app/issues) tab (or below in quick issues), or contact me on [twitter](https://twitter.com/itsmadou) for help to find something you'd like to work on. Make a pull request against `master` when you're ready to share your code!

### Quick Issues

- [Good first contribution](https://github.com/madou/armory-app/labels/good%20first%20contribution)
- [New features](https://github.com/madou/armory-app/issues?q=is%3Aopen+is%3Aissue+label%3Afeature)
- [Feature enhancements](https://github.com/madou/armory-app/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement)
- [Bugs](https://github.com/madou/armory-app/issues?q=is%3Aopen+is%3Aissue+label%3Abug)

© 2015-present gw2armory.com

repository: Boris-Eiratech/armory-app

repo_name: Boris-Eiratech/armory-app


text:
### Imperative

If you're from a [dat.gui](https://github.com/dataarts/dat.gui) background or prefer a more traditional imperative api, datoui provides a tiny wrapper with a similar interface. This is often useful when you want to quickly hack on projects.

> Note that while datoui has a similar interface as [dat.gui](https://github.com/dataarts/dat.gui), it will never likely have an exact mapping. datoui is simply a wrapper around Oui to handle certain use cases.

```javascript
let p = oui.datoui()
p.add( obj, 'someNum' )
let dir = p.addFolder( 'dir' )
dir.add( obj, 'nestedProp' )
```

Both of these approaches are equivalent and can be used in parallel. Which one you chose depends on your codings style and use case. As a general rule though, `datoui` is handy for quickly hacking on code and testing parameters. As code matures however, parameters become more defined and are often abstracted into an api. This is when the functional approach of `oui()` may be more applicable.

repository: breakfastny/oui

repo_name: breakfastny/oui


text:
W16 - Concurrent V8
===================

This is an experiment in automatic parallelization of JavaScript execution. It
includes modified Google's V8 and an execution environment for event-driven JavaScript
programs. The project is based on the work I did for MSc thesis at Oxford University.

The idea is very simple. Instead of executing all events in one thread we could
run several threads (one per processor core) with event loops working on a
common event queue. Conflicting access to data can be detected using [software
transactional memory](http://en.wikipedia.org/wiki/Software_transactional_memory).
Each event is a transaction. If it happens to be involved
in a conflict the event can be reverted and restarted.

The implementation of W16 is far from being complete. Some of the most effective
optimizations were disabled to simplify implementation. The goal of the
experiment was to show that combination of event-driven programming and STM
creates a scalable computational model.

We have just one computationally-intensive
[test](https://github.com/sheremetyev/w16/blob/master/w16/primes.js).
It counts number of primes under 10^6. The counting process is split into
batches and each batch is executed as an event. The number of primes is known so
we can easily verify the correctness of execution. Splitting the work into
events gives the parallelization engine an opportunity to distribute load
between processors.

In my experiments (on AWS High-CPU Extra-Large instance with Amazon Linux 64 bit)
W16 scaled almost linearly. The exection times were as following.

- 1 thread: 24.5 seconds
- 2 threads: 12.3 seconds
- 3 threads: 8.5 seconds
- 4 threads: 6.5 seconds

Implementation Details
======================

There are following modification to V8 engine.

- thread management code is removed

- thread-specific data members are moved from Isolate to ThreadLocalTop

- some parts of the Heap are made thread-local

- functions have a separate version of compiled code for each thread with
  embedded pointers to thread-local instances of data

- shared data is protected by mutexes

- when GC is required all threads are paused and references in all threads are
  traversed

- simplified version of
  [commit-time invalidating STM](http://dl.acm.org/citation.cfm?id=1772970) is
  [implemented](https://github.com/sheremetyev/w16/blob/master/src/stm.cc)

- read and write operations on heap object are intercepted and redirected via
  STM to a copy of the object; changes are written back to the original object
  on commit

- [event-driven execution environment](https://github.com/sheremetyev/w16/blob/master/w16/main.cc)
  is implemented

The [difference](https://github.com/sheremetyev/w16/compare/v8...master) from
the original V8 source code is kept as small as possible.

The following things are not implemented.

- mutual exclusion for external calls from JavaScript to C++ and marking of
  transaction as irrevocable

- deferred execution of asynchronous external calls

W16 can be compiled on Windows with Visual Studio 2010 and on Mac OS X with
Xcode 4.2. Other configurations haven't been tested.

Compiling and Testing
=====================

Windows
-------

Run the following commands to clone, build and execute W16 on Windows (in 2 threads).

    git clone git://github.com/sheremetyev/w16.git
    cd w16
    svn export http://src.chromium.org/svn/trunk/deps/third_party/cygwin@66844 third_party/cygwin
    generate.cmd
    build.cmd
    w16\Debug\w16 w16\primes.js --threads=2

The last command should produce the following output.

    [Worker 0] 78498 primes.
    2 threads, 15282 ms, 10 transactions, 0 aborts

Mac OS X
--------

Run the following commands to clone, build and execute W16 on Mac OS X.

    git clone git://github.com/sheremetyev/w16.git
    cd w16
    ./generate.sh
    ./build.sh
    w16/build/Debug/w16 w16/primes.js --threads=2

Linux
-----

Run the following commands to clone, build and execute W16 on Linux.

    git clone git://github.com/sheremetyev/w16.git
    cd w16
    ./generate.sh
    make -f Makefile-ia32
    out/Debug/w16 w16/primes.js --threads=2

Should you have any questions about W16 please don't hesitate to
[contact me](mailto:sheremetyev@gmail.com).


text:
# flutter_mangopay_client

[![pub package](https://img.shields.io/pub/v/flutter_mangopay_client.svg)](https://pub.dev/packages/flutter_mangopay_client)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

A simple flutter client for Mangopay Payment gateway.

## Getting Started

#### Steps to follow for integration of this plugin:

 - create a new directory named "dependencies" (without quotes) in your flutter project's root directory

 - copy the directory & contents of this plugin to the dependencies directory

 - add following in the pubspec.yaml file of your project under `dependencies`:

   ```yaml
  flutter_mangopay_client:
    path: ../
   ```

 - Note that yaml file depends on indentation/spaces of the content to work properly

 - Run `flutter packages get` or `flutter pub get`

That is it, you should now be able to use the `MangopayClient` without any issues.

#### How to create client instance
```dart
    final mangoPayClient = MangopayClient.getInstance(
	  // [Required]
      clientID: 'CLIENT_ID',
	  // [Required]
      clientPassword: 'CLIENT_PASSWORD',
	  // [Optional]
	  baseURL: 'BASE_API_URL',
	  // [Optional]
	  // use for testing purpose => MangopayEnvironment.Sandbox
	  // use for app release => MangopayEnvironment.Production
      environment: MangopayEnvironment.SandBox,
	  // [Optional] API version
	  version: 'v2.01',
    );
```

## Features:

#### Fetch all registered users
```dart
    final List<MangopayUser> users = await mangoPayClient.getUsers();
```

#### Fetch all registered cards for a user
```dart
/// use the same client ID as the one used for registrations
    final List<MangopayCard> cards = await mangoPayClient.getCards(
	  // [Required]
      userId: 'MANGOPAY_USER_ID',
    );
```

#### Register a card
```dart
    /// create a mangopay card for registration
    final mangopayCard = MangopayCard.fromUserData(
	  // 16 digit card number
      cardNumber: 'CardNumber',
      cvv: 'CardCVV',
	  // Month in MM format
      expirationMonth: 'ExpiryMonth',
	  // Year in YY format
      expirationYear: 'ExpiryYear',
	  //currency in ISO 4217 format
      currency: 'Currency',
      userID: 'MangoPayUserID',
	  // [Optional]
	  tag: 'UNIQUE_TAG',
    );

	/// perform Mangopay card registration
	final registerCardData = await mangoPayClient
	.registerCardWithMangopayCard(
		'MangoPayUserID',
		mangopayCard,
	);

```

**Note**: Refer to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) for more details about currency format

#### Register a User [Natural]
```dart
	final mangopayUser = await mangoPayClient
        .registerNaturalUser(
            firstName: 'John',
            lastName: 'doe',
            email<EMAIL_ADDRESS>            countryOfResidence: 'FR',
            nationality: 'FR',
            birthdayTimeStamp:
                (DateTime.parse('1974-01-04')
					.millisecondsSinceEpoch ~/ 1000)
		);
```
**Note**: birth date must be in [UNIX timestamp](https://www.epochconverter.com/) format.

#### Create a wallet for registered user
```dart
	final wallet = await mangoPayClient.createUserWallet(
        userID: 'MangoPayUserID',
		//currency in ISO 4217 format
        currency: 'currency',
        walletDescription: 'Any valid short description',
		// [Optional]
		tag: 'UNIQUE_TAG',
	);
```
**Note**: Refer to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) for more details about currency format

#### Perform DirectPayin transaction using card
```dart
	final transactionID = await mangoPayClient
          .directPayinUsingCard(
		//currency in ISO 4217 format
        currency: 'currency',
		// valid registered card ID
        cardId: 'CardID',
		// amount type = number (int)
        amount: 149,
		// fees type = number (int)
        fees: 6,
        secureModeReturnURL: 'SECURE_RETURN_URL',
        mangopayUserID: 'MangoPayUserID',
        mangopayWalletID: 'RecipientWalletID',
      )
```
**Notes**:

 - Refer to [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) for more details about currency format

 - `CardID` can be obtained from already registered cards or recently obtained card registration data

 - `SECURE_RETURN_URL` should be a valid url, but it can be any valid url, including `https://google.com`

 - `RecipientWalletID` should be a wallet ID of a valid Mangopay User

#### Deactivate a card
```dart
	final MangopayCard deactivatedCard = await mangoPayClient
            .deactivateCard(
          // valid registered card ID
          cardId: 'CardID',
		  // [Optional]
          isCurrentlyActivated: true,
        );
```

## Issues & Support

- File an issue on the repository, if something is not working as expected.
   - Please Use `[Bug]` or `[Issue]` tags in issue titles.
   - Please follow the issue template used in flutter-sdk's repository, may be we'll integrate that here as well.

- File an issue in the repository, If you have any suggestions and/or feature requests
   - Please Use `[Suggestion]` or `[Request]` tags in issue titles.


text:
---
title: "The Tortoise and The Hare"
permalink: "/the-tortoise-and-the-hare"

author: martybent

tags:
  - Marty Bent
  - CY20 Q1
  - Race
  - Allegory
  - Fable
  - Moral
  - Teachings

excerpt: Marty expertly compares Bitcoin and Fiat to Aesop's fable the Tortoise and the Hare. Posted February 10, 2020.

defaults:
  - scope:
      type: posts
---

{% include donation.md %}

***

# [The Tortoise and The Hare](https://digg.com/@martybent/tortoise-hare-zzW0oNtR)
### By [Marty Bent](https://twitter.com/MartyBent)
### Posted February 10, 2020

![](/assets/images/2020/m2/mb2.png)
*"Trust me."*

> "I want to be candid. This strategy will cost money, involve risk and take time. We will have to try things that we’ve never tried before. We will make mistakes. We will go through periods in which things get worse and progress is uneven or interrupted."
>— Timothy Geithner

This is but one snippet of one iteration of the pitch newly appointed Treasury Secretary Timothy Geithner shilled to the public on February 10th, 2009.

At the time, he was frantically running across Washington D.C., from Capitol Hill to media appearance after media appearance in an attempt to convince his fellow citizens that $300 Billion of the remaining TARP funds he was about to spend on toxic assets was not a bad deal. The populace was wary that the banks he would be buying the toxic assets from would refuse to sell below market price. They had been through a lot at this point.

As Geithner was uttering the words quoted above, the computers running bitcoind v0.1.5 and below were racing to confirm the 3,768th block of the Bitcoin blockchain. Ordering their CPUs to go out and seek a SHA-256 hash below the difficulty target at the time so that they could collect 50 bitcoin block subsidy.

No one really noticed it then, but there were two solutions to the Great Recession running in parallel; the one put forth by Timothy Geithner, Ben Bernanke and crew, and another put forth by Satoshi Nakamoto.

The powers that be in the US and across the globe - those attempting to put Humpty Dumpty back together again - were too busy to be cognizant of their competition in the aftermath of the financial crisis. They were rushing to make sure people would be able to get cash out of ATMs. Satoshi and the band of misfits who were drawn to the new open source protocol he launched were hyper aware of their competition. This is evidenced by the message that was etched into Bitcoin’s genesis block, “The Times 03/Jan/2009 Chancellor on brink of second bailout for banks”. A reference to a headline in that day’s issue of The Times of London.

This wasn't the only reference to the traditional monetary system that would be made by Bitcoin's creator. Coincidentally, on the day after Timothy Geithner was making quick iterations of his pitch to the American people Satoshi made a direct reference to the Central Banking system and its flaws in his eyes:

> “The root problem with conventional currency is all the trust that's required to make it work. The central bank must be trusted not to debase the currency, but the history of fiat currencies is full of breaches of that trust.”
> — Satoshi Nakamoto

Over the course of the last eleven years, the two solutions have been going head to head in the market. The solution put forth by Geithner and crew - who have bequeathed control of the levers to the Fed presidents and Treasury secretaries who have followed - is more of the same; money printing. The accumulation of long-term debt in hopes that we can stoke production today. On the surface, it seems to be working. But can this type of monetary policy persist?

The solution put forth by Satoshi is in direct opposition to the one put forth by the banking elite; a sound digital money that cannot be debased or controlled by a select few. Bitcoin is controlled by everyone and no one at the same time.

![](/assets/images/2020/m2/mb1.png)
*The first man to ever receive a bitcoin transaction. RIP Hal.*

The two competing solutions are engaged in a classic Tortoise v. The Hare scenario.

The Federal Reserve and other Central Banks around the world have sprinted out of the gate; increasing the size of their monetary bases by orders of magnitude in very short order as they tinker with interest rates on a whim.

The Bitcoin Network has been on a slow grind for the last eleven years. Consistently producing blocks roughly every ten minutes as those who would like to see it succeed meticulously fortify the system. Working to make it more efficient, more scalable, more private and more robust one pull request at a time.

Most people don't realize it, but we're all watching a race to fix the money play out in real time. The money game is a long game. My sats are on the Tortoise.

***

{% include signup.md %}


text:
# ColorTabs2019

Color Tabs Extension for Visual Studio 2019 (not earlier 16.11). Hopefully this version of VS will not be changed dramatically.

![Example](example0.png)

This Vsix will add a colored rectangle left of your tab name. Color is based on your project file path. No way to determine specific color for specific project exsist yet.

Colored rectangles will be visible only if you are using a left/right layout for the tab panel. Top layout does not support yet.

You can change a foreground for tab names in VS settings/Color Tabs 2019 to bring it to accordance of you VS theme.

I DO NOT test it against:

- any Visual Studio theme except dark
- any project types except `csproj`

Please keep in mind: I have no plans to invest a lot of time here. So PR are welcome :)


text:
https://github.com/ChristianOlmosUSA/BitcoinHunter

## I must refer you to 100x faster: https://github.com/ChristianOlmosUSA/BitcoinGuesser

### Lets work together and find Satoshi's lost Bitcoin and help return it to the bitcoin ecosystem !!

step 1) download and save all bitcoin addresses into the local folder, this is a 2.6GB file so will take a while, click on the file from:
https://www.bitkeys.work/faq.php .

step 2) pip install -r requirements.txt _______only requires bitcoin, so unlikely to need a virt env, this was built using python 3.9.1, anything 3x should work
(pip install bitcoin)

step 3) Create a WordList you wish to test, save it locally as MyWordList.txt, (or use the random generator option later on when I've built it)

step 4) > python hunter.py  _____ (OR > python3 hunter.py)

    Hunter will run the following programs:
        LargeFileSplitter (makes the database into a text file, can also split it into more manageable files)... I run with 64MB of ram, you might need to split the files into chunks...
        Permuter (Creates combinations of words for the wordlist)
        SeedHasher (Converts these word combos into Pirvate key and public address hashes)
        KeyChecker (Checks the hashes against the database to see if they exist)

all your results files will be in the gitignore, so they won't shared back to github (private keys, seedlists etc)

* This is the first complete program I've ever written, ask if you have questions! Its certainly not hugely efficient


text:
# egb220_line_robot
Group 34's line following robot.

# Setup JDLuck Spark Mark II For Platformio
This is useful as an easy alternative to setting up `make` scripts, for managing the builds.
Install VSCode. Install Plaformio extension for VSCode.

1) [Find `core_dir` of Platformio](https://docs.platformio.org/en/latest/projectconf/section_platformio.html#projectconf-pio-core-dir).

1) Create a new folder called `boards` under `core_dir` folder.

1) In the `sparkmarkII` folder you will find `jdluck_sparkmark2.json`. Copy this to the `boards` folder you just made.

1) Go back to the `core_dir` of Platformio and create folders in this structure under it: `packages/framework-arduino-avr/variants/jdluck_spark/`.

1) Finally, copy `pins_arduino.h` from the `sparkmarkII` folder into the folder created in the previous step.


text:
# Spring Authorization Server Sample
This project contains a basic sample implementation of a
OAuth2 authorization server based on Spring Boot and
Spring Security OAuth2.

## Usage
### Storage
All OAuth2 clients are stored in a MongoDB. Provide a MongoDB
running on localhost:27017. Everything else is picked up automatically.

### SSL
The server only accepts connections via HTTPS. Therefore you have to
provide a SSL certificate. You can create a self-signed certificate
using the following commands:

```shell
cd src/main/resources/keystore
keytool -genkeypair -alias localhost -keyalg RSA -keysize 2048 -storetype PKCS12 -keystore localhost.p12 -validity 3650
keytool -export -keystore keystore.jks -alias localhost -file myCertificate.crt
```

While creating the certificate you can choose any password. Set this password
in `src/main/resources/application.yml` within the property `server.ssl.key-store-password`.


text:
### [CVE-2022-26117](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-26117)
![](https://img.shields.io/static/v1?label=Product&message=Fortinet%20FortiNAC&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=%3D%20FortiNAC%20version%208.3.7%20and%20below%2C%208.5.2%20and%20below%2C%208.5.4%2C%208.6.0%2C%208.6.5%20and%20below%2C%208.7.6%20and%20below%2C%208.8.11%20and%20below%2C%209.1.5%20and%20below%2C%209.2.3%20and%20below.%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=Execute%20unauthorized%20code%20or%20commands&color=brighgreen)

### Description

An empty password in configuration file vulnerability [CWE-258] in FortiNAC version 8.3.7 and below, 8.5.2 and below, 8.5.4, 8.6.0, 8.6.5 and below, 8.7.6 and below, 8.8.11 and below, 9.1.5 and below, 9.2.3 and below may allow an authenticated attacker to access the MySQL databases via the CLI.

### POC

#### Reference
- https://github.com/orangecertcc/security-research/security/advisories/GHSA-r259-5p5p-2q47

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

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
# postcss-with-gulp

A short visual tutorial on adding Postcss to your gulp tasks.

## Installation

Download node at [nodejs.org](http://nodejs.org) and install it, if you haven't already.

```sh
npm install
```

## Tests

```sh
npm install
npm test
```

## Dependencies

- [cssnano](): A modular minifier, built on top of the PostCSS ecosystem.
- [gulp](): The streaming build system
- [gulp-postcss](https://github.com/postcss/gulp-postcss): PostCSS gulp plugin
- [postcss-cssnext](https://github.com/MoOx/postcss-cssnext): Use tomorrow’s CSS syntax, today

## Dev Dependencies

None

## License

MIT

_Generated by [package-json-to-readme](https://github.com/zeke/package-json-to-readme)_

repository: jayfallon/postcss-with-gulp

repo_name: jayfallon/postcss-with-gulp


text:
By using a `Joi` object we can specify highly customizable validation rules in
paths, request payloads, and responses.

Create a server exposing a login endpoint and reply with "login successful" when
an HTTP `POST` request is sent to `/login`.

The endpoint will accept following payload variables:

```isGuest```       (boolean)
```username```      (string)
```accessToken```   (alphanumeric)
```password```      (alphanumeric)

Validation should consist of following conditions:

i)   if ```isGuest``` is false, a ```username``` is required.
ii)  ```password``` cannot appear together with ```accessToken```.
iii) if any other parameters than specified above are sent, they should pass the validation.

If the validation is successful, the handler must return a text of `login successful`

-----------------------------------------------------------------
##HINTS

Create a server that listens on port `8080` with the following code:

```js

var routeConfig = {
    path: '/a/path/',
    method: 'POST',
    handler: myHandler,
    config: {
        validate: {
           payload: Joi.object({
                username: Joi.string(),
                password: Joi.string().alphanum(),
                accessToken: Joi.string().alphanum(),
                birthyear: Joi.number().integer().min(1900).max(2013),
                email: Joi.string().email()
           })
           .options({allowUnknown: true})
           .with('username', 'birthyear')
           .without('password', 'accessToken')
        }
    }
}
```

All route information can be found [here](https://hapijs.com/api).

Joi information can be found here:

    {rootdir:/node_modules/joi/README.md}

repository: ccarruitero/makemehapi

repo_name: ccarruitero/makemehapi


text:
# Open Weather

## [Demo](http://open-weather.amttemplate.in)
[![Demo Gif](demo/demo.gif)](http://open-weather.amttemplate.in)

## Application Features
- Search with City Name
- Current Weather Data - Temperature, Humidity, Wind Speed
- 3 Unit Systems - Standard, Metric, Imperial
- 48 Hours forcast with graph (Temperature/Humidity)

## Technical & Design Features
### Responsive
<img src="demo/demo-mobile.gif" alt="drawing" width="300"/>

Fit to be used in Desktop, Tab and mobile devices.
### Cross Platform
Integrated with Cordova and ready to be compiled as android app (apk).
#### Steps
1. Install Cordova : `npm install -g cordova`
2. Install [Java (JDK)](https://docs.oracle.com/javase/8/docs/technotes/guides/install/windows_jdk_install.html#A1097272)
3. Install [Android Studio and SDK](https://developer.android.com/studio)
4. Connect your android device in debug mode, or start emulator
5. Run the app, `cordova run android`.
6. [See More...](https://medium.com/analytics-vidhya/create-a-mobile-app-using-your-existing-angular-web-project-using-cordova-9c10d377d527)
### Material UI
UI is designed with latest [Angular Material](https://material.angular.io/), for a modern App like UI.

## Angular CLI
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.0.5.

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.

repository: debasen/open-weather

repo_name: debasen/open-weather


text:
# AWS API client for Amazon Elastic Kubernetes Service

**Generated Dart library from API specification**

*About the service:*
Amazon Elastic Kubernetes Service (Amazon EKS) is a managed service that
makes it easy for you to run Kubernetes on Amazon Web Services without
needing to stand up or maintain your own Kubernetes control plane.
Kubernetes is an open-source system for automating the deployment, scaling,
and management of containerized applications.

Amazon EKS runs up-to-date versions of the open-source Kubernetes software,
so you can use all the existing plugins and tooling from the Kubernetes
community. Applications running on Amazon EKS are fully compatible with
applications running on any standard Kubernetes environment, whether running
in on-premises data centers or public clouds. This means that you can easily
migrate any standard Kubernetes application to Amazon EKS without any code
modification required.

## Links

- [Other AWS libraries](https://github.com/agilord/aws_client/tree/master/generated).
- [Issue tracker](https://github.com/agilord/aws_client/issues).
- [AWS API definitions](https://github.com/aws/aws-sdk-js/tree/master/apis).

gha_language: Dart


text:
# Quick Start
- [x] Clone this repo
- [x] Ensure `chmod +x` on every file in your `.githooks` folder
- [x] Ensure you have .NET 5 installed
- [x] You're all set. Now go code some great stuff!

repository: Somsiady-Inc/HitMeApp

gha_language: C#

repo_name: Somsiady-Inc/HitMeApp