text:
---
layout: default
---

# 1992-11-25 - Re: The List is YOURS, So Speak Up!

## Header Data

From: Bob Stratton<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: bd3e587503339e74014e3fed8f1fd42499836957905622501b1e464284d44ba0

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1992-11-25 02:16:51 UTC

Raw Date: Tue, 24 Nov 92 18:16:51 PST

## Raw message

```
{% raw  %}From: Bob Stratton<EMAIL_ADDRESS>Date: Tue, 24 Nov 92 18:16:51 PST
To<EMAIL_ADDRESS>Subject: Re: The List is YOURS, So Speak Up!
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Hi all,

After Tim's stirring message about the use of the list, I couldn't help but
drop a line to the list myself.

I'm yet another person interested in Mac implementations of PGP, and
encrypted mailers. I work for a Macintosh software company as a developer,
but have spent most of the last several years working with big machines, so I
haven't picked up all of the bad habits that I see Macs furthering across the
Net. (Most of these have to do with writing unportable code, as if no other
manufacturers' hardware matters.)

I'm also sort a mailer weenie, so this talk of encrypted mailers has me quite
interested. I've started studying more of the fundamentals (I've only read
David Kahn's book, back in 8th grade, which was a while ago :-) I'm
especially interested in the MIME/PEM issues, and fervently request coredumps
from anyone who's been following those to date.

My company (which I DO NOT speak for) develops TCP/IP based communications
software for the Mac, so needless to say, a nice RSA-encrypted Mac mailer
could fall within our purview. My company is also very interested in privacy
issues. In point of fact, the VP of Engineering and I recently addressed a
Virginia state assembly subcommittee for purposes of having them remove SSNs
from driver's licenses.. (YAY!)

I'm new to tbe Mac world, but not the mailer world. I shall try to be a
resource for this list's work. There's another person here who's also
interested in the GUI design for a new Mac incarnation of PGP.

I see a couple of possible UI features:

 - Live folders, for drag and drop en/decryption

 - Encryption to/from the clipboard (which is basically what I'm doing now,
	except through intermediate files)

 - An  MPW tool implementation, with pipes. (I suspect that I'd use this
	mostly for testing the 'engines')

I want to reiterate the sentiment posted by several to KEEP THINGS PORTABLE.
I know it's not chic for a Mac developer to say that, but so be it.

{% endraw %}
```

## Thread

+ Return to [November 1992](/archive/1992/11)

+ Return to "[Bob Stratton <strat@intercon.com>](/authors/bob_stratton_strat_at_intercon_com_)"

+ 1992-11-25 (Tue, 24 Nov 92 18:16:51 PST) - Re: The List is YOURS, So Speak Up! - _Bob Stratton<EMAIL_ADDRESS>


text:
# sans-server-swagger

Sans-Server middleware that uses swagger documents to define routes, validate requests, validate responses, and to produce mocks.

## Table of Contents

