text:
---
layout: default
title:  Storage
---

Having Ruby experience makes you hirable; but how can you stand out? You need to demonstrate your abilities. What better way than using Ruby and "the cloud" to store and serve your resume!

In this blog post you will learn to use fog - the cloud computing library - to upload your resume to Amazon's Simple Storage Service (S3), Rackspace's CloudFiles or Google's Storage for Developers.

Here's my out of date resume stored on S3, CloudFiles and Google Storage; programmatically stored in the cloud using this tutorial. NOTE: my boss would like me to add that I'm not currently looking for a new gig ;)

Check out those cloud-specific URLs! You could put all three in your job application, add the Ruby source for how you did it, and have your choice of Ruby jobs for being so awesome!

How? The all-clouds-in-one library of choice is fog.

## Installing fog

fog is distributed as a RubyGem:

    gem install fog

Or add it in your application's Gemfile:

    gem "fog"

## Using Amazon S3 and fog

Sign up for an account here and copy down your secret access key and access key id from here. We are about to get into the code samples, so be sure to fill in anything in ALL_CAPS with your own values!

First, create a connection with your new account:

    require 'rubygems'
    require 'fog'

    # create a connection
    connection = Fog::Storage.new({
      :provider                 => 'AWS',
      :aws_access_key_id        => YOUR_AWS_ACCESS_KEY_ID,
      :aws_secret_access_key    => YOUR_AWS_SECRET_ACCESS_KEY
    })

    # First, a place to contain the glorious details
    directory = connection.directories.create(
      :key    => "fog-demo-#{Time.now.to_i}", # globally unique name
      :public => true
    )

    # list directories
    p connection.directories

    # upload that resume
    file = directory.files.create(
      :key    => 'resume.html',
      :body   => File.open("/path/to/my/resume.html"),
      :public => true
    )

If you are anything like me, you will continually tweak your resume. Pushing updates is easy:

    file.body = File.open("/path/to/my/resume.html")
    file.save

As you can see, cloud storage files in fog are a lot like an ActiveRecord model. Attributes that can be changed and a `#save` method that creates or updates the stored file in the cloud.

But if it took you longer to realize the mistake you might not still have file around, but you've got options.

directory = connection.directories.get("proclamations1234567890")

    # get the resume file
    file = directory.files.get('resume.html')
    file.body = File.open("/path/to/my/resume.html")
    file.save

    # also, create(attributes) is just new(attributes).save, so you can also do:
    file = directory.files.new({
      :key    => 'resume.html',
      :body   => 'improvements',
      :public => true
    })
    file.save

## Backing up your files

Now you've got a bunch of files in S3: your resume, some code samples,
and maybe some pictures of your cat doing funny stuff. Since this is
all of vital importance, you need to back it up.

    # copy each file to local disk
    directory.files.each do |s3_file|
      File.open(s3_file.key, 'w') do |local_file|
        local_file.write(s3_file.body)
      end
    end

One caveat: it's way more efficient to do this:

    # do two things per file
    directory.files.each do |file|
      do_one_thing(file)
      do_another_thing(file)
    end

than it is to do this:

    # do two things per file
    directory.files.each do |file|
      do_one_thing(file)
    end.each do |file|
      do_another_thing(file)
    end

The reason is that the list of files might be large. Really
large. Eat-all-your-RAM-and-ask-for-more large. Therefore, every time
you say `files.each`, fog makes a fresh set of API calls to Amazon to
list the available files (Amazon's API returns a page at a time, so
fog works a page at a time in order to keep its memory requirements sane).

## Sending it out

Alright, so you (eventually) become satisfied enough to send it off, what is the URL endpoint to your resume?

    puts file.public_url

Pop that link in an email and you should be ready to cruise job ads and send your resume far and wide (Engine Yard is hiring, so check us out!). Now you are set, unless you are interviewing for Google, or Rackspace... Both of these companies have their own cloud storage services, so using Amazon S3 might not be the foot in the door you hoped for.

More clouds? How much extra stuff will you have to do for these services!?! Hardly anything needs to change, you just have to pass slightly different credentials in, but I'm getting ahead of myself.

## Google Storage for Developers

Sign up here and get your credentials here.

    connection = Fog::Storage.new({
      :provider                         => 'Google',
      :google_storage_access_key_id     => YOUR_SECRET_ACCESS_KEY_ID,
      :google_storage_secret_access_key => YOUR_SECRET_ACCESS_KEY
    })

## Rackspace CloudFiles

Rackspace has Cloud Files and you can sign up here and get your credentials here.

    connection = Fog::Storage.new({
      :provider           => 'Rackspace',
      :rackspace_username => RACKSPACE_USERNAME,
      :rackspace_api_key  => RACKSPACE_API_KEY
    })

If you work with the European cloud from Rackspace you have to add the following:

    :rackspace_auth_url => "lon.auth.api.rackspacecloud.com"

Then create, save, destroy as per fog-for-AWS. The `:public => true` option when creating directories (see above) is important for Rackspace; your folder and files won't be shared to Rackspace's CDN and hence your users without it.  Similarly the `:public => true` on files is important for AWS and Google or they will be private.

## Local Storage

While you are working out the kinks you might not want to do everything live though, ditto for while you are running tests, so you have a couple options to try before you buy.  First, you can use a local provider to store things in a directory on your machine.

    connection = Fog::Storage.new({
      :provider   => 'Local',
      :local_root => '~/fog'
    })

## Mocking out Cloud Storage

Of course when you are testing or developing you can always just use the mocks (at least for AWS and Google, Rackspace still needs mocks implemented if you are looking for somewhere to contribute).  They emulate the behavior of the external systems without actually using them.  It is as simple as:

    Fog.mock!
    connection = Fog::Storage.new(config_hash)

## Cleaning up

Fog takes care of the rest so you can focus on your cover letter. And with the awesome cover letter and cloud delivered resume you are probably a shoe-in. So all that is left is to cleanup that leftover job hunt residue.

    file.destroy
    directory.destroy

## Checking if a file already exists

Sometimes you might want to find out some information about a file without retrieving the whole file. You can do that using 'head'.

    #returns nil if the file doesn't exist
    unless directory.files.head('resume.html')
       #do something, like creating the file
    end

    #returns a hash with the following data:
    # 'key' - Key for the object
    # 'Content-Length' - Size of object contents
    # 'Content-Type' - MIME type of object
    # 'ETag' - Etag of object
    # 'Last-Modified' - Last modified timestamp for object
    puts directory.files.head('resume.html')

## Summary

All done. Try out all the different options and let me know if you have any bugs or issues.  I also wrote up a more consolidated example as a script that you can use for reference.

Bonus, note the `Fog.mock!` command. In your tests you can easily mock out calls to cloud providers.

Please let me know in the comments if you got a new Ruby job because you hosted your CV on 3 different Cloud Stores without getting your hands dirty.

Have questions or comments?  Hop into #ruby-fog on freenode, ping @fog or @geemus.

And please always remember that I accept high fives and contributions!

repository: ninefold/fog

extension: markdown

gha_language: Ruby

repo_name: ninefold/fog


text:
---
layout: post
title: HASP v0.37
tags:
  - HASwitchPlate
categories:
  - HASwitchPlate
---

Stability and performance improvements

# HASP v0.37 release

## ESP8266 code v0.37

* Updated ESP8266 Arduino core to 2.5.0, which comes will a whole truckload of stability and performance improvements
* Major improvements for LCD firmware updates to improve reliability and update speed
* Re-enable mDNS services with LEA MDNSResponder
* Improve user experience when MQTT client cannot connect to broker

## Home Assistant Automations

* Updated JSON sensor to new format after changes in 0.85

## ESP8266 Update Procedure

If you're using the [AutoFirmwareUpdate](https://github.com/aderusha/HASwitchPlate/blob/master/Home_Assistant/hasp-examples/plate01/hasp_plate01_00_autofirmwareupdate.yaml) automation your devices should pull this update at 3:00am.  Otherwise, log into the admin web page and you can pull the update from the firmware page.

## Home Assistant Update Procedure

Run the `deployhasp.sh` script to pull down the updated automations using one of the guides below:

