text:
# Employee-Tracker
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Description

This is a simple application that allows the user to track and update records for their employees. I have taken the liberty of creating a walkthrough that shows the functionality of this application once it has been installed:
https://drive.google.com/file/d/1P43Lz0gLDRsG7XBcuR68dX6xgi9_NBok/view

## Installation
First go to the directory containing the server.js file for this appplication.

npm init, npm install, npm install inquirer, npm install --save mysql2, and npm install console.table --save need to all be run before starting this application.

## Usage
Log into your mysql account by typing: mysql -u root -p then enter your password.
In the mysql prompt type source db/schema.sql followed by source db/seeds.sql to create and prepopulate the table.

To start, simply enter: npm start

View All Departments will show a table of all the departments with their associated ids.
View All Roles will show a table containing the job title, role id, salary, and department that the role belongs to.
View All Employees will show employee ids, first names, last names, title, salary, department, and if they have a manager.

Add Department will ask you to name the department and that department will be added to the database.
Add Role will ask you to name the role, salary, and department and adds it to the database.
Add Employee will ask you to enter first name, last name, role, and manager for this new employee to add to the database.
Update Employee Role will let you select the employee to update and then also select their new role before updating it in the database.

## License

This project is covered under a MIT license. Feel free to use it as you wish.

## Questions

  GitHub User Name: willsan0723

  [GitHub Repository](https://github.com/willsan0723/)

  If you have any additional questions you can reach me at<EMAIL_ADDRESS>


text:
---
layout: default
---

# 1997-09-12 - World's Greatet Search Engine / Re: More on House Intelligence committee amendment on crypto

## Header Data

From: TruthMonger<EMAIL_ADDRESS>To: Declan McCullagh<EMAIL_ADDRESS>Message Hash: 5842ea8fa8aa180b3c1d5c6ebabe14b75aa9211eb302fe6bdaa2f5456f299fa1

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-09-12 01:15:38 UTC

Raw Date: Fri, 12 Sep 1997 09:15:38 +0800

## Raw message

```
{% raw  %}From: TruthMonger<EMAIL_ADDRESS>Date: Fri, 12 Sep 1997 09:15:38 +0800
To: Declan McCullagh<EMAIL_ADDRESS>Subject: World's Greatet Search Engine / Re: More on House Intelligence committee amendment on crypto
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Declan McCullagh wrote:
>
> So I'm reading through the 43-page amendment to SAFE that the House
> Intelligence committee approved today. It includes:
>
> * Ban on sale of crypto without a backdoor. Five year & fine (maybe
> $250,000?) if violated. Prosecutions can be held in closed-door
> courtrooms, publishers of info about case to be held in contempt of court.

How about a ban on sale of Congressional votes without using vaseline
on the citizen's backdoor?

World's Greatest Search Engine?
  It's the one that finds the names of the Justice Department officials
who went to jail for contempt of court when they defied Congress during
the INSLAW hearings.

TruthMonger

{% endraw %}
```

## Thread

+ Return to [September 1997](/archive/1997/09)

+ Return to "[Declan McCullagh <declan@well.com>](/authors/declan_mccullagh_declan_at_well_com_)"
+ Return to<EMAIL_ADDRESS>(Douglas L. Peterson)](/authors/fnorky_at_geocities_com_douglas_l_peterson_)"
+ Return to "[Robert Hettinga <rah@shipwright.com>](/authors/robert_hettinga_rah_at_shipwright_com_)"
+ Return to "[TruthMonger <tm@dev.null>](/authors/truthmonger_tm_at_dev_null_)"
+ Return to "[Will Rodger <rodger@worldnet.att.net>](/authors/will_rodger_rodger_at_worldnet_att_net_)"
+ Return to "["William H. Geiger III" <whgiii@amaranth.com>](/authors/william_h_geiger_iii_whgiii_at_amaranth_com_)"
+ Return to "["William H. Geiger III" <whgiii@invweb.net>](/authors/william_h_geiger_iii_whgiii_at_invweb_net_)"

+ _Unknown thread root_
  + 1997-09-11 (Fri, 12 Sep 1997 07:05:37 +0800) - [More on House Intelligence committee amendment on crypto](/archive/1997/09/fd44a6d5aca9b2a39d6e4b3c7fc024ad4562804a755a80d7d38a8cb44152f8a5) - _Declan McCullagh<EMAIL_ADDRESS>    + 1997-09-12 (Fri, 12 Sep 1997 09:15:38 +0800) - World's Greatet Search Engine / Re: More on House Intelligence committee amendment on crypto - _TruthMonger<EMAIL_ADDRESS>    + 1997-09-12 (Fri, 12 Sep 1997 10:38:17 +0800) - [Re: More on House Intelligence committee amendment on crypto](/archive/1997/09/d5106f23970a4e8b4d2d9e315c09409ef2a0b3d73cae496a5fdbaf9606066ac5) - _"William H. Geiger III"<EMAIL_ADDRESS>      + 1997-09-12 (Fri, 12 Sep 1997 12:59:38 +0800) - [Re: More on House Intelligence committee amendment on crypto](/archive/1997/09/2261749b6838722e7150013eaf85422a7117cb8279e4902d6d7baff6d35d1639) - _Declan McCullagh<EMAIL_ADDRESS>        + 1997-09-12 (Sat, 13 Sep 1997 07:57:50 +0800) - [Re: More on House Intelligence committee amendment on crypto](/archive/1997/09/a2d3bbd215de482517acc6030e15568d00e9887bc2702e9e74b71ffa003df8d8) - _Robert Hettinga<EMAIL_ADDRESS>      + 1997-09-12 (Fri, 12 Sep 1997 19:31:22 +0800) - [Re: More on House Intelligence committee amendment on crypto](/archive/1997/09/f3d96a7d17f641a174a05639e56c3e3541dcbd5ea21ddf8a52de8d7dd88f924c) - _Will Rodger<EMAIL_ADDRESS>    + 1997-09-15 (Mon, 15 Sep 1997 12:55:36 +0800) - [Re: More on House Intelligence committee amendment on crypto](/archive/1997/09/3f9dd74f3458e537a693d83edaa7a86fe066c7ec4776fb26f67a1e95c6ddc81d) -<EMAIL_ADDRESS>(Douglas L. Peterson)_
      + 1997-09-15 (Tue, 16 Sep 1997 01:29:51 +0800) - [Re: More on House Intelligence committee amendment on crypto](/archive/1997/09/c9cc666308c7fc678dcb44c7dc4e97455944e1084c99d67ce263ceff67dd0710) - _"William H. Geiger III"<EMAIL_ADDRESS>

license: MIT

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive


text:
---
layout: post
title: "RIP Doug Engelbart"
date: 2013-07-04 15:43
comments: true
categories:
---