- [Example](#example)
- [Configuration](#configuration)
- [Helper Methods](#helper-methods)
    - req.deserialize
        - [.binary](#reqdeserializebinary)
        - [.byte](#reqdeserializebyte)
        - [.date](#reqdeserializedate)
        - [.dateTime](#reqdeserializedatetime)
    - req.swagger
        - [.rel](#reqswaggerrel)
        - [.root](#reqswaggerroot)
    - [res.enforce](#resenforce)
    - res.swagger
        - [.example](#resswaggerexample)
        - [.enforce](#resswaggerenforce)
- [Controllers](#controllers)
- [Mocks](#mocks)
    - [Validation](#validation)
    - [Mock Sources](#mock-sources)
    - [Automatic vs Manual Mocking](#automatic-vs-manual-mocking)
    - [Test Response Examples](#test-response-examples)
- [Swagger Enforcer](#swagger-enforcer)
    - [Response Enforcement](#response-enforcement)

## Example

The following example will produce mock responses using response examples for any incoming requests. You can add actual implementations through [controllers](#swagger-document-controllers).

A complete example can be found in the [example directory](https://github.com/byu-oit/sans-server-swagger/tree/master/example).

```js
const Server = require('sans-server');
const Swagger = require('sans-server-swagger');
const Router = require('sans-server-router');

// define the server
const server = Server();

// define the swagger middleware with a router
const swaggerMiddleware = Swagger({
    controllers: './controllers',
    development: true,
    exception: function(res, state) {
        res.body({
            status: state.statusCode,
            message: state.body
        });
    },
    swagger: './swagger.json'
});

// use the swagger middleware
server.use(swaggerMiddleware);

// make a request against the server
server.request({ method: 'GET', path: '/v1/path/to/call' })
    .then(function(res) {
        console.log(res.statusCode);
        console.log(res.body);
    });
```

## Configuration

The swagger middleware is generated using a configuration with the following properties:

- *controllers* - [REQUIRED] The directory path to JavaScript files that contain the methods to execute to fulfill web service requests.

- *development* - [OPTIONAL] If true then mocks will automatically be produced from examples when a controller does not exist. Additionally not all controllers must exist. If set to false then all controller implementations must exist. Defaults to `false`.

- *exception* - [OPTIONAL] A function that will get called if the middleware is unable to provide an expected response. This function will receive two parameters: 1) res - the response object, and 2) state - the current response state data. Use the response object to make any modifications to the response before it is returned.

    This function will be called when 1) the response does not meet the response schema defined by swagger, 2) the response uses a status code that is not defined by swagger, 3) the request has invalid input, and 4) when a response is not implemented.

- *ignoreBasePath* - [OPTIONAL] If true then the swagger base path will not be used in the routes. Defaults to `false`.

- *mockQueryParameter* - [OPTIONAL] The query parameter to look for when a response should be manually mocked. Defaults to `mock`.

- *swagger* - [REQUIRED] The swagger file that defines the services. This can be either a json or a yaml file.

## Helper Methods

### req.deserialize.binary

Convert an 8-bit binary string, made of `0`s and `1`s, into a Buffer object.

**Signature:** req.deserialize.binary ( value: String ) : Buffer

**Parameters:**

- *value* - An 8-bit binary string made of `0`s and `1`s.

**Returns** a Buffer.

```js
const buffer = req.deserialize.binary('00000010');
```

### req.deserialize.byte

Convert a base64 encoded string into a Buffer object.

**Signature:** req.deserialize.byte ( value: String ) : Buffer

**Parameters:**

- *value* - A base64 encoded string.

**Returns** a Buffer.

```js
const buffer = req.deserialize.binary('aGVsbG8=');
```

### req.deserialize.date

Convert a date string (formatted as YYYY-MM-DD) into a Date object.

**Signature:** req.deserialize.date ( value: String ) : Date

**Parameters:**

- *value* - A date string, formatted as YYYY-MM-DD.

**Returns** a Date.

```js
const date = req.deserialize.date('2000-01-01');
```

### req.deserialize.dateTime

Convert an ISO date string into a Date object.

**Signature:** req.deserialize.dateTime ( value: String ) : Date

**Parameters:**

- *value* - An ISO date string.

**Returns** a Date.

```js
const date = req.deserialize.dateTime('2000-01-01T00:00:00.000Z');
```

### req.swagger.rel

Get an object that represents the swagger schema for the current request path and method.

```js
const swagger = req.swagger.rel;
```

### req.swagger.root

Get an object that represents the swagger document from its root.

```js
const swagger = req.swagger.root;
```

### res.enforce

*Deprecated*

[See res.swagger.enforce](#resswaggerenforce)

### res.swagger.example

A shortcut method to get a response example.

**Signature:** res.swagger.example ( [ code: String | Number [, type: String ] ] ) : *

**Parameters:**

- *code* - An optional parameter for the response code. If omitted then the first response code will be used.

- *type* - An optional parameter specifying the content-type to use for the example. If omitted then the value will be derived from the request's `Accept` header.

**Returns** a value derived from the example.

```js
const result = res.swagger.example(200);
```

### res.swagger.enforce

Begin building an object with line by line enforcement. As you mutate the object each change will be validated against the expected swagger response. Also implements defaults automatically as possible. If the response is not an object then continual enforcement will not be in effect, although it will validate the initial value.

[Read more about enforcement](#swagger-enforcer)

**Signature:** res.swagger.enforce ( code: String | Number [, initialValue: * ] ) : *

**Parameters:**

- *code* - The response code the enforce the response for.

- *initialValue* - An optional value to initialize with.

**Returns** the data type that is being enforced.

```js
const result = res.swagger.enforce(200);
```

## Controllers

Out of the box and using the example above this middleware will produce mock responses. To write implementations for your swagger endpoints you needs to set up controllers.

You can look at the [example directory](https://github.com/byu-oit/sans-server-swagger/tree/master/example) contained within this project for details.

In summary:

1. You need a directory where you will place all of your controller files. This directory is specified by the `controller` option when creating the middleware.

    ```js
    const swaggerMiddleware = Swagger({
        controllers: './controllers',
        ...
    });
    ```

2. Each path's controller implementation is defined by it's `x-controller` and `operationId`.

    - `x-controller` is the name of the file within the controllers directory that implements the function defined by the `operationId`. The `x-controller` can be defined for the entire swagger document, for a specific path, or for a specific method within a path by defining this property at those different levels within your swagger document. An `x-controller` defined at one level can be overwritten by another `x-controller` at a more specific level.

    - `operationId` is the name of the property within your controller that has the function to execute. This function will receive as parameters the sans-server request and response objects.

    **For example purposes only**, in the following example the `x-controller` is defined at the document level, the path level, and the method level. In actuality, the `x-controller` only needs to be defined at each appropriate level once. If defined at the document level then all paths and methods will use that controller unless a specific path or method has an `x-controller` specified as something else.

    ```yaml
    x-controller: pets              # All methods for all paths will use pets.js controller unless overwritten
    paths:
      "/pets":
        x-controller: pets          # This path will use the pets.js controller for all methods within this path unless overwritten
        get:
          x-controller: pets        # This method within this path will use the pets.js controller
          summary: List all pets
          operationId: listPets     # Implementation looked for in exports.listPets in pets.js file
    ```

## Mocks

### Validation

Mocked responses will be validated against the swagger response definition.

### Mock Sources

In order for mocks to work there must be a source. Mocks can be produced from two sources:

1. From examples within the swagger document:

    ```yaml
    paths:
      "/pets":
        get:
          summary: List all pets
          operationId: listPets
          responses:
            '200':
              description: An paged array of pets
              examples:
                application/json:     # Mocks will be produced from examples
                - id: 123
                  name: Sparky
                  tag: Dog
                - id: 456
                  name: Ghost
                  tag: Cat
                - id: 789
                  name: Goldy
                  tag: Fish
              schema:
                "$ref": "#/definitions/Pets"
    ```

2. From an implemented mock in a controller:

    ```js
    // until this implementation is complete we can have it call the custom mock
    exports.listPets = function(req, res) {
        exports.listPets.mock(req, res);     // call the mock
    };

    // a custom mock for this implementation
    exports.listPets.mock = function(req, res) {
        res.send([
            {
                id: 123,
                name: "Sparky",
                tag: "Dog"
            },
            {
                id: 456,
                name: "Ghost",
                tag: "Cat"
            },
            {
                id: 789,
                name: "Goldy",
                tag: "Fish"
            }
        ]);
    };
    ```

### Automatic vs Manual Mocking

**Automatic Mocking**

Automatic mocking only works if these conditions are met:

1. The [configuration](#configuration) must have the `development` option set to `true`.

2. There must be no implementation for the endpoint being hit.

3. There must be a [mock source](#mock-sources).

For mocks that are [sourced](#mock-sources) from the swagger document examples the swagger response that is defined first will be used to determine the mock being sent back. Additionally the request's `Accept` header will be used to determine which example to send back. If the request's `Accept` header is not set then the first example's content type will be used.

**Manual Mocking**

Mocks can be used manually even when an implementation exists or when not in development mode.

Manual mocking only works if these conditions are met:

1. The swagger definition for the path being mocked must specify the [mocked query parameter](#configuration) as a swagger query parameter.

2. The incoming request has a query parameter that matches the [mocked query parameter](#configuration).

3. There must be a [mock source](#mock-sources).

For mocks that are [sourced](#mock-sources) from the swagger document examples the [mocked query parameter](#configuration) value is used in conjunction with the request's `Accept` header to determine which response example to send back. If the request's `Accept` header is not set then the first example's content type will be used.

### Testing Response Examples

There is no need to write test cases for all of your swagger response examples. A tool has been provided that will do this for you.

**Validate Response Examples using Terminal/Command Line**

For this to work you'll need to install the sans-server-swagger module globally `npm install -g sans-server-swagger`. Then run the following command with the parameter being the path to your swagger file:

```text
sans-server-swagger ./swagger.yaml
```

**Validate With Mocha**

```js
const expect = require('chai').expect;
const Swagger = require('sans-server-swagger');

describe('my tests', () => {
    it('examples are valid', () => {
        return Swagger.testSwaggerResponseExamples('./swagger.yaml')
            .then(results => expect(results.percentage).to.equal(1));
    });
});
```

**Validate With Tape**

```js
const Swagger = require('sans-server-swagger');
const test = require('tape');

test('my tests', t => {
    t.plan(1);
    Swagger.testSwaggerResponseExamples('./swagger.yaml')
        .then(results => t.equal(results.percentage, 1));
});
```

## Swagger Enforcer

This package uses the [swagger-enforcer](https://www.npmjs.com/package/swagger-enforcer) package to perform validation. The swagger-enforcer has been exposed through this package. This is especially useful for its [type conversion](https://www.npmjs.com/package/swagger-enforcer#enforcerto) and [parameter injection](https://www.npmjs.com/package/swagger-enforcer#enforcerinjectparameters) tools.

```js
const Swagger = require('sans-server-swagger');
const Enforcer = Swagger.Enforcer;

const date = Enforcer.to.date(new Date());
console.log(date);      // a string of "2000-01-01" (or whatever the date actually is)
```

### Response Enforcement

You can enforce a response while it is being built by using the swagger-enforcer. As of now the enforced rules are the [defaults](https://www.npmjs.com/package/swagger-enforcer#enforcement-options).

To enforce a response while building you only need to specify which response you'll be building. Below you can see an implemented controller method that uses the building enforcement:

```js
exports.foo = function(req, res) {
    const result = res.enforce(200);    // 200 - the response code to enforce
    result.firstName = 'Bob';           // an error will be thrown here if this is an invalid mutation of the result
    result.lastName = 'Smith';          // an error will be thrown here if this is an invalid mutation of the result
    res.send(result);
};
```

Additionally you can optionally set the initial value:

```js
exports.foo = function(req, res) {
    const result = res.enforce(200, { firstName: 'Bob' });  // will throw an error here if initial value is invalid
    result.lastName = 'Smith';          // an error will be thrown here if this is an invalid mutation of the result
    res.send(result);
};
```

repository: byu-oit/sans-server-swagger

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

license_type: permissive

repo_name: byu-oit/sans-server-swagger


text:
# TinyML

## Ubuntu Setup
- https://bkjaya.wordpress.com/2020/04/27/how-to-install-qemu-on-ubuntu-20-04-lts-focal-fossa/
```
sudo apt install qemu qemu-utils qemu-kvm virt-manager
sudo apt install qemu-system-arm
```

## Microsoft
- [EdgeML](https://microsoft.github.io/EdgeML/)

## PyTorch
- [Mobile](https://pytorch.org/mobile/home/)
- Raperry Pi
    - https://nmilosev.svbtle.com/compling-arm-stuff-without-an-arm-board-build-pytorch-for-the-raspberry-pi

# Federated Learning
- https://github.com/OpenMined/PySyft

## Videos
- https://www.youtube.com/playlist?list=PLtT1eAdRePYoovXJcDkV9RdabZ33H6Di0

https://www.edgeimpulse.com/
https://github.com/fritzlabs/Awesome-Mobile-Machine-Learning
https://github.com/margaretmz/awesome-tensorflow-lite
https://github.com/albanie/convnet-burden

[Arduino Nano 33 IoT](https://www.mouser.in/Search/Refine?Ntk=P_MarCom&Ntt=149013141)
[Arduino Nano 33 BLE](https://www.mouser.in/Search/Refine?Ntk=P_MarCom&Ntt=128734529)
[Arduino Nano 33 BLE Sense](https://www.mouser.in/Search/Refine?Ntk=P_MarCom&Ntt=140736399)

https://makerbazar.in/products/arduino-nano-33-ble-sense-board

branch_name: refs/heads/main


text:
# <img src="./mods/core/icons/mac+linux.png" height="20px"> notion-enhancer

notion.so is a pretty awesome tool already, but there's always room for improvements.
it might just be a preference, it might be something crucial to your setup,
it might be something users have been asking for for a long time,
or it might even be something you haven't realised you need yet
\- there's something that would make your user experience a lot better.

this package is a mod-loader for the desktop app, with custom colour theming and extra feature enhancements.

want to contribute? check out the [contribution guidelines](CONTRIBUTING.md) and the [documentation](DOCUMENTATION.md).

for support, join the [discord server](https://discord.gg/sFWPXtA).

## Supported desktop clients

- the pre-enhanced builds available at [notion-repackaged](https://github.com/notion-enhancer/notion-repackaged). Built for Windows, Linux and Mac (Intel and M1)
- manually patching the [official windows/mac releases](https://notion.so/desktop)
- the pre-enhanced packages for by [notion-linux](https://github.com/davidbailey00/notion-linux)
- the pre-enhanced arch linux AUR package [notion-app-enhanced](https://aur.archlinux.org/packages/notion-app-enhanced/)

outdated notion versions (< 2.0.10) probably won't work.

mobile clients are not supported and due to system limitations/restrictions cannot be.

a chrome extension may be coming soon for web client support.

## Installation

### Installing notion-repackaged builds

> **if you are using Arch or derivatives like Manjaro**, you can install [notion-app-enhanced](https://aur.archlinux.org/packages/notion-app-enhanced/) which is pre-enhanced and doesn't require any additional steps to get working.
>

The [notion-enhancer/notion-repackaged](https://github.com/notion-enhancer/notion-repackaged) project provides prebuilt builds for Windows, Linux and Mac that are ready to install and use. These builds are pre-enhanced and aim to provide the fastest and easiest way to use notion-enhancer.

The [available release builds](https://github.com/notion-enhancer/notion-repackaged/releases/) include:

- Windows (`.exe` installer, only x64)
- Linux (`AppImage`, `deb`, `rpm`, `pacman` packages, only x64)
- Mac (`dmg` package, for Intel and Apple Silicon)

The builds are not signed, so your operating system might complain when installing even though the builds are completely safe to use.

For more information, please head over to [notion-repackaged's documentation](https://github.com/notion-enhancer/notion-repackaged)

### Patching manually

> **if you are updating from v0.7.0 or earlier,** things have changed, more information is available
> in this [update guide](UPDATING.md). please read that before following these instructions.

- ensure that no notion windows/processes are running by ending all Notion processes in your task manager.
  - `CMD + ALT + ESC` on mac and `CTRL + SHIFT + ESC` on windows/linux to open task manager.
- [install node.js](https://nodejs.org/en/download/)
  - you may need to restart your computer.
  - notion-enhancer will use node.js, you do not need to interact with it aside from downloading to install notion-enhancer.
- open your computer's terminal, **not the node.js command prompt.**
  - **windows 10:** search in your start menu (click windows key or icon in bottom left of screen) for _'cmd'_ or _'command prompt'_.
  - **mac:** search in spotlight (magnifying glass in top right of screen) for _'terminal'_.
- type and enter the following line(s) based on your operating system, if there are multiple lines, make sure to enter them _one by one_ .
  - **windows 10:**
    ```
    npm i -g notion-enhancer
    ```
  - **mac:** this may ask you to enter your password, instead of hiding your password with \*\*\* symbols, mac terminal hides it by making it invisible. simply type your password and click enter.
    ```
    sudo chmod -R a+wr /usr/local/lib/node_modules
    sudo chmod -R a+wr /usr/local/bin
    sudo chmod -R a+wr /Applications/Notion.app/Contents/Resources
    npm i -g notion-enhancer
    ```
  - **debian/ubuntu, chromeOS, wsl (to modify the win10 app):**
    ```
    bash curl -sL https://deb.nodesource.com setup_current.x | sudo -E bash -
    sudo apt-get install -y nodejs
    npm i -g notion-enhancer
    ```

- ⚠ important - on the notion desktop app version 2.0.13 and newer, a small fix is necessary to make notion enhancer work. follow the [steps here](https://www.notion.so/hack-notion-enhancer-v0-10-2-to-work-with-notion-s-v2-0-13-app-a4ab1267e67b4126b6448641ca4a0041) to fix notion. there's also a [video version](https://www.youtube.com/watch?v=vcwUpwpQ2sY) of the instructions.

#### Command-line interface

the enhancements should be automatically applied on installation
and automatically removed on uninstallation.

on some platforms this may throw errors if done without
elevated/admin permissions, though, so if it hasn't automatically
installed you will still need to use these commands.

```
Usage:
  $ notion-enhancer <command> [options]

Commands:
  apply   : add enhancements to the notion app
  remove  : return notion to its pre-enhanced/pre-modded state
  check   : check the current state of the notion app

For more info, run any command with the `--help` flag:
  $ notion-enhancer apply --help
  $ notion-enhancer remove --help
  $ notion-enhancer check --help

Options:
  -y, --yes      : skip prompts (may overwrite data)
  -n, --no       : skip prompts (may cause failures)
  -d, --dev      : show detailed error messages (for debug purposes)
  -h, --help     : display usage information
  -v, --version  : display version number
```

## Frequently asked questions

**when will the update be out?**
i code this in my free time, in-between my other commitments. there are no ETAs.

**the themes aren't working?**
if you pick a dark theme it will only be applied if notion is in dark mode,
and if you pick a light theme it will only work if notion is in light mode.
do `CMD/CTRL+SHIFT+L` to toggle between them.

**is this against notion's terms of service? can i get in trouble for using it?**
definitely not! i contacted their support team to check, and the response was awesome:

> "Thanks for taking the time to share this with us. Userscripts and userstyles are definitely
> cool ideas and would be helpful for many users! ... I'll also share this with the rest of the
> team to take to heart for future improvements."

**how do i uninstall the enhancer?**
run `npm remove -g notion-enhancer`.

## Features

most of the enhancer's functionality is split into configurable enhancement modules,
but some basic improvements necessary for things to work are built in by values:

- the notion:// url scheme/protocol is patched to work on linux.
- a tray/menubar icon: links relevant to the enhancer + buttons to manage notion windows.

once applied, modules can be configured via the graphical menu,
which is opened from the tray/menubar icon or with `OPTION/ALT+E`.

![](https://user-images.githubusercontent.com/16874139/97819046-34e8b600-1cfa-11eb-8fa6-a3ad5374cd0b.png)

currently all modules come pre-installed for technical reasons, security assurance, and ease-of-use.
these include:

### notion-enhancer core

**tags:** #core

**description:** the cli, modloader, menu, & tray.

**author:** [dragonwocky](https://github.com/dragonwocky/)

| option                        | extended description                                                                                | type                                                                                | values/defaults            | platform-specific details |
| ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -------------------------- | ------------------------- |
| auto-resolve theme conflicts  | when a theme is enabled any other themes of the same mode (light/dark) will be disabled.                                                                                | toggle                                                                                | no                         |                           |
| hide app on open              | app can be made visible by clicking the tray icon or using the hotkey.                                                                                | toggle                                                                                | no                         |                           |
| auto-maximise windows         | whenever a window is un-hidden or is created it will be maximised.                                                                                | toggle                                                                                | no                         |                           |
| close window to the tray      | pressing the × close button will hide the app instead of quitting it. it can be re-shown by clicking the tray icon or using the hotkey.                                                                                | toggle                                                                                | yes                        |                           |
| integrated titlebar           | replace the native titlebar with buttons inset into the app.                                                                                | toggle                                                                                | yes                        | macOS: forced on          |
| tiling window manager mode    | completely remove the close/minimise/maximise buttons - this is for a special type of window manager. if you don't understand it, don't use it.                                                                                | toggle                                                                                | no                         | macOS: forced off         |
| window display hotkey         | used to toggle hiding/showing all app windows.                                                                                | [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) input | `CommandOrControl+Shift+A` |                           |
| open enhancements menu hotkey | used to toggle opening/closing this menu while notion is focused.                                                                                | [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) input | `Alt+E`                    |                           |
| values/defaults page id/url   | every new tab/window that isn't opening a url via the notion:// protocol will load this page. to get a page link from within the app, go to the triple-dot menu and click "copy link". leave blank to just load the last page you opened. | text input                                                                                | `Alt+E`                    |                           |

![](https://user-images.githubusercontent.com/16874139/97819249-7a59b300-1cfb-11eb-99fa-de945fe8e3d9.png)

### tabs

**tags:** #core #extension

**description:** have multiple notion pages open in a single window.

**author:** [dragonwocky](https://github.com/dragonwocky/)

| option                                                                | type                                                                                | values/defaults                                                                                |
| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
| tab select modifier (key+1, +2, +3, ... +9 and key+left/right arrows) | select                                                                                | `Alt`, `Command`, `Control`, `Super`, `Alt+Shift`, `Command+Shift`, `Control+Shift`, `Super+Shift` |
| new tab keybinding                                                    | [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) input | `CommandOrControl+T`                                                                               |
| close tab keybinding                                                  | [accelerator](https://github.com/electron/electron/blob/master/docs/api/accelerator.md) input | `CommandOrControl+W`                                                                               |

![](https://user-images.githubusercontent.com/16874139/97821456-9dd62b00-1d06-11eb-8c3a-e9f77bbd740e.png)

### tweaks

**tags:** #core #extension

**description:** common style/layout changes.

**author:** [dragonwocky](https://github.com/dragonwocky/)

| option                       | extended description                                                                                | type         | values/defaults | platform-specific details |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------- | ------------ | --------------- | ------------------------- |
| height of frameless dragarea | the rectangle added at the top of a window in "integrated titlebar" mode, used to drag/move the window.    | number input | 15              | macOS: forced to 0        |
| width to wrap columns at     | the size in pixels below which in-page columns are resized to appear full width so content isn't squished. | number input | 600             |                           |
| integrated scrollbars        | use scrollbars that fit better into notion's ui instead of the default chrome ones.                        | toggle       | yes             |                           |
| snappy transitions           |                                                                                | toggle       | no              |                           |
| thicker bold text            |                                                                                | toggle       | yes             |                           |
| more readable line spacing   |                                                                                | toggle       | no              |                           |
| hide help button             |                                                                                | toggle       | no              |                           |

![](https://user-images.githubusercontent.com/16874139/97819829-1638ee00-1cff-11eb-80c6-f270c2ba0f37.png)

### always on top

**tags:** #extension

**description:** add an arrow/button to show the notion window
on top of other windows even if it's not focused.

**author:** [dragonwocky](https://github.com/dragonwocky/)

![](https://user-images.githubusercontent.com/16874139/97820478-79784f80-1d02-11eb-9e32-caac4563d8f0.png)

### bracketed links

**tags:** #extension

**description:** render links surrounded with \[\[brackets]] instead of underlined.

**author:** [arecsu](https://github.com/arecsu/)

![](https://user-images.githubusercontent.com/16874139/97820501-9f9def80-1d02-11eb-8ad8-b1ddf1ed9599.png)

### bypass preview

**tags:** #extension

**description:** go straight to the normal full view when opening a page.

**author:** [dragonwocky](https://github.com/dragonwocky/)

### calendar scroll

**tags:** #extension

**description:** add a button to scroll down to the current week in fullpage/infinite-scroll calendars.

**author:** [dragonwocky](https://github.com/dragonwocky/)

![](https://user-images.githubusercontent.com/16874139/97820611-fe636900-1d02-11eb-8f78-0536103e25aa.png)

### cherry cola

**tags:** #theme #dark

**description:** a delightfully plummy, cherry cola flavored theme.

**author:** [runargs](https://github.com/runargs)

![](https://user-images.githubusercontent.com/16874139/97819898-9fe8bb80-1cff-11eb-846f-1a66e0302ebd.png)

### custom inserts

**tags:** #extension

**description:** link files for small client-side tweaks. (not sure how to do something? check out the
[tweaks](https://github.com/notion-enhancer/tweaks) collection.)

**author:** [dragonwocky](https://github.com/dragonwocky/)

| option                | type |
| --------------------- | ---- |
| css insert            | file |
| client-side js insert | file |

### dark+

**tags:** #theme #dark

**description:** a vivid-colour near-black theme.

**author:** [dragonwocky](https://github.com/dragonwocky/)

| option         | type  | values/defaults    |
| -------------- | ----- | ------------------ |
| primary colour | color | `rgb(177, 24, 24)` |

![](https://user-images.githubusercontent.com/16874139/97820632-19ce7400-1d03-11eb-85a9-87f6d957dc96.png)

### dracula

**tags:** #theme #dark

**description:** a theme based on the popular dracula color palette originally by zeno rocha and friends.

**author:** [dracula](https://github.com/dracula/)

![](https://user-images.githubusercontent.com/16874139/97820175-04f0e100-1d01-11eb-9ede-b6e033a28cbc.png)

### emoji sets

**tags:** #extension

**description:** pick from a variety of emoji styles to use.

**author:** [dragonwocky](https://github.com/dragonwocky/)

| option | type   | values/defaults                                                                                |
| ------ | ------ | --------------------------------------------------------------------------------------------------------------- |
| style  | select | twitter, apple, google, microsoft, samsung, whatsapp, facebook, joypixels, openmoji, emojidex, lg, htc, mozilla |

![](https://user-images.githubusercontent.com/16874139/97820652-3f5b7d80-1d03-11eb-80a6-34089b946711.png)

### focus mode

**tags:** #extension

**description:** hide the titlebar/menubar if the sidebar is closed (will be shown on hover).

**author:** [arecsu](https://github.com/arecsu/)

| option                            | extended description                                                                                | type   | values/defaults |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | --------------- |
| add padding to bottom of the page | will only take effect when the sidebar is hidden. aims to make the canvas as symmetrical/consistent as possible: if there is empty space on 3 sides, the 4th should follow. | toggle | on              |

![](https://user-images.githubusercontent.com/16874139/97820337-da535800-1d01-11eb-9df5-55567cba2cc4.png)

### font chooser

**tags:** #extension

**description:** customize fonts. for each option, type in the name of
the font you would like to use, or leave it blank to not change anything.

**author:** [torchatlas](https://github.com/torchatlas)

| option               | type       |
| -------------------- | ---------- |
| sans-serif (inc. ui) | text input |
| serif                | text input |
| monospace            | text input |
| code                 | text input |

![](https://user-images.githubusercontent.com/16874139/97820678-61ed9680-1d03-11eb-8f9f-54c1c5faf25e.png)

### gameish

**tags:** #theme #dark

**description:** a purple, "gamer-styled" theme with a blocky-font.

**author:** [LVL100ShrekCultist](https://reddit.com/user/LVL100ShrekCultist/)

![](https://user-images.githubusercontent.com/16874139/97820696-75006680-1d03-11eb-8046-c3cb871ad34c.png)

### littlepig dark

**tags:** #theme #dark

**description:** a purple monospaced theme using emojis and colourful text.

**author:** [Lizishan](https://www.reddit.com/user/Lizishan/)

![](https://user-images.githubusercontent.com/16874139/97820718-919c9e80-1d03-11eb-9749-e04faef82e2d.png)

### littlepig light

**tags:** #theme #light

**description:** a bright monospaced theme using emojis and colourful text.

**author:** [Lizishan](https://www.reddit.com/user/Lizishan/)

![](https://user-images.githubusercontent.com/16874139/97820868-446cfc80-1d04-11eb-80ba-48cbedd62ed1.png)

### material ocean

**tags:** #theme #dark

**description:** an oceanic colour palette.

**author:** [blacksuan19](https://github.com/blacksuan19)

![](https://user-images.githubusercontent.com/16874139/97820253-6d3fc280-1d01-11eb-86d1-9932b364bad8.png)

### neutral

**tags:** #theme #dark

**description:** smoother colours and fonts, designed to be more pleasing to the eye.

**author:** [arecsu](https://github.com/arecsu/)

![](https://user-images.githubusercontent.com/16874139/97821029-fad0e180-1d04-11eb-9bad-2c76e9fa7613.png)

### night shift

**tags:** #extension #theme

**description:** sync dark/light theme with the system (overrides normal theme setting).

**author:** [dragonwocky](https://github.com/dragonwocky/)

### pastel dark

**tags:** #theme #dark

**description:** a true dark theme with a hint of pastel.

**author:** [zenith_illinois](https://reddit.com/user/zenith_illinois/)

![](https://user-images.githubusercontent.com/16874139/97820893-60709e00-1d04-11eb-8d52-55ab44000786.png)

### property layout

**tags:** #extension

**description:** auto-collapse page properties that usually push down page content.

**author:** [alexander-kazakov](https://github.com/alexander-kazakov/)

![](https://user-images.githubusercontent.com/16874139/97820916-81d18a00-1d04-11eb-8e07-b7519590157a.png)

### right-to-left

**tags:** #extension

**description:** enables auto rtl/ltr text direction detection.

**author:** [obahareth](https://github.com/obahareth/)

![](https://user-images.githubusercontent.com/16874139/97820953-a7f72a00-1d04-11eb-98c0-6ad83d097682.png)

### scroll to top

**tags:** #extension

**description:** add an arrow above the help button to scroll back to the top of a page.

**author:** [CloudHill](https://github.com/CloudHill/)

| option                                  | type         | values/defaults |
| --------------------------------------- | ------------ | --------------- |
| smooth scrolling                        | toggle       | on              |
| distance scrolled until button is shown | number input | 50              |
| unit to measure distance with           | select       | percent, pixels |

![](https://user-images.githubusercontent.com/16874139/97820445-4c2ba180-1d02-11eb-9d1a-911bca266f7f.png)

### weekly view

**tags:** #extension

**description:** calendar views named "weekly" will show only the 7 days of this week.

**author:** [adihd](https://github.com/adihd/)

![](https://user-images.githubusercontent.com/16874139/97820985-bf361780-1d04-11eb-9e2a-786a7c37477d.png)

### word counter

**tags:** #extension

**description:** add page details: word/character/sentence/block count & speaking/reading times.

**author:** [dragonwocky](https://github.com/dragonwocky/)

![](https://user-images.githubusercontent.com/16874139/97821003-d37a1480-1d04-11eb-8aaa-9e5dfea495eb.png)

## contributors

[@TarasokUA](https://github.com/TarasokUA/) wrote the first versions of this in python, in early 2020.
a couple months after I ([@dragonwocky](https://github.com/dragonwocky/)) picked the project up, at first extending
upon the original base and later moving to the javascript module system.

the enhancer wouldn't be anything near to what it is now though without
interested community members testing, coding and ideating features - some are listed as
[contributors](https://github.com/notion-enhancer/notion-enhancer/graphs/contributors) here on github,
but many more have been helping out on discord and in emails.

individual modules have their original authors attributed.

license: MIT

repository: CloudHill/notion-enhancer

branch_name: refs/heads/dev

gha_license_id: MIT

repo_name: CloudHill/notion-enhancer


text:
---
layout: post
title: "ifconfig vs ip"
category: posts
---
__!! ALL of this was stolen from [tty1.net][1]. I liked it so much, I decided to copy it for my own reference. !!__

The command `/bin/ip` has been around for some time now. But people continue using the older command `/sbin/ifconfig`. Let's be clear: `ifconfig` will not quickly go away, but its newer version, `ip`, is more powerful and will eventually replace it.

The man page of `ip` may look intimidating at first, but once you get familiar with the command syntax, it is an easy read. This page will not introduce the new features of `ip`. It rather features a side-by-side comparison if `ifconfig` and ip to get a quick overview of the command syntax.

### Show network devices and configuration
`ifconfig`

`ip addr show`

`ip link show`

### Enable a network interface
`ifconfig eth0 up`

`ip link set eth0 up`

A network interface is disabled in a similar way:

`ifconfig eth0 down`

`ip link set eth0 down`

### Set IP address
`ifconfig eth0 <IP_ADDRESS>`

`ip address add <IP_ADDRESS> dev eth0`

This was the simple version of the command. Often, also the network mask or the broadcast address need to be specified. The following examples show the ifconfig and ip variants.

Needless to say that the netmask can also be given in CIDR notation, e.g. as <IP_ADDRESS>/24.

`ifconfig eth0 <IP_ADDRESS> netmask <IP_ADDRESS> broadcast <IP_ADDRESS>`

`ip addr add <IP_ADDRESS>/24 broadcast <IP_ADDRESS> dev eth0`

### Delete an IP address
With ip it is also possible to delete an address:

`ip addr del <IP_ADDRESS>/24 dev eth0`

### Add alias interface
`ifconfig eth0:1 <IP_ADDRESS>/8`

`ip addr add <IP_ADDRESS>/8 dev eth0 label eth0:1`

### ARP protocol
Add an entry in your ARP table.

`arp -i eth0 -s <IP_ADDRESS> 00:11:22:33:44:55`

`ip neigh add <IP_ADDRESS> lladdr 00:11:22:33:44:55 nud permanent dev eth0`

Switch ARP resolution off on one device

`ifconfig -arp eth0`

`ip link set dev eth0 arp off`

[1]: http://www.tty1.net/blog/2010/ifconfig-ip-comparison_en.html

gha_language: CoffeeScript


text:
# JavaScript and TypeScript

Nx is a general-purpose build system and a general-purpose CLI. It works with JavaScript, TypeScript, Java, C#, Go, etc.. The core plugins Nx comes with do work best with JavaScript or TypeScript.

TypeScript is a great choice for many teams, but not for everyone. If you want to use Nx with JavaScript, simply pass `--js` to all generate commands, as follows:

```shell
nx g @nx/react:app myapp --js
nx g @nx/react:component mycmp --project=myapp --js
```

You can build/test/lint/serve your applications and libraries the same way whether you use JavaScript and TypeScript. You can also mix and match them.

Regardless whether you use JavaScript or TypeScript, you will have a `tsconfig.base.json` file at the root of the workspace. **It's not used to build the applications and libraries in the workspace. It's only used to improve the editor experience.**

## Interested in building and distributing TypeScript packages?

You might want to check out the `@nx/js` package which comes with advanced TypeScript support, including [SWC](https://swc.rs/) and more. Find out more in the [plugin documentation](/packages/js).

repository: nrwl/nx

gha_language: TypeScript

repo_name: nrwl/nx


text:
# CPURTD
CPU Reverse-Tower Defense

###Recommended Tools:
- Visual Studio 2015
- Unity 5.2(.4)
- [SourceTree (1.7)]

###Using Visual Studio as Diff Tool in Source Tree

####Setup*
1. Open Options menu through `Tools` > `Options`
2. Under the `Diff` tab, set `External Diff Tool` to `Custom`
3. Set the `Diff Command` to `[VS Install Directory]\Common7\IDE\vsDiffMerge.exe`, where `[VS Install Directory]` is probably `C:\Program Files (x86)\Visual Studio 14.0` and `Arguments` to `$LOCAL $REMOTE \\t`
4. Set `External Merge Tool` to `Custom`
5. Set the `Diff Command` to `[VS Install Directory]\Common7\IDE\vsDiffMerge.exe`, where `[VS Install Directory]` is probably `C:\Program Files (x86)\Visual Studio 14.0` and `Arguments` to `$LOCAL $REMOTE $BASE $MERGED \\m`

*[Source](https://github.com/Inmeta/Knowledge/wiki/Setting-Up-DiffMerge#setting-up-diff-and-merge-for-sourcetree)

####Usage

When a merge conflict is encountered in SourceTree:

1. Right click on the conflicted file and select `Resolve Conflicts` > `Launch External Merge Tool` *(note: Visual Studio may take a few seconds to start up)*
2. When Visual Studio Launches, select the correct changesets and make adjustments to resolve conflicts
3. Click `Accept Merge` (small button in the directly above the split view to the left). The spilt view should be closed.
4. When you focus back to SourceTree, the merged file should be automatically Staged and a `[conflicted file].orig` created. The `.orig` file can be safely deleted.

###Project Setup

1. On the repo page in GitHub, change clone url from `SSH` to `HTTPS` and copy the clone URL (above the repo file listing).
2. In SourceTree, click `Clone / New`.
3. In the dialog that appears paste the clone URL into the `Source Path / URL:` field
2. Set the `Destination Path:` to where ever you want the project
3. Click `Clone`

####Visual Studio Tools for Unity (VS 2015)*

Better integration between Visual Studio and Unity, allows VS breakpoints and inspection

**[Download VS Tools for Unity](https://visualstudiogallery.msdn.microsoft.com/8d26236e-4a64-4d64-8486-7df95156aba9)** and complete setup

**For Editor debugging**, run "Attch to Unity" in Visual Studio, then run the game from Unity. *Warning: Pausing from VS crashes Unity.*

**For Build debugging** In Unity, open the Build Settings dialog under `File > Build Settings` and check `Development Build` and `Script Debugging` (haven't actually gotten this to work).

*[Source](https://msdn.microsoft.com/en-us/library/dn940025.aspx)

gha_language: C#


text:
# extra_hittest_area

[![pub package](https://img.shields.io/pub/v/extra_hittest_area.svg)](https://pub.dartlang.org/packages/extra_hittest_area) [![GitHub stars](https://img.shields.io/github/stars/fluttercandies/extra_hittest_area)](https://github.com/fluttercandies/extra_hittest_area/stargazers) [![GitHub forks](https://img.shields.io/github/forks/fluttercandies/extra_hittest_area)](https://github.com/fluttercandies/extra_hittest_area/network)  [![GitHub license](https://img.shields.io/github/license/fluttercandies/extra_hittest_area)](https://github.com/fluttercandies/extra_hittest_area/blob/master/LICENSE)  [![GitHub issues](https://img.shields.io/github/issues/fluttercandies/extra_hittest_area)](https://github.com/fluttercandies/extra_hittest_area/issues)

Language: README.md | [中文简体](README-ZH.md)

Manually add the extra hitTest area of a widget without changing its size or layout.

## Parent widgets

The widgets are the same as offical widgets. They are make sure your widget can get hitTest from parent, use them if extra hitTest area are beyond the size of parent.

* `StackHitTestWithoutSizeLimit`
* `RowHitTestWithoutSizeLimit`, `ColumnHitTestWithoutSizeLimit`, `FlexHitTestWithoutSizeLimit`
* `SizedBoxHitTestWithoutSizeLimit`
## Listener widgets

* `GestureDetectorHitTestWithoutSizeLimit`
* `RawGestureDetectorHitTestWithoutSizeLimit`
* `ListenerHitTestWithoutSizeLimit`

| parameter        | description               | default         |
| ---------------- | ------------------------- | --------------- |
| extraHitTestArea | The extra area of hitTest | EdgeInsets.zero |
| debugHitTestAreaColor | The color of the extra area | null |

you can also set `ExtraHitTestBase.debugGlobalHitTestAreaColor` instead set `debugHitTestAreaColor` in everytime.

```dart
return GestureDetectorHitTestWithoutSizeLimit(
  child: mockButtonUI(text),
  //debugHitTestAreaColor: Colors.pink.withOpacity(0.4),
  extraHitTestArea: const EdgeInsets.all(16),
  onTap: () {
    showToast('$text:onTap${i++}',
        duration: const Duration(milliseconds: 500));
  },
);
```

## Implements other HitTestWithoutSizeLimit

if some widgets are not included in this package, you can implements them with following classes.

* `RenderBoxHitTestWithoutSizeLimit`, `RenderBoxChildrenHitTestWithoutSizeLimit`


text:
CloudFormation 101
==================

# About this repository

This repository contains three key sections.

- `./presentation` is a HTML based presentation to guide you through the training session
- `./src/exercise-*` contains the supporting material, referenced in the presentation
- `./src/setup` contains information about preparing the training session

# Objectives

This repository is intended to be a primer on the use of AWS CloudFormation for the automatic creation of AWS resources.
Assumptions are: Little to no AWS experience prior to the session.

# Prerequisites

* An AWS account with a user that can execute CloudFormation stacks (along with EC2 & SQS)
* A basic knowledge of JSON
* A ssh public key to ssh to an ec2 instance

# Setup Instructions

## Simple (for one person)
For the exercises to work you'll need a few basic supporting components (VPC, Subnet, Security Group). AWS provides these by default so you could skip the setup if you're only interested in completing the exercises yourself.

## Advanced (to run your own demos)
If you'd like to run the exercises for others, we've provided a CloudFormation template that creates the required VPC, Subnet, Security Group and Jumpbox. Create the supporting stack by doing the following:

- Logging into AWS https://signin.aws.amazon.com/console/
- then selecting `Servces > CloudFormation > Create Stack`.
- Choosing the template `./scr/setup/cf101-vpc.template`,
- then giving your stack a name,
- then suppling a valid AWS KeyName (a Public key you've uploaded to AWS).
- Also, make sure you choose an appropriate instance `EC2InstanceType`. `t2.small` is a good choice if you're not sure.
- Continue with the defaults for everything else.

This will create a VPC (an isolated network for us to play in) and Jumpbox (a virtual machine that we'll use as an entry point to login to other machines via ssh). This is a common pattern for AWS and other networks.

If you're intended on having others follow the exercises you'll want to manage ssh users and keys on the jumpbox. There's a script `./src/setup/create_user.sh` that has been supplied to handle this for you if you update the `S3_URL` variable to point to an S3 Bucket with the public keys. You can then run this script on the Jumpbox.

# Exercises

In your browser open the [Presentation](presentation/index.html) and follow along.

repository: hmcmanus/training

repo_name: hmcmanus/training


text:
# Cytosim grammar

This is a text editor bundle with a grammar that provides syntax highlighting for [cytosim](https://gitlab.com/f.nedelec/cytosim). We provide a guide to install it in Textmate and Sublime Text. [Textmate](https://macromates.com/) is mac only, and [Sublime Text](https://www.sublimetext.com/) can be also installed in Windows and Linux.

When you include this bundle in your text editor, the grammar of files with the extension `.cym` and `.cym.tpl` will be changed to the grammar provided, that results in syntax highlighting as shown in here:

![](example_grammar.png)

As you can see, it provides syntax highlighting, and allows for `%%` to produce a different kind of comment to define sections.

Furthermore, if you are using `preconfig.py`, it provides python syntax highlighting within sections in double square brackets.

Also, you can comment and uncomment lines using the usual shortcut `Cmd + /` in mac and `Ctrl + /` in windows.

## How to install it in textmate (mac):

Just drag the file `Cytosim.tmbundle` file into the icon of Textmate in the dock, and accept.

![](dock.png)

## How to install it in sublime text:
Go to `Preferences>Browse Packages`. It will open a file explorer window, which contains a folder called `User`. Copy the file `Cytosim.tmbundle` into the folder `User`.

![](preferences.png)

repository: manulera/cytosimGrammar

repo_name: manulera/cytosimGrammar


text:
# QUORUM TRUFFLE BOX

This truffle box makes it easy for you to quickly deploy on a quorum node. Contract's can then be interacted with using the generated front-end, ala remix-style.

By default, it uses the default node account generated when a new Quorum node is created. To not use the default node account, simply change the mnemonic or private key in password.js.

## Password.js

Input your mnemonic and Quoroum node RPC into this file. To create your own node, we recommend you to try out Chainstack's 2 week trial [here](https://console.chainstack.com).

To run Quorum nodes locally, head over to truffle's Quorum documentation [here](https://www.trufflesuite.com/docs/truffle/getting-started/working-with-quorum)

## Dependencies
Install all dependencies
```
npm install
```

## Contract deployment

Simply run
```
truffle migrate --network quorum
```

Make sure to have included your mnemonic,rpc and explorer url (if using Chainstack).

## Deploying front end

The frontend application is built using VueJS. You will have to build it first.
NOTE: Before building the front end, please migrate all your contracts. You have to install dependencies if this is the first time running the front end application
```
cd frontend
npm install
npm run build
```

The `/dist/` folder should appear in the project root. Go to the project root and execute `start.js`

```
node start.js
```


text:
# Sunny Land

## Welcome!
Welcome to the Sunny Land project! This game is a simple 2D platformer made in the Godot Game Engine. This is one of my first ever games, and this is only considered, and should be treated as, a prototype.

#
## Building the Game
This section demonstrates how to download the project and work with it.
### Prerequesities
* [Godot Engine](https://godotengine.org/) - Download the version of which OS you have.
### How to Build
1. Download the Godot Engine (it should say download in the top toolbar) and download either the standard version or the mono version. This project was made on a 64bit system, so I cannot test whether it works on a 32bit system or not.
2. Open the Godot executable and go to "Import". Open the folder in which you downloaded this project.
3. And there you go! If you need some help, feel free to contact me.

#
## Credits
* [RedstoneMCPC/MCPCStudios](https://www.youtube.com/channel/UCBYz_oj04vkR4ydIfIphvSQ) - Author
* [Godot Discord](https://discord.com/invite/4JBkykG) - Helping to forward this game to Git!

## Licenses
* [Project](LICENSE.md)
* [Godot Engine](https://godotengine.org/license)
* [Art](https://opengameart.org/content/sunny-land-2d-pixel-art-pack)
* [Music](https://www.patreon.com/thetoadz)

repository: RedstoneMCPC/sunnyLand

repo_name: RedstoneMCPC/sunnyLand


text:
# mutateAndFade
mutateAndFade( **element**,  **mutateFunction**, **options**,  )

  **element**   The element that you want to change.

  **mutateFunction**   A function that receives an element and modifies it. This element may be the element you provided or a clone of it.

  **options**  { **duration**,  **timingFunction** }

**Keep in mind:**

The inline style of the provided element should be left blank to avoid conflict. The module uses this styles.

It's suggested to use a wrapper and then change the styles of the elements inside it. If you need to set the wrapper styles, make use of classes.

repository: nathanaelsousa/mutateAndFade

repo_name: nathanaelsousa/mutateAndFade


text:
# Getting Started

## Installation

Install from the NPM repository using yarn or npm:

```bash
$ npm i -S node-powershell
```

```bash
$ yarn add node-powershell
```

## Importing

### ES6

```javascript
import Shell from 'node-powershell'
```

### ES5 (CommonJS)

```javascript
const Shell = require('node-powershell')
```

repository: felixgrey/node-powershell

repo_name: felixgrey/node-powershell


text:
# Coinbase-Pro-Neo4j-Map
Which Coinbase Pro cryptocurrencies are tied to which? Find out with this small Neo4j project!

## Usage
Open your installation of Neo4j, make a new project, and run the provided Cypher commands. This should load the CSV-files into your database, so you can study the relationships between Coinbase Pro's currency pairs.

Enjøy!


text:
---
layout: post
title: Adventures in PostgreSQL - Extract Epoch
---

Recently I needed to create a database query that compares the timestamps of several rows of data. It took me substantial detective work and googling, so I figured I'd document the solution in a blog post.

PostgreSQL provides various functions for working with `date` and `timestamp` datatypes. The `EXTRACT` method allows you to select a certain attribute from a piece of data.

```sql
EXTRACT(field FROM source)
```

From the documentation:
> The extract function retrieves subfields such as year or hour from date/time values. source must be a value expression of type timestamp, time, or interval. (Expressions of type date will be cast to timestamp and can therefore be used as well.) field is an identifier or string that selects what field to extract from the source value. The extract function returns values of type double precision.

Example:

```sql
SELECT EXTRACT(DAY FROM TIMESTAMP '2001-02-16 20:38:40');
Result: 16
```

For my specific use case, I wanted to find the difference between timestamps, so I needed to use the `EPOCH` field. Extracting the epoch from a `date` or `timestamp` returns the number of seconds since `1970-01-01 00:00:00-00` (the Unix Epoch time).

Example:

```sql
SELECT EXTRACT(EPOCH FROM TIMESTAMP WITH TIME ZONE '2001-02-16 20:38:40-08');
Result: 982384720
```

Specifically, I needed to determine (given a set of criteria) whether at least two records had been created 10 minutes apart from each other.

I ended up writing a subquery that compared the absolute differences of the timestamps. Here is an abbreviated version of the final query:

```sql
SELECT *
FROM fruits x
WHERE EXISTS (
  SELECT 0
  FROM fruits y
  WHERE ABS((EXTRACT (EPOCH from x.time))-(EXTRACT (EPOCH from y.time))) < 600
  AND ABS((EXTRACT (EPOCH from x.time))-(EXTRACT (EPOCH from y.time))) > 0
)
```

This query works well, but shoot me an email if you have other efficient and elegant solutions.

---
## SOURCES
PostgreSQL

gha_language: SCSS

gha_license_id: NOASSERTION


text:
# Datasets module in aepp

This documentation will provide you some explanation on how to use the Datasets module and different methods supported by this module.\
Contrary to the other documentation, due to the limited methods available, all methods will be documented here.\
To have a full view on the different API endpoints specific to the schema API, please refer to this [API documentation](https://www.adobe.io/apis/experienceplatform/home/api-reference.html#!acpdr/swagger-specs/dataset-service.yaml).\
Alternatively, you can use the docstring in the methods to have more information.

## What is the Datasets in AEP ?

The Dataset Service API provides several endpoints to help you manage data usage labels for existing datasets within the Data Lake.\
Data usage labels are part of Adobe Experience Platform Data Governance, which allows you to manage customer data and ensure compliance with regulations, restrictions, and policies applicable to data use.\
Dataset Service is separate from Catalog Service, which manages other dataset metadata.\
If you wish to create datasets and manage datasets elements, you should then refer to the [catalog documentation](./catalog.md)

## Importing the module

Before importing the module, you would need to import the configuration file, or alternatively provide the information required for the API connection through the configure method. [see getting starting](./getting-started.md)

To import the module you can use the import statement with the `datasets` keyword.

```python
import aepp
aepp.importConfigFile('myConfig_file.json')

from aepp import datasets
```

The datasets module provides a class that you can use for managing your labels on your datasets.

## The Datasets class

The Datasets class uses the default API connector that you would encounter for any other submodules on this python module.\
This class can be instanciated by calling the `Datasets()` from the `datasets` module.

Following the previous method described above, you can realize this:

```python
datasetslabels = datasets.Datasets()
```

2 parameters are possible for the instanciation of the class:

* config : OPTIONAL : config object in the config module. (example : aepp.config.config_object)
* header : OPTIONAL : header object  in the config module. (example: aepp.config.header)

## Datasets methods

* `getLabels`
  Return the labels assigned to a dataSet
  Argument:
  * dataSetId : REQUIRED : the dataSet ID to retrieve the labels

* `headLabels`
  Return the head assigned to a dataSet. You would required the ETAG parameter to modify or delete the labels.
  Argument:
  * dataSetId : REQUIRED : the dataSet ID to retrieve the head data

* `deleteLabels`
  Delete the labels of a dataset.
  Arguments:
  * dataSetId : REQUIRED : The dataset ID to delete the labels for.
  * ifMatch : REQUIRED : the value is from the header etag of the headLabels. (use the headLabels method)

* `createLabels`
  Assign labels to a dataset.
  Arguments:
  * dataSetId : REQUIRED : The dataset ID to delete the labels for.
  * data : REQUIRED : Dictionary setting the labels to be added.
    more info https://www.adobe.io/apis/experienceplatform/home/api-reference.html#/Datasets/postDatasetLabels

* `updateLabels`
  Update the labels (PUT method)
  * dataSetId : REQUIRED : The dataset ID to delete the labels for.
  * data : REQUIRED : Dictionary setting the labels to be added.
        more info https://www.adobe.io/apis/experienceplatform/home/api-reference.html#/Datasets/postDatasetLabels
  * ifMatch : REQUIRED : the value is from the header etag of the headLabels.(use the headLabels method)

On top of these methods, you will have access to an attribute of your instance that will provide you a dictionary sample for creation of labels for a dataset.\
The name of the attribute is `REFERENCE_LABELS_CREATION`\
The output will be:

```JSON
{
    "labels": [
        [
        "C1",
        "C2"
        ]
    ],
    "optionalLabels": [
        {
        "option": {
            "id": "https://ns.adobe.com/{TENANT_ID}/schemas/{SCHEMA_ID}",
            "contentType": "application/vnd.adobe.xed-full+json;version=1",
            "schemaPath": "/properties/repositoryCreatedBy"
        },
        "labels": [
            [
            "S1",
            "S2"
            ]
        ]
        }
    ]
}
```

repository: awiddie/aepp

repo_name: awiddie/aepp


text:
---
layout: default
---

# 1996-08-12 - Re: National Socio-Economic Security Need for Encryption Technology

## Header Data

From: "Perry E. Metzger"<EMAIL_ADDRESS>To: Bart Croughs<EMAIL_ADDRESS>Message Hash: 75f6076542652b362f3406c2c6b1b7a5eebc5ddf4b8af4ffa2dc98fd7309354a

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1996-08-12 02:06:35 UTC

Raw Date: Mon, 12 Aug 1996 10:06:35 +0800

## Raw message

```
{% raw  %}From: "Perry E. Metzger"<EMAIL_ADDRESS>Date: Mon, 12 Aug 1996 10:06:35 +0800
To: Bart Croughs<EMAIL_ADDRESS>Subject: Re: National Socio-Economic Security Need for Encryption Technology
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

I realized that I'd simply dismissed Bart without explaining why his
contention is so silly.

"Perry E. Metzger" writes:
> Bart Croughs writes:
> > 	 But there is another axiom of economics which the
> > nationalist/socialist can use for his case against the free movement of
> > capital. This axiom states that the wages of workers depend on the
> > amount of capital invested. The more capital invested, the higher the
> > wages are.
>
> This must be some new axiom of economics that I had not heard of.

I failed to note obvious counterexamples. Well known authors get giant
advances for books written with manual typewriters. Minimum wage
workers routinely operate expensive equipment. Workers doing the same
job in different places using identical equipment that cost identical
sums earn different salaries.

Clearly, wages are defined by supply and demand -- not by "capital
investment".

Perry

{% endraw %}
```

## Thread

+ Return to [August 1996](/archive/1996/08)

+ Return to "[Bart  Croughs <bart.croughs@tip.nl>](/authors/bart_croughs_bart_croughs_at_tip_nl_)"
+ Return to "["Perry E. Metzger" <perry@piermont.com>](/authors/perry_e_metzger_perry_at_piermont_com_)"
+ Return to "[Sandy Sandfort <sandfort@crl.com>](/authors/sandy_sandfort_sandfort_at_crl_com_)"

+ 1996-08-11 (Mon, 12 Aug 1996 07:43:38 +0800) - [re: National Socio-Economic Security Need for Encryption  Technology](/archive/1996/08/4280c7522835075a14b1576614d10d04990274591d9a9bc9f0fede020fa641b7) - _Bart  Croughs<EMAIL_ADDRESS>  + 1996-08-12 (Mon, 12 Aug 1996 09:28:51 +0800) - [Re: National Socio-Economic Security Need for Encryption Technology](/archive/1996/08/ed88514ac15ad0f01d46f24691a0cdb07c0b5314df58d31dad080050608459f7) - _"Perry E. Metzger"<EMAIL_ADDRESS>    + 1996-08-12 (Mon, 12 Aug 1996 10:06:35 +0800) - Re: National Socio-Economic Security Need for Encryption Technology - _"Perry E. Metzger"<EMAIL_ADDRESS>  + 1996-08-12 (Mon, 12 Aug 1996 12:58:38 +0800) - [re: National Socio-Economic Security Need for Encryption Technology](/archive/1996/08/80dd2f883d615acc4e4136c7baabb8bb8514b32a7c87f051ed3a4e3b2586a957) - _Sandy Sandfort<EMAIL_ADDRESS>


text:
# Priva2TOA5

Python script to download Priva-generated CSV files (containing data from Western Sydney University's Glasshouse Facility)
from the associated gmail email address and convert those files to TOA5 format (thus enabling smart upload into HIEv)

## Getting Started

To enable this script to log into the associated gmail address, a matching file entitled credentials.py must be created alongside the main script file, with contents:

    gmail_login = {
        'username'<EMAIL_ADDRESS>        'password': "<insert gmail password>"
    }

### Prerequisites

Python 3

Pandas library (via pip install etc)

## Authors

**Gerard Devine** - Hawkesbury Institute for the Environment

## License

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


text:
### Prep work

First up, you'll need to update your local machines Execution Policy to allow for these cmdlets to to be executed.

Open your PowerShell console as an administrator and run the following commands:

#### Check and set your machines' execution policy

~~~powershell
> Get-ExecutionPolicy -List

# expected default results:
#
#           Scope ExecutionPolicy
#           ----- ---------------
#   MachinePolicy       Undefined
#      UserPolicy       Undefined
#         Process       Undefined
#     CurrentUser       Undefined
#    LocalMachine       Undefined

> Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine -Force # update your local machine scope to be unrestricted
> Get-ExecutionPolicy -List

# expected results:
#
#           Scope ExecutionPolicy
#           ----- ---------------
#   MachinePolicy       Undefined
#      UserPolicy       Undefined
#         Process       Undefined
#     CurrentUser       Undefined
#    LocalMachine    unrestricted
~~~

If you haven't done so already, you'll need to install the the SharePoint PowerShell cmdlets from [PowerShell Gallery: Microsoft.Online.SharePoint.PowerShell](https://www.powershellgallery.com/packages/Microsoft.Online.SharePoint.PowerShell/).

We will do this via the PowerShell console. Run the following commands:

```powershell
> Install-Module -Name Microsoft.Online.SharePoint.PowerShell -AllowClobber -Force;

> Get-Module -Name *SharePoint.PowerShell -ListAvailable | Select-Object Name,Version;

# expected results:
#
# Name                                   Version
# ----                                   -------
# Microsoft.Online.SharePoint.PowerShell [latestVersionNumber]
```

Now you'll need to do the same for [PNP PowerShell](https://www.powershellgallery.com/packages/SharePointPnPPowerShellOnline/), run the following commands:

```powershell
> Install-Module SharePointPnPPowerShellOnline -AllowClobber -Force

> Get-Module -Name SharePointPnPPowerShell* -ListAvailable | Select-Object Name,Version

# expected results:
#
# Name                          Version
# ----                          -------
# SharePointPnPPowerShellOnline [latestVersionNumber]
```

**A note on the -AllowClobber switch**

If you import a command with the same name as a command in the current session, the imported command hides or replaces the original commands when -AllowClobber is specified. This goes a long way towards avoiding ambiguity. We'll be using this somewhat regulrarly.

You're now good to continue.

### SPO PowerShell

#### Notes about the SPO cmdlets

Now, we're going to use the SPO cmdlets to connect to the admin admin centre, this is what we use these for, **but please be aware that you can do a lot of harm there, tread carefully**. PNP PowerShell is used for, and is far better at manipulating individual site collections, we'll come onto that soon in the next section.

Please take a moment to familiarise yourself with the documentation for [Connect-SPOService](https://docs.microsoft.com/en-us/powershell/module/sharepoint-online/connect-sposervice?view=sharepoint-ps), specifically:

> Connects a SharePoint Online administrator or Global Administrator to a SharePoint Online connection (the SharePoint Online Administration Center). This cmdlet must be run before any other SharePoint Online cmdlets can run.

#### Connect to the SharePoint Online Administration Center

```powershell
> Connect-SPOService -Url https://[tenantName]-admin.sharepoint.com/ # you'll be prompted for credentials

# you should now be connected to the admin centre

> $sites = Get-SPOSite # get all sites within this tenant

> $sites # display the sites you just retrieved

# example results:
#
# Url                                                Owner                Storage Quota
# ---                                                -----                -------------
# https://[tenantName].sharepoint.com/search                              26214400
# https://[tenantName].sharepoint.com/teams/team1<EMAIL_ADDRESS>  26214400
# https://[tenantName].sharepoint.com/teams/team2<EMAIL_ADDRESS>  26214400
# https://[tenantName].sharepoint.com/                                    26214400
# https://[tenantName].sharepoint.com/sites/site1                         26214400
# https://[tenantName].sharepoint.com/teams/team3                         26214400
# https://[tenantName].sharepoint.com/sites/site2                         26214400
#
#   remainder elided for brevity
```

You can now continue and work on your tenant using the SPO cmdlets, though remember, be careful! One last thing...

```powershell
> Disconnect-SPOService # always disconnect when you're finished!
```

### PNP PowerShell

Next up, we're going to do something very similar using PNP PowerShell, though this time we will be connecting directly to an existing Site Collection.

```powershell
> Connect-PnPOnline -Url https://[tenantName].sharepoint.com/sites/[siteName] # enter your credentials

# if the previous method fails, you've likely got MFA enabled on your tenant, use this instead

> Connect-PnPOnline -Url https://[tenantName].sharepoint.com/sites/[siteName] -UseWebLogin # this will provide a web login interface

# you should now be connected to your chosen site

> $site = Get-PNPSite # retrieve a reference to the current site and persist it to a variable

> $site

# example results:
#
# Url                                                     CompatibilityLevel
# ---                                                     ------------------
# https://[tenantName].sharepoint.com/sites/[siteName]    15

# now you can do some cool stuff, let's retrieve this site collections' recycle bin items

> $rec = Get-PnPRecycleBinItem

# example results:
#
# Title                  Id       ItemType   LeafName
# -----                  --       --------   --------
# Test Document 1.docx   [guid]   File       Test Document 1.docx
# Test Doc 3.docx        [guid]   File       Test Doc 3.docx
# Test Doc 3.docx        [guid]   File       Test Doc 3.docx
# Test Doc 1.docx        [guid]   File       Test Doc 1.docx
# Test Doc 2.docx        [guid]   File       Test Doc 2.docx
```

You could now continue removing those recycle bin items if you felt like it.

#### SharePoint Client-Side Object Model in PnP PowerShell (CSOM)

I'm now going to demonstrate using [CSOM](https://www.c-sharpcorner.com/article/sharepoint-client-object-modal-csom/#:~:text=Introduction,outside%20without%20using%20web%20services.) while we're still connected to the previous site collection with PNP.

One important part to note is that all of these cmdlets are built using CSOM behind the scenes (both SPO and PnP). CSOM is a derivative of C#, so if you know that language you'll do well here - if not, read along and use some Google-Fu to catch up where necessary.

```powershell
# we should still be connected to a site collection, if not, reconnect using Connect-PnPOnline

# retrieve the context of the connected site
> $ctx = Get-PnPContext

> $ctx

# expected results:
#
# RetryCount                   : 10
# Delay                        : 1000
# PropertyBag                  : {}
# Web                          : Microsoft.SharePoint.Client.Web
# Site                         : Microsoft.SharePoint.Client.Site
# RequestResources             : Microsoft.SharePoint.Client.RequestResources
# FormDigestHandlingEnabled    : True
# ServerVersion                : 16.0.20308.12005
# Url                          : https://[tenantName].sharepoint.com/sites/[siteName]
# ApplicationName              : SharePoint PnP PowerShell Library
# ClientTag                    : PnPPS:2006:Get-PnPRecycleBinItem
# DisableReturnValueCache      : True
# ValidateOnClient             : True
# AuthenticationMode           : Default
# FormsAuthenticationLoginInfo :
# Credentials                  : Microsoft.SharePoint.Client.SharePointOnlineCredentials
# WebRequestExecutorFactory    : Microsoft.SharePoint.Client.DefaultWebRequestExecutorFactory
# PendingRequest               : Microsoft.SharePoint.Client.ClientRequest
# HasPendingRequest            : True
# Tag                          :
# RequestTimeout               : 1800000
# StaticObjects                : {[Microsoft$SharePoint$SPContext$Current, Microsoft.SharePoint.Client.RequestContext]}
# ServerSchemaVersion          : <IP_ADDRESS>
# ServerLibraryVersion         : 16.0.20308.12005
# RequestSchemaVersion         : <IP_ADDRESS>
# TraceCorrelationId           : [guid]
```

Great, we've got far more information than we had before. What can we do with it?

Let's try to retrieve all of the Lists that have been provisioned on this Site Collection, this is still just PnP, we'll get back to CSOM soon, I promise:

```powershell
> $lists = Get-PnPList # retrieve all lists on this Site Collection

> $lists

# example results:
#
# Title                               Id       Url
# -----                               --       ---
# _catalogs/hubsite                   [guid]   /sites/[siteName]/_catalogs/hubsite
# appdata                             [guid]   /sites/[siteName]/_catalogs/appdata
# appfiles                            [guid]   /sites/[siteName]/_catalogs/appfiles
#
# -------- elided
#
# Documents                           [guid]   /sites/[siteName]/Shared Documents
#
#   remainder elided for brevity
```

Let's isolate our Shared Documents Library from within our `$lists` object.

```powershell
> $docLib = $lists | Where-Object {$_.Title -eq "Documents"}

> $docLib

# expected results:
#
# Title       Id       Url
# -----       --       ---
# Documents   [guid]   /sites/OrgDemo/Shared Documents
```

We're getting there, I promise.

Let's say that we now need to retrieve all of the Site Content Types that are attached to this Library. Surely we can just do this right?

```powershell
> $docLib.ContentTypes

# An error occurred while enumerating through a collection: The collection has not been initialized. It has not been requested or the request
has not been executed. It may need to be explicitly requested..
```

Ruh-roh!

What's happened here? The explanation is in the exception output.

> The collection has not been initialized

And:

> It may need to be explicitly requested

**So what do we do?**

This is going to get a little heavy, bare with me.

```powershell
# we've already got our context, but just to be sure...
> $ctx # retrieve it again if it's null with $ctx = Get-PnPContext

# retrieve Content Types from $docLib
> $contentTypes = $docLib.ContentTypes # <- CSOM
> $ctx.Load($contentTypes) # <- CSOM
> $ctx.ExecuteQuery() # <- CSOM
> $contentTypes

# example results:
#
Name                   Id       Group           Description
----                   --       -----           -----------
Document               [guid]   Content Types   Generic Document
Folder                 [guid]   Content Types   Create a new folder
```

CSOM to the rescue! You can take this further by slowly building up the objects you're working with by retrieving all Fields on each Content Type, or whatever else you need to do. Pretty cool huh?

Don't forget to disconnect from your PnP Session!

```powershell
> Disconnect-PnPOnline
```

Let me know if you've got any questions.

Job's another goodun!


text:
## react-native-multi-share

Drop-in replacement of react-native `Share` module, provides the ability to share multiple images.

### Installation

```
npm i react-native-multi-share --save
```

```
react-native link react-native-multi-share
```

#### Using CocoaPods

```
# Add to Podfile
pod 'react-native-multi-share', :path => '../node_modules/react-native-multi-share'
```

### Usage

```javascript
import MultiShare from 'react-native-multi-share';

async function onShare() {
  await MultiShare.share({ images: ['file:///.../image1.jpg', ...] });
}
```

### Common Issues

#### Does not work android

The images has to be copy to external storage, other apps cannot read your document folder.

```js
// Copy the files to the external storage
import RNFetchBlob from 'react-native-fetch-blob';

const fs = RNFetchBlob.fs;

// Android Only
async function getExternalCacheDirAsync() {
  const dir = `${fs.dirs.SDCardApplicationDir}/cache`;
  if (!await fs.isDir(dir)) {
    await fs.mkdir(dir);
  }
  return dir;
}

export async function copyToExternalCacheDirAsync(from) {
  const dir = await getExternalCacheDirAsync();
  const filename = from.replace(/^.*[\\/]/, '');
  const to = `${dir}/${filename}`;
  await RNFetchBlob.fs.cp(from, to);
  return to;
}

```

### Todos

- [x] Test on react-native
- [x] Test on detached expo.io project
- [x] iOS
- [x] Android
- [ ] Pull request to react-native
- [ ] Test using images along with other fields

repository: katafo/react-native-multi-share

repo_name: katafo/react-native-multi-share


text:
# deckgo-slide-poll

Engage your audience or class in real time. Involve them to contribute to your presentations with their smartphones and show the results live.

Add a slide "Poll" to your presentation.

## Nota bene

This template does **not** currently save the results of the voting. Each time you will refresh or launch your presentation, the poll start again.

If you would have this requirement, let us now with a new [feature request](https://github.com/deckgo/deckdeckgo/issues) in our GitHub issue tracker.

## Installation

This template could be added to your presentation using the following methods.

> This template is included per default in our Developer Kit

### From a CDN

It's recommended to use [unpkg](https://unpkg.com/) to use this template from a CDN. To do so, add the following include script in the main HTML file of your project:

```
<script type="module" src="https://unpkg.com/<EMAIL_ADDRESS>```

### From NPM

To install this template in your project from [npm](https://www.npmjs.com/package/@deckdeckgo/slide-poll) run the following command:

```bash
npm install @deckdeckgo/slide-poll
```

### Framework integration

The [Stencil documentation](https://stenciljs.com/docs/overview) provide examples of framework integration for [Angular](https://stenciljs.com/docs/angular), [React](https://stenciljs.com/docs/react), [Vue](https://stenciljs.com/docs/vue) and [Ember](https://stenciljs.com/docs/ember).

That being said, commonly, you might either `import` or `load` it:

#### Import

```
import '@deckdeckgo/slide-poll';
```

#### Loader

```
import { defineCustomElements as deckDeckGoSlideElement } from '@deckdeckgo/slide-poll/dist/loader';
deckDeckGoSlideElement();
```

## Usage

The "Poll" slide's Web Component could be integrated using the tag `<deckgo-slide-poll/>`.

```
<deckgo-slide-poll poll-link="https://deckdeckgo.com" socket-url="https://api.deckdeckgo.com">
    <h1 slot="question">Do you like my presentation so far?</h1>
    <p slot="answer-1">It is super</p>
    <p slot="answer-2">Meh</p>
    <p slot="answer-3">I could'nt care less</p>
    <p slot="answer-4">Tell me why</p>
    <p slot="answer-5">Ain't nothin' but a heartache</p>
    <p slot="how-to">Go to <a href="https://deckdeckgo.com/poll">deckdeckgo.com/poll</a> and use the code {0}</p>
    <p slot="awaiting-votes">Awaiting first votes</p>
</deckgo-slide-poll>
```

<!-- Auto Generated Below -->

## Properties

| Property            | Attribute             | Description                                                                                | Type      | Default                             |
| ------------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ----------------------------------- |
| `connectPollSocket` | `connect-poll-socket` | In case you would not like that the template try to reach the socket server                                                                                | `boolean` | `true`                              |
| `customActions`     | `custom-actions`      | If you provide actions for the all deck but, a specific one for this slide, set this option to true                                                            | `boolean` | `false`                             |
| `customBackground`  | `custom-background`   | If you define a background for the all deck but, a specific one for this slide, set this option to true                                                        | `boolean` | `false`                             |
| `pollKey`           | `poll-key`            | Per default the template will always try to create a new poll but if you set this value, it will try to retrieve an existing poll                              | `string`  | `undefined`                         |
| `pollLink`          | `poll-link`           | The url which leads to the voting application respectively where your audience will be available to make their voice heard aka where they will be able to vote | `string`  | `'https://app.deckdeckgo.com/poll'` |
| `socketPath`        | `socket-path`         | The path to reach the socket server                                                                                | `string`  | `'/poll'`                           |
| `socketUrl`         | `socket-url`          | The url of the socket (server) where the poll (chat room) is going to be created                                                                               | `string`  | `'https://api.deckdeckgo.com'`      |

## Events

| Event          | Description                        | Type                |
| -------------- | ---------------------------------- | ------------------- |
| `pollUpdated`  |                                    | `CustomEvent<void>` |
| `slideDidLoad` | Triggered when the slide is loaded | `CustomEvent<void>` |

## Methods

### `afterSwipe() => Promise<void>`

#### Returns

Type: `Promise<void>`

### `beforeSwipe(_enter: boolean, _reveal: boolean) => Promise<boolean>`

#### Returns

Type: `Promise<boolean>`

### `hideContent() => Promise<void>`

#### Returns

Type: `Promise<void>`

### `isAnswered() => Promise<boolean>`

#### Returns

Type: `Promise<boolean>`

### `lazyLoadContent() => Promise<void>`

#### Returns

Type: `Promise<void>`

### `resizeContent() => Promise<void>`

#### Returns

Type: `Promise<void>`

### `revealContent() => Promise<void>`

#### Returns

Type: `Promise<void>`

### `update() => Promise<void>`

#### Returns

Type: `Promise<void>`

## Slots

| Slot               | Description                                                                                |
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `"actions"`        | Custom actions for this slide                                                                                |
| `"answer-x"`       | X possible answers to the question                                                                                |
| `"awaiting-votes"` | A message displayed until first vote                                                                                |
| `"background"`     | A custom background for this slide                                                                                |
| `"footer"`         | A custom footer for this slide                                                                                |
| `"header"`         | A custom header for this slide                                                                                |
| `"how-to"`         | Explain how can attendees vote. Note also that if you provide a string 0 in the content of your slot how-to, the information will be automatically converted to the real key of your poll (the key your audience could use to reach it and vote). |
| `"notes"`          | Some notes related to this slide                                                                                |
| `"question"`       | A question                                                                                |

## CSS Custom Properties

| Name                                        | Description                                                                  |
| ------------------------------------------- | ---------------------------------------------------------------------------- |
| `--background`                              | background                                                                   |
| `--color`                                   | color                                                                        |
| `--overflow`                                | overflow of the slide @default hidden                                        |
| `--slide-padding-bottom`                    | Padding bottom of the slide @default 64px and 32px on wider screen           |
| `--slide-padding-end`                       | Padding right of the slide @default 64px and 32px on wider screen            |
| `--slide-padding-start`                     | Padding left of the slide @default 64px and 32px on wider screen             |
| `--slide-padding-top`                       | Padding top of the slide @default 64px and 32px on wider screen              |
| `--slide-poll-align-items`                  | The QR code column content items alignment default center                    |
| `--slide-poll-awaiting-votes-background`    | The background of the "awaiting-votes" slot default rgba(255, 255, 255, 0.9) |
| `--slide-poll-awaiting-votes-border-radius` | The border-radios of the "awaiting-votes" slot default 8px                   |
| `--slide-poll-awaiting-votes-padding`       | The padding of the "awaiting-votes" slot default 8px                         |
| `--slide-poll-awaiting-votes-z-index`       | The z-index of the "awaiting-votes" slot default 1                           |
| `--slide-poll-background`                   | The background behind the QR code component                                  |
| `--slide-poll-grid-column-gap`              | The column gap between the QR code and the chart default 32px                |
| `--slide-poll-how-to-font-size`             | The font-size of the text of thee slot "how-to" default 0.8em                |
| `--slide-poll-how-to-max-width`             | The maximal width of the "how-to" slot default calc(100% - 64px)             |
| `--slide-poll-justify-content`              | The QR code column content justify position default center                   |
| `--slide-poll-text-align`                   | The QR code column text alignment default center                             |
| `--slide-user-select`                       | user select @default none                                                    |
| `--zIndex`                                  | z-index @default 1                                                           |

----------------------------------------------

*Built with [StencilJS](https://stenciljs.com/)*

repository: peterennis/deckdeckgo

repo_name: peterennis/deckdeckgo


text:
---
date: '2012-01-10T20:55:00-05:00'
old:
  layout: post
  oldcategories:
  - research
  status: published
  timestamp: 08:55 PM Tuesday, January 10, 2012 EST
  wordpress_id: '1109'
oldtags:
- '2012'
- ibm
- interns
slug: looking-for-summer-interns-in-the-software-technology-group-at-ibm-tj-watson-research-center
tags:
- interns
- research
- ibm
- '2012'
title: Looking for Summer Interns in the Software Technology Group at IBM TJ Watson
  Research Center
url: /weblog/2012/01/10/looking-for-summer-interns-in-the-software-technology-group-at-ibm-tj-watson-research-center/
---

IBM TJ Watson Research Center — Photo by Simon Greig

Are you one of the best software engineering students in the world? Do you dig mining software repositories? Are you a wizard at social network analysis? Interested in a great summer job looking at what makes software teams work? Even better, want to work with me?

[The Software Technologies Group at the IBM TJ Watson Research Center in Hawthorne, NY is looking for summer interns!](http://researcher.ibm.com/view_project.php?id=1811) I started at IBM back in 2007 as an intern and had a great time meeting some of the smartest students from around the world. Students are given a chance to work with the best technology in the world and often end submitting papers to ICSE, CHI, CSCW, or FSE as a result of their work with us.

We suggest that you [apply online](https://jobs3.netmedia1.com/cp/job_summary.jsp?job_id=RES-0451733). If you've got questions you can email directly for more information. But hurry up, as we're going to start our selection and interview process soon.

PS. For faculty, this is a great way offload students for the summer if you'd like to take off to St. Barth's for a few months.


text:
# Project description

In this project, we will per form lung segmentation on 3D CT volumes using 2D UNet architecture.

## Dataset
We use 150 CT volumes (75 patients) for training, 20 volumes (10 patients) for validation and 12 volumes for testing predictions. Note that dataset is separated on subject-level and not volume-level to keep the evaluation unbiased.

## Mask Generation
To generate the segmentation label mask, we used 3D slicer software along with NVidia AI Assisted Annotation tool (can be installed as an extention in 3D slcier) to speed up the process. Manual segmentation on each slice for 170 volumes can take forever. Thanks to NVidia researchers for developing this tool which helped me to generate these masks in 2 days instead of months.

## Data preprocessing
First of all convert 3D data into 2D slices and store them. The code is provided in 'Data preprocessing' notebook. Set your data paths accordingly. The resulting dataset consisted of 176,884 slices for  training and 23,298 slices for validation purpose.

## Training
Before starting training, make sure your data structure looks like this.

```
|-- data_slices
    |-- train
        |-- masks
            |-- img
        |-- slices
            |-- img

    |-- valid
        |-- masks
            |-- img
        |-- slices
            |-- img
```

After that we can prepare our UNet mdoel and train it on our dataset. We can also visualize our models predictions on the validation dataset. The code is provided in the 'Model training' notebook.

## Prediction
We can use also make and visualize predicitons on the test data. The notebooks are provided.

repository: scumechanics/CTLungSegmentationUNet

repo_name: scumechanics/CTLungSegmentationUNet


text:
palindrome-checker
==================

[View Demo](http://yourshoesuntied.com/palindrome-checker-demo/)

A simple application to determine if a given string is a palindrome.

This application was designed in response to a sample interview question.  It was simply an excercise in working through a problem that started in as
a conceptual programming discussion and ended as a coded solution.  Though I am sure the solution is still rough around the edges, it was a great little mini project to solve.
As it is, it may not be a very useful application but one can see how either the algorithm or the technique could be applied to other situations.

repository: bkapke/palindrome-checker

repo_name: bkapke/palindrome-checker


text:
# Deep Throughts

MERN-stack application that allows users to view all thoughts in the system, post their thoughts, react to existing thoughts, and add friends.

The application is deployed to Heroku here: https://cryptic-cove-39070.herokuapp.com/

The following technologies were used in the development of this application:

- Client
  - Apollo Server
  - React
  - React-Router
  - GraphQL
- Server
  - Apollo Server
  - bcrypt
  - Express
  - GraphQL
  - jsonwebtoken
  - Mongoose

## Application Functionality

The application is able to perform the following functions:

- Create user accounts
- Authenticate and allow existing users to log into their accounts
- Allow user (logged-in or not) to:
  - Browse all thoughts posted to the application
  - View all reactions (comments) on thoughts
  - View user profiles showing all thoughts they have posted and their friends in the system
- Allow logged-in users to:
  - Post thoughts
  - Add friends
  - View their personal profile showinf all thoughts they have posted and their friends in the system

## Screenshot

Here is a screenshot of the deployed application, on a user's profile page!

<img src="assets/deep-thoughts-screenshot.png" alt="Screenshot of Deployed Site"/>

## References

- apollo-server-express: https://www.npmjs.com/package/apollo-server-express
- Apollo: https://www.apollographql.com/docs/
- bcrypt: https://www.npmjs.com/package/bcrypt
- Bootstrap: https://getbootstrap.com/
- Express: https://expressjs.com/
- GraphQL: https://graphql.org/
- jsonwebtoken: https://www.npmjs.com/package/jsonwebtoken
- mongoose: https://mongoosejs.com/

repository: Stevtm/deep-thoughts

repo_name: Stevtm/deep-thoughts