* [`deployhasp.sh` for standard installations](https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/05_Home_Assistant.md#automatic-home-assistant-installation)
* [`deployhasp.sh` for Hass.io](https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/05_Home_Assistant.md#hassio)
* [Manual installation process](https://github.com/aderusha/HASwitchPlate/blob/master/Documentation/05_Home_Assistant.md#manual-home-assistant-installation)

## Links for more HASP info

* [Main documentation page](https://github.com/aderusha/HASwitchPlate/tree/master/Documentation)
* [Buy HASwitchPlate PCBs](https://www.tindie.com/products/luma/ha-switchplate-hasp-pcb/) - strongly recommended for safe assembly.  [Buy them from me](https://www.tindie.com/products/luma/ha-switchplate-hasp-pcb/) or [download the gerbers](https://github.com/aderusha/HASwitchPlate/raw/master/PCB/HASwitchPlate.gerbers.zip) and send them to your favorite [short-run PCB fab](http://www.allpcb.com/setinvite.aspx?inviteid=34099&url=https://www.allpcb.com/).
* [Buy an assembled device ready to install](https://www.tindie.com/products/luma/ha-switchplate-hasp-single-wide-assembled/) if the build process seems intimidating
* [HASwitchPlate Discord chat](https://discord.gg/tnBsMw4)
* [HASwitchPlate Reddit community](https://www.reddit.com/r/HASwitchPlate)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
Bombe 0.4.2
===========

Bombe 0.4.2 resolves an oversight when bumping to ASM 7, notably that our
`ClassProviderInheritanceProvider` was still using `ASM6` - this has now been
resolved to use `ASM7`, in addition to a new constructor to allow for
third-parties to specify which ASM API version they wish to use.

An equivalent change was made in Bombe 0.3.3.

repository: CadixDev/Bombe

branch_name: refs/heads/develop

gha_language: Java

repo_name: CadixDev/Bombe


text:
TraceDB and Ingesters
=====================

To build the package with the ingesters, the *pdfium_test* executable needs to
be installed on your system. The *build_release_ingestiond* will automatically
install the latest version.

See the *infra/pdfium* directory for details.

repository: sshyran/skia-buildbot

gha_language: Go

repo_name: sshyran/skia-buildbot


text:
# PH526X---Python-for-research
Harvard online course for python in research application

COURSE OUTLINE
Welcome and Introduction
Introduction and Welcome
Pre-Quiz Self-Assessment
Important Pre-Course Survey
Week 1: Basics of Python 3
Week 1 Overview
Part 1: Objects and Methods (Comprehension Check)
Part 2: Sequence Objects (Comprehension Check)
Part 3: Manipulating Objects (Comprehension Check)
Week 1 Homework (Homework)
Week 2: Python Libraries and Concepts Used in Research
Week 2 Overview
Part 1: Scope Rules and Classes (Comprehension Check)
Part 2: NumPy (Comprehension Check)
Part 3: Matplotlib and Pyplot (Comprehension Check)
Part 4: Randomness and Time (Comprehension Check)
Week 2 Homework (Homework)
Week 3: Case Studies Part 1
Week 3 Overview
DNA Translation (Comprehension Check)
Homework: DNA Translation (Homework)
Language Processing (Comprehension Check)
Homework: Language Processing (Homework)
Introduction to Classification (Comprehension Check)
Homework: Introduction to Classification (Homework)
Week 4: Case Studies Part 2
Classifying Whiskies (Comprehension Check)
Homework: Classifying Whiskies (Homework)
Bird Migration (Comprehension Check)
Homework: Bird Migration (Homework)
Social Network Analysis (Comprehension Check)
Homework: Social Network Analysis (Homework)
Week 5: Statistical Learning
Week 5 Overview
Part 1: Linear Regression (Comprehension Check)
Part 2: Logistic Regression (Comprehension Check)
Part 3: Random Forest (Comprehension Check)
Homework: Case Study 7 (Homework)
Homework: Case Study 7, Part 2 (Homework)


text:
# EZ Cheap Flights Seeker Backend
Python flask server for getting cheap flights information from Skyscanner.

Full tutorial: https://www.codeastar.com/easy-cheap-flights-seeker-web-app-with-flask-and-react/

## Quick Start
1. Install required library
```
$pipenv install
```
2. Set your Skyscanner API key (get it free from Rapid API)
```
$export SKYSCAN_RAPID_API_KEY=YOUR_KEY   (for Linux/MacOS)
or
>$Env:SKYSCAN_RAPID_API_KEY="YOUR_KEY"   (for Windows PowerShell)
or
>set SKYSCAN_RAPID_API_KEY=YOUR_KEY      (for Windwos command shell)
```
3. Start the Flask server
```
$python main.py
```

branch_name: refs/heads/main


text:
# WLSinterop

PowerShell profile for minimizing environment switch

### Installation

Create a folder named ```WindowsPowerShell``` in your Documents folder. Then copy [this file](https://github.com/kidandcat/WLSinterop/blob/master/WindowsPowerShell%5CMicrosoft.PowerShell_profile.ps1) inside that folder with the name being ```Microsoft.PowerShell_profile.ps1```.

### Usage

After opening a new PowerShell window, all of your Linux commands will be available directly from powershell, without the need of using ```bash -c ""```.

Right now command autocomplete doesn't works, but windows paths will be parsed so you can autocomplete paths.

In administrator privileged command ```set-executionpolicy remotesigned```

#### (optional) Set `root` as default user

```ubuntu1804.exe config --default-user root```

### Demo
Using `dir`, then `ls`

![Demo](https://raw.githubusercontent.com/kidandcat/WLSinterop/master/Captura.PNG)

repository: kidandcat/WLSinterop

gha_language: PowerShell

repo_name: kidandcat/WLSinterop


text:
# Industry recommendations for academic data science programs

[List of authors](authors.md)

As industry data scientists, we are grateful for the growing number of academic programs in the field. It is a challenge to find enough candidates to fill out our teams and solve the problems we face. We welcome new entrants to the field, whether it is their first career or a second, and would like to help them get the best preparation possible.

Several of us have been invited to participate on the advisory boards of academic data science programs, and we want to share our collected insights as a resource to such programs anywhere.
Two of the most common questions are indirectly about how to best prepare students: [**What precisely do industry data scientists do?**](what_DS_do.md) and [**What makes someone a good data scientist?**](strong_DS_skills.md)
We've attempted to answer both of these in a way that can inform how you construct your degree program and your course material.
We address the third most common question as well: [**How can we partner with companies?**](partnering.md)

## A work in progress

It is the authors' hope that this serves as a summary of an ongoing conversation.
If you are part of an academic data science program and have other questions you would like to see answered here,
reach out to Brandon Rohrer<EMAIL_ADDRESS>or one of the other authors.
If you work as a data scientist and would like to contribute, [we welcome your insights](author_q_and_a.md).

gha_license_id: NOASSERTION


text:
# politeiawwwcli

`politeiawwwcli` is a command line tool that allows you to interact with the Politeia API.

## Available Commands
```
activevotes        Retrieve all proposals being actively voted on
castvotes          Cast ticket votes for a specific proposal
changepassword     change the password for the currently logged in user
changeusername     change the username for the currently logged in user
commentsvotes      fetch all the comments voted by the user on a proposal
faucet             use the Decred testnet faucet to send DCR to an address
getcomments        fetch a proposal's comments
getproposal        fetch a proposal
getunvetted        fetch unvetted proposals
getvetted          fetch vetted proposals
login              login to Politeia
logout             logout of Politeia
me                 return the user information of the currently logged in user
newcomment         comment on a proposal
newproposal        submit a new proposal to Politeia
newuser            create a new Politeia user
policy             fetch server policy
proposalvotes      fetch vote results for a specific proposal
resetpassword      change the password for a user that is not currently logged in
secret
setproposalstatus  (admin only) set the status of a proposal
startvote          (admin only) start the voting period on a proposal
usernamesbyid      fetch usernames by their user ids
userproposals      fetch all proposals submitted by a specific user
verifyuser         verify user's email address
verifyuserpayment  check if the user has paid their user registration fee
version            fetch server info and CSRF token
votecomment        vote on a comment
```

## Application Options
```
    --host=    politeiawww host (default: https://proposals.decred.org)
-j, --json     Print JSON
-v, --verbose  Print request and response details

```

**If you're running Politeia locally, you need to make sure to specify the host.**
`$ politeiawwwcli --host https://localhost:4443 <command>`

## Help Options
`-h, --help  Show the help message`

View a list of all commands
`$ politeiawwwcli -h`

View information about a specific command
`$ politeiawwwcli <command> -h`

## Persisting Data Between Commands
`politeiawwwcli` stores  user identity data (user's public/private key pair), session cookies, and CSRF tokens in the `AppData/Politeiawww/cli/` directory.  This allows you to login with a user and remain logged in between commands.  The user identity data and cookies are segmented by host, allowing you to login and interact with multiple hosts simultaneously.

## Usage

Create a new user.
```
$ politeiawwwcli -j --host https://localhost:4443 newuser<EMAIL_ADDRESS>username password --verify --paywall
```
`--verify` will satisfy the email verification requirement for the user.
`--paywall` will use the Decred testnet faucet to satisfy the user registration fee requirement.

**Note: If you use the --paywall flag, you will still need to wait for block confirmations before you'll be allowed to submit proposals.**

Login with the user.
`$ politeiawwwcli --host https://localhost:4443 login<EMAIL_ADDRESS>password`

Once logged in, you can submit proposals, comment on proposals, cast votes, or perform any of the other user actions that Politeia allows.

## 403 Error
If you receive a 403 from the Politeia server, it's most likely an issue with the CSRF tokens.  You can fix this by running either the `version` command or by loggin in with a user.

## Proposal Status Codes
Admins can set the status of a proposal with the `setproposalstatus` command.  The proposal status codes are listed below.

```
PropStatusInvalid      0 // Invalid status
PropStatusNotFound     1 // Proposal not found
PropStatusNotReviewed  2 // Proposal has not been reviewed
PropStatusCensored     3 // Proposal has been censored
PropStatusPublic       4 // Proposal is publicly visible
PropStatusLocked       6 // Proposal is locked
```

## User Edit Action Codes
Admin users can edit certain properties of other users with the `useredit` command.  The edit action codes are listed below.

```
UserEditExpireNewUserVerification        1 // Expire new user verification
UserEditExpireUpdateKeyVerification      2 // Expire update key verification
UserEditExpireResetPasswordVerification  3 // Expire reset password verification
UserEditClearUserPaywall                 4 // Clear user paywall
UserEditUnlock                           5 // Unlock user
```

license: ISC

repository: guilhermemntt/politeia

gha_license_id: ISC

repo_name: guilhermemntt/politeia


text:
# life-must-go-on

:trophy: 3rd place winner at fmi{codes} and a sponsor award

We have tons of items that we don't need but it is bothersome to research how to get rid of them. Many times throwing them away is not a good option. The earth is not a trash bin.

This app lets you select the object you don't need and it will give you a fleet of possible approaches. That sweater you won't wear anymore? Christmas is coming, there are donaion and charity events! Local shops are accepting old clothes and giving away discount coupons. There is a new thrift shop nearby! Choose for yourself, we provide the suggestions.

The app uses NLP (Natural Language Processing) to:
 * collect data from the web, categorize it and save it into our database.
 * parse your item input and find suggestions for it

repository: nikifaets/life-must-go-on

repo_name: nikifaets/life-must-go-on


text:
# `@propcheck/jest`

This is a [jest](https://jestjs.io/) extension that allows you to effortlessly integrate property based testing with your regular Jest tests. For more information on what exactly that means and how to write them, see the base [propcheck documentation](https://github.com/beark/propcheck) and [@propcheck/core](https://github.com/beark/propcheck/tree/master/packages/propcheck-core).

There are two facilities provided by this package to construct a property-based test:
- A short-hand builder for setting up a whole test with a single line, `given`.
- An `expect` extension, `forall`.

The first form sets up an entire test for you, and so it would typically be invoked in a top (or near top-level) scope. It looks something like
```ts
given(generator1, generator2, ..., generatorN)
    .operation("someOperation")
    .shouldSatisfy(someProperty);
```

where `someProperty` is a property, `generator1`, `generator2`, etc are generators, and `"someOperation"` is the name of the operation that is being put under test. These concepts are explained more [here](https://github.com/beark/propcheck/blob/master/packages/propcheck-core/README.md).

The second form gives you a bit more control and looks almost like any other `expect` statement in a Jest test:
```ts
describe("someOperation", () => {
    it("should satisfy the property someProperty", () => {
        expect(someProperty).forall(generator1, generator2, ..., generatorN);
    });
});
```

This is roughly equivalent of what the first example, using `given`, would expand to. Naturally, when using `expect` and `forall`, you get to structure your property tests in a way you see fit and need not follow this pattern.

When defining the property itself, you are free to use any of the following mechanisms to signal success/failure:
-   Return a truthy value in the property to indicate it passed
-   Return a falsy value (except `undefined`) to indicate it didn't hold for the given input
-   Any thrown errors will also be interpreted as the property failing
-   You can also simply use `expect` as you would in any Jest test

Here's a more complete example:
```ts
import { arrayOf, nat } from '@propcheck/core/generators';

describe("My property tests", () => {
    // Example using given
    const assoc = (a: number, b: number, c: numer) =>
        // Note that in this property, we simply return a boolean outcome
        a + (b + c) === (a + b) + c;

    given(nat, nat, nat).operation("plus").shouldSatisfy(assoc);

    // Example using expect extension
    it("Array.reverse().reverse() is an identity op", () => {
        const revrevIsId = (arr: number[]) => {
            // In this property, we use an expect statement to verify whether
            // it holds. No need to return anything.
            expect(arr.reverse().reverse()).toEqual(arr);
        };

        expect(revrevIsId).forall(arrayOf(nat));
    });
});
```

If you want to use this package, then generally you'll want at least [@propcheck/core](https://github.com/beark/propcheck/tree/master/packages/propcheck-core) too, so you have access to a good base of generators to build on.

## Installation & Setup

With npm:
```
$ npm installl --save-dev @propcheck/core @propcheck/jest
```

With yarn:
```
$ yarn add -D @propcheck/core @propcheck/jest
```

After installing `@propcheck/core` and `@propcheck/jest`, add the latter to your jest configuration's setup files. For example, in your package.json:
```json
{
    "name": "myProject",
    "scripts": {
        "test": "jest",
    },
    "jest": {
        "setupFilesAfterEnv": [
            "Any other setup files you may have",
            "@propcheck/jest"
        ]
    }
}
```

Finally, if you're writing your tests in TypeScript, you may have to ensure the inclusion of the types of `@propcheck/jest` extensions by either modifying your tsconfig.json, or using an empty import of `@propcheck/jest`. The former should be a once per project configuration change, and might look like this:
```json
{
    "compilerOptions": {
        "types": ["@types/jest", "@propcheck/jest"]
    }
}
```

The latter you'd have to do in every file where you want to use an extension provided by `@propcheck/jest` and would simply look like this:
```ts
import {} from "@propcheck/jest";

describe("MyTest", () => {
    it("works", () => {
        expect(myProperty).forall(...generators);
    });
});
```

If you're using `given`, there's no need for this additional step, since `import`ing it will implicitly give you all the other types too.

NOTE: if you know how this last setup step for types can be removed/automated, PRs are welcome!

## Determinism

What good is a failing test if you can't repeat it to figure out if you've really solved it? And what about all those people saying randomness has no place in tests -- doesn't the entire _idea_ of property based testing go against that?

To ensure this is never a problem in practice, Propcheck is, in fact, not based on randomness. It is based on repeatable pseudo-randomness. Indeed, the `Runner` module of `@propcheck/core` is _completely pure_ (modulo effects performed by the function under test). If you run a test with a particular set of options, the result will always be _exactly_ the same (if not, you should [file a bug](https://github.com/beark/propcheck/issues)).

 While `@propcheck/jest` actually _does_ randomize the initial seed state, it nevertheless ensures runs are _repeatable_. Any time a test run results in property failure, the exact parameters for that specific iteration of the test will be printed. They are:

- Seed -- the seed that was used to generate the arguments for the property when it failed.
- Size -- the size that was used to decide how "large" the generated values should be.
- Iteration -- essentially, how many times the property had been tested. Some generators may give defferent results based on this.

Using these, you can re-run the exact iteration that resulted in a failure (thus cutting down on test-time) in two ways:

1. Programmatically pass the desired parameters to the test. Couple this with Jest's `fit`, and you can get to precisely the point where your test failed.
2. Provide the parameters via environment variables.

The former option might look like this:
```ts
const seed = [124459077, 98394823, 87234902, 230109];
const startIteration = 20;
const startSize = 100;

// Using given
given(gen1, gen2)
    .withOptions({ seed, startIteration, startSize })
    .operation("some operation")
    // Tell propcheck to use fit instead of it
    .fshouldSatisfy(property);

// Using expect/forall
fit('my test', () => {
    expect(property).forallWithOptions(
        { seed, startIteration, startSize },
        gen1,
        gen2
    );
});
```

And the latter might look something like this:
```
~/myProject$ PROPCHECK_SEED="{124459077, 98394823, 87234902, 230109}" PROPCHECK_STARTITER=20 PROPCHECK_STARTSIZE=100 npm test
```

Note that when setting options via environment variable, the options apply to _every_ `forall` or `forallWithOptions` being run. Ie, you probably want to focus specifically on the failing test. This is perhaps easiest done by command line argument to Jest:
```
~/myProject$ npm test -- -t "string matching a test name"
```

It can also be done in code with `fit`, as shown above.

repository: beark/propcheck

repo_name: beark/propcheck


text:
---
layout: post
title: "Fix Value Error: unknown locale: UTF 8"
description: "Fix for the unknown local problem in Macs"
category: python
tags: [python, locale, install]
---
{% include JB/setup %}

Today I was trying to install AWS cli and got this error when running the help command.

~~~
raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
~~~

The solution was to add some environment variables to my zsh environment. So I added this to my `env-config` files.

~~~
export LANG="en_US.UTF-8"
export LC_COLLATE="en_US.UTF-8"
export LC_CTYPE="en_US.UTF-8"
export LC_MESSAGES="en_US.UTF-8"
export LC_MONETARY="en_US.UTF-8"
export LC_NUMERIC="en_US.UTF-8"
export LC_TIME="en_US.UTF-8"
export LC_ALL=
~~~

To test the code run:

    python -c 'import locale; print(locale.getdefaultlocale());'

And you should see `('en_US', 'UTF-8')` as the output.

References for the post

- [Patrick Armino's Blogpost](http://patrick.arminio.info/blog/2012/02/fix-valueerror-unknown-locale-utf8/)
- [Stackoverflow](http://stackoverflow.com/questions/19961239/pelican-3-3-pelican-quickstart-error-valueerror-unknown-locale-utf-8)


text:
---
title: Inappbrowser
description: Open an in-app browser popup window.
---
This is a fork of cordova-plugin-inappbrowser which adds support for PopupBridge libraries for Android and iOS to support payments within the context of the InappBrowser element of a Cordova-based app.

Installation
cordova plugin add cordova-plugin-inappbrowser-popup-bridge

## Installation

    cordova plugin add cordova-plugin-inappbrowser

If you want all page loads in your app to go through the InAppBrowser, you can
simply hook `window.open` during initialization.  For example:

    document.addEventListener("deviceready", onDeviceReady, false);
    function onDeviceReady() {
        window.open = cordova.InAppBrowser.open;
    }


text:
# Undistraction.com

This is a gatsby v1 static site.

## Dependencies

Install dependencies with `yarn`.

## Deployment

The site is deployed to Netlify, and is automatically deployed with every push to the master branch.

Nameservers for undistraction.com (Dreamhost are registrar) are pointed at Netlify which handles the DNS including Mail which is handled by Google Apps via MX records. Login to the Netlify web console to manage DNS and domains.

repository: Undistraction/undistraction-com

repo_name: Undistraction/undistraction-com


text:
# Snyk Framework
The Snyk Framework causes an application to be automatically configured to work with a bound [Snyk Service][].
Binding an application to the service will cause the buildpack to check for vulnerable dependencies and break the build process
if found any, for a given severity threshold.

    Detection Criterion	Existence of a bound Snyk service.

Existence of a Snyk service is defined as the VCAP_SERVICES payload containing a service who's name, label or tag has snyk as a substring.

Existence of an apiToken value Configuration.

    Tags
    <tt>snyk

Tags are printed to standard output by the buildpack detect script

## User-Provided Service (Optional)
Users may optionally provide their own Snyk service. A user-provided Snyk service must have a name or tag with `snyk` in it so that the Snyk Framework will automatically configure the application to work with the service.

The credential payload of the service may contain the following entries:

| Name | Description
| ---- | -----------
| `apiToken` | The snyk api token used to authenticate against the api endpoint.
| `apiUrl` | (Optional) The url of the snyk api endpoint. Should be of the form `https://my.snyk.server:port/api`. Defaults to `https://snyk.io/api`
| `orgName` | (Optional) The organization for the snyk service to use. If not provided, snyk api will use the user's default organization.

## Configuration
For general information on configuring the buildpack, including how to specify configuration values through environment variables, refer to [Configuration and Extension][].

The framework can be configured with additional (optional) values by modifying the [`config/snyk.yml`][] file in the buildpack fork.

| Name | Description
| ---- | -----------
| `api_token` | Same as `apiToken` in credentials payload. If defined both in config and in credentials, config will take precedence.
| `api_url` | Same as `apiUrl` in credentials payload. If defined both in config and in credentials, config will take precedence.
| `org_name` | Same as `orgName` in credentials payload. If defined both in config and in credentials, config will take precedence.
| `dont_break_build` | If set to `true` will tell Snyk to continue with the application deployment even though Snyk found vulnerabilties.
| `severity_threshold` | Tells Snyk the severity threshold of vulnerabilities found above which to fail the deployment.

[Snyk Service]: https://snyk.io
[Configuration and Extension]: ../README.md#configuration-and-extension
[`config/snyk.yml`]: ../config/snyk.yml

repository: snyk-partners/java-buildpack

repo_name: snyk-partners/java-buildpack


text:
# Study Stuff Backend [SSB]

A repository with all my study materials (focused on Java ☕). Here you'll find links to books, articles and other study stuff that I'm using to increase aabilities of **Software Engineering**...

I hope it helps another one who desires to do so.

## Sumary
- [Books](#books)
- [Articles](#articles)
- [POCs](#pocs)

## Books 📚

Read about technical content is always a good way to understand a little bit more how things work. Here are some books to help with programming language, algorithms and design patterns used on the world of **software engineering**

> "Two things are infinite: the universe and human stupidity; and I'm not sure about the universe." ― Albert Einstein

### Java

* [Elements of Programming Interviews in Java: The Insiders' Guide ](https://www.amazon.com.br/Elements-Programming-Interviews-Java-Insiders/dp/1517671272/ref=sr_1_1?__mk_pt_BR=%C3%85M%C3%85%C5%BD%C3%95%C3%91&keywords=Elements+of+Programming+Interviews+in+Java%3A+The+Insiders%27+Guide&qid=1565991644&s=gateway&sr=8-1)

### Algorithms

* [Cracking the code interview](https://www.amazon.com.br/Cracking-Coding-Interview-Programming-Questions/dp/0984782850/ref=sr_1_1?__mk_pt_BR=%C3%85M%C3%85%C5%BD%C3%95%C3%91&keywords=cracking&qid=1565991398&s=gateway&sr=8-1)
* [Algorithms, Fourth Edition](https://www.amazon.com.br/Algorithms-Algorithms_4-English-Robert-Sedgewick-ebook/dp/B004P8J1NA/ref=sr_1_1?__mk_pt_BR=%C3%85M%C3%85%C5%BD%C3%95%C3%91&keywords=algorithms&qid=1571331679&s=books&sr=1-1)
* [Grooking algorithms](https://www.amazon.com/Grokking-Algorithms-illustrated-programmers-curious/dp/1617292230/ref=sr_1_2?crid=26YC6C1R648B2&keywords=grokking+algorithm&qid=1579699357&sprefix=grokking+%2Caps%2C325&sr=8-2)

### Design Patterns

* [Design Patterns: Elements of Reusable Object-Oriented Software](https://www.amazon.com.br/Design-Patterns-Object-Oriented-Addison-Wesley-Professional-ebook/dp/B000SEIBB8/ref=sr_1_2?__mk_pt_BR=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=PMSTSTUQWO5M&keywords=design+patterns&qid=1565991752&s=gateway&sprefix=Design+patter%2Caps%2C262&sr=8-2)
* [Clean Architecture: A Craftsman's Guide to Software Structure and Design ](https://www.amazon.com.br/Clean-Architecture-Craftsmans-Software-Structure-ebook/dp/B075LRM681/ref=pd_rhf_se_s_qp_0_3/130-5404658-1610243?_encoding=UTF8&pd_rd_i=B075LRM681&pd_rd_r=4c9a19e6-fd7c-4a3c-9792-c370a8b339e4&pd_rd_w=yudn9&pd_rd_wg=9v9dS&psc=1&refRID=XRP02VVN1JT82RSZZPPC)
* [Design patterns implemented in Java](https://java-design-patterns.com/)

## Articles 📝

These articles helped me to figure out "how it works on  real-world".

> "If you can't explain it to a six year old, you don't understand it yourself." ― Albert Einstein

### Java

* Java Basics
    * [How HashMap Works in Java](https://dzone.com/articles/how-hashmap-works-in-java)
    * [When to Use Abstract Class and Interface](https://dzone.com/articles/when-to-use-abstract-class-and-intreface)
    * [ArrayList vs. LinkedList vs. Vector](https://dzone.com/articles/arraylist-vs-linkedlist-vs)
    * [Random Number Generation in Java](https://dzone.com/articles/random-number-generation-in-java)
    * [Java String Format Examples](https://dzone.com/articles/java-string-format-examples)
* Concurrency and Multithreading
    * [Java Concurrency and Multithreading Tutorial](http://tutorials.jenkov.com/java-concurrency/index.html)
    * [Core Java Concurrency](https://dzone.com/refcardz/core-java-concurrency?chapter=1)
* Graal
    * [Deep Dive Into the New Java JIT Compiler](https://www.baeldung.com/graal-java-jit-compiler)
    * [Understanding How Graal Works - a Java JIT Compiler Written in Java](https://chrisseaton.com/truffleruby/jokerconf17/)
* Spring
    * [Understanding the Basics of Spring vs. Spring Boot](https://dzone.com/articles/understanding-the-basics-of-spring-vs-spring-boot?utm_source=dzone&utm_medium=article&utm_campaign=spring-boot-content-cluster)
    * [Spring Boot vs. Spring MVC vs. Spring: How Do They Compare?](https://dzone.com/articles/spring-boot-vs-spring-mvc-vs-spring-how-do-they-compare?utm_source=dzone&utm_medium=article&utm_campaign=spring-boot-content-cluster)
    * [Spring Boot 1.5.x to 2.0.x Migration – first step of migration to Java 11](https://altkomsoftware.pl/en/blog/spring-boot-migration-java/)
    * Flight of the Flux
        * [1 - Assembly vs Subscription](https://spring.io/blog/2019/03/06/flight-of-the-flux-1-assembly-vs-subscription)
        * [2 - Debugging Caveats](https://spring.io/blog/2019/04/16/flight-of-the-flux-2-debugging-caveats)
        * [3 - Hopping Threads and Schedulers](https://spring.io/blog/2019/12/13/flight-of-the-flux-3-hopping-threads-and-schedulers)
    * [Spring WebFlux Tutorial](https://howtodoinjava.com/spring-webflux/spring-webflux-tutorial/)
    * [Spring cloud ribbon with eureka – Client side load balancer example](https://howtodoinjava.com/spring-cloud/spring-boot-ribbon-eureka/)
    * [Building a Reactive RESTful API with Spring WebFlux<EMAIL_ADDRESS>
### Algorithms
*// TODO: improve this section*

### Design Patterns / Architecture

* [RESTful API Design Principle: Deciding Levels of Granularity](https://dzone.com/articles/restful-api-design-principle-deciding-levels-of-gr)
* [Three Important Patterns for Building Microservices](https://dzone.com/articles/3-most-important-patterns-for-building-microservic)
* [Clean Code Cheat Sheet](https://www.planetgeek.ch/wp-content/uploads/2014/11/Clean-Code-V2.4.pdf)
* [Microservices as an Evolutionary Architecture](https://www.thoughtworks.com/pt/insights/blog/microservices-evolutionary-architecture)
* [10 Common Software Architectural Patterns in a nutshell](https://towardsdatascience.com/10-common-software-architectural-patterns-in-a-nutshell-a0b47a1e9013)
* [An Overview of Monolithic vs Microservices Architecture (MSA)](https://www.bmc.com/blogs/microservices-architecture/)
* [Principles of chaos engineering](http://principlesofchaos.org/)
* [When to use Cassandra, MongoDB, HBase, Accumulo and MySQL](https://blog.ippon.tech/use-cassandra-mongodb-hbase-accumulo-mysql/)

## POCs 👨🏼💻

> "Never memorize something that you can look up." ― Albert Einstein

* [Badabin](https://github.com/rflpazini/badabin) -> Spring app with Java 11 + WebFlux
* [Rogue](https://github.com/rflpazini/rogue) -> [Microprofile](https://microprofile.io/) app made with async transfers and in-memory DB implemented with [Hashtable](https://docs.oracle.com/javase/7/docs/api/java/util/Hashtable.html)
* [Playground](https://github.com/rflpazini/playground-java)

repository: DeMesquita/study-stuff

repo_name: DeMesquita/study-stuff


text:
# rime-docker

[![Build Status](https://travis-ci.org/blue-jam/rime-docker.svg?branch=master)](https://travis-ci.org/blue-jam/rime-docker)

A docker image including [rime](https://github.com/icpc-jag/rime), C++, Java, Kotlin, and Python.

[Docker Hub](https://hub.docker.com/r/bluejamkmy/rime-docker)

## Usage

You may have to run `docker` commands as a super user.

1. Pull `rime-docker` image from Docker Hub.

   ```
   $ docker pull bluejamkmy/rime-docker
   ```

1. Save [`Dockerfile`](Dockerfile.example) in your rime project directory.

   ```Dockerfile
   FROM bluejamkmy/rime-docker

   COPY . /rime_project

   WORKDIR /rime_project
   ```

1. Build a docker image for your project.

   ```
   $ docker build -t myrime .
   ```

1. Run rime command in your container.

   ```
   $ docker run -it --rm myrime rime test
   ```

repository: blue-jam/rime-docker

repo_name: blue-jam/rime-docker


text:
# Developing apps for Celo Terminal

For the most part, developing a Celo Terminal app is as easy as developing a simple website.
There are four key open source technologies used in Terminal:
* [Typescript](https://www.typescriptlang.org/docs/)
* [Electron](https://www.electronjs.org/docs): Framework for developing cross-platform desktop apps.
* [React](https://reactjs.org/docs/getting-started.html): Framework for developing user interfaces.
* [Material-UI](https://material-ui.com/): Collection of UI components.

Developing a Terminal app generally won't require interacting with the Electron framework directly. Thus,
an in-depth understanding is not required, but understanding the basics can always be helpful.

Basics of React framework and understanding of React Hooks are a pre-requisite to develop a Terminal app:
* React Docs: [https://reactjs.org/docs/getting-started.html](https://reactjs.org/docs/getting-started.html)
* React Hooks: [https://reactjs.org/docs/hooks-intro.html](https://reactjs.org/docs/hooks-intro.html)

Checkout general [development guide](./develop.md) for instructions on how to build, test and
develop Celo Terminal locally.

## Structure

All Apps are located in [src/renderer/apps](../src/renderer/apps) folder. Each App is a react component
that satisfies the [AppDefinition](../src/renderer/components/app-definition.ts) interface. Terminal provides
core libraries to help with running transactions and fetching on-chain state.

Code structure relevant for App development:
```
 src/renderer/apps/<app id> - Application code, tests and assets
 src/renderer/state         - Reusable React hooks for state management
 src/renderer/components    - Shared/reusable UI components
 src/lib                    - Shared/reusable non-UI libraries
```

Core libraries:
* Running TXs: [src/renderer/components/app-definition.ts](../src/renderer/components/app-definition.ts)
* Fetching on-chain state: [src/renderer/state/onchain-state.ts](../src/renderer/state/onchain-state.ts)
* Storing configuration: [src/renderer/state/localstorage-state.ts](../src/renderer/state/localstorage-state.ts)
* Caching: TODO: not yet available...

## Error handling

By default, there is already a catch-all error handler that handles all uncaught errors from
event handlers and async routines. There is a simple UI that displays errors as a non-intrusive
pop-up.

More customized apps can always implement more complex erorr handling and its UI inside the App itself.

## Testing

For regular, non-UI testing, you can write tests that will be run using Jest. In general, if you have large
amounts of non-UI code, it is recommended to have them in a separate npm package. You can add the package as
a dependency and import it in your Celo Terminal application code.

For UI and full integration testing details checkout the [Development Guide](./develop.md#end-2-endintegrationui-testing).

# Reviewing and integrating an app in Terminal

If you want to discuss plans for integrating your app in Celo Terminal, reach out to
`@zviad | WOTrust` on [Celo Discord](https://chat.celo.org), or by email<EMAIL_ADDRESS>
Celo Terminal is still in very early stages of development, thus all initial app integrations
will be on more case-by-case basis.

repository: dukejones/celoterminal

repo_name: dukejones/celoterminal


text:
# Introduction

Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration. Packer is lightweight, runs on every major operating system, and is highly performant, creating machine images for multiple platforms in parallel.

QMI uses Hashicorp Vagrant to use the machine image created by Packer.

These images are known as "boxes" in Vagrant, and specifying the box to use for your Vagrant environment is always the first step after creating a new Vagrantfile.  Box files are generated through another Hashicorp tool called Packer, and boxes can be created for most HyperVisors.  As QMI is VirtualBox focussed that will be the focus of this article.

## What you will need

* The latest version of Packer
* A Windows Server 2016 ISO (This can be the evaluation edition),(The provided scripts are designed to work with Standard edition)
* A decent text editor
* Base Operating System repository
* Some knowledge about Packer, JSON and PowerShell
* Time, building a box takes hours

## qlik-base-os repository
The qlik-base-os repository contains the files necessary to create a blank Microsoft Windows 2016 Standard Oracle VirtualBox virtual machine.

| Folder | File | Description|
|--------|------|------------|
| answer_files| Autounattend.xml| Windows unattended install template|
| floppy | NA | Not currently used|
| iso | NA | Place the Windows 2016 iso download here|
| scripts | All | Scripts that are executed during the creation of the virtual machine image |
| root | vagrantfile-windows_2016.template | Vagrant file used to create the Vagrant box file |
| root | Win2k16.json | Packer configuration file |

## Packer Worklow

![packer-workflow](../img/packer-workflow.png)

| Step | Description |
|------|-------------|
|1| Windows 2016 iso file is used by the win2k16.json (Packer template)|
|2| A standard Windows Autounattend.xml file is used to configure and install Windows 2016 Server|
|3| Scripts are executed by Packer and referenced by the win2k16.json file to determine what is created with the machine image |
|4| The vagrant template specifies the default values to c reate as the output machine image (eg. Amount of RAM/Cores)
|5| The above files are used by the Packer JSON file (win2k16.json) to create the machine image
|6| Hashicorp Packer does all the lifting and outputs a Vagrant box file
|7| The output of packer is a Vagrant box (this will be added to Vagrant and be used as the base operating system)

repository: Qlik-Partner-Tools/qmi-documentation

repo_name: Qlik-Partner-Tools/qmi-documentation


text:
# Django OIDC Provider

[![Python Versions](https://img.shields.io/pypi/pyversions/django-oidc-provider.svg)](https://pypi.python.org/pypi/django-oidc-provider)
[![PyPI Versions](https://img.shields.io/pypi/v/django-oidc-provider.svg)](https://pypi.python.org/pypi/django-oidc-provider)
[![Travis](https://travis-ci.org/juanifioren/django-oidc-provider.svg?branch=master)](https://travis-ci.org/juanifioren/django-oidc-provider)
[![PyPI Downloads](https://img.shields.io/pypi/dm/django-oidc-provider.svg)](https://pypi.python.org/pypi/django-oidc-provider)

## About OpenID

OpenID Connect is a simple identity layer on top of the OAuth 2.0 protocol, which allows computing clients to verify the identity of an end-user based on the authentication performed by an authorization server, as well as to obtain basic profile information about the end-user in an interoperable and REST-like manner. Like [Google](https://developers.google.com/identity/protocols/OpenIDConnect) for example.

## About the package

`django-oidc-provider` can help you providing out of the box all the endpoints, data and logic needed to add OpenID Connect capabilities to your Django projects.

Support for Python 3 and 2. Also latest versions of django.

[Read docs for more info](http://django-oidc-provider.readthedocs.org/) or [see the changelog here](https://github.com/juanifioren/django-oidc-provider/blob/master/CHANGELOG.md).

## Contributing

We love contributions, so please feel free to fix bugs, improve things, provide documentation. You SHOULD follow this steps:

* Fork the project.
* Make your feature addition or bug fix.
* Add tests for it inside `oidc_provider/tests`. Then run all and ensure everything is OK (read docs for how to test in all envs).
* Send pull request to the `develop` branch.

repository: lynndotconfig/django-oidc-provider

repo_name: lynndotconfig/django-oidc-provider


text:
# ECE520 Final Project

ENVIRO BASED CAPTURE THE FLAG
===

Goal: For my final project for ECE520, I will be building a 2D capture the flag game with novel game play dynamics using [ENVIRO](https://github.com/klavinslab/enviro), a multi-agent, mult-user, simulator. This repo is a prototype of the game that demonstrates the key aspects of the game play.

This game is very much like a traditonal capture the flag game with some novel game play dynamics.

Like a traditional capture the flag game there are:
- Individual flags that need to be captured by colliding the player into them. The flags are placed such that the players will need to cross paths to collect the flags, to increase conflict.
- A goal to bring the flag to score points.

Some novel game play dynamics in this game are:
- Players do not have a life bar but instead are eliminated by getting pushed off the edge similar to a platformer type game.
- Players make use of water streams to push the opponent off the edge and deter their progress.
- Players can also bring up walls as protection from the water streams

Challenges
===
One of the primary challenges of making the game was just making sure that movement was controllable and predictable. I tried using apply_force() initially but it proved to be hard to control. The track_velocity() function worked better in controlling linear velocity, but turning was still a bit tough to control. It turns out the trick was just to dampen the turning by adding more rotational friction to the agent defition.

 It turns out game balancing is very time consuming and difficult!

Another challenge was to get the multi player working. I first tried using multiple agents with a coordinator much like in the provided example, but this proved difficult to test with just one environment. Instead I created two separate agents that used the same keyboard. This kind of set up is very similar to the old school 2d scroller blaster games.

Installation and Running the Code
===
```bash
git clone https://github.com/basikthings/ENVIRO_CPTR_THE_FLAG_BLSTR.git
cd ENVIRO_CPTR_THE_FLAG_BLSTR
```

Navigate to the folder on a command line and enter

```bash
docker run -p80:80 -p8765:8765 -v $PWD/:/source -it klavins/enviro:v1.6 bash
```

This will start a container environment using Docker provided by Professor Klavins with all the [ENVIRO](https://github.com/klavinslab/enviro) code installed

```bash
make
esm start
enviro
```
Open a web browser and navigate to:
```html
localhost
```
Enjoy!

Gamplay
===
The object of the game is to score as many points as possible and prevent your opponent from scoring points. Points are scored by capturing the flag that is matched to your player color, and delivering it to the goal box designated by the circle at the top of the screen. If the player is knocked off into the wall_end before reaching the goal, both the player and the flag return to their original positions without scoring any points. Each players points are tallied up.

Capture the Flag Agents
---
- ***player***: Is the character that the user controls using a D pad spanned by {w,a,s,d} or {i,j,k,l} for player1 and player2 respectively. The players can also shoot a stream of water by holding down {f} or {;} respectively for the two players. The players can also put up high mass walls on either side to block the opponents stream of water {c,t} or [.,[} respectively.

- ***flag***: The player needs to run into the flag to capture it.

- ***goal***: The player needs to run into the goal to earn a point. A point is only earned when the player runs into the goal while having a flag captured.

- ***water***: Water is shot from each of the players. There's a bit of bending the laws of physics here, but the water is made to weigh nearly the same as the mass of the player. This gives each player the ability to use their own water stream to push the opposing players.

- ***wall***: Walls can be dropped by the players as a way to protect against opposing player  water streams or to use a way to deflect your own water stream. A maximum of 4 walls can be placed at any one time by a user. Walls can also be pushed out of the way by shooting enough water. Instead of a completely static wall. The wall is instantiated with a very large mass compared to all other objects and set to move and a slow rate. The slow moving walls add an interesting game play dynamic that allows the players to still traverse space while being protected.

- ***map_end***: The four walls of the map are elimination zones that brings the players back to their respective bases. Players compete to push each other into the map_ends to impede the opponents progress.

Game Dynamics
===

Open Map

Water Wall to Block

Moving Wall used to Block Water to clear a Path


text:
---
name: Product Issue
about: Create a product issue
assignees: ''

---

_[General guidance: Product issues should describe the feature, but are not actually technically specced for dev work.]_

## Overview

_[First, the workflow in one sentence]_

#### Description and outcomes
_[Then, more detail. Provide a short summary and/or list key outcomes that the user should be able to accomplish with this feature.]_

#### Resources
- [ ]  _[Link Gherkin Scenarios]_
- [ ]  _[Link Figma Scenarios]_

#### Accessibility Requirements

repository: learningequality/kolibri

gha_language: Python

gha_license_id: MIT

repo_name: learningequality/kolibri


text:
Funnel.js - React
=========

This is an updated version of Funnel.js. https://github.com/inlineblock/funnel.js

The difference between this one and the previous one, is this basically has no options. You send it an array of data objects with the key "value" as the number.

All other options are done by CSS. Checkout that CSS file for changing the colors, gaps, etc. Height is set automatically be the containers in CSS. It defaults to 80vh.

This was originally demo'd at #UtahJS conference.

Usage
=====
```jsx
<Funnel data={ getData() } />
```

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


text:
[back](3_CPP.md)

# Debugging Python applications remotely

In my **"embedded native remote development environment"** approach plays *Microsoft Visual Studio Code Insider* the primary roll as development IDE with a **SSH**-connection to the SoC-FPGA development board. *VS Code* can not only be used for Python development but for **C++** application development and debugging and for **Webinterface** design, as well. For every use case please follow this guide to see how you can establish a remote connection between *VS Code* and *rsyocto*.

![Alt text](https://raw.githubusercontent.com/robseb/rsyocto/rsYocto-1.042/doc/symbols/EmbeddedNativDevApproch.jpg)
**My pre-configured and preferred Linux application development approach for C++,Python and Web**

This guide describes how to install and configure *Visual Studio Code Insiders* to access the Linux system remotely over a `ssh-connection`. Later on is shown how to use *Visual Studio Code* to remote debug Phyton applications.

*Visual Studio Code* is a code editor built by *Microsoft*. It is an universal binary application and runs on Windows, Linux and macOS. **Visual Studio Code Insider** is a special version and extended Visual Studio Code with advanced plugin support. For instance, only *Visual Studio Code Insider* enables a remote access via SSH to *ARMv7-A* and *ARMv8-A* Linux devices.

*Visual Studio Code Insider* does allow only *SSH* access with a **SSH-Keygen**. The key must be regenerated after every Board-, SD-card or IP-Address switch. A static IPv4-Address or an indexed MAC address of the board inside the DHCP-Server can prevent the `OpenSSH` server to request a new keygen after a reboot.

The following step by step guide shows how to setup *Visual Studio Code Insider* for Python application remote development and debugging on a *Windows 10* PC. For other systems please follow Microsoft's instructions:
[Visual Studio Code Remote Development Troubleshooting Tips and Tricks](https://code.visualstudio.com/docs/remote/troubleshooting)
(*Chapter: Improving your security with a dedicated key*)

With the following guide *Microsoft* describes the remote debugging function of *Visual Studio Code Insider*:
[Developing on Remote Machines using SSH and Visual Studio Code](https://code.visualstudio.com/docs/remote/ssh)

### I. Generation of the SSH Key with Windows 10 / Linux
* Open the Windows "**Command Prompt**" or the Linux **Terminal Window** (*admin rights not required*)
* Execute the following commands
1.    **Generate a new SSH Key**
      * Windows stores the key inside the following directory:  `C:\Users\<USER Name>\.ssh`
      * Linux here:  `~/.ssh`
      ``````shell
      ssh-keygen -t rsa -b 4096
       ``````
       ![Alt text](CreatingSSHwithCMD.jpg?raw=true "Windows CMD and SSH")
        * Always press `ENTER` (*do not enter an extra password or another name*):
2.    **Set the IPv4 Address of the board**
       ``````shell
      SET<EMAIL_ADDRESS>      ``````
      * Here for example with the IP address *<IP_ADDRESS>*
5.    **Copy the generated SSH-Key via SSH to the board**
      * After this command the *rsyocto* splash screen appears and the Linux Distribution asks for the password: **`eit`**
      ``````shell
      scp %USERPROFILE%\.ssh\id_rsa.pub %REMOTEHOST%:~/tmp.pub
      ``````
4.   **Authenticate and activate the SSH key**
     * Again, after this following command should the *rsyocto* splash screen appear and the Linux Distribution should ask for the password: **`eit`**
      ``````shell
      ssh %REMOTEHOST% "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat ~/tmp.pub >>  ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys && rm -f ~/tmp.pub"
      ``````

### II. Installation of *Visual Studio Code Insider* and configuration of remote access
* Download and install the latest version of **Visual Studio Code Insider**:
  [Download Visual Studio Code Insiders](https://code.visualstudio.com/insiders/)
* Follow the installation instructions
* After a successful installation open *Visual Studio Code Insider*
* On the sidebar (*toolbar on the left hand side*) click the **`Extension`**-icon
* Search for the extension:"**`Remote Development`**" (*by Microsoft*) ([Remote Development - Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack)) and press the **`install`**-button to install this extension

  ![Alt text](VisualCodeConfig1.jpg?raw=true "Visual Studio Configuration 1")

* **Restart Visual Studio Code Insider** to accept the changes
* Click on the side bar "**`Remote Explorer`**"
* Choose in the Drop Down Menu "**`REMOTE EXPLORER`**" and the **`SSH Target`**
* Move the mouse of the title **"`SSH TARGETS`"** and click on the **gear-icon**

  ![Alt text](VisualCodeConfig2.jpg?raw=true "Visual Studio Configuration 2")

* Select in the appeared Dropdown menu: **"C:\Users\<USER Name>\.ssh\config"**

  ![Alt text](VisualCodeConfig3.jpg?raw=true "Visual Studio Configuration 3")

* Configure the name and IPv4-Address by adding the following `jason`-configuration file
  (change the "**`HostName`**" with the **IPv4-Address of your board**):
``````jason
Host rsyocto
    ForwardAgent yes
    HostName <IP_ADDRESS>
    User root
    IdentityFile ~/.ssh/id_rsa
``````
* Save and close this configuration file
* If an error occurred close and restart *Visual Studio Code Insider* and try it again

### III. Connection of the *rsyocto* with *Visual Studio Code Insider*
* Open *Visual Studio Code Insider*
* Select on the side bar "**`Remote SSH`**"
* Under the tap "**`Connections`**" an entry with the name **"`rsyocto`"** appears
* Right click on this entry and choose **"`Connect Host in current Window`"**

  ![Alt text](VisualCodeConfig4.jpg?raw=true "Visual Studio Configuration 4")

  * The first attach attempt takes a little bit longer, because the *Visual Studio Code* downloads and installs the **Visual Studio Code Server**
  * **Note:** Be sure that the board is connected to the internet and the system time is correct (use `date` to check it)
  * In case that the connection to the board is established successfully a green icon with a **connected symbol** should appear

### IV. Accessing the rootfs files remotely
*  ***Visual Studio Code Insider* can access the rootfs (*root file system*) of the embedded Linux Distribution**
*  Some Python sample applications are pre-installed on *rsyocto*
*  Navigate on the sidebar to **"`Explorer`"** click the blue **"`Open Folder`"** icon
*  *Visual Studio Code Insider* should now ask for a **remote directory to open**
      * **Default:** `"/home/root/"` --> User *root folder* with the Python examples
      * **Web sever:** `"/usr/share/apache2/default-site/htdocs"` --> Every file inside this folder will be accessible with a web browser
* Click "**`okay`**"

 ![Alt text](VisualCodeConfig5.jpg?raw=true "Visual Studio Configuration 5")
* Now the rootfs of the embedded Linux is accessible with the *Visual Studio Code Insider File explorer*

 ![Alt text](VisualCodeConfig6.jpg?raw=true "Visual Studio Configuration 6")

### V. Preparing the Python remote development
* Select inside the sidebar "**`Extension`**"
* Choose the previously installed extension "**`Python`**" (*by Microsoft*)
* Press the green button:"**`Install on SSH:rsyocto`**"

 ![Alt text](VisualCodeConfig7.jpg?raw=true "Visual Studio Configuration 7")

* With this input *Visual Studio Code Server* starts with the installation of the required remote Python debugging components
* Press  "**`reload required`**" to activate this changes

### VI. Debugging Python Code remotely
* Open any pre-installed Python sample located on the home directory (*~*) of *rsyocto* (*also available inside `examples/python` of this repo*)
* Navigate to the sidebar icon **"`Debug and Run`"** and click on the "**`Debug with Python`**" Button
* Choose in the Drop Down Menu "**`Python File`**"

 ![Alt text](VisualCodeConfig8.jpg?raw=true "Visual Studio Configuration 8")

 * Or use the following `json`-file to configure the debugger:
      ``````json
            {
            "version": "0.2.0",
            "configurations": [
                  {
                      "type": "python",
                      "request": "launch",
                      "name": "Python curent file remotly",
                      "program": "${file}",
                      "console":"integratedTerminal"
                  }
                ]
            }
      ``````
  * The remote Debugging should start
  * If not: press the "**`Start Debugging`**" button or **`F5`**
  * **Now *Microsoft Visual Studio Code* is configured to write and debug any Python Code directly on the embedded Linux via a network interface over SSH and SFTP**

       ![Alt text](VisualCodeConfig9.jpg?raw=true "Visual Studio Configuration 9")
___

### VII. Use of the Python Package Manager pip (PyPI)
* The pre-installed example "*serialEchoDemo.py*" requires the [pySerial](https://pyserial.readthedocs.io/en/latest/shortintro.html)-module
* "*rsyocto*" has a full support for all *Python pip* package index versions
* Use the *PiP* [Homepage](https://pypi.org/) to find a module to download and install
* Run the following command to download and install this module with *rsyocto*:
     ````bash
     pip3 install "module_name"
     ````
* Now it is possible to use Python packages, which are designed by a large community (*e.g. Raspberry Pi-community*), on a powerful *Intel SoC-FPGA*

* To show all pre-installed Python PiP packages
     ````bash
     pip list
     ````
___

![Alt text](PythonDebiggingAninmation.gif?raw=true "Visual Studio Code Python Debug")

**Example: Debugging the Python script "*gsensorDemo.py*" on a DE10 Standard Board**

 ## Continue with the next level: [Analyzation of applications with the ARM Development Studio (DS-5) Streamline](5_Streamline.md)

repository: robseb/rsyocto

gha_language: Verilog

repo_name: robseb/rsyocto


text:
# bib-site

This is a set of PHP scripts which provide an interface to browse and edit a .bib file. Everything happens in the .bib file - no SQL database or anything like that needed.

Even if you don't need that, you might like `bib-parse.php`, which does a better job of parsing .bib files (or at least, *my* .bib files) than any other PHP parser I found.

I use this to run [read.somethingorotherwhatever.com](http://read.somethingorotherwhatever.com)

## Installation

Clone this repository somewhere on your web server. Copy `config.json.dist` to `config.json` and set it up. You'll need to change `bibfile`,`root_url` and `password`. Use PHP's `crypt()` function to hash your password. (My web host seems to run an old version of PHP that doesn't have the good hashing functions)

### Bookmarklet

Add the following bookmarklet to save the page you're looking at:

```
javascript:(function(){var site = 'http://read.somethingorotherwhatever.com'; var d = {'title':document.title,'url':window.location};var p=[];for(var x in d){p.push(x+'='+encodeURIComponent(d[x]))};var url = site+'/new?'+p.join('&');window.open(url)})()
```

(Remember to change `site` to your bib-site address)

## Customisation

Make a copy the `templates` folder and change your config to point to that. The templates are rendered using [twig](http://twig.sensiolabs.org/).

repository: christianp/bib-site

gha_language: PHP

repo_name: christianp/bib-site


text:
# [CONTACTS+][demo-link]

  The capacity to learn is a gift; the ability to learn is a skill; the willingness to learn is a choice.

  Brian Herbert

## Table of Contents
- [Overview](#Overview)
- [Installation](#Installation)
- [Notes](#Notes)
- [Acknowledgement](#Acknowledgement)

## Overview
- [Contacts+][demo-link] is a mobile application that allows you to access and edit the contacts on your phones. Also, the contacts information is stored into cloud to prevent data loss.
- The application provides a quick access to your favorite contacts in one tap.
- The application also allows you to access your own personal information easy.
- With one tap, you can copy the contact information into your phone clipboard.
- Short video demo of the application: https://youtu.be/mO4-eLsuZsU

## Installation
- Clone the repo
- Install packages
  ```bash
  npm install
  ```
- Start Expo
  ```bash
  npm start
  ```

## Notes
- The application is built with [React Native][react-native-homepage], [Expo][expo-homepage] and [Firebase][firebase-homepage].
- Email/password authentication is utilized, but it can be expanded to other authentication methods provided by Firebase.

## Acknowledgement
- Special thanks to [Dawid Urbaniak][urbaniak-github] for the detailed [tutorial][urbaniak-tutorial] of using React Native Paper + React Navigation in React Native.

[demo-link]: https://youtu.be/mO4-eLsuZsU
[react-native-homepage]: https://reactnative.dev/
[expo-homepage]: https://expo.io/
[firebase-homepage]: https://firebase.google.com/
[urbaniak-github]: https://github.com/Trancever
[urbaniak-tutorial]: https://reactnavigation.org/blog/2020/01/29/using-react-navigation-5-with-react-native-paper/


text:
# liguetaxi tests #

This directory contains additional test suites beyond unit tests. Whereas the unit tests run very quickly (since they don't make any network calls), the tests in this directory hit directly the [Ligue Taxi API]().

## integration ##

This will exercice the entire liguetaxi library against the live [Ligue Taxi API][]. These tests will verify that the library is properly coded against the actual behaviour of the API, and will (hopefully) fail upon any incompatible change in the API.

Because these tests are running using live data, there is a much higher propability of false positives in test failures due to network issues, test data having been changed, etc.

Additionally, in order to test the methods that modify data, a real API credential need to be present. While tests will try to be well-behaved in terms of what data they modify, it is **strongly** recommended that these tests only be run using a dedicated test account.

Run tests using:

    $ LIGUETAXI_HOST='<LT_HOST>' LIGUETAXI_TOKEN='<LT_TOKEN>' go test -v ./integration

Additionally there is a flag `log` that will make tests log the requests:

    $ LIGUETAXI_HOST='<LT_HOST>' LIGUETAXI_TOKEN='<LT_TOKEN>' go test -v -log ./integration

[Ligue Taxi API]: https://portal.taxidigital.net/suporte/php/API_TD/

repository: TripeeApp/liguetaxi

repo_name: TripeeApp/liguetaxi


text:
---
layout: page
permalink: /gymnastics/
title: Artistic Gymnastics
description: About my career as a competitive gymnast.
---

### USA Junior National Team Member

I was a member of the [USA Junior
National](https://usagym.org/pages/athletes/athleteListDetail.html?id=113855)
team from 2008 - 2013. To become a member of the national team I placed within
the top seven gymnastics of my age group at national championships. Being on the
national team earned me the opportunity to train at week-long training camps at
the USA Olympic Training Center in Colorado Springs, CO several times a year.

    Competing at the Junior national champonships on Floor and Vault.

This opportunity also allowed me to represent the United States in three
international competitions in Lilleshall in the UK, Bejjing, China, and
Medellín, Colombia.

        {% include figure.html path="assets/img/china_USA.jpg" class="img-fluid rounded z-depth-1" %}

    Stanford Men's Gymnastics team on the podum for second place at NCAA Finals.

***

### Stanford Men's Gymnastics (September 2012 - April 2015)
During my undergraduate career at Stanford, I was a member of the [Stanford
Men's Gymnastics Team](https://gostanford.com/sports/mens-gymnastics).  I
competed all events except rings, and helped the team to win two second place
and one third place titles at the NCAA championships. Being a gymnast on the
Stanford Men's Gymnastics team required 20 hours of intensive training each week
in addition to weekly competitions across the country during the winter season.
I was a NCAA First Team Academic All-American at the 2013, 2014, and 2015 NCAA
championships, and an Elite 89 Scholar Athlete in 2014.

        {% include figure.html path="assets/img/stanford_team.jpg" class="img-fluid rounded z-depth-1" %}

    Stanford Men's Gymnastics team on the podum for second place at NCAA Finals.

Unfortunately, during my senior year at Stanford, chronic injuries to my
shoulders and ankles from 15 years of intensive gymnastics prevented me from
competing.

***

### Trampoline
Of all the things I learned in gymnastics, my favorite by far was bouncing on
the trampoline. I have a compilation of clips on YouTube of me doing trampoline
and some other things.


text:
# QMK logo editor

Live demo:

* https://joric.github.io/qle

Reddit:

* https://redd.it/gjejxi

## References

* https://helixfonteditor.netlify.app (Helix Font Editor by @teri_yakichan)
* https://gist.github.com/joric/96b6a1a65eedc224b7d9d3d17bd4e9e8 (crkbd_logo_converter.py)
* https://rawgit.com/lorol/esp8266-oled-ssd1306/master/resources/glyphEditor.html
* https://javl.github.io/image2cpp/
* https://oleddisplay.squix.ch

license: Unlicense

repository: rpbaptist/qle

repo_name: rpbaptist/qle


text:
# puzzle [![Build Status](https://travis-ci.org/pbgnz/puzzle.svg?branch=master)](https://travis-ci.org/pbgnz/puzzle) [![Coverage Status](https://codecov.io/gh/pbgnz/puzzle/branch/master/graph/badge.svg)](https://codecov.io/gh/pbgnz/puzzle/branch/master/)

## Requirements
1. Go 1.7 or later

## Details

Assume a variation of the 8-puzzle called 11d-puzzle. The 11d-puzzle is identical to the 8-puzzle, except
for 2 differences:
1. the board is a 3x4
2. diagonal moves into the empty tile are legal (assume it can be done on a physical board).
The goal configuration of the 11d-puzzle is:

```
+---+---+---+---+
| 1 | 2 | 3 | 4 |
+---+---+---+---+
| 5 | 6 | 7 | 8 |
+---+---+---+---+
| 9 | 10| 11| 0 |
+---+---+---+---+
```

### Usage

``` bash
$ go get -u github.com/pbgnz/puzzle
```

``` bash
$ puzzle 1 0 3 7 5 2 6 4 9 10 11 8
```

repository: pbgnz/puzzle

repo_name: pbgnz/puzzle


text:
# Meta
[meta]: #meta
- Name: Add Visual Pack Build
- Start Date: 2020-05-14
- Author(s): aemengo
- Status: Implemented
- RFC Pull Request: [rfcs#160](https://github.com/buildpacks/rfcs/pull/160)
- CNB Pull Request: (leave blank)
- CNB Issue: [pack#1200](https://github.com/buildpacks/pack/issues/1200), [pack#1201](https://github.com/buildpacks/pack/issues/1201), [pack#1203](https://github.com/buildpacks/pack/issues/1203), [pack#1204](https://github.com/buildpacks/pack/issues/1204), [pack#1205](https://github.com/buildpacks/pack/issues/1205), [pack#1206](https://github.com/buildpacks/pack/issues/1206)
- Supersedes: https://github.com/buildpacks/rfcs/pull/152

# Summary
[summary]: #summary

Pack should provide a visual representation of the image build process. Please see [mockup](https://storage.googleapis.com/artifacts.cf-garden-windows-dev.appspot.com/pack-build-visual.mp4) for concept.

# Definitions
[definitions]: #definitions

* [Pack](https://github.com/buildpacks/pack) - A tool within the buildpacks ecosystem for converting code into runnable images, in a local environment.

# Motivation
[motivation]: #motivation

The **casual application developer** has trouble seeing the value proposition of buildpacks. They also encounter a high learning curve when using our tooling. We've seen evidence of this through user interviews and other channels.

For most of these developers, pack is their introduction to the buildpacks ecosystem. By providing a visual representation of the build process, they will be introduced to various buildpack concepts, and their relevance to the build process.

# What it is
[what-it-is]: #what-it-is

When a casual application developer runs `pack build [--interactive/-i]` on the command-line in the working directory of their application, they are presented with a terminal UI that depicts the build process. The command will depict the build process as four stages.

1. The [pull stage](https://user-images.githubusercontent.com/4236888/119383740-b9e4ee00-bc91-11eb-9a02-c0267b568763.png)
2. The [detect stage](https://user-images.githubusercontent.com/4236888/119383770-bfdacf00-bc91-11eb-82ce-49b95d82c938.png)
3. The [build stage](https://user-images.githubusercontent.com/4236888/119383765-be110b80-bc91-11eb-8877-ab10fbd7cad6.png)
4. The [result stage](https://user-images.githubusercontent.com/4236888/119383754-bc474800-bc91-11eb-924e-91bb30d78820.png)

---

This RFC acts as a gateway to subsequent functionality. Follow-up RFCs could include:

1. **CVE detection.** A user should be able to view CVEs that a **(r) rebase** will remove.
1. **Build Hijack.** A user should be able to open a shell for debugging, into a failed build container.
1. **Edit Build Plan.** A user should be able to modify a build plan, before building.
1. **Export Build Plan.** A user should be able to "save" a modified build plan, for reproducibility.
1. **View Layer Details.** A user should be able to view a filesystem diff by a plan "step" à la [dive](https://github.com/wagoodman/dive).
1. **Revert Plan.** A user should be able to revert to last successful build plan.
1. **Even More.**

# How it Works
[how-it-works]: #how-it-works

One can make extensive use of [rivo/tview](github.com/rivo/tview) to provide a UI, and handle user events, on the command-line. In Golang.

# Drawbacks
[drawbacks]: #drawbacks

- This RFC would increase maintenance cost and surface area. It provides a whole net new path that will need to be tested and maintained.

# Alternatives
[alternatives]: #alternatives

- Find other means to entice the casual application developer into the buildpacks ecosystem.

# Prior Art
[prior-art]: #prior-art

- [Mockup](https://storage.googleapis.com/artifacts.cf-garden-windows-dev.appspot.com/pack-build-visual.mp4)
- [Mockup Src](https://github.com/aemengo/pack-visualize)
- [Hijack Issue](https://github.com/buildpacks/pack/issues/62)
- [Layer Metadata Issue](https://github.com/buildpacks/lifecycle/issues/411)

# Issues to Create

- buildpacks/pack: `pack build -i` prompts you to choose from suggested builders [epic/pack-build-interact]
- buildpacks/pack: `pack build -i` conducts pull phase [epic/pack-build-interact]
- buildpacks/pack: `pack build -i` conducts detect phase [epic/pack-build-interact]
- buildpacks/pack: `pack build -i` shows interactive panel with **image:**, **builder:** info [good first issue][epic/pack-build-interact]
- buildpacks/pack: `pack build -i` shows interactive panel with **plan:** info [epic/pack-build-interact]
- buildpacks/pack: `pack build -i` shows interactive panel with **log:** info [epic/pack-build-interact]

repository: buildpacks/rfcs

gha_language: Shell

repo_name: buildpacks/rfcs


text:
**Profile specific implementation guidance:**

*  Client System SHALL use status = 'final' for Observation creation. status = 'amended' for document update. status = 'entered-in-error' for removaed (soft delete) Observation
* Client system SHALL provide the following details as 'Observation.performer':
 Person ([AUBasePractitioner]) who is clinically responsible for the undertaking of the exam shall be present.
 An organisation ([AUBaseOrganisation]) which captures the relevant details shall be present

[extensible]: http://hl7.org/fhir/terminologies.html#extensible
[General Guidance Section]: definitions.html

[AUBasePractitioner]: http://hl7.org.au/fhir/base/aubase1.1/StructureDefinition-au-practitioner.html
[AUBaseOrganisation]: http://hl7.org.au/fhir/base/aubase1.1/StructureDefinition-au-organisation.html

gha_language: HTML


text:
# NC-NEWS

NC-NEWS is my attemp at a replication of a back-end news website.
I created this to learn more about Express.js, Knex.js, TDD, and Node.js in general.

a working version of this back end is hosted on [Heroku](https://pure-falls-39051.herokuapp.com/api).

## Getting Started

For this project a number of scripts are included but the following instructions will tell you how to do this using the native knex and psql commands

### First things first

for this to work you will need to install psql, you can follow the tutorial here for linux [psql](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-16-04)

#### IT IS HIGHLY RECOMENDED THAT YOU SETUP PSQL WITH A NEW PASSWORD YOU HAVE NOT USED ANYWHERE ELSE AS SOME MISTAKES COULD LEAD TO YOU COMMITING THIS INFORMATION TO THE INTERNET.

As the setup is different on linux than on other systems i will be focusing on linux but the instructions are genrally relevant to all systems
the main diffrence is that knex requires your database username and password to make a connection.
but we will cover this further down.

### npm install

```bash
npm install
```

This will install a number of dependencies including mocha, chai,chai-sorted, pg, knex,supertest, and express.

#### Please note you will need to install knex globally to make use of the raw knex commands that are about to follow

In order to setup this project locally you should run the setup.sql file located under ./db/setup.sql

You can do this by executing this command.

```bash
psql -f ./db/setup.sql
```

### Linux users only

Once your database is up and running you will need to navigate to ./knexfile.js

and change the username, and password to reference your psql username and psql password.

you should find some code that looks like this, you only need to change the development and test keys.

```js
const customConfigs = {
  development: {
    connection: {
      database: "nc_news",
      username: "YOUR PSQL USERNAME",
      password: "YOUR PSQL PASSWORD"
    }
  },
  test: {
    connection: {
      database: "nc_news_test",
      username: "YOUR PSQL USERNAME",
      password: "YOUR PSQL PASSWORD"
    }
```

#### It is highly recommended that you import these in from a file that is gitignored so that when these files are commited to your remote repository your private information is not available for all to see.

### Knex migrations

Once you have initialised your dev and test databases you can use knex migrate to make use of the supplied migration files under ./db/migrations.
the following command will tell knex to execute each of the migration files in time stamp order.

```bash
knex migrate:latest
```

this will create all of the necessary tables for your database with the correct columns.

### Seeding

Once the tables and columns have been established we need to seed them, luckily knex has another command which allows us to do this.
Using knex seed run tells knex to execute the seed file located in ./knexfile.js
e.g...

```js
const ENV = process.env.NODE_ENV || "development";
const { DB_URL } = process.env;
const baseConfig = {
  client: "pg",

  migrations: {
    directory: "./db/migrations"
  },
  seeds: {
    directory: "./db/seeds" //<------------------
  }
};
```

You will notice that the first line of this file makes use of a conditional statment, this is used for testing but we'll speak more on this later.

for now execute this command

```bash
knex seed:run
```

this will seed the database with some data, you can find the raw data here --> ./db/data/dev-data if you should like to take a look.

### Lets see if it worked

To check your migrations and seeding worked you can login to psql \c into nc_news and select \* from articles
to receive a huge list of articles.

## Testing using mocha chai and NODE_ENV

As noted earlier in the tutorial there was a conditional variable declaration in the knexfile.js

```js
const ENV = process.env.NODE_ENV || "development"; //<-----------
const { DB_URL } = process.env;
const baseConfig = {
  client: "pg",

  migrations: {
    directory: "./db/migrations"
  },
  seeds: {
    directory: "./db/seeds"
  }
};
```

Node.js allows us to manually set an environment property in node and refrence this in our code, the end result of which allows us to use diffrent data and knex configs based on the environemt

you will notice that the module.exports at the bottom of the file exports a spread of the base config and corresponding key of the customConfig object

```js
const customConfigs = {
  development: {
    connection: {
      database: "nc_news",
      username: "tony",
      password: "password"
    }
  },
  test: {
    connection: {
      database: "nc_news_test",
      username: "tony",
      password: "password"
    }
  },
  production: {
    connection: `${DB_URL}?ssl=true`
  }
};

module.exports = { ...baseConfig, ...customConfigs[ENV] }; //<----
```

noramlly you would make use of this by setting your NODE_ENV to test within the cli before running you knex migrate and knex seed commands but as this repo comes complete with a ready made suite of tests you can simply make use the npm test script provided in the package JSON.

```bash
npm test
```

this will result in a series of 50+ gloriously passing test while also intialising your test database.

you can check your new test database by running psql and \c into nc_news_test

and select \* from articles

to receive a series of test articles

once this is done and your tests have passed you can move on to deployment.

## Built With

[Express.js](https://expressjs.com/)

[Knex.js](https://knexjs.org/)

[Mocha](https://mochajs.org/)

[chai](https://www.chaijs.com/)

[Supertest](https://www.npmjs.com/package/supertest)

[Nodemon](https://nodemon.io/)

[PG](https://node-postgres.com/)

[Psql](https://www.postgresql.org/)

## Contributing

Feel free to fork and use as you like, also any pull requests will be inspected and actioned.

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

repository: TonyDMorris/SameFlex-Express

gha_language: JavaScript

repo_name: TonyDMorris/SameFlex-Express


text:
## TODO

Use [redditmanager](https://redditmanager.com/) to download links of your saved posts.
Set `linkFilePath` with path of downloaded file above.
Set `basePath` variable for download location.

Build or run the main file.

repository: junaidk/reddit-scrap

repo_name: junaidk/reddit-scrap


text:
![Phase One of the MCU](images/Marvel-10-Years-Banner.jpg "MCU Phase 1")

# All About the MCU
A retrospective on phase 1 of the Marvel Cinematic Universe. You can visit [marvel.com](https://www.marvel.com) for more info, or click on the character icons to load their info on the page.

## Requirements
Use a modern browser (if you don't have one, use Internet Explorer to download something that actually works)

Not a lot - you'll need git installed localy, as well as a preprocessor like [SASS](https://sass-lang.com/) for CSS compilation. A good code editor helps too!

 Hack away!

## License
MIT

## Authors

TVR - front-end dev

JB - web designer

JO - graphic designer

JB - 3D / Motion

RH - Photography


text:
# tylerreckart.com
Get yourself up and running

### Development
Install our dependencies
```sh
yarn install
```
Make sure GraphQL & PSQL are running
```sh
yarn serve
```
Start the development server
```sh
yarn start
```

### Testing
```sh
jest
```

### Build & Serve
Make sure GraphQL & PSQL are running
```sh
yarn serve
```
Run the build
```sh
yarn build
```


text:
# Maltsters #

Proof of concept Rails API app for retrieving malt lot analysis data from maltsters.

## To Install ##

    # Download
    git clone https://github.com/elbongurk/maltsters-api.git

    # Setup
    cd maltsters-ios
    ./bin/setup

    # Fetch malt and lot data
    rake fetch

    # Generate malt analysis data
    rake analyze:malts

    # Run
    rails server

## Copyright ##

This app is released under the MIT License.

Cloudup iOS Copyright ©2014 Elbongurk. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: elbongurk/maltsters-api

repo_name: elbongurk/maltsters-api


text:
[![node][node]][node-url] [![pwa-studio][pwa-studio]][pwa-studio-url]

[node]: https://img.shields.io/badge/Node-%3E%3D10.14.1-brightgreen.svg
[node-url]: https://nodejs.org

[pwa-studio]: https://img.shields.io/badge/pwa--studio-v4.0.0-brightgreen.svg
[pwa-studio-url]: https://github.com/magento-research/pwa-studio

## Prerequisites
Make sure you have the following:

- NodeJS >= 10.14.1 LTS (NodeJS 11+ can cause problems)

- Yarn >= 1.13.0

- Python 2.7 and build tools, [see the Installation instructions on node-gyp](https://github.com/nodejs/node-gyp#installation) for your platform.

- unix based OS for example MacOS or Linux

## Quick setup

Note: only run commands from the root dir

**step: 1**
```
git clone https://github.com/VilkVoytek/taknasmak-front.git
```

**step: 2**
```
cd taknasmak-front
```

**step: 3** (this runs all necessary package.json commands back to back)
```
yarn run setup
```

**step: 4**
```
yarn run watch:taknasmak
```

## Credits

* Magento for creating [PWA Studio](https://github.com/magento-research/pwa-studio)

repository: VilkVoytek/taknasmak-front

repo_name: VilkVoytek/taknasmak-front


text:
---
id: 5a7103be-eb92-4380-8207-598e9f10724c
title: Dendron Engine
desc: ''
updated:<PHONE_NUMBER>997
created:<PHONE_NUMBER>902
---

## Summary
The engine provides the core of most of Dendron's capabilities. This includes note lookup, markdown parsing, etc

## Utilities
- markdown parsing and remark related utilities
   - loc: `src/markdown*`

## Related

- [[Server Migration|dendron.roadmap.project.n.2020.server-migration]]

repository: bdefore/dendron-site

repo_name: bdefore/dendron-site


text:
# cloudfier-maven-plugin

[![Build Status on Travis CI](https://travis-ci.org/abstratt/cloudfier-maven-plugin.svg?branch=develop)](https://travis-ci.org/abstratt/cloudfier-maven-plugin)

A Maven plug-in that exposes Cloudfier's functionality to Maven-based builds (for more on Cloudfier, see the [service website](http://cloudfier.com) and its [git repository](http://github.com/abstratt/cloudfier)).

The following goals are available:
- **publish** - publishes a local project to a Cloudfier server
- **test** - runs the test suite for a project currently deployed on a Cloudfier server
- **generate** - generates code locally from a project currently deployed at a Cloudfier server

#### cloudfier-maven-plugin:publish

Publishes a local project to a Cloudfier server, validating the application, and making it available for model-based testing and code generation.

Parameters:
- kirra.uri - the URI of the Cloudfier server (defaults to "http://develop.cloudfier.com/services")
- kirra.project.slug - the unique identifier for a project (defaults to "${project.groupId}-${project.artifactId}-${project.version}")
- kirra.project.sourcedir - the location where to find source files (defaults to "$basedir/src/main/textuml")

Example:

```
mvn com.abstratt:cloudfier-maven-plugin:publish
```

#### cloudfier-maven-plugin:test

Runs the test suite for a project currently deployed on a Cloudfier server. Does not re-deploy the application, but does re-deploy the data set supporting the Cloudfier application.

Parameters:
- kirra.uri - the URI of the Cloudfier server (defaults to "https://develop.cloudfier.com/services")
- kirra.project.slug - the unique identifier for a project (defaults to "${project.groupId}-${project.artifactId}-${project.version}")

```
mvn com.abstratt:cloudfier-maven-plugin:test
```

#### cloudfier-maven-plugin:generate

Generates code locally from a project currently deployed at a Cloudfier server.

Parameters:
- kirra.uri - the URI of the Cloudfier server (defaults to "http://develop.cloudfier.com/services")
- kirra.project.slug - the unique identifier for a project (defaults to "${project.groupId}-${project.artifactId}-${project.version}")
- kirra.generator.override - whether to silently override existing files (defaults to false)
- kirra.target.platform - the target platform (available: "jse", "jee" and "doc", defaults to "doc")
- kirra.target.dir - the base directory where to generate the code, defaults to the current dir

The Cloudfier project must have been deployed (using the 'cloudfier full-deploy' command in Cloudfier).

Example:

```
mvn com.abstratt:cloudfier-maven-plugin:generate \
    -Dkirra.target.dir=/tmp/test8 \
    -Dkirra.target.platform=jee \
    -Dkirra.project.slug=demo-cloudfier-examples-expenses
```

which on my machine generates:
```
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- cloudfier-maven-plugin:0.11.2:generate (default-cli) @ standalone-pom ---
PLATFORM: jee
[INFO] Generating at /tmp/test8/pom.xml
[INFO] Generating at /tmp/test8/src/main/java/invoicer/InvoiceIssuedEvent.java
[INFO] Generating at /tmp/test8/src/main/java/invoicer/Invoicer.java
[INFO] Generating at /tmp/test8/src/main/java/resource/timetracker/ClientElement.java
[INFO] Generating at /tmp/test8/src/main/java/resource/timetracker/ClientResource.java
[INFO] Generating at /tmp/test8/src/main/java/resource/timetracker/InvoiceElement.java
[INFO] Generating at /tmp/test8/src/main/java/resource/timetracker/InvoiceResource.java
[INFO] Generating at /tmp/test8/src/main/java/resource/timetracker/TaskElement.java
[INFO] Generating at /tmp/test8/src/main/java/resource/timetracker/TaskResource.java
[INFO] Generating at /tmp/test8/src/main/java/resource/timetracker/WorkElement.java
[INFO] Generating at /tmp/test8/src/main/java/resource/timetracker/WorkResource.java
[INFO] Generating at /tmp/test8/src/main/java/system/System.java
[INFO] Generating at /tmp/test8/src/main/java/timetracker/AlreadyInvoicedException.java
[INFO] Generating at /tmp/test8/src/main/java/timetracker/Client.java
[INFO] Generating at /tmp/test8/src/main/java/timetracker/ClientService.java
[INFO] Generating at /tmp/test8/src/main/java/timetracker/Invoice.java
[INFO] Generating at /tmp/test8/src/main/java/timetracker/InvoiceNotOpenException.java
[INFO] Generating at /tmp/test8/src/main/java/timetracker/InvoicePaidEvent.java
[INFO] Generating at /tmp/test8/src/main/java/timetracker/InvoiceService.java
[INFO] Generating at /tmp/test8/src/main/java/timetracker/MustBePositiveException.java
[INFO] Generating at /tmp/test8/src/main/java/timetracker/MustHaveWorkException.java
[INFO] Generating at /tmp/test8/src/main/java/timetracker/Task.java
[INFO] Generating at /tmp/test8/src/main/java/timetracker/TaskService.java
[INFO] Generating at /tmp/test8/src/main/java/timetracker/Work.java
[INFO] Generating at /tmp/test8/src/main/java/timetracker/WorkService.java
[INFO] Generating at /tmp/test8/src/main/java/timetracker/WrongClientException.java
[INFO] Generating at /tmp/test8/src/main/java/util/PersistenceHelper.java
[INFO] Generating at /tmp/test8/src/main/resources/META-INF/orm.xml
[INFO] Generating at /tmp/test8/src/main/resources/META-INF/persistence.xml
[INFO] Generating at /tmp/test8/src/main/resources/META-INF/sql/create.sql
[INFO] Generating at /tmp/test8/src/main/resources/META-INF/sql/drop.sql
[INFO] Generating at /tmp/test8/src/main/resources/log4j.properties
[INFO] Generating at /tmp/test8/src/main/webapp/WEB-INF/web.xml
[INFO] Generating at /tmp/test8/src/test/java/tests/test/ClientScenarios.java
[INFO] Generating at /tmp/test8/src/test/java/tests/test/Examples.java
[INFO] Generating at /tmp/test8/src/test/java/tests/test/InvoiceScenarios.java
[INFO] Generating at /tmp/test8/src/test/java/tests/test/TaskScenarios.java
[INFO] Generating at /tmp/test8/src/test/java/tests/test/WorkScenarios.java
[INFO] Generating at /tmp/test8/src/test/java/timetracker/ClientCRUDTest.java
[INFO] Generating at /tmp/test8/src/test/java/timetracker/InvoiceCRUDTest.java
[INFO] Generating at /tmp/test8/src/test/java/timetracker/TaskCRUDTest.java
[INFO] Generating at /tmp/test8/src/test/java/timetracker/WorkCRUDTest.java
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.656s
[INFO] Finished at: Thu Apr 23 18:16:26 BRT 2015
[INFO] Final Memory: 11M/490M
[INFO] ------------------------------------------------------------------------
```
#### Building the generated code (jee and jse)

You need to have Maven 3 and Java 8 installed. You can build and test the generated code with:

```
mvn clean install -f /tmp/test8/pom.xml
```

#### Releasing this plug-in

```
./release.sh
```

repository: abstratt/cloudfier-maven-plugin

repo_name: abstratt/cloudfier-maven-plugin


text:
---
layout: page
title: About me
---

<p class="message">
  I'm a research scientist based in [Edmonton](https://goo.gl/maps/XmqeR) (Alberta, Canada). This blog is - well, I'm not sure exactly - probably just a place to post tutorials, projects and other random stuff I think is interesting. If this all seems a bit vague, I'm sure there is a good reason for that...
</p>

Find out more about me or my work at:

* [University of Alberta](http://www.ualberta.ca/~jain/)  (seriously out of date...)
* [LinkedIn](https://ca.linkedin.com/pub/piyush-jain/9/143/23)
* [High Level Analytics](http://www.highlevelanalytics.com)
* [GitHub](http://www.github.com/piyushnz)
* [Gravity Lab](http://www.gravitylaboratory.com/#!people/c1r4z)


text:
Release v1.1.0
---
Implemented features

* [Move autoscale policy field to Machine subconfig at Create Server Command](https://github.com/CenturyLinkCloud/clc-node-sdk/issues/178)
* [Add support of autoscale policy to modify command](https://github.com/CenturyLinkCloud/clc-node-sdk/issues/179)
* [Add support of anti-affinity policy to modify command](https://github.com/CenturyLinkCloud/clc-node-sdk/issues/180)
* [Implement possibilities to create load balancer with multiple pools by single command](https://github.com/CenturyLinkCloud/clc-node-sdk/issues/181)
* [Implement possibilities to modify load balancer with multiple pools by single command](https://github.com/CenturyLinkCloud/clc-node-sdk/issues/182)
* [Add support of alert and autoscale policies to define infrastructure command](https://github.com/CenturyLinkCloud/clc-node-sdk/issues/186)

Release v1.1.1
---
Implemented features

* [Release version 1.1.1 to npm](https://github.com/CenturyLinkCloud/clc-node-sdk/issues/193)

Release v1.1.3
---
Implemented features

* Change 'claim network' response

Release v1.1.4
---
Fixed issues

* [Time issues between UTC and EST](https://github.com/CenturyLinkCloud/clc-node-sdk/issues/198)
* [Major Issue with Server Selection](https://github.com/CenturyLinkCloud/clc-node-sdk/issues/197)
* [Delete and Server Selection](https://github.com/CenturyLinkCloud/clc-node-sdk/issues/196)

repository: KateDiomina/clc-node-sdk

repo_name: KateDiomina/clc-node-sdk