Doug Engelbart passed away last night at age 88. I remember him as one of the names behind the beginnings of modern computers, inventing the mouse, hypertext, video conferencing and collaboration. But these were not the ends of his contributions, these were the *means* by which he tried to achieve [his intent](http://www.dougengelbart.org/pubs/augment-3906.html), to augment human intellect.

Too bad we use his inventions for Facebook, Twitter, Netflix, LOLCats and flame wars; we *degrade* human intellect.

The best way to remember him is this, written by [Brett Victor](http://twitter.com/worrydream) on his blog in [A few words on Doug Engelbart](http://worrydream.com/Engelbart/), (read it all):

{% blockquote %}
The least important question you can ask about Engelbart is, "What did he build?" By asking that question, you put yourself in a position to admire him, to stand in awe of his achievements, to worship him as a hero. But worship isn't useful to anyone. Not you, not him.

The most important question you can ask about Engelbart is, "What world was he trying to create?" By asking that question, you put yourself in a position to create that world yourself.
{% endblockquote %}

*Follow the author as [@hiltmon](https://twitter.com/hiltmon) on Twitter and [@hiltmon](http://alpha.app.net/hiltmon) on App.Net. Mute `#xpost` on one.*

extension: markdown

gha_language: JavaScript


text:
## EXPRESS-IMGBB

Express Middleware for imgbb

Supports multiple file uploads.

It uses the official imgbb API (https://api.imgbb.com/)

## HOW TO USE

### Server Implementation

```bash
npm install express-imgbb
```

```javascript
const { imgbb } = require('express-imgbb');
const express = require('express');
const path = require('path');
const app = express();

// dotenv is recommended to store the API Key.
const { config } = require('dotenv');
config();

// Because the image size is large, you need to increase the limit.
app.use(express.json({ limit: '32mb' }));

// Get an API key from the official website. (https://api.imgbb.com/)
app.set('IMGBB_API_KEY', process.env.API_KEY);

// See req['iResponses'] when going through the middleware.
// The type is 'ImgbbResponseArray'. Please refer to the document below.
app.post('/upload', imgbb, (req, res) => {
    const iResponses = req['iResponses'];
    // ... doing Something
});

```

### Client implementation (Web Browser - Vanilla JS)

#### imgbb Request Schema
---
```typescript
type ImgbbRequestArray = Array<{
    image: string, // [Required] URL OR Base64 Encoding
    name?: string, // [Optional] Custom Filname
    expiration?: string, // [Optional] uploads to be auto deleted after certain time (in seconds 60-15552000)
}>
```

#### imgbb Response Schema
---
```typescript

type ImgbbResponseArray = Array<{
    data: {
        id: string,
        title: string,
        url_viewer: string,
        url: string,
        display_url: string,
        size: string,
        time: string,
        expiration: string,
        image: {
            filename: string,
            name: string,
            mime: string,
            extension: string,
            url: string,
        },
        thumb: {
            filename: string,
            name: string,
            mime: string,
            extension: string,
            url: string,
        },
        medium: {
            filename: string,
            name: string,
            mime: string,
            extension: string,
            url: string,
        },
        delete_url: string
    } | null,
    success: boolean,
    status: number
    error: {
        message: string,
        code: number,
        context: string,
    } | null
}>;
```

When the request is complete, an array of results for each image will be returned. Note that it also includes results for failures. On failure, data is null and an error object is assigned.

#### Sending Image URL (Vanilla JS)
---

``` javascript
fetch('/upload', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
    },
    body: JSON.stringify({
        iRequests: [{
            image: 'https://via.placeholder.com/300/09f/fff.png',
            name: 'exmaple',
            expiration: 3600,
        }]
    }),
});
```

#### Sending Base64 Image (Vanilla JS)
---
```html
<input type="file" id="formFileMultiple" accept="image/*" multiple>
```
```javascript
// convert base64String
const formFileMultiple = document.querySelector('#formFileMultiple');
const iRequests = [];
// when file selected by the user
formFileMultiple.onchange = evt => {
    // get selected files from input element
    const files = evt.target.files;
    // for each file
    for (const file of files) {
        const fileReader = new FileReader();
        // convert base64 string
        fileReader.readAsDataURL(file);
        fileReader.onload = (evt => {
            // When the conversion is complete, write it on the form.
            iRequests.push({
                name: file.name,
                 // You need to remove the front part of DataURL.
                image: evt.target.result.split(',')[1],
            });
        });
    }
};
```

```javascript
// upload
fetch('/upload', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
    },
    body: JSON.stringify({ iRequests }),
});
```

repository: dark-gammaru/express-imgbb

branch_name: refs/heads/main

repo_name: dark-gammaru/express-imgbb


text:
# learngo
Study golang with sample code

# BabyStep
* [01_hello-world](https://github.com/MJ-Kim-dev/learngo/tree/master/01_hello-world)
* [02_Variables](https://github.com/MJ-Kim-dev/learngo/tree/master/02_Variables)
* [03_functions](https://github.com/MJ-Kim-dev/learngo/tree/master/03_functions)
* [04_control-statement](https://github.com/MJ-Kim-dev/learngo/tree/master/04_control-statement)
* [05_data-structures](https://github.com/MJ-Kim-dev/learngo/tree/master/05_data-structures)

# Projects
* [practice-structs](https://github.com/MJ-Kim-dev/learngo/tree/master/practice-structs)
* [practice-maps](https://github.com/MJ-Kim-dev/learngo/tree/master/practice-maps)
* [url-checker](https://github.com/MJ-Kim-dev/learngo/tree/master/url-checker)

# Funny
Write in go (song) - https://youtu.be/LJvEIjRBSDA

# How to use
Simple!
Just use command 'go run main.go'

If you want to run it on the website, click this
[![Run on Repl.it](https://repl.it/badge/github/MJ-Kim-dev/learngo)](https://repl.it/github/MJ-Kim-dev/learngo)

# Additional Resources
* [golang website](https://golang.org/)
* [golang book(korean)](http://pyrasis.com/private/2015/06/01/publish-go-for-the-really-impatient-book), source : [github](https://github.com/pyrasis/golangbook)

repository: MJ-Kim-dev/learn-Go

repo_name: MJ-Kim-dev/learn-Go


text:
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.2.0] 2020-10-18

### Added

- New option `indentSize` to customize how many space to use to write on the asset file.

### Fixed

- Calling the plugin without options will no longer throw an error.
- The JSON asset file will now correctly be written in the current directory where your gulpfile is working.

## [0.1.0] 2020-10-17

### Added

- First working version.

repository: khalyomede/gulp-revisioner

gha_language: TypeScript

repo_name: khalyomede/gulp-revisioner


text:
# ARIES - Low voltage smArt gRid dIscrete Event Simulator to Enable Large Scale Learning in the Power Distribution Networks
ARIES meant to enable large scale learning and easy smart grid applications design and testing. ARIES is designed according to object oriented best practices, and it is implemented in Python 3. ARIES is equipped with a REST API to actively interact with the simulations, it features a simulation results storage system based on a MongoDB database, and a event management system based on a redis in-memory data structure store used as message broker.

# Setup
1. Clone the repo
2.  Run `docker-compose up`

# Dependencies
To run the simulation you need to install Docker engine and also Docker compose.

repository: comnetstud/ARIES

gha_language: Python

repo_name: comnetstud/ARIES


text:
# Backend Services for the Data Donation Platform

## Requirements

You'll need a few things to get up and running for local development:

* Java 11 - see the [docs here](docs/java-11.md)
* Maven - for building the project
* Python - for running various scripts if needed
* Ruby - for rendering configuration files from templates
* Google Cloud SDK - for running pubsub locally
* Docker - for building images and optionally for running the test suite
* Vault - for secrets management

### Setting up Google Cloud SDK

We mainly use Google's [pubsub emulator][pubsub] for running Housekeeping
locally and for tests related to Housekeeping. If you have homebrew, you can
install the `google-cloud-sdk` cask. Otherwise, follow the instructions
[here][gcloud-install]. Once the SDK is installed, we can install the emulator:

```bash
gcloud components install --quiet
gcloud components install pubsub-emulator --quiet
gcloud components update --quiet
```

[pubsub]: https://cloud.google.com/pubsub/docs/emulator
[gcloud-install]: https://cloud.google.com/sdk/docs

### Setting up Docker

If you have homebrew, you can install the `docker` cask. Otherwise, follow the
instructions [here][docker-install]. The Community Edition should be enough.
Once you have docker install, make sure the docker daemon is up and running.

If you're on macOS, running docker commands should not require `sudo`. However,
Linux seems to require `sudo` by default. If you want to avoid using `sudo` or
becoming root under Linux, try adding your user to the `docker` group:

```bash
usermod -aG docker <username>
```

Additionally, if you're at the Broad:

* Register a new account on [dockerhub][], using your broad gmail
* Email help@broad and ask them to link your dockerhub account to the
  `kduxengineering` dockerhub group
* Log in to Docker using these credentials (run `docker login`)

[docker-install]: https://docs.docker.com/install
[dockerhub]: https://hub.docker.com

### Setting up Vault

If you have homebrew, the `vault` command line tool is available there.
Otherwise, [download the client][vault-dl] and make the executable available on
your PATH:

* Unpack vault and put its sole binary into a software directory (e.g., `/opt/vault`)
* Update the PATH variable
    * E.g. `echo 'export PATH=/opt/vault/vault:$PATH' >> ~/.bashrc`

Additionally, if you're at the Broad:

* Go to GitHub and create a personal access token (see the instructions [here][gh-vault])
* Store your token somewhere safe and accessible locally (e.g. `~/.github-token`)
* Set the `VAULT_ADDR` environment variable
    * E.g. `echo 'export VAULT_ADDR=https://clotho.broadinstitute.org:8200' >> ~/.bashrc`
* Authenticate with vault
    * `vault login -method=github token=$(cat ~/.github-token)`

[vault-dl]: https://www.vaultproject.io/downloads.html
[gh-vault]: https://broadinstitute.atlassian.net/wiki/spaces/DO/pages/113874856/Vault

## Getting Started

Sections below describe different aspects of the platform. Thus, this section
doesn't go deep into internals, it's just a set of instructions for quickly
making the platform up and running on a local machine. If you need to learn
more, read 'till the end of the file :)

For testing purposes, the platform can be run locally using a disposable
database, which is the default.

1. Clone the repository and step into it
    ```bash
    git clone git@github.com:broadinstitute/ddp-study-server.git
    cd ddp-study-server/pepper-apis
    ```
2. Render the configuration file (if you're on Linux, prepend `sudo` because this invokes docker)
    * `./api-build.sh v1 dev . --config`
3. Build the project
    * `mvn -DskipTests clean install -pl dss-server -am`

4. Copy the command-line flags from `output-build-config/local-java-props.txt`
5. Run the JAR
    * `java [the copied cmd line flags] -jar ./dss-server/target/DataDonationPlatform.jar`
6. Make sure the server has started
    * `curl -i http://localhost:5555`
    * You'll get a `404` but at least it verifies the server is responding

Lastly, setup your local environment with [checkstyle](docs/setting-up-checkstyle.md)
to follow established coding conventions.

## api-build.sh
The `api-build.sh` script helps with a few automation steps. Try the `--help` flag for more info.

### Options when building backend container
* `DEBUG` when set to `true`, will open up port 9786 and launch the backend with debugging enabled

### Running tests and main apps (DataDonationPlatform.java and Housekeeping.java) in intellij and mvn
After running `api-build.sh` (you ran that already, right?), take a look at the `output-build-config/local-java-props.txt`
file.  This file contains a bunch of `-D` vars that you'll need to put into either your
intellij run/debug profiles or your command-line `mvn` command.  When you use file paths from the `local-java-props.txt` file,
replace any relative paths with absolute paths.  Otherwise you may see errors about `java.lang.NoClassDefFoundError: Could not initialize class org.broadinstitute.ddp.util.ConfigManager`
due to static initializers failing to find necessary config values.

Before starting the tests or running the apps, you need to setup the coordinates for the pubsub emulator:
```
$ export PUBSUB_EMULATOR_HOST=localhost:8442
```

The you can run the tests on the command line.  Copy the `-D` vars from `output-build-config/local-java-props.txt` into the shell command,
replacing relative paths with the full paths on your machine.
```sh
$ mvn test [pile of -D vars copy-pasted from output-build-config/local-java-props.txt]
```

![intellij all tests configuration](docs/AllTests.png)

![intellij DDP main](docs/DataDonationPlatformMain.png)

You may need to set `JAVA_HOME` as an environment variable in Intellij manually, depending on whether/how your machine sets up java by default.

![pubsub emulator environment](docs/pubsub-environment.png)

### Testing API calls
In order to send a request to the service, you must obtain an `idToken` first
* Navigate to TestApp and log in using test user credentials
* Check the logs in the TestApp interface to see the JSON and get `idToken` contents
* It can be that a TestApp is down. In this case run Chrome, press F12 to enable Developer Tools and then:
    * Go to the Console tab and execute `localStorage.getItem('session_key')` or
    * Go to the Network tab and check the contents of the "Authorization" header
* Put the token to a file:
    * `$ echo "<token contents>" >> ~/token`
* Send a request using the token, for example:
    * `$ curl -H "Authorization: Bearer $(cat ~/token)" -v localhost:5555/pepper/v1/user/19i3-test-user-48f0/studies/TESTSTUDY1/activities`
* Check the response status, it shouldn't be 401 (you can get it if the token has expired or invalid)

## Databases
We track schema changes via liquibase, use mysql for local database, and google
cloudsql/mysql for our CI dev/test/staging/prod environments.

### Setting up a local mysql database
Beware that our cloudSQL databases require SSL, and if you don't enable SSL on your local mysql instance, you may
end up with surprises during CI builds. If you still want to disable SSL locally, append the following parameter to the
JDBC connection string (see the details on how to set it below):

```
useSSL=false
```

You'll need to download mysql for your local machine, make note of the
generated password during installation, create a separate schema in your
database, and create a new user for the database. (If you're on macOS, try
installing<EMAIL_ADDRESS>using Homebrew.)

Note that we use `utf8mb4` and NOT `utf8`.

1. [Download mysql](https://dev.mysql.com/downloads/mysql/) and note one-time share of root password

2. Read through the [install docs](https://dev.mysql.com/doc/refman/5.7/en/osx-installation-launchd.html)

3. Download a decent sql client, such as [mysql workbench](https://www.mysql.com/products/workbench)

4. Create a new local schema (the name is not important)
    ```
    CREATE DATABASE pepperlocal CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
    ```

5. Create a new user and grant privileges to it (you can skip this step if you use `root` MySQL user).
Note that the `RELOAD` priviledge is needed for some unit tests.
    ```
    CREATE USER '[your db user]'@'%' IDENTIFIED BY '[your db password]';
    GRANT ALL ON pepperlocal.* TO '[your user]'@'%';
    GRANT RELOAD on *.* TO '[your user]'@'%';
    ```

6. Add the following to the your MySQL server configuration file (`/etc/mysql/my.cnf` or `~/.my.cnf`):
    ```
    [mysqld]
    character-set-server=utf8mb4
    collation-server=utf8mb4_unicode_ci
    max_allowed_packet=32M
    skip-character-set-client-handshake
    ```

    Restart MySQL service after making changes (an Ubuntu Linux example):
    ```
    $ service mysql restart
    ```

    If you don't do that, MySQL won't handle Unicode strings properly (one of the manifestations are '???' symbols in the
    MySQL CLI output of internationalized strings). Since we support multiple languages, this is a must.

7. Update the _rendered_ secrets file `*.conf` (**not** `*.conf.ctmpl`), for example `output-build-config/testing-inmemorydb.conf`.
    ```
    "dbUrl":"jdbc:mysql://<IP_ADDRESS>:3306/pepperlocal?user=[your db user]&password=[your db password]&serverTimezone=[your time zone]"
    ...
    ```

Note that our `.gitignore` files will ignore your local changes to rendered secrets files.  This is
by design, so that we don't commit secrets to source code control.  If you re-render secrets between
builds, you will need to re-update your `*.conf` files with any local changes.

### Manually Connecting to CloudSQL (google's mysql)

Our cloud databases use SSL.  In order to connect, you must have the CA cert, the individual cert, and the key file.
Here's how to get them:

```
vault read -field=value secret/pepper/dev/v1/db-server-ca > cert.ca
vault read -field=value secret/pepper/dev/v1/db-client-cert > cert.crt
vault read -field=value secret/pepper/dev/v1/db-client-key > cert.key
```

Use these three files to configure MSQLWorkbench's connection like so:

![mysql cert configuration](docs/MySqlWorkbenchSSL.png)

Database coordinates are in the rendered `application.conf` file.

In addition to SSL and the username/password combination, you must also be on a Broad network in order to access the database or use VPN.

If you are using the MySQL CLI, connect using the password from the `pepper-apis/output-config/application.conf` and specifying certificates
(info on how to obtain them is given in the "Connecting to CloudSQL (google's mysql)" section above):

```
$ mysql -h [dev mysql server] -u[username] -p[password] --ssl-ca [path to cert.ca] --ssl-cert [path to cert.crt] --ssl-key [path to cert.key]
```

Alternatively, you can get credentials by reading the "dbUrl" property from Vault:

```
$ vault read -field dbUrl secret/pepper/dev/v1/conf
```

### CloudSQL Proxy

`DDP -> cloudsqlproxy -> cloudsql`

To avoid the complexity of keystore maintenance, we use google's [cloudsql proxy](https://cloud.google.com/sql/docs/mysql/sql-proxy).

This means that in order for the app to connect to one of our cloud databases, you must install **and run** the proxy
on your machine whenever you want DDP to connect to a cloud database.

The proxy introduces a level of indirection, so make sure you know **what the proxy is pointing at _before_** you connect your client.  Because your client will connect to something like `<IP_ADDRESS>:3306`, you can't tell from your client what database you're actually
connecting to.

**Please always check where the proxy is pointing to so that you don't connect to the wrong database**.

After installing the proxy, you can run it by passing in the value of the `CLOUDSQL_CONNECTION_LIST` variable in the rendered
[output-config/sqlproxy.env](output-config/sqlproxy.env) file, along with the path to the rendered service account like so:

```
./cloud_sql_proxy -instances=[value of CLOUDSQL_CONNECTION_LIST var]
-credential_file=[path-to-your-pepper]/output-config/sqlproxy-service-account.json
```

### Importing the `dev` MySQL database into your environment:

Sometimes it's necessary to use the `dev` data in your local environment (e.g. for reproducing an issue found in `dev`). In order
to do that, one should import the `dev` database dump:

1. Create the dump:

```
$ mysqldump -h [dev mysql server] -u[username] -p[password] --ssl-ca [path to cert.ca] --ssl-cert [path to cert.crt] --ssl-key [path to cert.key] --extended-insert=false pepperdev > [path to sql file]
```

2. Re-create your local database in the MySQL CLI:

```
mysql> drop database ddp;
mysql> create database ddp;
```

3. Import the dump into your local database:

```
mysql> use ddp;
mysql> source /path/to/dump.sql;
```

## Security
We take security very seriously.  We use Auth0 and JWTs to help manage authn and
authz.  It is up to us as developers to ensure that every route is properly protected.

### SQL
We keep our sql statements in `src/main/resources/sql.conf`.  Portability of
SQL is very important, as we test locally against hsqldb or mysql, but deploy to CI
 and production using cloudSQL/mysql.

### Global and Test-Specific Changelogs
At startup time, the "global" changelogs are run.  Global changelogs are those
changelogs that apply to all environments--dev, test, qa, prod, etc.  Sometimes, however,
you want to mess with the database in specific ways for specific tests, outside
of production.  Changelogs that are test-specific are stored in `test/resources/db-testscripts`
and are run on-demand _only by the test cases that need them_.  These changlogs are applied
in the test environment _after_ the global changelogs are applied.

## Testing Deployed Routes
To run tests against deployed instances, you have two options: either spin up
a server as part of your test by extending `TestStartupUtil` or point your
test at a previously-deployed instance.

`TestStartupUtil` is a utility that will boot a server in a separate process
exactly once during any kind of test run.  Use this utility for rapid local
iteration.  To enable it, set `-Dddp.testing.bootAppLocally=true`.  Without this flag,
the app will not be booted.  By leaving the flag off, you can run the same
tests against a different deployment, thereby keeping the tests the same 100% the same
 (including liquibase) but pointing them at a different server instance.

## What's with the gigantic `IntegrationTests` class?
It's enormous so that we only boot the appserver once for all integration tests, which
means that execution time for integration tests should be much quicker.  This might need to
be revisited when we start to bring in DI tools like guice and mocks.

## Testing is an activity orthogonal to the environment
One can test things locally, in the dev environment, and in the test environment.
There are _testing_ configuration files that instruct the tests how to operate
in a way that is compatible with the environment.

## Editing `/etc/hosts`
You may find it useful to connect to a local build, using the full docker deployment,
including nginx certs.  To do this in such a way that you don't run afoul of SSL validation,
you'll want to edit your `/etc/hosts` file like so:
```
sudo emacs /etc/hosts
...point pepper-dev.datadonationplatform.org at <IP_ADDRESS>...
sudo killall -HUP mDNSResponder
```

## Auth0 Integration, Rules, Authn, and Authz
We use auth0 for identity management.  We augment auth0's JWT id token during login
via rules that run inside of auth0.  The source for the rules [is here](rules).

While we use auth0 for authentication (authn), we use in-app authorization (authz)
instead of adding extensive authz claims to our JWTs.  We do this primarily because
we want up-to-date ACL data without the hassle of re-issuing JWTs when ACLs change.

When a user logs in, just before a JWT is returned to the client, the auth0 rules fire
and connect to a deployed instance of pepper to register the user (if they haven't
signed up already) and add the pepper user guid to the JWT.  Due to firewall
restrictions, sometimes we need to mock the connectivity between auth0 and pepper.
This mocking is controlled by client metadata in auth0.  The `mockRegistration` value
(boolean) controls whether or not the rule will use mock data or connect to a real
pepper endpoint.  If set to `true`, the `overrideUserGuid` value (String) will be
added to the JWT.  By changing the client metadata, you can change what gets
added to the JWT without requiring a live connection between auth0 and a deployed
instance of pepper.

# Housekeeping
You would need to run Housekeeping to send out emails and create the PDFs.

You need to create th schema first (name does not matter)
```sql
 CREATE DATABASE housekeepinglocal CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
```
Grant access to your user
```sql
GRANT ALL ON housekeepinglocal.* TO '[your user]'@'%';
```
Add the following line to your `testing-inmemorydb.conf` config
```
"housekeepingDbUrl": "jdbc:mysql://<IP_ADDRESS>:3306/housekeepinglocal?user=[your user]&password=[your password]&serverTimezone=UTC",
```
Run Housekeeping.java with the following vm environment
```shell
-Dconfig.file=output-build-config/testing-inmemorydb.conf
```

repository: broadinstitute/ddp-study-server

branch_name: refs/heads/develop

gha_language: Java

repo_name: broadinstitute/ddp-study-server


text:
---
layout: post
title: "Printed Pi on Consul 254 teletype"
---

Used faster relay instead of trying to fix the teletype
output with RC chain.

Added output to Pi calculation program:

[![](https://img.youtube.com/vi/HqMfZEPkGQE/0.jpg)](https://www.youtube.com/watch?v=HqMfZEPkGQE)

repository: Dovgalyuk/Relay

repo_name: Dovgalyuk/Relay


text:
# Isodigify

SaaS Webdesign inspired by the business model of Netlify

[Isodigify](https://isodigify.oguzbits.com/)

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

### Installing

1. Clone the repo

```
git clone https://github.com/oguzbits/isodigify.git
```

2. Run npm install inside project root directory

```
npm install
```

3. Start the server

```
npm run start
```

4. Explore

```
Enjoy! :)
```

## Built With

- [React](https://reactjs.org/) - The JavaScript framework used
- [SASS](https://sass-lang.com/) - CSS Pre-Processor

## Contributors

- **Oguz Öztürk**

## License

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

repository: oguzbits/isodigify

repo_name: oguzbits/isodigify


text:
# Multipart Upload API

OSS service support more than one ways to upload files. Besides `put_object`, user can upload files through 'Multipart Upload'. It supports 'broken-point continuingly-transferring', so it's very suitable in these scenarios:

* Needs support of broken-point continuingly-transferring.
* Large file with size exceeded 100MB.
* Terrible Networking condition.
* File size not determined.

---

* Multipart Upload
  * Initialize a multipart upload event
  * Upload an object part
  * Copy an object part
  * Complete a multipart upload event
  * Abort a multipart upload event
  * List all multipart upload events in a bucket
  * List parts of an object

#### Initialize a multipart upload event
Before upload parts of the file you need to upload, you have to initialize a multipart upload event.
```ruby
# method signature
init_multi_upload(bucket, object, headers = {})
```
```ruby
res = oss.init_multi_upload('bucket-name', 'object-name')
p res.status # => 200
p res.xpath("//UploadId") # => '0004B9894A22E5B1888A1E29F8236E2D'
```

'UploadId' is the identifier of the multipart upload event, you'll need it later operations.

#### Upload an object part
```ruby
# method signature
upload_object_part(bucket, object, body, upload_id, part = 1)
```
```ruby
res = upload_object_part('bucket-name', 'object-name', 'String Content of Part 1', '0004B9894A22E5B1888A1E29F8236E2D', 1)
p res.status # => 200
```

#### Copy an object part
`upload_object_part_copy` allows user to copy an existed object as a part of the multipart upload object. And objects large than 1GB must be copied through this method.

Note:
  * Each part must large than 100KB except the last part.
  * Valid range of part number: 1~10000.

```ruby
# method signature
upload_object_part_copy(source_bucket, source_object, target_bucket, target_object, upload_id, part = 1, headers = {})
```
```ruby
res = upload_object_part_copy('target-bucket-name', 'target-object-name', 'target-bucket-name', 'target-object-name', '0004B9894A22E5B1888A1E29F8236E2D', 2)
p res.status # => 200
```

#### Complete a multipart upload event
After finishing uploading parts, you have to call `complete_multi_upload` to finish the multipart upload event.

```ruby
# method signature
complete_multi_upload(bucket, object, upload_id, parts = [])
```
```ruby
res = oss.complete_multi_upload(
  'bucket-name', 'object-name', '0004B9894A22E5B1888A1E29F8236E2D',
  [{
    part_number: 1,
    etag: "172F5D31191B965FE8CCB5A0F5BECD9A"
  }, {
    part_number: 2,
    etag: "172F5D31191B965FE8CCB5A0F5BECD9A"
  }]
)
p res.status # => 200
```

#### Abort a multipart upload event
Sometimes you need to abort the upload event, this is where `abort_multi_upload` come into play.

```ruby
# method signature
abort_multi_upload(bucket, object, upload_id)
```
```ruby
res = oss.abort_multi_upload('bucket-name', 'object-name', '0004B9894A22E5B1888A1E29F8236E2D')
p res.status # => 204
```

#### List all multipart upload events in a bucket
You can get all unfinished multipart upload events through `list_multi_upload`.

```ruby
# method signature
list_multi_upload(bucket, headers = {})
```
```ruby
res = oss.list_multi_upload('bucket-name')
p res.status # => 200
```

#### List parts of an object
Sometimes you need to view the parts that have been uploaded successfully during a multipart upload event.

```ruby
# method signature
list_object_parts(bucket, object, upload_id, headers = {})
```
```ruby
res = oss.list_object_parts('bucket-name', 'object-name', '0004B9894A22E5B1888A1E29F8236E2D')
p res.status # => 200
```

repository: serco-chen/oss-ruby

repo_name: serco-chen/oss-ruby


text:
---
title: "Newsletter - TPRCiC 2020"
author: Todd Rinaldo
type: post
date: 2020-04-17 00:00:00 +0000 UTC
url: "/post/tprcic-newsletter-2020-04-17"
categories:
 - Conferences
 - Meetings

---

# In this issue:
* Round 2 Call for Talks is open now! Due May 02, 2020 00:01 UTC
* About the Conference in the Cloud
	* Cost, Timing, Platform
* Be part of it all - Organizer spots open!
	* Volunteers needed
* How to Reach Us

# Call for Talks - DUE May 02, 2020 00:01 UTC
Our second and final round of talk submissions ends May 2 at 00:01 UTC. Submit your new talk topics or expansions to past talks! https://www.papercall.io/tpc20cic. Since this is an online conference, we will not accept talks for which there are existing recordings unless the submitter plans to significantly change them for this conference.

# About the Conference in the Cloud
In 2020 we’ll be hosting a special virtual conference on June 24 - 26. The 2020 Perl and Raku Conference in the Cloud uses hashtag #TPRCiC, so if you see #TPRCiC around on social media, that’s our tag for the conference.

At the Conference in the Cloud, expect to see Perl and Raku presentations. Core presentation topics in the past have included Perl 5 and Perl 6 (now Raku) and organizers are hopeful to continue the same way moving forward. The Conference in the Cloud, just like The Perl and Raku Conference, is organized and run by volunteers. Presentations are also given by volunteers. The presentations at the conference will be submitted during our Call For Presentations (CFP) and selected by organizers who volunteer to be on our talks-committee. We plan to have 2 or more tracks at this event with presentations (20-50 minutes long) on a variety of technical topics throughout each day.

# Registration Cost
Attendees who want to interact live with speakers and other attendees (during [BOFs](https://github.com/perlconference/tpc-2020-cloud/wiki#bofs), panels, and Q&A) will need to pay a minor registration fee of $10.00. The $10.00 fee is inclusive of the entire event. This fee will help secure a safe event, and help cover the minor costs of hosting it.

# Anticipated Conference Time
In order to accomodate the most time zones possible, we have decided to go with 11AM to 6PM EDT or 15:00 to 22:00 UTC. You can use this [world clock meeting planner](https://www.timeanddate.com/worldclock/meetingtime.html?month=6&day=24&year=2020&p1=224&p2=179&p3=16&p4=240&p5=248&iv=0) to visualize what this looks like for your time zone.

# Hosting Platform
The Perl and Raku Conference in the Cloud (TPRCiC) is going to be an online, interactive event hosted on the Zoom platform. The broadcast will be recorded and streamed simultaneously to [YouTube](https://www.youtube.com/yapcna).

The conference organizers had a few goals in mind when selecting an online platform to host the Conference in the Cloud. The selected platform needed to have easy-to-use tools for administrators, as well as participants of all technical levels. It needed to offer operating support not only for macOS and Windows, but also for Linux operating systems. Given the planning time constraints and nature of the conference, organizers decided a ready out of the box solution is the best choice.

It is known that there are security and privacy concerns with the Zoom platform. TPRCiC organizers are going to do their best to set the platform up as safely as possible, while Zoom continues to improve the security of their platform. TPRCiC will be configured so that only the presenter has ability to talk and present. All others will be muted and will need to request access to speak (to ask a question or make a comment) or share video.

Access to the interactive conference on Zoom will only be granted to people who register in advance, agree to the Code of Conduct, and pay a $10 registration fee for the whole conference. Presentations will be streamed live to [YouTube](https://www.youtube.com/yapcna) so those who can’t pay the fee or won’t use Zoom, can still access most conference content. [BOFs](https://github.com/perlconference/tpc-2020-

repository: oalders/tpf-news

repo_name: oalders/tpf-news


text:
# Detour into learning on the wards

This blog is in the works. Its a compilation of lectures and notes that have been useful throughout training thus far.

## Contents

- [Setup](#setup)
- [Development](#development)
- [Author](#author)
- [License](#license)

## Setup

This site is developed through Jekyll and uses the Hyde theme. It uses the **jgd** gem for creating a new **gh-pages** branch to publish the site, as Github pages fails to build with external plugins.

## Development

*Ultrasound Reckoning* has two branches.

- `master` for development, including literature review and image processing
- `gh-pages` for the hosted site, built in real time using the *jgd* gem

## Author

**Anish Shah**
- <https://github.com/asshah4>

## License

Open sourced under the [MIT license](LICENSE.md).


text:
# nbds_colab
> Literate programming for data science using nbdev, Jupytemplate and Google Colaboratory

nbds_colab is a template repository for small to medium sized data science projects which use the nbdev programming system from within Google Colaboratory. It combines the best features of the following to give quick project start-up followed by a complete low friction workflow, from first code to package release:

* Fastai.nbdev - exploratory programming, automated documentation generation, integrated testing and easy PyPi package release [nbdev](https://github.com/fastai/nbdev//)

* Google Colaboratory & Drive - low cost cloud computing with acceleration [Colaboratory](https://colab.research.google.com/)

* Jupytemplate - standardized notebooks for data science [xstreamsrl Jupytemplate](https://github.com/xtreamsrl/jupytemplate)

* Full GitHub integration

## Getting started

The following assumes a working knowledge of the nbdev exploratory programming system, Jupiter notebooks, Google Colaboratory (Colab), Google Drive and GitHub. For more information on nbdev read the [nbdev documentation](http://nbdev.fast.ai/) and on how nbdev works with Google Colaboratory, the [nbd_colab docs]((https://github.com/hallmx/nbd_colab).

* Make sure you are logged in to your GitHub account then click [nbds_colab_template](https://github.com/hallmx/nbds_colab/generate) to go to the template repo on GitHub. Enter a name for your project and click 'Create repository from template'. A new repo based on the template will be created in your GitHUb.

* From GitHub, edit the `settings.ini` file of the new repo with your own personal and package information as described in the nbdev [documentation](http://nbdev.fast.ai/) and [tutorial](http://nbdev.fast.ai/tutorial/). Add any dependencies to the 'requirements' setting (`requirements = dep1 dep2` etc) with multiple requirements separated by a single space. A set of test_flags have already been added (`tst_flags = test_flag_colab|test_flag_deps|test_flag_GPU|test_flag_slow|test_flag_large|test_flag_other`). These can be customized if needed. Commit the new `settings.ini` to save the changes.

* Activate GitHub Pages to display automatic documentation: click on 'Settings', then scroll down to GitHub Pages and select 'master branch/docs folder'. Edit the repo description by adding the auto-generated GitHub Pages link to the box next to the repo description at the top of the page.

* Finally, clone the new repo to your Google Drive. A detailed description of how, and helpful tools to accomplish this, are provided by nbds-colabs's sister library, nbd_colab. The nbd_colab [documentation](https://github.com/hallmx/nbd_colab) will guide you through installing nbd_colab and then cloning the new repo to your Google Drive as well as configuring it for GitHub integration.

Once cloned and configured on your Google Drive, the template repo now becomes the project template its own project directory and has full GitHub integration. Out of the box, the project notebooks are set up to support automatic documentation generation and integrated testing courtesy of nbdev. Every time you work with a notebook you just have to remember to run the cells at the top of the notebook to mount Google Drive, pip install nbdev and fastcore, and `%cd` into the project directory. These cells are flagged `#hide`, so they don't appear in the automated documentation.

## Project template.

The project template is structured to allow small to medium sized data science projects to be broken down into manageable units, each with its own notebook. You can put anything anywhere but if you are going to run with the already established project structure,  our idea of what should go where is as follows:

* `00_core`: core functionality for the project (optional).

* `01_dstemplate1` - `03_`: data science templates to edit with the main project code.

* `04_` - `07_` add more notebooks as required!

* `08_ensemble1` - `09_`: code to create model ensembles from the output of `01_dstemplate` to `03_`.

* `10_final`: bring it all togather in the final project model or result.

* `11_common`: code, classes and functions shared between template files.

* `12_vis`: shared code for data visualization

* `13_dataproc`: shared data processing , preprocessing and feature engineering functionality

* `14_data`: data acquisition, initial processing and source description(s)

* `15_refs`: place all the project references and citations in one place for quick lookup

## Customizing the project template

Before the first commit and push to GitHub is a good time to customize the template for your particular project.

* Delete unwanted notebooks (simply remove them from Google Drive) and add new notebooks (see the nbd_colab documentation on how to do this) so that the repo has the desired project structure.

* You can rename the 'dstemplate', 'ensemble' and 'final' notebooks to something more meaningful for your project but remember to keep the nbdev naming convention of progressive double digits following by the new name. If you work in a team, also including the authors initials - so something like, e.g. '00_AB_data_exploration.ipynb' or 'AB_00_data_exploration.ipynb'. Don't forget to ammend any associated import statements to the new name as well!

* Update all `#default_exp` flags with the new notebook name and don't forget to update all local imports similarly. Remove unwanted imports and add new ones as required.

* Uncomment the `%cd command` just below library installs and change the placeholder text to the name of the project directory. Run this cell every time you reload the notebook so that local imports work as expected.

* Customize test_flags for development. As well as the built in `all_flags` the template ships with the following custom test_flags: `test_flag_colab`, `test_flag_deps`, `test_flag_GPU`, `test_flag_slow`, `test_flag_large`, and `test_flag_other`. Use these or create your own by editing settings.ini.

Now you can build the project library with `nbdev_build_lib` and documentation with `nbdev_build_docs` as described in the nbdev [documentation](http://nbdev.fast.ai/) and [nbd_colab docs](https://github.com/hallmx/nbd_colab). Don't forget to check for any diffs with `nbdev_diffs_nbs` and run tests with `nbdev_test_nbs`. If all is well, push the customized template with an 'init commit' message, or the like, to GitHub. After pushing, go to the remote repo's GitHub Pages and you should be able to view the starter documentation for you project!

## The data science templates

The data science templates are adapted from [xstreamsrl's jupytemplate](https://github.com/xtreamsrl/jupytemplate) project, where the aim is to provide a greater degree of structure and standardization to data science projects. Here we take the natural next step and place them into a literate programming environment. Dive in and edit them as needed for your project.

## The project life cycle

There is a certain life cycle to projects developed with nbdev and Google Colab.

1. Edit notebooks as required. Each Colab notebook must install and import all it's own dependencies.

2. Write tests and documentation straight into the notebook alongside (well above or below!) related code.

3. Consider which cells should be exported as .py scripts, which should be included in the documentation etc and add  appropriate flags to the top of cells.

4. Review cell outputs - some you will want to show in the documentation and some you will want to hide by collapsing the output box in Colab.

5. When done, check the notebook can run independently top to toe.

6. Build the library, build the documentation and check for diffs

7. Run tests with `nbdev_test_nbs`. Debug failing code and notebooks. Use test_flags to customizer testing where needed.

8. Push the new version to GitHub. Check the GitHub Actions panel for any problems during the push and review the rebuilt documentation on GitHub Pages.

9. Repeat the cycle until the project is finished.

10. New package versions can be released on PyPi with a few simple commands

This may seem complicated at first but very soon you get into the swing of it and most report greatly increased productivity after the initial learning curve. If anything is unclear the best place to go is the nbdev [documentation](http://nbdev.fast.ai/) and nbd_colab [guide](https://github.com/hallmx/nbd_colab). Still stuck, try the nbdev threads on the [fastai forum](https://forums.fast.ai/) .

## Articles.

[nbdev: use Jupyter Notebooks for everything](https://www.fast.ai/2019/12/02/nbdev/), Jeremy Howard, Dec 02 2019.

[Introducing jupytemplate: configurable templates for Jupyter](https://towardsdatascience.com/stop-copy-pasting-notebooks-embrace-jupyter-templates-6bd7b6c00b94), Emanuele Fabbiani, Feb 4th 2020.

gha_language: Jupyter Notebook


text:
# pisteppers
simple code to drive stepper motors from a raspberry pi with good performance and minimal extra hardware.

This code use pigpio waves to drive gpio pins allowing fine cntrol of rampup speed on the steppers.

It is set up to drive steppers through a basic controller such as a Pololu A4988 as described in blog post linked below.

By using pigpio waves, jitter and timing glitches are minimal allowing the motors to be driven at pretty much their best possible speed, depending on the type of stepper and the load.

More background in blog post here: http://morepootling.blogspot.co.uk/2017/04/final-updates-on-driving-stepper-motors.html

The module runs in a simple python select framework, and a socket is used to control it with various basic commands.

license: Unlicense

repository: innot/pisteppers

repo_name: innot/pisteppers


text:
# Virtual Analog (VA) Compressors

This is the repo for my Master's thesis.

## Contents
- *SOUL/* - single-file library and extra .soul files for testing
- *Thesis_ZheDeng_2021_Revised.pdf* - thesis on character compressor design; please read if interested in the mathematics behind the *VA.soul*

**This is repo contains *depercated* code. Please refer to [my VA library](https://github.com/thezhe/SOUL-VA) for an updated version of *VA.soul*.**

repository: thezhe/VirtualAnalogCompressors

repo_name: thezhe/VirtualAnalogCompressors


text:
---
layout: post
title:      "Couch to 5k React Edition"
date:       2021-05-25 01:20:36 +0000
permalink:  couch_to_5k_react_edition
---

A couple weeks ago, I mentioned that I was going to explain a little bit of the transition from Vanilla JavaScript over to using React.js. In that [post](https://brycew30.github.io/making_the_transition_from_vanilla_js_to_react), I talked about some useful topics to be extra familiar with to make your life a little bit easier when learning React, such as arrow functions and the ternary operator. I called this post the Couch to 5k because it will give a little bit (plus resources) of a lot of information, and it's up to you to take it and run with it!

Now, I think it's time to dive into React.js a little bit! We previously talked a little bit about the "what" of React, so that leads us to the next question:

## Why Use React?
I think this is a logical first step in branching out to a new library/framework/language. The question, in reality, is usually: what are the strengths of using it compared to not using it/using something else. React's specialty is helping create Single Page Applications (SPAs). While you don't *need* to import the React library to create a solid SPA (I'm wincing as I type that, because my JavaScript project seemed to get more and more confusing as I added features to it), your life becomes significantly easier and more organized as you start to add more and more buttons, forms, etc for functionality.

### That's because of COMPONENTS!

[Components](https://reactjs.org/docs/components-and-props.html) are pieces of code that are able to be reused, which lets you think of parts of your code as pieces of the puzzle rather than trying to solve the whole thing in one go. That's where you'll find the magic of React, and why it became so popular so quickly after being created by Facebook. In a Vanilla JavaScript SPA, a small change in code will cause you as a developer to have to check multiple places to make sure you didn't accidentally break your app (spoiler alert: you most likely did); however, if your code is broken down into components using React, your code will most likely work the same as before due to the components' individuality. I really like [this](https://www.youtube.com/watch?v=fd2Cayhez58&ab_channel=LearnCode.academyLearnCode.academy) video from LearnCode.academy of a short and sweet explanation of components and rendering with React.

### Virtual DOM
Another really nice feature of React is the Virtual DOM, which essentially means your browser takes a screenshot of the page and compares to the updated screenshot if something is updated, and is then able to just change that one updated piece rather than have to refresh the whole page. The biggest win here comes in performance as your SPA grows in size.

### Support
A lesser talked about feature for React (in my experience) is that its [huge popularity](https://insights.stackoverflow.com/survey/2020#technology-most-loved-dreaded-and-wanted-web-frameworks-loved2) has given users tons of space to ask questions and get help. As someone starting to learn React in 2020/2021, I've really benefited from all of the answers to questions before me that I have needed help with that someone else ran into as well.

## How?
### JSX
React utilizes [JSX](https://www.w3schools.com/react/react_jsx.asp), which converts HTML tags into React elements. It makes `const greeting = <h1>Hello World</h1>` into usable code by compiling.

### Create-React-App
Now that we've learned a little bit about React as a library, it's time to get your SPA up and running. With the help of [Node](https://nodejs.org/en/), just type:
```
npx create-react-app app-name
cd app-name
npm start
```
[Create-React-App.dev](https://create-react-app.dev/docs/getting-started/) allowed me to copy over this really helpful outline of the file structure generated with this command:
my-app
```
├── README.md
├── node_modules
├── package.json
├── .gitignore
├── public
│   ├── favicon.ico
│   ├── index.html
│   ├── logo192.png
│   ├── logo512.png
│   ├── manifest.json
│   └── robots.txt
└── src
    ├── App.css
    ├── App.js
    ├── App.test.js
    ├── index.css
    ├── index.js
    ├── logo.svg
    ├── serviceWorker.js
    └── setupTests.js
```
And now you already have a working SPA! This will specifically give you a working frontend for your application to use with a backend if you'd like.

Now all that's left is creating an app (or 20) and playing around with JSX, components, and all of the other gifts React presents to take all that Vanilla JavaScript knowledge we've practiced over the last several weeks and get really creative with it!

![](https://media.giphy.com/media/celii7i9UMbW1uG41B/giphy.gif)


text:
# buildJetsonTX1Kernel
Scripts to help build the kernel and modules onboard the Jetson TX1

These scripts are for building starting from a fresh flash of L4T 24.2 on a NVIDIA Jetson TX1.

getKernelSources.sh

Downloads the kernel sources for L4T 24.2 from the NVIDIA website, decompresses them and opens a graphical editor on the .config file.

patchAndBuildKernel.sh

Applies patches to the kernel, adds 32-bit precompiled compoents, and then compiles the kernel and modules using make.

copyImage.sh

Copies the Image and zImage files created by compiling the kernel to the /boot directory

Note: that you may want to save the newly built Image, zImage and modules to external media so that can be used to flash a Jetson image, or clone the disk image.


text:
Welcome to another issue of Haskell Weekly!

This is a weekly summary of what's going on in its community.

## Featured

- [A defense of laziness in Haskell, Part 1: Prologue](https://www.youtube.com/watch?v=fSqE-HSh_NU) by Alexis King
> Laziness is a critical but often maligned aspect of Haskell, and as this video argues, it is frequently misunderstood.

- [GHC 9.8.1-alpha2 is now available](https://discourse.haskell.org/t/ghc-9-8-1-alpha2-is-now-available/7258) by Ben Gamari
> The GHC developers are very pleased to announce the availability of the second alpha prerelease of GHC 9.8.1.

- [GHC activities report: June–July 2023](https://well-typed.com/blog/2023/08/ghc-activities-report-june-july-2023/) by Well-Typed
> This is the nineteenth edition of our GHC activities report, which describes the work on GHC and related projects that we are doing at Well-Typed.

- [Haskell Language Server <IP_ADDRESS> is now available](https://discourse.haskell.org/t/ann-haskell-language-server-2-1-0-0-is-now-available/7272) by Fendor

- [Haskell vs Zombies](https://www.channable.com/tech/haskell-vs-zombies) by Channable
> We wanted to build a system that prevents orphaned subprocesses from escaping, and makes sure terminating a job also terminates all subprocesses that are potentially associated with it.

- [How to learn language extensions](https://discourse.haskell.org/t/how-to-learn-language-extensions/7252)
> I’m relatively new to Haskell (although I was a programmer for 39 years), and I find the way some language extensions are documented to be rather opaque.

- [Important things to know about writing good haskell code](https://discourse.haskell.org/t/important-things-to-know-about-writing-good-haskell-code/7302)
> What do you think is important to know in order to write good Haskell code?

- [The Meaning of Monad in MonadTrans](https://www.parsonsmatt.org/2023/08/10/the_meaning_of_monad_in_monadtrans.html) by Matt Parsons
> At work, someone noticed that they got a compiler warning for a derived instance of MonadTrans.

## Jobs

- [Systems Haskell Engineer at SimpleX Chat](https://www.linkedin.com/jobs/view/3670109632) (ad)
  > SimpleX Chat is a fully open-source, private and secure messaging platform. It is the first, and it seems the only, messaging network that does not have any kind of user identity in its design (not even random numbers) - it uses anonymous pairwise identifiers instead.

Trying to hire a Haskell developer?
You should [advertise with us](https://haskellweekly.news/advertising.html)!

## In brief

- [CLC Election September 2023](https://discourse.haskell.org/t/clc-election-september-2023/7262) by Bodigrim
> CLC seeks nominations for a vacant seat.

- [Haskell CI Group meeting notes](https://discourse.haskell.org/t/haskell-ci-group-meeting-notes/7315) by Bryan Richter
> Last week I hosted the first Haskell CI Group meeting. Notes from the meeting and other details are now available at the Haskell CI Group repository.

- [Haskell Foundation DevOps Weekly Log, 2023-08-16](https://discourse.haskell.org/t/haskell-foundation-devops-weekly-log-2023-08-16/7321) by Bryan Richter
> The main highlight of the last week was the Haskell CI group meeting, which took place last Thursday.

## Show & tell

- [keuringsdienst - Data validation in Haskell with composable rules (monoid)](https://hackage.haskell.org/package/keuringsdienst) by Josep Bigorra
> There exist many data validation packages, in Haskell and other languages, but so far I have never found something that was flexible but powerful enough for my needs.

- [Three configurable prettyprinters](https://reasonableapproximation.net/2023/08/10/three-configurable-prettyprinters.html) by Phil Hazelden
> I've been exploring a new-to-me approach to stringification. Except that right now it's three different approaches that broadly share a common goal. I call it/them pretty-gist.

## Call for participation

- [Survey for Visually Impaired Programmers (18+)](https://hde.design/research/dev-vis/) by smm_research
> Are you a software developer/engineer who uses a screen reader? If so, then we could use your input on the development processes and tools you use while developing software.

- [hapistrano: Compress binary file](https://github.com/stackbuilders/hapistrano/issues/223)
- [swarm: Add CLI option to really quit the game on Quit](https://github.com/swarm-game/swarm/issues/1423)

repository: haskellweekly/haskellweekly

branch_name: refs/heads/haskellweekly

gha_language: Haskell

repo_name: haskellweekly/haskellweekly


text:
# math-done-write-page

Math Done Write application landing page based on [Jekyll-Uno](https://github.com/joshgerdes/jekyll-uno)

---

### Copyright and license

It is under [the MIT license](/LICENSE).

repository: skuzniar/math-done-write-page

repo_name: skuzniar/math-done-write-page


text:
##### tags: `#COVID19` `#I2We20` `#HacktheCrisis` `#save_communities` `#EUvsVirus` `#COVIDathon` `#cohesion` `#community` `#cooperation` `#collaboration` `#efficiency` `#permaculture` `#sustainability` `#eco-friendly` `#self-sufficient` `#cryptography` `#holochain` `#DID` `#DAC`

# 🌻 ***CoNetRes*** the independent *Community Network Resource Mapping* toolkit
*Community Network Resource Mapping* software it's a toolkit that provides a big picture of the **supply**, **support**, and **aid** **capacity and needs** of a community, to support effective and efficient **collaboration** inside and between communities.

---

## ⭐ Features

- Using *CoNetRes* any community member can start multiple virtual communities and define tags as references to be able to connect globally through matching.
- Using *CoNetRes* anyone can share and request any kind of resources anonymously within their communities and/or make publicly available in the name of the community.

`✌ cross-platform document-oriented database editor with higly customizable predefined templates`

---

### The toolkit
… can be used to build [progressive web applications](https://en.wikipedia.org/wiki/Progressive_web_application) for resource mapping, on most of the digital platforms, and using gateways in special needs (SMS, Nat, IoT).

### The data
- is collected using [sociocybernetic](https://en.wikipedia.org/wiki/Sociocybernetics) techniques,
- stored in MongoDB using [decentralized identity and access management ](https://iop-stack.iop.rocks/dids-and-claims/specification/#/dac) with GDPR compliant privacy and data security,
- aggregated through APIs (in relevant cases) and open protocols like [Murmurations](https://murmurations.network/);
- the data collection and actualization is incentivized using *ThankYou points*,
- validated by the community with the help of embedded *personal value formula variable* (advanced reputation system)
- processed with [data anonymization](https://en.wikipedia.org/wiki/Data_anonymization) using decentralized IDs (DIDs).
- The data owner (User/Community) fully controls the stored data and accessibility.

### Authentication
… can happen through
- the main contact channels (email, phone, social),
- OAuth as secure delegated access,
- cryptographic hash function with mnemonic

### Use case

![simple-use-case-diagram.svg](https://raw.githubusercontent.com/eapo/CoNetRes/master/simple-use-case-diagram.svg)

---

## 🔥 Story

I came up with this idea when I realized:
> The globally **failing *economic*, *political* and *social institutions*** induce bottom-up collaborations, because fixing our problems from above **does not provide lasting solutions** to our needs anymore.

We need secure tools and effective methods for **efficient allocation of resources**, because today independent communities lack technology to *collect*, *process*, and *share* their available resources, as well as the resources in need.

We started to develop an open-source **resource mapping solution** done in an *independent* and *collaborative* way, with *anonymous data collection* and *secure information management*, which are key roles today! We are developing a **highly customizable open-source toolkit** for this.

In a *collaborative society* all *independent communities* need to have any resources to **do their best** and be able to communicate **without boundaries** in a secure way.
Example: Local farmers can map and share their available machinery and ask for unused organic materials, then others farmers doesn't need to buy and maintain those expensive tools and can give back materials to increase fertility. In the same time a small gardener will know where to go for a good compost and where to send her kids to learn about growing food.

---

## 🛠 Development
*CoResNet* is an **open-source toolkit** for *independent communities* to be able **to articulate the needs and share available resources** in a secure and trustworthy way.

> We are open for any kind of support to have this software available to any community around the world!

 - Devpost](https://devpost.com/software/i2we20-community-network-resource-mapping-toolkit-dev/joins/pXX5uQfIV87UWdQpEjHzXA)

1. We are using [HackMD](https://hackmd.io) to clarify the bigger picture and to collaborate on all related information.
2. Using social interactions and google forms we undertook research across different communities.
3. The technical background for the development is provided by other open-source solutions, like [ßoiler](https://github.com/LaKing/boilerplate "is a modular framework for Javascript-based projects, mainly web applications") Javascript framework with [codepad](https://github.com/LaKing/codepad "Browser-based collaborative development environment"), the collaborative development environment running on [srvctl](https://github.com/LaKing/srvctl "Systemd based server and containerfarm manager").
4. The main language is `JavaScript` with `node.js` and `Vue.js`, using `JSON`, `HTML5`, `CSS`.
5. Source code is published on [GitHub](https://github.com/eapo/CoNetRes/)

> The toolkit can't be monetized, crowdsourcing, donations, and even business can be built on it with a pro-rata share to gain money, development, and necessary resources.

### For the MVP
The next steps for the MVP of the *Community Network Resource Mapping* toolkit are
1. to have a fully customizable form for data collection, [0--(40)--100]
2. list available COVID-19 and pandemic solutions as resources and possible deficiencies,
3. be able to have anonymous profiles with customizable details and P2P contact information [0--(20)--100]

#### Good to have
4. multiple views with filters to display the collected data, such as
    - an egocentric zone view, where resources can be listed in related zones, like categories [0]
    - a dependency map, where missing resources can be revealed easily [0]
    - a geolocation view, where resources can be located providing easy access to them [0]

### To reach these steps
- good open-source programmers are needed,
- stable motivation/incentive is needed (funds, events, perks, etc)
- the continuous presence of mentors are needed mostly in the fields of `#Data_science` `#Psychology&Sociology` `#UIUX_design`

---

## ⚛ Contact
- 📧 [coop<i class="fa<EMAIL_ADDRESS>- 💬 [ #I2We20 @discord](https://discord.gg/4nAz5vP)
- 🐱 [ eapo/CoNetRes](https://github.com/eapo/CoNetRes)

---

 🌐 [Resources.CollaborativeSociety.EU](http://resources.collaborativesociety.eu/) | 📺 [ presentation](https://hackmd.io/@eaposztrof/rJa8JEy_8) | 🐦 [ Murmuration](http://oszt.6od.hu/d/murmurations_node.json)

repository: ArinaVenusRising/CoNetRes

repo_name: ArinaVenusRising/CoNetRes


text:
## Google Clone
![googleclone](https://github.com/aniler0/aniler0.github.io/blob/master/public/projectimages/googleclone.png)

This is a clone project. I learned so many things from the project and I had so much fun doing it.

I used :

- React
- Material UI
- Firebase to deploy
- Google Search API

Try it:[Link](https://ggle-clone1-1614854908220.web.app/)


text:
# DJL - Jupyter notebooks

## Overview

This folder contains tutorials that illustrate how to accomplish basic AI tasks with Deep Java Library (DJL).

## [Beginner Tutorial](tutorial/README.md)

## More Tutorial Notebooks

- [Run object detection with model zoo](object_detection_with_model_zoo.ipynb)
- [Load pre-trained PyTorch model](load_pytorch_model.ipynb)
- [Load pre-trained Apache MXNet model](load_mxnet_model.ipynb)
- [Transfer learning example](transfer_learning_on_cifar10.ipynb)
- [Question answering example](BERTQA.ipynb)

You can run our notebook online: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/deepjavalibrary/djl/master?filepath=jupyter)

## Setup

### JDK 11 (not jre)

JDK 11 (or above are required) to run the examples provided in this folder.

to confirm the java path is configured properly:

```bash
java --list-modules | grep "jdk.jshell"

><EMAIL_ADDRESS>```

### Install jupyter notebook on python3

```bash
pip3 install jupyter
```

### Install IJava kernel for jupyter

```bash
git clone https://github.com/frankfliu/IJava.git
cd IJava/
./gradlew installKernel
```

## Start jupyter notebook

```bash
jupyter notebook
```

## Docker setup

You may want to use docker for simple installation or you are using Windows.

### Run docker image

```
cd jupyter
docker run -itd -p <IP_ADDRESS>:8888:8888 -v $PWD:/home/jupyter deepjavalibrary/jupyter
```

You can open the `http://localhost:8888` to see the hosted instance on docker.

### Build docker image by yourself

You can read [Dockerfile](https://github.com/deepjavalibrary/djl/blob/master/jupyter/Dockerfile) for detail. To build docker image:

```
cd jupyter
docker build -t deepjavalibrary/jupyter .
```

### Run docker compose

```
cd jupyter
docker-compose build
docker-compose up -d
```

You can open the `http://localhost:8888` to see the hosted instance on docker compose.


text:
---
repo: wq.create
date: 2019-01-11
---

# wq.start 1.1.1

Together with [wq-django-template v1.1.1](./wq-django-template-1.1.1.md), **wq.start 1.1.1** incorporates the ability to disable GeoDjango (`django.contrib.gis`) which makes it easier to get started without having GDAL installed (see wq/wq#34).

To use the new feature, upgrade `wq.start` and run:

```bash
wq start --without-gis myproject
```

repository: wq/wq

repo_name: wq/wq


text:
# Webinars

## 1. Being a Computational Social Scientist
Tthis webinar demystifies computational social science, and explores how and why social scientists should embrace computational methods. Presented by Dr Julia Kasmire and Dr Diarmuid McDonnell of the UK Data Service, this webinar examines five key domains of computational social science:
1. Thinking computationally
2. Writing code
3. Computational environments
4. Manipulating structured and unstructured data
5. Reproducibility of the scientific workflow
We cover key theories and ideas behind each domain and provide example code, written in the popular Python programming language, that demonstrates some of the key skills computational social scientists need to develop.
* [Watch recording]()
* [Download slides]()

repository: vaidasmo/comp-soc-sci

repo_name: vaidasmo/comp-soc-sci


text:
---
title: "Overlay Network"
date: 2023-02-11
tags:
- seed
- pattern
---

> A network that is layered on top of another network

Normally on top of [[thoughts/HTTP]]. Fun fact! The [[thoughts/Internet]] was originally built as an overlay upon the telephone network

Examples:
- [[thoughts/VPN]]
	- [WireGuard](https://www.wireguard.com/)
- [OpenZiti](https://docs.openziti.io/#build-a-network)
- [ZeroTier](https://github.com/zerotier/ZeroTierOne)
- [Tailscale](https://tailscale.com/) (or the open source version [Headscale](https://github.com/juanfont/headscale/))
- Almost all [[thoughts/peer-to-peer]] [[thoughts/distributed systems]]
	- Most notably, [[thoughts/DHT|DHTs]]

path: /content/thoughts/Overlay Network.md

branch_name: refs/heads/hugo

filename: Overlay Network.md

gha_language: SCSS


text:
---
layout: post
title:  Web Developement
date:   2020-10-30 21:20:30 +0800
image:  02.jpg
tags:   Assignment-4
---
Web Developement is a part of EP1000. It is used as a form of documentation that is accessible anywhere and anytime. I am tasked to document my journey through this module and show my progress.

### My First Website
I was tasked to build a website by following Jake Wright's tutorial on CSS.


text:
---
date: "2006-08-18T18:00:00"
title: "Cuboid layers"
description: "Problem 126"
---

The minimum number of cubes to cover every visible face on a cuboid measuring 3 x 2 x 1 is twenty-two.

If we then add a second layer to this solid it would require forty-six cubes to cover every visible face, the third layer would require seventy-eight cubes, and the fourth layer would require one-hundred and eighteen cubes to cover every visible face.

However, the first layer on a cuboid measuring 5 x 1 x 1 also requires twenty-two cubes; similarly the first layer on cuboids measuring 5 x 3 x 1, 7 x 2 x 1, and 11 x 1 x 1 all contain forty-six cubes.

We shall define C(n) to represent the number of cuboids that contain n cubes in one of its layers. So C(22) = 2, C(46) = 4, C(78) = 5, and C(118) = 8.

It turns out that 154 is the least value of n for which C(n) = 10.

Find the least value of n for which C(n) = 1000.


text:
# QUEEQUEG - A Singularity Web hook debugger

Receives Singularity webhook notifications and prints them on the console.

## Setup

```bash
make setup
```

## Usage

Check the environment variables at the top of the Makefile. Make sure that they match your Singularity installation.

* PORT - local port on which queequeg will listen (default: 3000).
* HOST - hostname that queequeg will use (default: localhost).
* SINGULARITY_PORT - port used for the singularity framework to register callbacks with (default: 7099).
* SINGULARITY_HOST - hostname used for the singularity framework to register callbacks with (default: localhost).
* SINGULARITY_BASE - location of the singularity API. This is usually '/singularity' but in some special cases it may be e.g. '/'.

Then start the server:

```bash
make server
```

## Legal blurb

(C) 2014 Henning Schmiedehausen

Licensed under the terms of the Apache Software License V2.

repository: hgschmie/queequeg

repo_name: hgschmie/queequeg


text:
# SentenceTransformer

This page documents the properties and methods when you load a SentenceTransformer model:
```python
from sentence_transformers import SentenceTransformer
model = SentenceTransformer('model-name')
```

```eval_rst
.. autoclass:: sentence_transformers.SentenceTransformer
   :members:

```

repository: UKPLab/sentence-transformers

repo_name: UKPLab/sentence-transformers


text:
---
layout: layout.pug
navigationTitle:  Deployment Best Practices
title: Deployment Best Practices
menuWeight: 64
excerpt: Best practices for deploying DC/OS Percona Server for MongoDB
enterprise: false
model: /mesosphere/dcos/services/percona-server-mongodb/data.yml
render: mustache
---

# Minimum {{ model.dbName }} Node Requirements

The following resources are the service default, recommended for development and testing only:
- 3 x {{ model.dbName }} Nodes `count`
- 1 x CPUs per node
- 1024MB RAM per node
- 1000MB Disk per node, ['ROOT' Disk-type](/mesosphere/dcos/1.10/storage/mount-disk-resources/)

# Production {{ model.dbName }} Node Requirements

The following resources are recommended for a production deployment:
- 3 x {{ model.dbName }} Nodes `count`
- 4 x CPUs per node
- 4096MB RAM per node
- 8000MB Disk per node, [MOUNT Disk-type](/mesosphere/dcos/1.10/storage/mount-disk-resources/)
- ['XFS' filesystem](https://en.wikipedia.org/wiki/XFS)

WARNING:  Disks cannot be resized after deployment. Adjust the disk space requirements for the volume of your use case.

# Production DC/OS Agent Node

The recommendations in this section apply to the DC/OS Agent nodes running the {{ model.techName }} service.

## Block Device / Storage

### Disk Recommendations

{{ model.dbName }} performs best when using disks with fast read and write patterns.

We recommend the following:
- Always prefer locally-attached storage. Remote storage adds points of failure, add latency/overhead to block requests and are more complicated to troubleshoot.
- For redundant disk arrays, choose RAID10 (0+1). This RAID level provides the best performance and redundancy balance.
  - Enable RAID controller caching when using a battery-backed controller.
  - {{ model.dbName }} implements its own redundancy in storage, via replication. Keep this in mind when adding possibly-duplicated redundancy to storage.
- For better performance, use solid-state disks vs. spinning disks, or allocate more memory to cache more data, reducing the use of disks.

### Filesystem
The ['XFS' filesystem](https://en.wikipedia.org/wiki/XFS) is required when using [WiredTiger](https://docs.mongodb.com/manual/core/wiredtiger/), the default [{{ model.dbName }} Storage Engine](https://docs.mongodb.com/manual/core/storage-engines/). Serious stability problems have been observed when running WiredTiger on other filesystems.

We **strongly recommend** that you do not use the ['EXT3' filesystem](https://en.wikipedia.org/wiki/Ext3) with {{ model.dbName }}, due to poor pre-allocation performance. When in doubt, always use the ['XFS' filesystem](https://en.wikipedia.org/wiki/XFS).

### Read-Ahead and I/O Scheduler

For block device read-ahead, we recommend a setting of 32 sectors (=16KB) for most {{ model.dbName }} workloads. For the kernel-level I/O Scheduler, we recommend using "deadline". Both the IO scheduler and read-ahead can be changed by adding a file to the udev configuration in the `/etc/udev/rules.d` directory. This example assumes the block device serving mongo data is named `/dev/sda`. In the example, "deadline" is set as the IO scheduler and 16kb/32-sectors as the read-ahead:

```shell
# set deadline scheduler and 16kb read-ahead for /dev/sda
ACTION=="add|change", KERNEL=="sda", ATTR{queue/scheduler}="deadline", ATTR{bdi/read_ahead_kb}="16"
```

## Linux / Operating System

### Linux Kernel

Your Linux operating system should at minimum use Linux 2.6.36 and Glibc 2.13 or later. We strongly recommend that you use Linux kernels 3.2 or greater to take advantage of significant optimisations.

### NUMA Architecture

NUMA (Non-Uniform Memory Access) architecture should be disabled on the DC/OS Agent node, as {{ model.dbName }} operates inefficiently when it is enabled. We recommend that you disable NUMA on the DC/OS Agent node. Please consult your operating system or system manual to do this.

### Transparent HugePages

Recent versions of Linux operating systems enable a memory optimization named Transparent HugePages. We recommend that you disable this feature as it does not perform optimally under {{ model.dbName }} (or most other) workloads.

{{ model.dbName }} will log the following warning if Transparent HugePages are enabled:

```shell
2018-03-26T13:47:28.929+0000 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
2018-03-26T13:47:28.929+0000 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
2018-03-26T13:47:28.929+0000 I CONTROL  [initandlisten]
2018-03-26T13:47:28.929+0000 I CONTROL  [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
2018-03-26T13:47:28.929+0000 I CONTROL  [initandlisten] **        We suggest setting it to 'never'
```

Disable THP by adding the following flag to your Linux kernel boot options:

```shell
transparent_hugepage=never
```

Usually this requires changes to the GRUB boot-loader config in the directory `/boot/grub` or `/etc/grub.d` on newer systems. Red Hat covers this in more detail in this article (same method on CentOS): [https://access.redhat.com/solutions/46111](https://access.redhat.com/solutions/46111). Reboot the system after this change to clear out any previous huge pages and ensure that the setting will persist on reboot.

# {{ model.dbName }}

## {{ model.dbName }} User-per-Application

It is important to never give applications access to administrative functions of {{ model.dbName }}. We strongly recommend that you create a user for each application connecting to {{ model.dbName }}. Generally, applications need the ["readWrite" {{ model.dbName }} Privilege](https://docs.mongodb.com/manual/reference/built-in-roles/#readWrite) only to access the database(s) they require. See the "{{ model.dbName }} Administration" section of the documentation for steps on adding an application-level user.

## Links

See more Production recommendations here:
- [{{ model.dbName }} Production Notes](https://docs.mongodb.com/manual/administration/production-notes/)
- ["Tuning Linux for {{ model.dbName }}" - Percona Database Performance Blog](https://www.percona.com/blog/2016/08/12/tuning-linux-for-mongodb/)

repository: mesosphere/dcos-docs-site

repo_name: mesosphere/dcos-docs-site


text:
## Combat Roboports
Adds a new variant of roboport to the game that can deploy combat robots automatically.
Combat roboports are a lategame tech requiring utility science packs and are expensive, but in return they have long effective range and high damage. They use both combat robots as ammo and electricity.

The mod is compatible with Bob's Mods. When using Bob's Logistics I recommend to keep roboports enabled, it will work with roboports disabled but the recipe for the combat roboport becomes a mess.

**Known problems:**
- No animations on the combat roboport. This will be resolved as soon as the functionality is added to the modding API (implementation currently pending).

**Mod Portal:**
https://mods.factorio.com/mod/combat-roboports

repository: Artentus/CombatRoboports

repo_name: Artentus/CombatRoboports


text:
Rook container
==============

This container uses a cybozu's own Rook [cybozu-go/rook][]:neco-release. It's because the following feature and fixes are necessary for Neco and are not in the upstream's newest stable version (v1.3.0):

* Some trivial bugs about dm devices  (see the Path at [cybozu-go/rook][]:use-dmcrypt-dev)

Our custom Rook is created as follows to support the above-mentioned feature and fixes.

Until a release from Rook supports the above feature, the following update procedure is needed:

```
# Please set $ROOK_VERSION & $MASTER_COMMIT, e.g. ROOK_VERSION="1.3.0"; MASTER_COMMIT="7701c0b"
cd go/src/github.com/rook/rook
git checkout master && git pull
git remote add fork git@github.com:cybozu-go/rook.git
git fetch fork && git checkout neco-release
git rebase master
# Please resolve conflict & dependencies carefully

git push -f fork neco-release
git tag "v$ROOK_VERSION-master-$MASTER_COMMIT"
git push fork "v$ROOK_VERSION-master-$MASTER_COMMIT"
```

After that, please set `TAG` as `$ROOK_VERSION-master` and increment `BRANCH` (i.e. the image tag will be labeled as `v$ROOK_VERSION-master.$BRANCH`). And please update Dockerfile to use the tag `v$ROOK_VERSION-master-$MASTER_COMMIT`.

Note that when a stable version of Rook starts to support the above-mentioned feature and fixes, please update this procedure.

[rook]: https://github.com/rook/rook
[cybozu-go/rook]: https://github.com/cybozu-go/rook

Docker images
-------------

Docker images are available on [Quay.io](https://quay.io/repository/cybozu/rook)

repository: yokotaso/neco-containers

repo_name: yokotaso/neco-containers


text:
# Samples

You can download the
[`<tt>samples.zip</tt>`](../examples/samples.zip) file, which contains two Java application files, <tt>LimitSamples.java</tt> and <tt>SampleBase.java</tt>, and a directory, <tt>samples</tt>, that contains the xml files for the example.

To run the example, unzip the <tt>samples.zip</tt> file, compile, and execute the following on the command line:

```

java LimitSamples

```

url: https://raw.githubusercontent.com/li-jiabao/li-jiabao.github.io/f42a68eeeb57e54b6b628030379255d9ac00b131/_drafts/BigJava/Java API for XML Processing (JAXP)/StAX.md


text:
---
layout: base
title:  'Uppsala Group on Coordination and Names'
---

# Uppsala Group on Coordination and Names

## Coordination

The universal guidelines specify that the first conjunct is the head in a coordinated phrase. It has been suggested that some languages show inflection patterns indicating that the last conjunct is instead the head. We considered a number of examples but concluded that they could all be analyzed as cases where the inflection applies to the entire coordinated phrase but shows up only on one of the conjuncts. Hence, we don't find any reason to change the guidelines.

### Conjunct-sensitive agreement

One type of example is conjunct-sensitive agreement, that is, where the verb of a coordinated subject agrees with only one of the conjuncts. This happens in Latin as well as in Slavic languagues. As far as we could tell, however, the crucial factor here is proximity, meaning that the verb agrees with the first conjunct if it precedes the subject but with the last conjunct if it succeeds the subject. This is illustrated by the following contrasting examples from Serbo-Croatian:

~~~ sdparse
Juce su uništena sva sela i sve varošice . \n yesterday are destroyed-PL.N all villages-N and all towns-F .
conj(sela, varošice)
nsubj(uništena, sela)
~~~

~~~ sdparse
Sva sela i sve varošice su uništene . \n all villages-N and all towns-F are destroyed-PL.F .
conj(sela, varošice)
nsubj(uništene, sela)
~~~

We conclude that the conjunct-sensitive agreement patterns do not provide clear evidence of headedness in coordination.

### Delayed suffixation

Another type of example is found in Turkish, where inflectional suffixes may show up only on the final conjunct, as in this example.

~~~ sdparse
Süt  içer , diş fırcalar , bir hikaye dinler ve uyurDUK . \n milk drink-AOR , teeth brush-AOR , a   story  listen-AOR and sleep-AOR-PAST-2PL .
conj(içer, fırcalar)
conj(içer, dinler)
conj(içer, uyurDUK)
~~~

The fact that PAST and 2PL are only marked overtly on the final coordinated verb might be taken as an indication that the final conjunct is the head. However, we think it is also possible to analyze it as an inflection that applies to the entire coordination but is visible only on the last conjunct. In this respect, it is similar to constructions like "Tom and Jerry's Diner", where the clitic/suffix "'s" has scope over the entire coordination.

## Names

The universal guidelines specify that multiword names without regular syntactic structure should be annotated as head-initial structures with the name relation. Again it has been suggested that some languages show inflection patterns indicating that the last word is the head and again we concluded that these can be analyzed as cases where the inflection applies to the entire name but shows up only on the last element. Hence, we don't find any reason to change the guidelines here either.

A typical example is the genitive inflection in Swedish, which goes on the last name regardless of whether it is the last name or the first name.

~~~ sdparse
Fia Janssons bröder \n Fia Jansson's brothers
name(Fia, Janssons)
nmod:poss(Fia, bröder)
~~~

~~~ sdparse
Fias bröder \n Fia's brothers
nmod:poss(Fias, bröder)
~~~

repository: UniversalDependencies/docs

branch_name: refs/heads/pages-source

gha_language: HTML

repo_name: UniversalDependencies/docs


text:
Nunjucks  Extend Loader (Webpack)
==============================
Recently, I want to make my own frameworks based on webpack and nunjucks. I need a nunjucks loader but both [nunjucks-loader](https://github.com/at0g/nunjucks-loader) and [nunjucks-html-loader](https://github.com/ryanhornberger/nunjucks-html-loader) doesn't meet my needs, so i create this loader based on nunjucks-html-loader.

[![NPM version][npm-image]][npm-url]
[![Github license][github-license-image]][github-url]
[![Github stars][github-image]][github-url]

Usage
-----

This is a very simple webpack loader for nunjucks files., you can use it with HtmlWebpackPlugin like this:

```javascript
var conf = {
        template:  '!!file-loader?name=../' + pathname + '.html!nunjucks-extend-loader?{"searchPaths":["views"],"context":'+ context +',"imgroot":"src"}!views/' + pathname + '.html',
};
config.plugins.push(new HtmlWebpackPlugin(conf));
```

Configuration
-----
`pathname` is the name of html, like `path/to/index.html`.
`searchPaths` is the seq of where the template lie in. If your html is:
```
{% extends 'base.html' %}
```
Then, `searchPaths` tell the loader where to find `base.html`.
`context` is the data you want to render in the template, such as:
```
// context
{
    'title': 'nunjucks'
}

// html
{{ title }}  // nunjucks
```
`imgroot` tell the loader where to find src of `<img>`, the value is path relative to root. The loader will find every `<img src="path">` and copy the file to `./build/path`:
```
// html
<img src="assets/images/bg.jpg">

- root
    - src/assets/images/bg.jpg
```
after loader:
```
- root
    - build/assets/images/bg.jpg
    - src/assets/images/bg.jpg
```
Example
-----
[Webjucks](https://github.com/xiao555/Webjucks) is my framework use this loader.

Then I want add a function to this loader so that it can configure Nunjuckcs.

[npm-url]: https://www.npmjs.com/package/nunjucks-extend-loader
[npm-image]: https://img.shields.io/npm/v/nunjucks-extend-loader.svg
[github-url]: https://github.com/xiao555/nunjucks-extend-loader
[github-image]: https://img.shields.io/github/stars/xiao555/nunjucks-extend-loader.svg?style=social&label=Star
[github-license-image]: https://img.shields.io/github/license/xiao555/nunjucks-extend-loader.svg


text:
# instant-connection [![Build Status](https://travis-ci.org/kaliumxyz/instant-connection.svg?branch=master)](https://travis-ci.org/kaliumxyz/instant-connection)
> make connections to [instant](https://instant.leet.nu/) :D.

this is a sister of the [euphoria-connection](https://github.com/kaliumxyz/euphoria-connection) library and follows the same format.

## install
simply download it from npm.
```
$ npm install instant-connection
```

## usage
Require it and you can proceed to create new connections :D.
```js
const instantConnection = require('instant-connection')
const connection = new instantConnection()
```

connections will default to the &test room. Once you've created a connection you can send data over it with the send() method.

## tests
```
$ npm test
```

## license
MIT © [Kalium](https://kalium.xyz)

repository: kaliumxyz/instant-connection

repo_name: kaliumxyz/instant-connection


text:
---
layout: post
title: "OBD Python"
date: 2012-10-31 19:48
author: matt2005
comments: true
tags: [old blog, Car, Raspberry PI]
---
# Python OBD

Here's some OBD Python stuff I've found
Need python-serial for RPi

```bash
sudo apt-get install python-serial -y
sudo git clone https://github.com/AustinMurphy/OBD2-Scantool.git
```

Or my fork

```bash
sudo git clone https://github.com/matt2005/OBD2-Scantool.git
```


text:
### Hi there 👋

Looks like you have landed on the GitHub profile of [Brijesh Sahoo](https://www.linkedin.com/in/brijesh-sahoo/). Now I am curious to know about your journey to this page.

I am a passionate software developer from India with almost 4 years of working experience, 3 of them as an analyst. Phew!. Feels like I am really old. Have been working at Tata AIG for almost a year now. I have somewhat of a non-conventional engineering background and keep trying to self-learn CS fundamentals via whatever medium possible to this day.

- 🔭 Most of my time is spent building software backends for customers and other teams at Tata AIG.

- 🌱 These days I have started to learn more about UI frameworks like React. Still there are a lot of other things I would like to work with given the opportunity.  Rather I try to build a strategy and then planning stuff out as much as possible. That said I am quite flexible: ask some of my colleagues here and they should vouch.

- ⚡ I am always eager to learn more about how to build and ship elegant and minimalistic products and features that take your breath away.

- 📫 Besides coding, I enjoy listening to music (synth-wave, soundtracks and retro), podcasts (mostly career and software related, checkout [Changelog](https://changelog.com/) to get a taste), and watching sitcoms.

Feel free to ping me on [Facebook](https://www.facebook.com/bforbrijesh) or [Twitter](https://twitter.com/bforbrijesh) to talk about anything you think we might have in common!.

**Languages and Tools I am familiar with:** _Javascript, TypeScript, Node.js, Python, Java, Serverless, DynamoDB, and a few others I can't recollect anymore_


text:
# Agaricus stipatus Pers. SPECIES

#### Status
ACCEPTED

#### According to
Index Fungorum

#### Published in
Syn. meth. fung. (Göttingen) 2: 423 (1801)

#### Original name
Agaricus stipatus Pers.

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# Cyral

The Cyral App for Sumo Logic provides dashboards and visualizations for Cyral customers that have chosen to send their logs to the Sumo Logic platform.

# Documentation
First, you will need to [Send Cyral logs to Sumo Logic](https://cyral.com/docs/integration-siem#send-cyral-logs-to-sumo-logic). After configuring the collection,
you can [install](https://help.sumologic.com/05Search/Library/Apps-in-Sumo-Logic/Install-Apps-from-the-Library) the SumoLogic App from Cyral from the App Catalog
and use the same source category configured while creating the source used for your Cyral logs.


text:
# GitHubOrgUsers
This little program get all users form GitHub organization and LDAP and compare (with a prefix) if all GitHub users are in LDAP or SQLite DB.

## How to get and build
 To get this bin (and all dependencies) you have to execute:
 ```
go get github.com/hbermu/GitHubOrgUsers.git
```
To compile and execute, go to the directory and execute:
```
go build
```
This generate the bin "GitHubUsers".

## How to run
First you need to have a right config file, you have an example [here](config.toml). Then you can run:
```
./GitHubUsers start
```
Or if you have the config file in other path:
```
./GitHubUsers start ./config.toml
```
If you want a better log:
```
./GitHubUsers start --log.level="debug"
```
To create the SQLite DB with the schema:
```
./GitHubUsers start --log.level="debug"
```

## Run with Docker
You have a image on DockerHub to run this program with Docker. To do that you can run:
```
docker run -it -v /path/to/your/config/config.toml:/GitHubOrgUsers/config.toml hbermu/github_org_users start
```

Or with better log:
```
docker run -it -v /path/to/your/config/config.toml:/GitHubOrgUsers/config.toml hbermu/github_org_users start --log.level="debug"
```

In the case you need a list inside a SQLite DB:
```
docker run -it \
-v /path/to/your/config/config.toml:/GitHubOrgUsers/config.toml \
-v /path/to/your/db/sqlite.db:/GitHubOrgUsers/sqlite.db \
hbermu/github_org_users start
```

To create the Database SQLite and export it you must mount a volume inside the container and generate de Database. Here you have an example:
```
mkdir /tmp/db
chmod 777 /tmp/db
docker run -it -v /tmp/db:/tmp/  hbermu/github_org_users create_db /tmp/sqlite.db
mv /tmp/db/sqlite.db ./sqlite.db
chown $USER:$USER ./sqlite.db
```

repository: hbermu/GitHubOrgUsers

gha_language: Go

repo_name: hbermu/GitHubOrgUsers


text:
# LAB - Class 7

## Project: Bearer Authorization

### Author: Ashley Moore

### Links and Resources

[GitHub](https://github.com/mooream2291/bearer-auth)

### Setup

#### `.env` requirements (where applicable)

i.e.

- `PORT` - 3001
- `MONGODB_URI` - MONGODB_URI=mongodb://localhost:27017/bearer

#### How to initialize/run your application (where applicable)

- e.g. `npm start`

#### How to use your library (where applicable)

#### Tests

- How do you run tests? npm test

- Any tests of note? I don't think so?

- Describe any tests that you did not complete, skipped, etc: we got all the bugs!

#### UML

[UML](https://drive.google.com/file/d/1EtwlBx6cbyYBTaq_lvO1jO25PInLkTkZ/view?usp=sharing)