text:
# docker-jupyter

Docker image for Jupyter notebooks, Alpine bases

## How to build image
```sh
$ make build-image
```

## How to run Jupyter notebook
```sh
$ docker run -ti --rm --name jupyter-notebook ownport/jupyter:latest notebook:start
[INFO] Running Jupyter notebook
[I 09:43:02.981 NotebookApp] Writing notebook server cookie secret to /home/jupyter/.local/share/jupyter/runtime/notebook_cookie_secret
[I 09:43:03.221 NotebookApp] Serving notebooks from local directory: /data
[I 09:43:03.221 NotebookApp] 0 active kernels
[I 09:43:03.221 NotebookApp] The Jupyter Notebook is running at:
[I 09:43:03.221 NotebookApp] http://<IP_ADDRESS>:8888/?token=233e218539d8720dcd3d5ab50a06e4c8fe21dfb1324cd1c8
[I 09:43:03.221 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 09:43:03.221 NotebookApp] No web browser found: could not locate runnable browser.
[C 09:43:03.221 NotebookApp]

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://<IP_ADDRESS>:8888/?token=233e218539d8720dcd3d5ab50a06e4c8fe21dfb1324cd1c8
```
to run bash session
```sh
docker run -ti --rm --name conda ownport/jupyter:latest /bin/bash
```

## Extra features

### How to mount the volume to docker container
```sh
$ docker run -ti --rm --name jupyter-notebook -v $(pwd):/data ownport/jupyter:latest notebook:start
```
to setup user id
```sh
$ docker run -ti --rm --name jupyter-notebook \
        -e HOST_USERID=1000 \
        -e HOST_GROUPID=1000 \
        -v $(pwd):/data \
        ownport/jupyter:latest \
        notebook:start
```

### How to install additional packages

to install additional packages during a container start, add these packages as simple list into the next files:

- `apk-packages.req`: for Alpine packages
- `conda-packages.req`: for Conda packages

repository: ownport/docker-jupyter

repo_name: ownport/docker-jupyter


text:
# chat-app auth

This is the auth service for the chat application. Source written in **TypeScript** (3.7). Runs on **Node.js**.

## npm scripts

> IMPORTANT: Some environment variables must be provided before running the application ([read more](#Environment%20variables)).

```sh
# Replace 'yarn' for 'npm' as needed

# Install all dependencies
yarn install

# Transpile all .ts files to .js
# Using tsc, but can be replaced for babel, ...
yarn run build

# Run the server in DEVELOPMENT mode,
# (provide an .env file to be used by env-cmd)
yarn run dev

# Run the server in PRODUCTION mode,
# (remember to provide the required env variables)
yarn start

# Run test suite (pending...)
yarn run test
```

## Environment variables

The following variables must be defined before running the application:
- `MONGODB_URI`: its a [MongoDB Connection String](https://docs.mongodb.com/manual/reference/connection-string/) that includes the username, password (if any), host, port and database name.
- `JWT_SECRET`: the secret string to be used when signing the jwt tokens.
- `PORT`: this is automatically assigned by some services (Heroku), so be careful before setting it (default 2000).

When running the server with the `pnpm run dev` script, the variables are looked from an `.env` file located at root, thanks to then [`env-cmd` library](https://github.com/toddbluhm/env-cmd).

## Technologies

### Authentication

After the user has succesfully registered and signed it, they receive a [JSON Web Token](https://github.com/auth0/node-jsonwebtoken), that can be used as authentication mechanism to gain access to some of the app's protected data.

### Database

An external database service is needed to save the data.
The default configuration uses MongoDB via [`mongoose`](https://mongoosejs.com/), but you can replace it with a different database/library editing the files in `src/database/`.

#### Environment variables

#### Included Docker configuration

An example [`docker-compose`](https://docs.docker.com/compose/) file is provided in the `docker/` directory to start a [MongoDB](https://hub.docker.com/_/mongo) service as container.

You will also need to [set up some environment variables](https://docs.docker.com/compose/environment-variables/) for credentials in the Docker containers. Personally, I used an `.env` file and variable substitution during testing, but this may not work if using Docker Swarm or Kubernetes.

### Server

Running a simple `express` server. May change it in the future.

### Security

- `bcryptjs` to hash data
- `express-validator` for server side validation

### ESLint

The following libraries and plugins are included as devDependencies:
- eslint
- prettier: prettier, config, plugin
- @typescript-eslint: plugin, parser
- typescript + relevant @types packages

See [`.eslintrc.js`](.eslintrc.js) and [`.prettierrc`](.prettierrc) for linter configuration (using recommended *mostly*). Missing a lint script in package.json or pre-commit hook (I'm using an IDE plugin).

## Author

Adrian Gomez

## License

[MIT](LICENSE)

license: MIT

repository: aegomez/chat-app-auth

branch_name: refs/heads/master

extension: md

gha_language: TypeScript

gha_license_id: MIT

license_type: permissive

repo_name: aegomez/chat-app-auth


text:
# Ursus API

An Urbit API/`%gall` agent client for iOS/macOS in Swift.

See my [Ursus Chat](https://github.com/dclelland/UrsusChat) repository for a demo project.

## Installation

Ursus can be installed using Cocoapods by adding the following line to your podfile:

```ruby
pod 'UrsusAPI', '~> 0.1'
```

I can probably help set up Carthage or Swift Package Manager support if you need it.

## Todo list

Things that would make this codebase nicer:

- [ ] Convert agent to a protocol; rename to UrbitApp?
- [ ] Figure out how to unify agents; agent pokes/subscribes; state; reducers; review thunks up in the main app
    - [ ] `URLRequest` implementing `AgentRequest` (`AppRequest`?) enum type thing idea
- [ ] Add special `Index` and `OrderedDictionary` types
- [ ] Finish all clients up to spec
- [ ] Split clients into separate subspecs
- [ ] Better documentation/examples.

## Dependencies

- [UrsusHTTP](https://github.com/dclelland/UrsusHTTP)

repository: narner/UrsusAPI

repo_name: narner/UrsusAPI


text:
---
layout: post
title: "Migrating From Octopress to Jekyll::Compose"
date: 2022-02-20T20:57:37+01:00
---

I recently removed all [Octopress](http://octopress.org/) dependencies in this
blog in favour of native features of the underlying [Jekyll](https://jekyllrb.com/)
static site generator.

I'd like to share that experience with you, but first I want to share a bit of
the history (from the perspective of myself as a user of the tool, so please
take everything with a pinch of salt.

PREVIOUS POST

stuck on Jekyll 3

```
octopress was resolved to 3.1.0, which depends on
      octopress-escape-code (~> 2.0) was resolved to 2.1.1, which depends on
        jekyll (~> 3.0)
```

Deprecation warnings

```sh
Deprecation: posts.empty? should be changed to posts.docs.empty?.
             Called by ["/Users/dgmstuart/.asdf/installs/ruby/2.7.2/lib/ruby/gems/2.7.0/gems/jekyll-3.9.1/lib/jekyll/collection.rb:39:in `method_missing'"].
Deprecation: posts.select should be changed to posts.docs.select.
             Called by ["/Users/dgmstuart/.asdf/installs/ruby/2.7.2/lib/ruby/gems/2.7.0/gems/jekyll-3.9.1/lib/jekyll/collection.rb:39:in `method_missing'"].
```

Step 1 remove dependencies on Octopress plugins

I have three octopress plugins:

  gem 'octopress-codeblock'
  gem 'octopress-image-tag'
  gem 'octopress-solarized'

Codeblock

doesn't support filenames

I just inline them

After fixing all tags:

Unknown tag 'css_asset_tag' included  (Liquid::SyntaxError)

remove

```liquid
\{    % css_asset_tag %}
```

Now they look wonky - indented

This is because they display as a `<figure>` tag and (at least in Chrome) the
default styles include a left-margin:

figure {
  display: block;
  margin-block-start: 1em;
  margin-block-end: 1em;
  margin-inline-start: 40px;
  margin-inline-end: 40px;
}

...but first we need to fix loading our css at all:octopress did that for us

https://jekyllrb.com/docs/step-by-step/07-assets/

move css under /assets

create styles.scss

Import all files there

import pixyll into styles
remove pixyll front matter

modify pixyll code so that we can override it with rouge

rougify style base16.solarized.dark > _sass/rouge.scss

branch_name: refs/heads/main

extension: markdown


text:
---
layout: post
title: 7.1.2017 - Saturday -
---

This is my fifty-first blog post:

## Today I learned (#TIL):

- Forgot to post this again over the weekend.

- Nice to attend the math study groups last night.  Did more chatting then actual math problems but it was nice to get some insight from more experienced coders.  Was reminded about the Project Euler website.

- Continued working on Firebase App.  I struggled understanding the issue I had assigned myself.  Decided to go back to review all the Firebase stuff we did for the (un)bootcamp.

- Continued to work on fCC challenges.

## Useful links:

[Project Euler](https://projecteuler.net)

## My next goals:

- Continue to work on fCC JS challenges.

- Review Firebase stuff

- Watch next section of Watch and Code JS video tutorials for review.

# Read-Search-Ask

# Perseverance is key!


text:
---
type: doc
layout: reference
category: "JavaScript"
title: "JavaScript Modules"
---

# JavaScript Modules

Kotlin allows you to compile your Kotlin projects to JavaScript modules for popular module systems. Here is
the list of available options:

1. Plain. Don't compile for any module system. As usual, you can access a module by its name in the global scope.
   This option is used by default.
2. [Asynchronous Module Definition (AMD)](https://github.com/amdjs/amdjs-api/wiki/AMD), which is in particular
   used by require.js library.
3. [CommonJS](http://wiki.commonjs.org/wiki/Modules/1.1) convention, widely used by node.js/npm
   (`require` function and `module.exports` object)
4. Unified Module Definitions (UMD), which is compatible with both *AMD* and *CommonJS*, and works as "plain"
   when neither *AMD* nor *CommonJS* is available at runtime.

## Choosing the Target Module System

Choosing the target module system depends on your build environment:

### From IntelliJ IDEA

Setup per module:
Open File -> Project Structure..., find your module in Modules and select "Kotlin" facet under it. Choose appropriate
module system in "Module kind" field.

Setup for the whole project:
Open File -> Settings, select "Build, Execution, Deployment" -> "Compiler" -> "Kotlin compiler". Choose appropriate
module system in "Module kind" field.

### From Maven

To select module system when compiling via Maven, you should set `moduleKind` configuration property, i.e. your
`pom.xml` should look like this:

``` xml
<plugin>
    <groupId>org.jetbrains.kotlin</groupId>
    <artifactId>kotlin-maven-plugin</artifactId>
    <version>${kotlin.version}</version>
    <executions>
        <execution>
            <id>compile</id>
            <goals>
                <goal>js</goal>
            </goals>
        </execution>
    </executions>
    <!-- Insert these lines -->
    <configuration>
        <moduleKind>commonjs</moduleKind>
    </configuration>
    <!-- end of inserted text -->
</plugin>
```

Available values are: `plain`, `amd`, `commonjs`, `umd`.

### From Gradle

To select module system when compiling via Gradle, you should set `moduleKind` property, i.e.

``` groovy
compileKotlin2Js.kotlinOptions.moduleKind = "commonjs"
```

Available values are similar to Maven.

## `@JsModule` annotation

To tell Kotlin that an `external` class, package, function or property is a JavaScript module, you can use `@JsModule`
annotation. Consider you have the following CommonJS module called "hello":

``` javascript
module.exports.sayHello = function(name) { alert("Hello, " + name); }
```

You should declare it like this in Kotlin:

``` kotlin
@JsModule("hello")
external fun sayHello(name: String)
```

### Applying `@JsModule` to packages

Some JavaScript libraries export packages (namespaces) instead of functions and classes.
In terms of JavaScript, it's an object that has members that *are* classes, functions and properties.
Importing these packages as Kotlin objects often looks unnatural.
The compiler allows to map imported JavaScript packages to Kotlin packages, using the following notation:

```kotlin
@file:JsModule("extModule")
package ext.jspackage.name

external fun foo()

external class C
```

where the corresponding JavaScript module is declared like this:

``` javascript
module.exports = {
    foo:  { /* some code here */ },
    C:  { /* some code here */ }
}
```

Important: files marked with `@file:JsModule` annotation can't declare non-external members.
The example below produces compile-time error:

```kotlin
@file:JsModule("extModule")
package ext.jspackage.name

external fun foo()

fun bar() = "!" + foo() + "!" // error here
```

### Importing deeper package hierarchies

In the previous example the JavaScript module exports a single package.
However, some JavaScript libraries export multiple packages from within a module.
This case is also supported by Kotlin, though you have to declare a new `.kt` file for each package you import.

For example, let's make our example a bit more complicated:

``` javascript
module.exports = {
    mylib: {
        pkg1: {
            foo: function() { /* some code here */ },
            bar: function() { /* some code here */ }
        },
        pkg2: {
            baz: function() { /* some code here */ }
        }
    }
}
```

To import this module in Kotlin, you have to write two Kotlin source files:

```kotlin
@file:JsModule("extModule")
@file:JsQualifier("mylib.pkg1")
package extlib.pkg1

external fun foo()

external fun bar()
```

and

```kotlin
@file:JsModule("extModule")
@file:JsQualifier("mylib.pkg2")
package extlib.pkg2

external fun baz()
```

### `@JsNonModule` annotation

When a declaration has `@JsModule`, you can't use it from Kotlin code when you don't compile it to a JavaScript module.
Usually, developers distribute their libraries both as JavaScript modules and downloadable `.js` files that you
can copy to project's static resources and include via `<script>` element. To tell Kotlin that it's ok
to use a `@JsModule` declaration from non-module environment, you should put `@JsNonModule` declaration. For example,
given JavaScript code:

``` javascript
function topLevelSayHello(name) { alert("Hello, " + name); }
if (module && module.exports) {
    module.exports = topLevelSayHello;
}
```

can be described like this:

```kotlin
@JsModule("hello")
@JsNonModule
@JsName("topLevelSayHello")
external fun sayHello(name: String)
```

### Notes

Kotlin is distributed with `kotlin.js` standard library as a single file, which is itself compiled as an UMD module, so
you can use it with any module system described above. Also it is available on NPM as [`kotlin` package](https://www.npmjs.com/package/kotlin)

gha_language: JavaScript


text:
# devdock
Set of tools to help manage a docker-oriented development environment

## new project (bootstrap)

create a new folder, cd into it and run

```
curl -s https://raw.githubusercontent.com/vertexportus/devdock/master/env/bootstrap.sh | bash -s
```

## new project (manually)

create a new folder, add a `project.yaml` file on it. Example:

```yaml
devdock:
  github: vertexportus/devdock.git

projects:
  laravel:
    github: username/laravel.git
    services:
      api:
        github: username/apiproject.git
        services:
          api:
            template: php.laravel.nginx
            database: db
            env_files: true
            ports: true
      frontend:
        github: vertexportus/frontendproject.git
        services:
          frontend:
            template: node.angular

services:
  db:
    template: postgres
```

run command:
```bash
rq config init
```

you can change enviroment variables on the `.env` file

to start the containers, you can run docker up with generation:

```bash
rq docker up --generate
```

## TODO

- add support for angular commands through cli
- add support for dynamic nginx.proxy
- change default ports for http/https

repository: vertexportus/devdock

gha_language: Python

repo_name: vertexportus/devdock


text:
4.5.0
* Adjust npm output.

4.4.0
* Fix SSR option.
* Update to `<EMAIL_ADDRESS>
4.3.1
* Fix that single icon imports wasn't working since 4.2.0.

4.3.0
* Remove `core-js` as dependency.

4.2.0
* Add an ESM dist file.
* Update to `<EMAIL_ADDRESS>
4.1.0
* Update to `<EMAIL_ADDRESS>* Removed `nanoid` dependency.

4.0.2
* Decouple component `name` and class output.

4.0.1
* Use `this.classes` instead of `$options.className` for wrapper usage.

4.0.0
* Use Vue's warn util directly and offer better debugging experience.
* Support `className` on component options to make wrapper components easier.
* Fix the problem that icons with undefined `name`s were throwing uncaught exceptions.
* Update to `<EMAIL_ADDRESS>* [Breaking] Update required version of peer dependency `vue` to `^2.4.0` (to support transparent event passing through).

3.5.4
* Update to `<EMAIL_ADDRESS>
3.5.3
* Fix spelling of `aria-labelledby`.
* Update to `<EMAIL_ADDRESS>
3.5.2
* Fix stacked icons layout after content is updated.

3.5.1
* Fix `role` generation.

3.5.0
* Add `title` prop support.
* Update to `<EMAIL_ADDRESS>
3.4.0
* Update to `<EMAIL_ADDRESS>
3.3.1
* Fix npm package.

3.3.0
* Fix unexpected focus for IE.
* Updated to `<EMAIL_ADDRESS>
3.2.0
* Updated `fa2svg` to `1.2.0`.

3.1.3
* Supported not rendering anything when explicitly set `name` to `null`.

3.1.2
* Fix missing width and height.

3.1.1
* Get rid of unnecessary `<g>` wrapper for `raw` mode.

3.1.0
* Switch to `<EMAIL_ADDRESS>
3.0.5
* Fix build.

3.0.4
* Add `name` option to root classes.

3.0.3
* Update `rollup-plugin-vue` to `4.2.0`.

3.0.2
* Fix package publish.

3.0.1
* Update `@fortawesome/fontawesome-free-webfonts` to `1.0.9`.

3.0.0
* Updated all icons to Font Awesome 5, see [README](./README.md) for updated usages.

2.3.5
* Fix `id` replacement.

2.3.4
* `id`s are now unique under `raw` mode.

2.3.2
* Replaced publish npm scripts with shell commands to prevent failure upon npm install.
* Added `pulse` prop.

2.3.1
* Fixed the problem that styles are missing for precompiled version ([#35](https://github.com/Justineo/vue-awesome/issues/35)).

2.3.0
* Added new ways to register icon.
* Clarify custom icon registration in documentation.

2.2.8
* Switch build tool to rollup.
* Provide `module` in `package.json`.

2.2.7
* Hot fix for last version. Use `console.warn` temporarily.

2.2.6
* Mark Vue as an external dependency in webpack config.

2.2.5
* Use `Vue.util.warn` directly.
* Added warning for referring to unregistered icons.

2.2.4
* Remove unused icon files.

2.2.3
* Fix the issue caused by webpack 2.2 with `babel-plugin-add-module-export`.

2.2.2
* Switch to webpack 2 and fix compiled version.

2.2.1
* Move animation to `<svg>` to make them work in IE10+.

2.2.0
* Added support for registering multiple paths with different styles (eg. multi-colored icons).

2.1.0
* Added support for stacked icons.

2.0.3
* Added Font-Awesome -> SVG -> JSON build process integration.
* Update Font-Awesome to `4.7.0`.

2.0.2
* Updated readme and build.

2.0.1
* Removed project configs for distribution to prevent problems with existing project templates.

2.0.0
* Switch to Vue.js dependency to `2.0`.
* Added support for users to specify used icons to reduce bundle size.
* Bump major version to 2.

0.3.0
* Supported registering custom icons.

0.2.2
* Fixed the problem that `dist` is not updated after last version.

0.2.1
* `scale` now works well with CSS `em` sizes.

0.2.0
* Added `aria-label="false"` for icons without `label` prop.

0.1.0
* First version.

repository: Justineo/vue-awesome

repo_name: Justineo/vue-awesome


text:
# Buck's Git and GitHub Cheat Sheet

## Git one-time setup on local system
```
$ git config --global user.name "Your Name"
$ git config --global user.email<EMAIL_ADDRESS>$ git config --global push.default matching
$ git config --global alias.co checkout
```

## Create a local repository
Go to the root directory of the files you want in the repository.
```
$ git init
$ git add -A   # Adds all files to the staging area, except those listed in .gitignore.
               # The 'rails new' command generates a .gitignore appropriate for a Rails project.
$ git commit -m "Initialize repository" # Commit the added files.
```
## See a list of your commits and commit messages
`$ git log`

## Diff
See all changes since last commit (that haven't been staged), i.e. diff of current unstaged files and last commit.
`$ git diff`

See all changes in staged files from last commit.
`$ git diff --cached`

## Roll back local changes you don't want to commit
You've made a mistake locally and want to roll back to the last local commit.
`$ git checkout -f  # -f flag forces overwriting the current changes`

## Locally merge branch changes into parent
```
[sub-branch]> git checkout master
[master]> git merge sub-branch
```

## Refresh a branch from its parent
(e.g. when pulling in latest changes from github development branch)
e.g. assume 'my-feature' branched from 'develop'
```
[my-feature]>git status # confirm local feature branch is clean
[my-feature]>git checkout develop
[develop]>git pull origin develop # refresh from github remote
[develop]>git checkout my-feature
[my-feature]git merge develop
```
Git will bring up a vi page asking you to enter a commit message.
1.   To be clear, whatever directory you are in, Git will be creating a subdirectory with the name of the repository, and the files for that repository will be inside the Git-created subdirectory.
- At the command line enter
git clone
then paste the URL after and enter.

## Create a new branch and move into it to start work in it

- Make sure you are in the branch you want to branch off of.  Often, you want to branch off of master.  To make sure you are in master:

git checkout master

- Create and move into the new branch, let's call the new branch awesome-feature-branch:

git checkout -b awesome-feature-branch

## See which files are currently staged

git status

## Stage (add) files that you've edited in the current branch

- Before adding (staging) your files prior to a commit, you can double-check the status of files that have had changes to them:

git status

- Add (stage) the files:

git add <filename>

- Or, to add all the changed files at once:

git add .

- Optionally check the status again to ensure that they were actually added:

git status

## Unstage files that you've staged but not committed
`git reset`
unstages all staged files

`git reset <filename>`
unstages just the specified staged file

## Commit all staged changes to current branch of local repository:

git commit -m "Good commit message here"

Commit messages should be specific and read like commands, e.g.:
- "Create user profile"
- "Add form field for user's age"
- "Add cute kitten pictures to header"

## Push changes from local feature branch to local and remote master branches

- First, make sure you have the latest and greatest remote master branch updates merged your feature branch (the master branch may have changed since you started your work on your feature branch, and it is your responsibility to make sure your changes are compatible with however the master branch has changed in the interim before you foist your feature branch changes onto remote master):

git checkout master  // move into master branch
git pull origin master  // pull remote master branch into local master branch
git checkout awesome-feature-branch  // move into feature branch
git merge master  // merge any master changes into feature branch

- Then push a copy of your local feature branch to your remote repo:

git push origin awesome-feature-branch

- Then create a pull request and merge remote feature branch into remote master

On GitHub, click on green "Compare & pull request" button next to feature branch.
On next page, click on green "Create Pull Request" button.
On next page, click on green "Merge Pull Request" button.
On next page, click on green "Confirm Merge" button.
Click on white "Delete Branch" button.

- Pull remote master down to local master

git checkout master  // move into master branch
git pull origin master  // pull remote master into local master - this will include all the changes that you merged remotely on GitHub
                        // from the feature branch into the master branch.  Note that with this workflow, you never merged from feature to
                        // master locally, it was done remotely on GitHub.  I assume that is because that is how to guarantee that a code
                        // review can be done by collaborating engineers.

- Clean up.  You already deleted the remote feature branch above (although you could wait until now).  Now delete the local feature branch using the '-d' option of 'branch'

git branch -d awesome-feature-branch

repository: buckmelton/notes

repo_name: buckmelton/notes


text:
#Yet Another Android Demo

Included are some small Android applications demo-ing a basic concept of the platform:

1. Yet Another Touch Visualizer: demo for handling touch events in Android
2. Yet Another Drawable Demo: demo for the various possibilities of drawing some basic shapes in android
3. Yet Another Thread Demo: demo for basic threading in android

Each application has a more full description on my blog:

1. Yet Another Touch Visualizer: [Touch handling in Android](http://sdesmedt.wordpress.com/2012/09/12/touch-handling-in-android/)
2. Yet Another Drawable Demo: [Drawing in Android ](http://sdesmedt.wordpress.com/2012/11/28/drawing-in-android/)
3. Yet Another Thread Demo: [Threading in Android](http://sdesmedt.wordpress.com/2014/04/26/threading-in-android/)

#License

The code is open sourced under the MIT License:

Copyright (c) 2014 Serge Desmedt

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: sergedesmedt/YetAnotherAndroidDemo

repo_name: sergedesmedt/YetAnotherAndroidDemo


text:
# rework-loader for webpack

Rework loader for [webpack](http://webpack.github.io/) which post-processes your CSS with [Rework](https://github.com/reworkcss/rework).

## Installation

`npm install rework-loader`

## Usage

[Documentation: Using loaders](http://webpack.github.io/docs/using-loaders.html)

``` javascript
var css = require("style!css!rework!./file.css");
// => returns css post processed with your rework config
```

## Configuration

``` javascript
var rework_plugin = require('rework_plugin');

// Other parts of webpack.config

module: {
  loaders: [
    { test: /\.css$/, loader: "style-loader!css-loader!rework-loader" },
    ...
  ]
},
rework: {
  use: [rework_plugin()]
}
```

## License

MIT (http://www.opensource.org/licenses/mit-license.php)

repository: okonet/rework-loader

repo_name: okonet/rework-loader


text:
# Quantization-aware Training (QAT) {#qat_introduction}

@sphinxdirective

Introduction
####################

Quantization-aware Training is a popular method that allows quantizing a model and applying fine-tuning to restore accuracy
degradation caused by quantization. In fact, this is the most accurate quantization method. This document describes how to
apply QAT from the Neural Network Compression Framework (NNCF) to get 8-bit quantized models. This assumes that you are
knowledgeable in Python programming and familiar with the training code for the model in the source DL framework.

Using NNCF QAT
####################

Here, we provide the steps that are required to integrate QAT from NNCF into the training script written with
PyTorch or TensorFlow 2:

.. note::
   Currently, NNCF for TensorFlow 2 supports optimization of the models created using Keras
   `Sequential API <https://www.tensorflow.org/guide/keras/sequential_model>`__ or
   `Functional API <https://www.tensorflow.org/guide/keras/functional>`__.

1. Import NNCF API
++++++++++++++++++++

In this step, you add NNCF-related imports in the beginning of the training script:

.. tab-set::

   .. tab-item:: PyTorch
      :sync: pytorch

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_torch.py
         :language: python
         :fragment: [imports]

   .. tab-item:: TensorFlow 2
      :sync: tensorflow-2

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_tf.py
         :language: python
         :fragment: [imports]

2. Create NNCF configuration
++++++++++++++++++++++++++++

Here, you should define NNCF configuration which consists of model-related parameters (``"input_info"`` section) and parameters
of optimization methods (``"compression"`` section). For faster convergence, it is also recommended to register a dataset object
specific to the DL framework. It will be used at the model creation step to initialize quantization parameters.

.. tab-set::

   .. tab-item:: PyTorch
      :sync: pytorch

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_torch.py
         :language: python
         :fragment: [nncf_congig]

   .. tab-item:: TensorFlow 2
      :sync: tensorflow-2

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_tf.py
         :language: python
         :fragment: [nncf_congig]

3. Apply optimization methods
+++++++++++++++++++++++++++++

In the next step, you need to wrap the original model object with the ``create_compressed_model()`` API using the configuration
defined in the previous step. This method returns a so-called compression controller and a wrapped model that can be used the
same way as the original model. It is worth noting that optimization methods are applied at this step so that the model
undergoes a set of corresponding transformations and can contain additional operations required for the optimization. In
the case of QAT, the compression controller object is used for model export and, optionally, in distributed training as it
will be shown below.

.. tab-set::

   .. tab-item:: PyTorch
      :sync: pytorch

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_torch.py
         :language: python
         :fragment: [wrap_model]

   .. tab-item:: TensorFlow 2
      :sync: tensorflow-2

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_tf.py
         :language: python
         :fragment: [wrap_model]

4. Fine-tune the model
++++++++++++++++++++++

This step assumes that you will apply fine-tuning to the model the same way as it is done for the baseline model. In the
case of QAT, it is required to train the model for a few epochs with a small learning rate, for example, 10e-5. In principle,
you can skip this step which means that the post-training optimization will be applied to the model.

.. tab-set::

   .. tab-item:: PyTorch
      :sync: pytorch

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_torch.py
         :language: python
         :fragment: [tune_model]

   .. tab-item:: TensorFlow 2
      :sync: tensorflow-2

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_tf.py
         :language: python
         :fragment: [tune_model]

5. Multi-GPU distributed training
+++++++++++++++++++++++++++++++++

In the case of distributed multi-GPU training (not DataParallel), you should call ``compression_ctrl.distributed()`` before
the fine-tuning that will inform optimization methods to do some adjustments to function in the distributed mode.

.. tab-set::

   .. tab-item:: PyTorch
      :sync: pytorch

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_torch.py
         :language: python
         :fragment: [distributed]

   .. tab-item:: TensorFlow 2
      :sync: tensorflow-2

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_tf.py
         :language: python
         :fragment: [distributed]

6. Export quantized model
+++++++++++++++++++++++++

When fine-tuning finishes, the quantized model can be exported to the corresponding format for further inference: ONNX in
the case of PyTorch and frozen graph - for TensorFlow 2.

.. tab-set::

   .. tab-item:: PyTorch
      :sync: pytorch

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_torch.py
         :language: python
         :fragment: [export]

   .. tab-item:: TensorFlow 2
      :sync: tensorflow-2

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_tf.py
         :language: python
         :fragment: [export]

.. note::
   The precision of weights gets INT8 only after the step of model conversion to OpenVINO Intermediate Representation.
   You can expect the model footprint reduction only for that format.

These were the basic steps to applying the QAT method from the NNCF. However, it is required in some cases to save/load model
checkpoints during the training. Since NNCF wraps the original model with its own object it provides an API for these needs.

7. (Optional) Save checkpoint
+++++++++++++++++++++++++++++

To save model checkpoint use the following API:

.. tab-set::

   .. tab-item:: PyTorch
      :sync: pytorch

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_torch.py
         :language: python
         :fragment: [save_checkpoint]

   .. tab-item:: TensorFlow 2
      :sync: tensorflow-2

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_tf.py
         :language: python
         :fragment: [save_checkpoint]

8. (Optional) Restore from checkpoint
+++++++++++++++++++++++++++++++++++++

To restore the model from checkpoint you should use the following API:

.. tab-set::

   .. tab-item:: PyTorch
      :sync: pytorch

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_torch.py
         :language: python
         :fragment: [load_checkpoint]

   .. tab-item:: TensorFlow 2
      :sync: tensorflow-2

      .. doxygensnippet:: docs/optimization_guide/nncf/code/qat_tf.py
         :language: python
         :fragment: [load_checkpoint]

For more details on saving/loading checkpoints in the NNCF, see the following `documentation <https://github.com/openvinotoolkit/nncf/blob/develop/docs/Usage.md#saving-and-loading-compressed-models>`__.

Deploying quantized model
#########################

The quantized model can be deployed with OpenVINO in the same way as the baseline model. No extra steps or options are
required in this case. For more details, see the corresponding :doc:`documentation <openvino_docs_OV_UG_OV_Runtime_User_Guide>`.

Examples
####################

* `Quantizing PyTorch model with NNCF <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/302-pytorch-quantization-aware-training>`__

* `Quantizing TensorFlow model with NNCF <https://github.com/openvinotoolkit/openvino_notebooks/tree/main/notebooks/305-tensorflow-quantization-aware-training>`__

@endsphinxdirective

repository: openvinotoolkit/openvino

repo_name: openvinotoolkit/openvino


text:
# Basswork

CSS preprocessor for [Basscss](http://basscss.com) built with Rework

## Rework Plugins Included:
- Rework NPM
- Rework Custom Media
- Rework Vars
- Rework Calc
- Rework Plugin Colors

## Install

```
npm install basswork
```

## Usage

### Node

Pass an unprocessed CSS string to Basswork, which will return the processed CSS.

```javascript
var basswork = require('basswork');
var fs = require('fs');

var src = fs.readFileSync('./src/base.css', 'utf8');
var css = basswork(src);
fs.writeFileSync('./css/base.css', css);
```

#### Options

Pass [Rework options](https://github.com/reworkcss/css#api) as the second argument, and [Rework stringify options](https://github.com/reworkcss/css#cssstringifyobject-options) as the third argument.
Basswork also includes a `namespace` option to prefix styles with a string followed by a hyphen.

```javascript
var css = basswork(src, { namespace: 'u' }, { compress: true });
```

### Command Line

```sh
$ basswork in.css out.css
```

```sh
$ basswork --sourcemap in.css out.css
```

MIT License

repository: jxnblk/basswork

repo_name: jxnblk/basswork


text:
# Contributing

Adifa is an open source project, and contributions are very welcome!

 Here's a few ideas:

- [Install Adifa on your computer](https://haniffalab.com/sci-adifa/installation.html) and kick the tires. Does it work? Does it do what you'd expect? If not, [open an issue](https://github.com/haniffalab/sci-adifa/issues/new/choose) and let us know.
- Comment on some of the project's [open issues](https://github.com/haniffalab/sci-adifa/issues). Have you experienced the same problem? Know a work around? Do you have a suggestion for how the feature could be better?
- Read through the [documentation](https://haniffalab.com/sci-adifa/index.html), and click the "improve this page" button, any time you see something confusing, or have a suggestion for something that could be improved.
- Find an [open issue](https://github.com/haniffalab/sci-adifa/issues) (especially [those labeled `help-wanted`](https://github.com/haniffalab/sci-adifa/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22)), and submit a proposed fix. If it's your first pull request, we promise we won't bite, and are glad to answer any questions.
- Help evaluate [open pull requests](https://github.com/haniffalab/sci-adifa/pulls), by testing the changes locally and reviewing what's proposed.

## Code of Conduct

[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](code_of_conduct.md)

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct/](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)

## Before filing an issue

- Search the repository (also google) to see if someone has already reported the same issue. This allows contributors to spend less time responding to issues, and more time adding new features!
- Please provide a minimal complete verifiable example for any bug. If you're not sure what this means, check out [this blog post](http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports) by Matthew Rocklin or [this definition](https://stackoverflow.com/help/mcve) from StackOverflow.
- Let us know about your environment.

## Submitting a pull request

### Pull requests generally

- The smaller the proposed change, the better. If you'd like to propose two unrelated changes, submit two pull requests.
- The more information, the better. Make judicious use of the pull request body. Describe what changes were made, why you made them, and what impact they will have for users.

### Submitting a pull request via github.com

Many small changes can be made entirely through the github.com web interface.

1. Navigate to the file within [`haniffalab/sci-adifa`](https://github.com/haniffalab/sci-adifa) that you'd like to edit.
2. Click the pencil icon in the top right corner to edit the file
3. Make your proposed changes
4. Click "Propose file change"
5. Click "Create pull request"
6. Add a descriptive title and detailed description for your proposed change. The more information the better.
7. Click "Create pull request"

That's it! You'll be automatically subscribed to receive updates as others review your proposed change and provide feedback.

### Submitting a pull request via Git command line

1. Fork the project by clicking "Fork" in the top right corner of [`haniffalab/sci-adifa`](https://github.com/haniffalab/sci-adifa).
2. Clone the repository locally `git clone git@github.com:<your-username>/sci-adifa.git`.
3. Create a new, descriptively named branch to contain your change ( `git checkout -b my-awesome-feature` ).
4. Hack away, add tests. Not necessarily in that order.
5. Make sure everything still passes by running `pytest` (see the [testing section](https://haniffalab.com/sci-adifa/installation.html#test) in the documentation)
6. Push the branch up ( `git push origin my-awesome-feature` ).
7. Create a pull request by visiting `https://github.com/<your-username>/sci-adifa` and following the instructions at the top of the screen.

## Proposing updates to the documentation

We want the Adifa documentation to be as helpful as possible. We've open-sourced our docs and we welcome any pull requests if you find it lacking.

### How to submit changes

You can find the Sphinx source files for our documentation in the [sphinx](https://github.com/haniffalab/sci-adifa/tree/main/sphinx) directory. See the section above, [submitting a pull request](#submitting-a-pull-request) for information on how to propose a change. All pull requests should be directed at the `main` branch (the default branch).

## A thank you

Thanks! Working with Adifa should be fun. If you find any of this hard to figure out, let us know so we can improve our process or documentation!

repository: haniffalab/sci-adifa

repo_name: haniffalab/sci-adifa


text:
# Naive Bayes Classifier for PHP #

Naive Bayes Classifier is a probabilistic classifier of previously unseen data based around the Bayes theorem rule.
Generally, other (more complex) algorithms giving better accuracy, but if NBC is trained well on a large data set it can give suprisingly good results for much less effort.

Naive Bayes Classifier may be used in:
- Spam detection
- Automatic assignment of categories to a set of items
- Automatic detection of the primary language

Learn more about Naive Bayes Classifier at https://en.wikipedia.org/wiki/Naive_Bayes_classifier

## Usage ##
```php
require_once('../lib/NBC.php');

$nbc = new NBC();

$nbc->train(new FileDataSource('polish.txt'), 'polish');
$nbc->train(new FileDataSource('english.txt'), 'english');
$nbc->train(new FileDataSource('japanese.txt'), 'japanese');

echo $nbc->classify("This color is very bright.") . PHP_EOL;
echo $nbc->classify("人生　の　意味　は　何　です　か？") . PHP_EOL;
echo $nbc->classify("Byłem ostatni w kolejce.");
```

## Sample output ##
```php
'english'
'japanese'
'polish'
```

## Further releases ##
- Saving trained classifier into file
- Tokenizer improvement (now working only with documents where tokens are separated by space)
- MySQL data source
- MongoDB data source

repository: petrovitch/PHPNaiveBayesClassifier

repo_name: petrovitch/PHPNaiveBayesClassifier


text:
---
title: Development Plan
sidebar: mydoc_sidebar
permalink: /development/plan/
---

## Plan

The development of INcDb is done based on the features specified sequentially.

1. User Management
2. Neurosynth Dataset generation
3. Database design
3. Computation of correlation between Component and Terms
4. Repository Browsing
5. Data (Raw Dataset) Submission by User
6. Implement Front-End Design based on Mockup agreed with Client
7. Neurosynth Viewer to display brain images
8. Use Celery and Redis to move Decoding function to background task
9. Unit Tests

## Iterations

### #1 - User Management

The first iteration of INcDb is the prototype done for COMP204P in Term 1. The app used Flask-User to implement the user management feature. We used the Flask-User starter app as the base and modify the code to suit our the project requirements. We changed the details of the default account and added extra fields like 'Title' and 'Affiliation'.

### #2 - Repository Browsing

**Neurosynth Dataset generation, Database design, Computation of correlation between Component and Terms, Repository Browsing**

The second iteration include adding the Neurosynth Dataset to the application, developing the database structure, implemeting the decoding function and basic repository browsing capability. This iteration include multiple features that are interconnected. The dataset and database was necessary for the decoding function to work and the repository browsing is included in this iteration to ensure that the database structure is well designed.

Although we can use database query to check that the decoding function insert data to the database as designed, adding the repository browsing can help us improve the database design so that the query to retreive the necessary data will be kept simple.

### #3 - Data (Raw Dataset) Submission by User

With the user management implemented in Iteration #1, we added the ability to upload data for signed in user. During this iteration, we added a new table, `Collections`, to the database and a `uploads` folder to the application to store the Raw Dataset uploaded by the user. We also implemented a progress bar to inform user of the upload process.

### #4 - Front-End Design

As the basic features of the application is mostly completed, we started to implement the front-end design based on the agreed mockup on the application during this iteration. We make changes to the original the mockup based on the feedback from our client and TA. The changes include capitalising the first letter to improve the professionalism of the site and increase the font-size of the body text to improve readability.

### #4 - Neurosynth Viewer

With the design in place, we started working on adding the Neurosynth Viewer to the application. The Neurosynth Viewer is a tool to display the brain images with sliders to interact with the images. We also added the merging function during this iteration. The merging function combines all the brain images (Component) of the Movie for a specific Term and display them using the Neurosynth Viewer.

### #5 - Moving decoding funtion to a background task

During this iteration, we move the decoding function to a backgroun task. As the decoding function compute the correlations between each Component uploaded and each Term in the database, it take a long time to complete. It is not feasible to get our Client to wait for both the uploading and the decoding. Hence, we used a background task to run the process and our Client can carry on managing the application after uploading the Processed Dataset.

### #6 - Unit Tests

The final iteration of INcDb include the testing the application using basic unit test cases. For details of the testing, please refer to the Testing page.


text:
# Supplementary Code and Data for the Paper *Subsampling and Knowledge Distillation On Adversarial Examples: New Techniques for Deep Learning Based Side Channel Evaluations*

## Overview

This github repository contains the following code:

- A parameterizable implementation of the neural network used in the paper as well as a full implementation of training given the data released in the CHES 2018 CTF contest (AES challenge).
- Two versions of the full challenge solver: one using the neural network, one using the baseline solution.
- Code that takes a set of traces, a set of expanded target key Hamming weights, a ball size and a neural network as input and changes the traces within the l2 radius given into new traces such that the neural network predicts the desired Hamming weight targets.

In addition, the /models directory contains our main neural network model. The baseline solution (lm_baseline.p), the linear classifier trained on adversarial examples for the neural network (lm_adv1.p) and another linear classifier trained on a different set of adversarial examples for the main neural network are available [separately](https://drive.google.com/file/d/1LLBo-FBlgvdRKc3H3eIDEpldh8khnJPr/view?usp=sharing).

## Requirements

### Dependencies

The code in this repository has been tested with the following dependencies:

- Python (version 3.6.3)
- keras (version 2.1.5)
- tensorflow (version 1.6.0)
- Pycryptosat (Version 5.6.8)
- scikit-learn (version 0.19.1)
- h5py (version 2.7.1)

### System Requirements

In addition to the system requirements imposed by the above dependencies, the system must provide at least about 7 GB of free RAM to be able to replicate the training of the main neural network, since the pre-processing of the trace files loads each training file (6 GB) into working memory in its entirety. Running the pre-trained classifiers and solving the challenge should work on a typical 2020 PC.

## Downloading and Preprocessing the Data

All training datasets of the 2018 CHES challenge are available from Riscure at the [CHES 2018 CTF homepage](https://chesctf.riscure.com/2018/content?show=training). The challenges themselves can also be downloaded there, but do at the time of writing require [registration](https://chesctf.riscure.com/2018/register) and a Google account to download.

Round 4 of the challenge corresponds to Set6 in the paper, i.e. to the unknown device challenge.

In order to replicate training, download the three random-key training files for the AES challenge, pre-process them by running *process_trace_files()* from *utils.py*, and run *training.py* in the same path. The training script will by default train a number of networks of varying depth for 1000 epochs on the same data and then test them on the Set6 challenge data. In order for the last step to work, the Set6 challenge data and the expanded Set6 key must be available in the same path. The expanded Set6 key is contained in the /data subdirectory of this repository.

## Running the Experiments

- *python3 challenge_solver_nn.py challenge_file model_file* will try to solve the challenge data contained in challenge_file and then print out some statistics on the expected success rate of running the attack with between 1 and 5 traces from the challenge dataset.
- *python3 challenge_solver.py challenge_file model_file* does the same, but in this case model_file should be a linear regression model.
- *occlusion.py* contains a function that allows to compute the impact of zeroizing some part of the trace on the prediction of a neural network model.
- *gradient_descent.pgd* takes as input a set of traces, a neural network, a search radius, and a set of prediction vectors. It then tries to find adversarial inputs within the L2 ball of the given radius around each original trace such that the neural network will output the desired predictions.


text:
# SharePoint 2013: Create an app to access a public OData source
## Requires
* Visual Studio 2012
## License
* Apache License, Version 2.0
## Technologies
* REST
* Javascript
* SharePoint Server 2013
* apps for SharePoint
## Topics
* data and storage
## IsPublished
* True
## ModifiedDate
* 2013-02-06 02:26:26
## Description

Provided by:
Scot Hillier,
Critical Path Training

This sample demonstrates how to create an external content type contained within an app for SharePoint, and then surface that data using an external list. The OData source that is used for this sample is the public Northwind
 OData source located at
http://services.odata.org/Northwind/Northwind.svc. This OData source is used to create an external list named
Customers in the app. Data from the external list is then displayed on the home page of the app by using the RESTful API to query the list. The following image shows the data that will be displayed on the home page of the app.

Figure 1. Data displayed on the home page of the app

The Visual Studio 2012 solution contained in this sample download consists of the following:

BCS Module (containing the BDC Metadata Model and External List definition)

Pages Module (containing the app home page)

Scripts Module (containing the JavaScript and jQuery code for querying the External List).

Prerequisites

This sample requires the following:

SharePoint 2013 development environment that is configured for app isolation

Visual Studio 2012

SharePoint development tools in Visual Studio 2012

Key components of the sample

The following are included in the sample project:

A Visual Studio 2012 solution named AppLevelECT, which contains all the required artifacts.

Configure the sample

Follow these steps to configure the sample.

In Visual Studio, select the AppLevelECT project (which is contained in the .zip file that you downloaded from the MSDN Samples Gallery), and change the Site URL property to reference a SharePoint 2013 Preview site where you
 will deploy the app.

In Visual Studio, open the AppLevelODataModel.xml file for editing.

Replace all instances of the text “contoso\Domain Users” with the name of a group from the target domain. The group used will be granted rights to use the BDC Metadata Model in the App.

Build the sample

Press F5 to build and deploy the app.

Run and test the sample

To run and test the sample:

Press F5 to build and deploy the app for SharePoint.

Data from the external data list will appear on the home page of the app.

Troubleshooting

If the app fails to install, ensure that the group referenced in the BDC Metadata Model is correct.

Change log

First release.

Related content

Business Connectivity Services in SharePoint 2013

Open Data Protocol

OData: JavaScript Object Notation (JSON) Format

OData: AtomPub Format

repository: techbuzzz/Samples-archive-msdn-products

path: /Microsoft Office Developer Documentation Team/SharePoint-2013-Create-an-app-to-access-a-public-17453/Readme.md

repo_name: techbuzzz/Samples-archive-msdn-products


text:
# Assembly
*x86_64 GAS ASM*

## Instructions

These POCs can be executed using the following command:
```sh
clang commenting-out.s -o commenting-out
./commenting-out
```
where `commenting-out` is substituted for the relevant POC. Vulnerable code viewers for reviewing the source code can be found in the [parent README](https://github.com/nickboucher/trojan-source#code-viewers).

Note that these Assembly POCs are written in a syntax that assumes compilation on MacOS using Apple `clang`. Compilation on other platforms may require syntax modification.

## Validation

### Commenting-Out

- Confirmed working on Apple clang version 14.0.0 (MacOS)

### Stretched String

- Confirmed working on Apple clang version 14.0.0 (MacOS)

### Early Return

- Confirmed working on Apple clang version 14.0.0 (MacOS)

### Homoglyph Function

- Confirmed NOT working on Apple clang version 14.0.0 (MacOS)

### Invisble Function

- Confirmed NOT working on Apple clang version 14.0.0 (MacOS)

repository: nickboucher/trojan-source

gha_language: SCSS

repo_name: nickboucher/trojan-source


text:
# Chacebook

Inspired by https://www.uplabs.com/posts/facebook-app-design, created using React NativeScript https://github.com/shirakaba/react-nativescript

## Screenshots

![Screenshot_20210709-213003](https://user-images.githubusercontent.com/12235926/125129544-e947a100-e0ff-11eb-8e81-73d308b0740c.jpg)
![Screenshot_20210709-212942](https://user-images.githubusercontent.com/12235926/125129556-efd61880-e0ff-11eb-9262-f801cbb2e0c1.jpg)
![Screenshot_20210709-212950](https://user-images.githubusercontent.com/12235926/125129608-011f2500-e100-11eb-8e7c-6b3b34af1ee8.jpg)

repository: CodeZARDev/Facebook

repo_name: CodeZARDev/Facebook


text:
# Capistrano::RVM

RVM  automated support for Capistrano v3.
Includes task to install RVM and Ruby.

## Notes

**If you use this integration with capistrano-rails, please ensure that you have `capistrano-bundler >= 1.1.0`.**

## Installation

Add this line to your application's `Gemfile`:

```ruby
gem 'capistrano', '~> 3.0'
gem 'capistrano-rvm'
```

And then execute:

```bash
$ bundle install
```

## Usage

Require in `Capfile` to use the default task:

```ruby
require 'capistrano/rvm'
```

And you should be good to go!

It will automatically:

- detect rvm installation path, preferring user installation
- detect ruby from project directory
- create the gemset if not existing already

Automatically done by RVM:

- [rubygems-bundler](https://github.com/mpapis/rubygems-bundler#readme)
  gem which is installed by default with RVM causes automatic call of
  `Bundler.setup` which is equivalent of `bundle exec`.

## Configuration

Well if you really need to there are available ways:

- `set :rvm_ruby_version, "2.0.0"` - to avoid autodetection and use specific version
- `fetch(:default_env).merge!( rvm_path: "/opt/rvm" )` - to force specific path to rvm installation

## Install RVM 1.x

This task will install stable version of rvm in `$HOME/.rvm`:
```bash
cap rvm:install:rvm
```

Or add an before hook:
```ruby
before 'deploy', 'rvm:install:rvm'  # install/update RVM
```

## Install Ruby

This task will install ruby from the project (other the specified one):
```bash
cap rvm:install:ruby
```

Or add an before hook:
```ruby
before 'deploy', 'rvm:install:ruby'  # install/update Ruby
```

This task requires [`NOPASSWD` for the user in `/etc/sudoers`](http://serverfault.com/a/160587),
or at least all ruby requirements installed already.

Please note that `NOPASSWD` can bring security vulnerabilities to your system and
it's not recommended to involve this option unless you really understand implications of it.

## How it works

This gem adds a new task `rvm:hook` before `deploy:starting`.
It uses the [script/rvm-auto.sh](script/rvm-auto.sh) for capistrano when it wants to run
`rake`, `gem`, `bundle`, or `ruby`.

## Check your configuration

If you want to check your configuration you can use the `rvm:check` task to
get information about the RVM version and ruby which would be used for
deployment.

    $ cap production rvm:check

## Custom tasks which rely on RVM/Ruby

When building custom tasks which need the current ruby version and gemset, all you
have to do is run the `rvm:hook` task before your own task. This will handle
the execution of the ruby-related commands.
This is only necessary if your task is *not* *after* the `deploy:starting` task.

    before :my_custom_task, 'rvm:hook'

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. When changing `script/` test your changes (`tf --text test/*.sh`)
4.  Push to the branch (`git push origin my-new-feature`)
6. Create new Pull Request

repository: mpapis/capistrano-capistrano-rvm

repo_name: mpapis/capistrano-capistrano-rvm


text:
# id8.Class( [path:String, ]descriptor:Object ):id8.Class
`id8.Class` – as the name suggests – is a convenience method for creating "JavaScript Classes" which mimic classical inheritance: while maintaining the advantages of prototypical inheritance.

`id8.Class` accepts two parameters. An **optional** parameter – `path`, which should always be the first parameter, if supplied – defining the name and namespace of the Class, e.g. `id8.Observer` would create a Class called `Observer` under the `id8` namespace. If no `path` is specified, then the Class is simply returned by the `id8.Class` method.

The `descriptor` parameter is mandatory and can be either the first parameter – if no `path` is given – or the second.

The `descriptor` Object will contain all your properties and methods which will be added to your Class' prototype.

The `descriptor` Object also accepts property descriptors as defined for use with [Object.defineProperty](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineProperty), see the code for [id8.Hash](https://github.com/constantology/id8/blob/master/src/id8.Hash.js) for an example of using property descriptors in your `id8.Class` descriptor.

## default descriptor options
The descriptor has the following **reserved** property names:

property	type	description

constructor	Function	This Class' constructor. This is the method that is called when you do: new Foo.

extend	Class|String	OPTIONAL. If you want to inherit the properties and methods from an existing Class you reference the Class here.

mixin	Object	OPTIONAL. An Object of properties and methods to mix into the Class' prototype.

module	Object	OPTIONAL. If you're building functionality to run within Node, then you may fall into issues with your Class' namespace path being blessed on m8's Module, rather than your Class' Module. See Assigning the correct module below for more information on getting around this.

chain	Boolean	OPTIONAL. Unless this is set explicitly to false, the id8.Class instance will return its context – this – Object whenever an instance method of a id8.Class returns undefined.

singleton	Mixed	OPTIONAL. Whether or not this Class is a Singleton.

		If you want a Singleton set this property to be either true or to an Array of arguments you wish to pass to the constructor Function.

		NOTE: id8.Class will internally resolve any attempt to create a new instance of the singleton by simply returning the existing singleton instance.

type	String	OPTIONAL. The type you want your Class instances to return when they are passed to Object.type.

		If you pass a path to id8.Class then the type will be created from this.

		However, if a type is also supplied it will overwrite the type created from the path.

parent	Function	This is a special reserved method for calling super methods. Since super is a reserved word in JavaScript, parent has been used in its place.

## id8.Class methods
These are the methods available on a newly created `id8.Class`

### create( [arg1:Mixed, arg2:Mixed, ..., argN:Mixed] ):ClassInstance
A `create` factory method is added to your Class constructor to allow you to:

- create an instance of a class using an arbitrary number of arguments; or
- not have to use the `new` constructor – if you're one of those developers who thinks it's some type of JavaScript faux pas to use the `new` constructor.

See the **id8.Class Examples** below on how to create `id8.Class` instances using the `create` factory on your class or the global `id8` factory.

See the **long winded argument** below to (hopefully) answer any questions or complaints you have regarding mimicing classical inheritance in JavaScript.

## instance properties

### this.__super
If by any chance you require access to a super class' methods or properties, you can access them from the `__super` property on your Class instance.

The `__super` property is read only and is available on the Class `constructor` as well as instances of a Class. See the **id8.Class examples** below for examples.

## instance methods

### this.parent()
When you create an instance of a Class created with `id8.Class` you can access the `super` method of a Class you are extending by calling:

```javascript

   this.parent( arg1, arg2, ..., argN );

```

Context will be maintained correctyl, unless you use Function `.call` or `.apply`. In which case you should pass the context in as normal.

#### Example

```javascript

   this.parent.call( this, arg1, arg2, ..., argN );

// or

   this.parent.apply( this, [arg1, arg2, ..., argN] );

```

## Assigning the correct module
If you are using `id8.Class` to create a "JavaScript Class" within a Commonjs Module and you are using the `path` parameter to assign that Class to a namespace, it is important to remember that when the namespace is `bless`ed – using [m8.bless](/constantology/m8) – it will either be assigned to the Module executing the `bless` code – i.e. `m8`.

As mentioned above you can supply the Module instance you want your Class and namespace to be created on. However, you may want the full namespace in your Class' `path` so that you can correctly access it later using the `id8` factory method.

This is simple to do, simply insert a carat `^` at the beginning of your Class' `path` and assign the correct Module instance to the Class' `module` property. The rest is handled internally.

### Example

#### The wrong way:

```javascript

   var id8 = require( 'id8' ),
       m8  = id8.m8.x( Object, Array, Boolean, Function ); // local reference to m8 and extend Native Types if sandboxed.

	var path = module.exports = {}; // base namespace for our module

// WRONG: assigns to Foo Class to m8's Module instance, will be accessible via m8.path.to.Foo
//        Foo instance types will be path_to_foo
   id8.Class( 'path.to.Foo', {
       constructor : function() {}
   } );

// WRONG: assigns Foo Class to this module as module.exports.path.to.Foo or path.path.to.Foo
//        Foo instance types will be path_to_foo
   id8.Class( 'path.to.Foo', {
       constructor : function() {},
       module      : module
   } );

// WRONG: assigns Foo Class to this module as module.exports.to.Foo or path.to.Foo, which is ALMOST what we want,
//        Foo instance types will be to_foo instead of path_to_foo
   id8.Class( 'to.Foo', {
       constructor : function() {},
       module      : module
   } );

```

#### The correct way:

```javascript

   var id8 = require( 'id8' ),
       m8  = id8.m8.x( Object, Array, Boolean, Function ); // local reference to m8 and extend Native Types if sandboxed.

	var path = module.exports = {}; // base namespace for our module

// CORRECT: assigns Foo Class to this module as module.exports.to.Foo or path.to.Foo
//          path.to.Foo instance types will be path_to_foo
//          this WILL NOT work correctly in a browser though as there is no Module class
   id8.Class( '^path.to.Foo', {
       constructor : function() {},
       module      : module
   } );

// CORRECT: assigns Foo Class to this module as module.exports.to.Foo or path.to.Foo
//          path.to.Foo instance types will be path_to_foo
//          this will also work in node and in a browser
   id8.Class( '^path.to.Foo', {
       constructor : function() {},
       module      : path
   } );

// CORRECT: assigns Foo Class to this module as module.exports.to.Foo or path.to.Foo
//          path.to.Foo instance types will be path_to_foo
//          this will also work in node and in a browser
   id8.Class( '^path.to.Foo', {
       constructor : function() {},
       module      : m8.ENV == 'commonjs' ? module : null
   } );

```

## id8.Class examples:

```javascript

   id8.Class( 'Foo', {
      constructor : function( greeting ) {
         this.greeting = greeting;
         this.setNum( 10 );
      },
      getNum      : function() { return this.num; },
      setNum      : function( num ) { return ( this.num = num ); }
   } );

   id8.Class( '^path.to.Bar', {
      constructor : function( greeting ) { this.parent( 'bar: ' + greeting, true ); },
      extend      : Foo,
      module      : m8.ENV === 'commonjs' ? module : null,
      getNum      : function() { return this.parent(); }
   } );

   var Zaaz = id8.Class( {
      constructor : function( greeting ) { this.parent( 'zaaz: ' + greeting, true ); },
      extend      : path.to.Bar
   } );

   var foo  = new Foo( 'hello world!' ),
       bar  = id8( 'path.to.Bar', 'hello world!' ),
       zaaz = Zaaz.create.apply( this, ['hello world!'] );

   foo.greeting;              // returns => "hello world!"
   foo.getNum()       === 10  // returns => true
   foo.setNum( 100 )  === 100 // returns => true
   foo.getNum()       === 100 // returns => true

   bar.greeting;              // returns => "bar: hello world!"
   bar.getNum()       === 10  // returns => true
   bar.setNum( 200 )  === 200 // returns => true
   foo.getNum()       === 100 // returns => true

   zaaz.greeting;             // returns => "bar: zaaz: hello world!"
   zaaz.getNum()      === 10  // returns => true
   zaaz.setNum( 400 ) === 400 // returns => true

   foo.__super.constructor          === Object // returns => true
   bar.__super.constructor          === Foo    // returns => true
   zaaz.__super.constructor         === Bar    // returns => true
   zaaz.__super.__super.constructor === Foo    // returns => true

   bar.__super         === path.to.Bar.__super // returns => true
   bar.__super.__super === Foo.__super         // returns => true

```

# The long winded argument...

## Classical inheritance sucks!
If this describes your attitude to the whole JavaScript Classes thing, then think about why you are saying this.

Is it because someone else has said it and you take their word as gospel or is there a real reason you think creating highly reusable code with single points of failure is a bad thing?

Classical inheritence is a design pattern like Deccorator, Factory, MVC, etc, etc. It has its purpose, you don't need a Class for everything of course, however if you're building large scale applications Classes have proven to be very handy for abstracting out reusable functionality.

### Testing and bug fixing are a b!+ch
As a design pattern: having a method that creates your classical inheritance like structure for you can aleviate the potential for various types silly bugs portentially caused by moving functionality around and renaming classes and methods.
Consider the following:

```javascript

// file: my/weird/package/Foo.js
   my.weird.package.Foo = function( value ) { this.value = value; }

   my.weird.package.Foo.prototype.setValue = function( value ) { this.value = value; };

// file: my/other/package/Bar.js
   my.other.package.Bar = function( id, value ) {
      my.weird.package.Foo.prototyope.constructor.call( this, value );
      this.id = id;
   }

   my.other.package.Bar.prototype.setValue = function( value ) {
      switch ( typeof value ) {
         case 'number' : this.value = value * 10; break;
         default       : my.weird.package.Foo.prototype.setValue.call( this, value );
      }
   };

```

Apart from the repetition and general fugliness of this code, it all looks perfectly sane, right?

Consider we copy `my.weird.package.Foo` to `my.crazy.package.Foo` and we want `my.other.package.Bar` to inherit from `my.crazy.package.Foo` instead, as the functionality in `my.weird.package.Foo` will be changing.

This is a simple example so there are only two super methods we need to change, however, the more functionality you write in this way and the more developers you have working with the same codebase, the more chances there are of something going wrong; the greater the amount of tests you need to write to make sure everything is being called correctly.

Yet, even with massive amounts of pointless tests, you could accidentally miss something out – like forgetting to change one of `Bar`'s super method calls – your tests may still pass, yet there may be certain edge cases which can cause nasty behaviour in your production environment which could be near impossible to trace.

Abstracting all this out into a reusable component does not only give you a smaller, more readable codebase to work with; it's simply a much safer option: having a single point of failure to debug is much better than potentially hundreds.

### Ecma.next
Classes are even proposed in the [ecma harmony](http://wiki.ecmascript.org/doku.php?id=harmony:classes) and [ecma](http://wiki.ecmascript.org/doku.php?id=strawman:class_operator) [strawman](http://wiki.ecmascript.org/doku.php?id=strawman:minimal_classes) [wiki](http://wiki.ecmascript.org/doku.php?id=strawman:maximally_minimal_classes).

## It's not OOJS, use `Object.create()` instead!
For the record, `id8.Class` uses `Object.create()` internally.

However, in case you did not realise, or are quoting someone else without understanding the problem(s) and solution(s).

`Object.create()` **does not** handle calling a constructor function **or** super methods. Yes you can use and reuse Objects as prototypes – we can do this without `Object.create()` too – but it is not the same as sub-classing and definitely nowhere near as powerful.
If it where then I would not have written a `id8.Class`.


text:
# OledClockService

## Description

It is an application of watch using winSTAR's OLED display (20 × 4 character) and raspberry pie, temperature sensor BME 280.
Display contents are:

* Display of date and time
* Display of temperature and humidiry (require BME280 sensor)
* Display of ntp server name
* Display of cpu usage and cpu temperature
* Display of internet speed (download / upload) and ping response

## Require

### Hardware

* Raspberry pi 1 Model B+ or later.
    * python 2.7 or later. (with some library is use)
* BME280 Temperature and humidiry sensor
    * [datasheet](http://akizukidenshi.com/download/ds/bosch/BST-BME280_DS001-10.pdf)
* WinSTAR OLED Display 20x4 WEH002004A
    * [WinSTAR page](https://www.winstar.com.tw/products/oled-module/oled-character-display/oled-20x4.html)
    * [OLED datasheet](https://www.winstar.com.tw/uploads/files/6eb7552c6c9c656f690c8206dc964e19.pdf)
    * [controller WS0010 datasheet](http://blog.digit-parts.com/pdf/ws0010.pdf)

### Software

* Python2.7 or later

You need to install the following:

```sh
pip install pytz
pip install psutil

sudo apt install -y python3-smbus
sudo apt install -y speedtest-cli
sudo apt install -y ntp
```

repository: marksard/oledclockservice

repo_name: marksard/oledclockservice


text:
# SCSS-Playground
Practice SCSS in keyboard friendly environment.

This playground supports only SCSS. The library which compiles code to SCSS is leafo/scssphp. 'Updated to v 0.5.1'

Credits:
Leafo/SCSSphp : https://github.com/leafo/scssphp

repository: sachya/SCSS-Playground

repo_name: sachya/SCSS-Playground


text:
---
title: "Moving from Oh-My-Zsh to Starship & Fish Shell"
date: "2022-04-05"
tags:
  - "tutorial"
  - "terminal"
  - "fish shell"
  - "starship"
slug: "moving-from-oh-my-zsh-to-starship-and-fish-shell"
heroImage<EMAIL_ADDRESS>unsplash: "Milos Prelevic"
unsplashURL: "prelevicm"
description: "I changed my prompt configurator from Oh-My-Zsh to Starship.rs and with that changed my shell to Fish. This blog post tells the story of my upgrade and the pitfalls and benefits of moving to Fish Shell."
---

I have been using [Zsh](https://www.zsh.org/) for almost a decade.
I remember the day that I switched from the default shell Bash to ZSH.
Powered by [Oh-My-Zsh](https://ohmyz.sh/), my terminal was powerful and helpful.
Add on top of that Oh-My-Zsh amazing templates; it was also pretty!

It was an amazing experience, and I recently had that experience again with [Starship.rs](https://starship.rs/).
Switching to Starship.rs meant I broke up with Oh-My-Zsh, and thus Zsh.
With everything back up in the air, I thought this would be a great time to try the [Fish shell](https://fishshell.com/)!

If you want to see why you should make this switch without reading all my specific setup, [click here](#benefits)

## Installing Starship.rs

Since I am on a Macbook Pro and already set up [homebrew](https://brew.sh/) as my package manager, installing Starship.rs was easy.
You need to install Starship.rs through Homebrew. Run the below command and get Fish installed as well!

```bash
$ brew install starship fish
```

With Starship installed, let's update the terminal a bit.
Create a configuration file for Starship:

```bash
$ mkdir -p $HOME/.config
$ touch $HOME/.config/starship.toml
```

Feel free to read [this documentation](https://starship.rs/config/#prompt) to customize your prompt how you like it.
Here is a snippet of mine.
It seems to work for me for now, but terminal prompts are so personal:

```toml
command_timeout = 10000

# Inserts a blank line between shell prompts
add_newline = true

...

[cmd_duration]
min_time = 4
show_milliseconds = false
disabled = false
format = " 🕙 $duration($style) "
style = "bold italic #87A752"
```

## Installing Fish

After completing the install through homebrew, jump into the fish terminal.
Type `fish` and see that you can start using Fish right away.
**Note**: You can always type `exit` to get back to your default shell.
But we want a more permanent solution, below is how we add Fish to our available shells and set it as default:

```bash
$ echo /usr/local/bin/fish | sudo tee -a /etc/shells
$ chsh -s /usr/local/bin/fish
```

These commands mean you are officially using Fish as your shell.

## Configuring Fish

> No configuration needed: fish is designed to be ready to use immediately, without requiring extensive configuration.

On the homepage for Fish is the above quote.
The shell prides itself on clear defaults and powerful built-in features.
But I am a tinkerer and need to configuration Fish a bit.
These are the steps I took to customize.

To facilitate the configuration of Fish, we need to create a config file.
If you have done any customization of Zsh or Bash you are already familiar with this concept.
Where we make these changes is a bit different.
Let's create the file we need:

```bash
$ mkdir -p $HOME/.config/fish
$ echo "set -gx EDITOR emacs" >> $HOME/.config/fish/config.fish
```

The above commands make sure we have a folder to hold our Fish configuration and sets my `EDITOR` variable to emacs.
The next major change we want to do to our Fish configuration file is tie in Starship.rs.

```bash
$ echo "starship init fish | source" >> $HOME/.config/fish/config.fish
```

And with that, we should be using our Starship prompt with Fish!

## Fish Oddities

Using Fish comes with a few oddities that we'll have to deal with.
The biggest difficulty when moving to Fish is the change in how aliases work.

With Zsh I set up some aliases to make my life easier:

```bash
# My Aliases

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias mkdir='mkdir -p'
alias h='history'
alias which='type -a'
alias ..='cd ..'
alias ...='cd ../..'
alias ls='exa -lag --header'
alias edit='vim'
alias ccd='clear && cd'
alias killpyc='find . -name \*.pyc -delete'
alias tmux="tmux -2"
alias latex="docker run -v `pwd`:/tmp latex pdflatex"
alias exa="$HOME/.asdf/installs/rust/nightly/bin/exa"
```

The most important alias I want to cary over Fish is my `ls` alias which uses [exa](https://the.exa.website/).
I have fallen for `exa`, and seeing the normal `ls` is disappointing.
Other aliases are better defaults, but will be helpful to have these in Fish too!

Fish has two different kinds of abbreviations.
`abbr` is manages abbreviations - user-defined words that are replaced with longer phrases after they are entered. [1](https://fishshell.com/docs/current/cmds/abbr.html)
`alias` is a simple wrapper for the `function` builtin, which creates a function wrapping a command.[2](https://fishshell.com/docs/current/cmds/alias.html)
Since we are trying to mirror Zsh's aliases, we'll use Fish's `abbr`.

First, let's create a file to hold our abbreviations.
Fish has a standard location for additional config files, so let's create that file and edit our abbreviations:

```bash
$ mkdir -p $HOME/.config/fish/conf.d/
$ touch $HOME/.cofig/fish/conf.d/abbr.fish
```

And fill it out:

```bash
abbr rm "rm -i"
abbr cp "cp -i"
abbr mv "mv -i"
abbr mkdir "mkdir -p"
abbr h "history"
abbr which "type -a"
abbr ls "exa -lag --header"
```

Once the abbreviations file is complete, we can add it to our Fish config file.
Add `source $HOME/.config/fish/conf.d/abbr.fish` to the Fish config file.
After reloading the config, we should be able to use our abbreviations.

To test it out, I ran `ls` in the `$HOME/.config/fish/` folder and got this:

```bash
Permissions Size User       Group Date Modified Name
drwxr-xr-x     - joshfinnie staff  3 Apr 15:28  completions
drwxr-xr-x     - joshfinnie staff  3 Apr 16:19  conf.d
.rw-r--r--   181 joshfinnie staff  3 Apr 16:21  config.fish
.rw-r--r--  1.6k joshfinnie staff  3 Apr 16:19  fish_variables
drwxr-xr-x     - joshfinnie staff  3 Apr 15:28  functions
```

Super!

Another thing that is different in Fish than Zsh or Bash is how we set Environment Variables.
With Zsh or Bash, we'd export a variable to set it globally.
But in Fish, there is a different syntax that we will have to use.

Below is an example of setting up the `FZF_DEFAULT_COMMAND` in both Zsh and Fish. It's a small difference, but a noticeable one.

```bash
# Bash
export FZF_DEFAULT_COMMAND='ag -g "" --hidden --ignore .git'

# Fish
set -x FZF_DEFAULT_COMMAND 'ag -g "" --hidden --ignore .git'
```

I do not set many environment variables this way, but if you do this should be an easy update.

## Benefits

Although changing shells can be overwhelming, there are some great benefits to using Fish.

1. It is fast.
   I find interacting with Fish to be snappier than Zsh even when customized at the same level.
2. It is much easier to customize.
   There are plenty of services like Oh-My-Zsh that work for Fish.
   Just to list a few, check out [Fisher](https://github.com/jorgebucaran/fisher) and [Oh-My-Fish](https://github.com/oh-my-fish/oh-my-fish).
3. There is an amazing ecosystem of functions. _I will speak a bit more about functions below._
4. Autocomplete and history search are next level.
   These are available for Zsh too, but Fish's autocomplete feels infinitely better.

### Functions

I listed functions as one of the benefits of Fish.
And I have to admit I have not used them to their full potential yet.
But they are worthy of note.

Within Fish, you can define functions that can do powerful things.
The function can iterate over files, or modify files based on boolean checks.
Your creativity is the only limit Fish functions have.
Below, I write and use a "Hello, World!" function for you to see:

```bash
$ function hello
      echo Hello $argv!
  end

$ hello
Hello

$ hello Josh
Hello Josh!
```

It is that easy.
You can always see what functions are currently available by typing `functions` in the Fish shell.

Another option for you is to write and save function in files.
Any file in your `$fish_function_path` will work as long as it ends with `.fish`.
By default this path includes `$HOME/.config/fish/functions` which is where I'd recommend storing these files.

Per [the documentation](https://fishshell.com/docs/current/language.html#syntax-function) functions are best use as a stronger alias or abbreviation.
So, as we aliased `exa` above, I'll also create a function for this command:

```bash
function lsa
    exa -lag --header $argv
end
```

This function saved at `$HOME/.config/fish/functions/lsa.fish` will now allow me to use `lsa`.
Doing so will trigger the above function and give me the same output as my abbreviated `ls`.
This is nice as it does not expand the abbreviation like `ls` does.
But miles might vary on the importance of that feature.

**Note**: you can also use the `funcsave` command that comes with Fish shell to save any functions you created.
So we could save our `hello` function above by typing `funcsave hello`.
This will write the function to your function folder automatically!

```bash
$ funcsave hello
funcsave: wrote $HOME/.config/fish/functions/hello.fish
```

## Conclusion

This is a quick explanation of how I adopted Fish and Starship.rs for my terminal.
I will be honest, I tried Fish five or so years ago and hated it.
Let's see if my experience is better than last time.
If you have used Starship.rs and Fish, let me know!
Contact me [on Twitter](https://twitter.com/joshfinnie) and I'd love to chat.
So far it has been a nice change-of-pace.

## Also Might Enjoy

- [ASDF: How To Set Up Runtimes on Windows Subsystem for Linux](/blog/setting_up_wsl_with_asdf/)
- [Using Latex through Docker](https://www.joshfinnie.com/blog/latex-through-docker/)

gha_language: MDX


text:
---
layout: post
title: The Wolf Report - November 16th, 2021
---

- [Types as sets - Mark Seemann](https://blog.ploeh.dk/2021/11/15/types-as-sets/)
- [The Unfulfilled Potential of Serverless - Jeremy Daly](https://www.jeremydaly.com/the-unfulfilled-potential-of-serverless/)
- [Introducing Relational Database Connectors - Cloudflare blog](https://blog.cloudflare.com/relational-database-connectors/)
- [The Infinite Loop of Lost Potential // @marknca](https://markn.ca/2021/the-infinite-loop-of-lost-potential/)
- [How I help you build better websites - Kent C. Dodds](https://kentcdodds.com/blog/how-i-help-you-build-better-websites)
- [Azure Active Directory's gateway is on .NET 6.0! - .NET Blog](https://devblogs.microsoft.com/dotnet/azure-active-directorys-gateway-is-on-net-6-0/)
- [Is There Such a Thing as Good Taste? - Paul Graham](http://paulgraham.com/goodtaste.html)
- [Dapr v1.5 is now available - Dapr Blog](https://blog.dapr.io/posts/2021/11/12/dapr-v1.5-is-now-available/?s=09)
- [Performance for composition in F# - DEV Community](https://dev.to/t4rzsan/performance-for-composition-in-f-3fl)
- [Building confidence in a decision - by Netflix Technology Blog - Nov, 2021 - Netflix TechBlog](https://netflixtechblog.com/building-confidence-in-a-decision-8705834e6fd8)
- [Highlights from Git 2.34 - The GitHub Blog](https://github.blog/2021-11-15-highlights-from-git-2-34/)
- [AWS Cognito Under the Hood - YouTube](https://www.youtube.com/watch?v=XWrzRwSEXl4)
- [High-performance services with gRPC: What's new in .NET 6 - YouTube](https://www.youtube.com/watch?v=CXH_jEa8dUw)
- [GitHub - alan2207/bulletproof-react: 🛡 ⚛ A simple, scalable, and powerful architecture for building production ready React applications.](https://github.com/alan2207/bulletproof-react)
- [GitHub - stphnwlsh/cleangraphqlapi: Sample GraphQL API using a streamlined version of Clean Architecture in .NET](https://github.com/stphnwlsh/cleangraphqlapi)

gha_license_id: NOASSERTION


text:
---
title: Using Data Explorer to Work with Signals Coming from Adobe Analytics
seo-title: Using Data Explorer to Work with Signals Coming from Adobe Analytics
description: This video shows how to work in Data Explorer to discover and use your Adobe Analytics data, including searching for used and unused signals, creating Analytics traits, and understanding the data.
seo-description: This video shows how to work in Data Explorer to discover and use your Adobe Analytics data, including searching for used and unused signals, creating Analytics traits, and understanding the data.
feature: data explorer
topics:
audience: all
activity: use
doc-type: feature video
author: Doug Moore
team: Technical Marketing
kt: 2142
---

# Using [!DNL Data Explorer] to Work with [!UICONTROL Signals] Coming from Adobe Analytics {#using-data-explorer-to-work-with-signals-coming-from-adobe-analytics}

This video shows how to work in [!DNL Data Explorer] to discover and use your Adobe Analytics data, including searching for used and unused [!UICONTROL signals], creating [!DNL Analytics] [!UICONTROL traits], and understanding the data.

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

It's likely that one of your main sources of data coming into Audience Manager is an analytics solution, and of course we hope that that is Adobe Analytics. :)

[!DNL Data Explorer] is primed and ready to help you see what is coming in from various report suites, and as you discover [!DNL Analytics] signals that are not yet used in [!UICONTROL traits], you can click straight over to the [!DNL Trait Builder] and create the [!UICONTROL traits] to utilize this powerful behavioral data in your segmentation.

For more information about [!DNL Data Explorer], please visit the [documentation](https://experiencecloud.adobe.com/resources/help/en_US/aam/data-explorer.html).


text:
# bigip_ltm_persistence_profile_dstaddr

[back](../bigip.md)

### Index

- [Example Usage](#example-usage)
- [Variables](#variables)
- [Resource](#resource)
- [Outputs](#outputs)

### Terraform

```terraform
terraform {
  required_providers {
    bigip = ">= 1.8.0"
  }
}
```

[top](#index)

### Example Usage

```terraform
module "bigip_ltm_persistence_profile_dstaddr" {
  source = "./modules/bigip/r/bigip_ltm_persistence_profile_dstaddr"

  # app_service - (optional) is a type of string
  app_service = null
  # defaults_from - (required) is a type of string
  defaults_from = null
  # hash_algorithm - (optional) is a type of string
  hash_algorithm = null
  # mask - (optional) is a type of string
  mask = null
  # match_across_pools - (optional) is a type of string
  match_across_pools = null
  # match_across_services - (optional) is a type of string
  match_across_services = null
  # match_across_virtuals - (optional) is a type of string
  match_across_virtuals = null
  # mirror - (optional) is a type of string
  mirror = null
  # name - (required) is a type of string
  name = null
  # override_conn_limit - (optional) is a type of string
  override_conn_limit = null
  # timeout - (optional) is a type of number
  timeout = null
}
```

[top](#index)

### Variables

```terraform
variable "app_service" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "defaults_from" {
  description = "(required) - Inherit defaults from parent profile"
  type        = string
}

variable "hash_algorithm" {
  description = "(optional) - Specify the hash algorithm"
  type        = string
  default     = null
}

variable "mask" {
  description = "(optional) - Identify a range of source IP addresses to manage together as a single source address affinity persistent connection when connecting to the pool. Must be a valid IPv4 or IPv6 mask."
  type        = string
  default     = null
}

variable "match_across_pools" {
  description = "(optional) - To enable _ disable match across pools with given persistence record"
  type        = string
  default     = null
}

variable "match_across_services" {
  description = "(optional) - To enable _ disable match across services with given persistence record"
  type        = string
  default     = null
}

variable "match_across_virtuals" {
  description = "(optional) - To enable _ disable match across services with given persistence record"
  type        = string
  default     = null
}

variable "mirror" {
  description = "(optional) - To enable _ disable"
  type        = string
  default     = null
}

variable "name" {
  description = "(required) - Name of the persistence profile"
  type        = string
}

variable "override_conn_limit" {
  description = "(optional) - To enable _ disable that pool member connection limits are overridden for persisted clients. Per-virtual connection limits remain hard limits and are not overridden."
  type        = string
  default     = null
}

variable "timeout" {
  description = "(optional) - Timeout for persistence of the session"
  type        = number
  default     = null
}
```

[top](#index)

### Resource

```terraform
resource "bigip_ltm_persistence_profile_dstaddr" "this" {
  # app_service - (optional) is a type of string
  app_service = var.app_service
  # defaults_from - (required) is a type of string
  defaults_from = var.defaults_from
  # hash_algorithm - (optional) is a type of string
  hash_algorithm = var.hash_algorithm
  # mask - (optional) is a type of string
  mask = var.mask
  # match_across_pools - (optional) is a type of string
  match_across_pools = var.match_across_pools
  # match_across_services - (optional) is a type of string
  match_across_services = var.match_across_services
  # match_across_virtuals - (optional) is a type of string
  match_across_virtuals = var.match_across_virtuals
  # mirror - (optional) is a type of string
  mirror = var.mirror
  # name - (required) is a type of string
  name = var.name
  # override_conn_limit - (optional) is a type of string
  override_conn_limit = var.override_conn_limit
  # timeout - (optional) is a type of number
  timeout = var.timeout
}
```

[top](#index)

### Outputs

```terraform
output "app_service" {
  description = "returns a string"
  value       = bigip_ltm_persistence_profile_dstaddr.this.app_service
}

output "hash_algorithm" {
  description = "returns a string"
  value       = bigip_ltm_persistence_profile_dstaddr.this.hash_algorithm
}

output "id" {
  description = "returns a string"
  value       = bigip_ltm_persistence_profile_dstaddr.this.id
}

output "mask" {
  description = "returns a string"
  value       = bigip_ltm_persistence_profile_dstaddr.this.mask
}

output "match_across_pools" {
  description = "returns a string"
  value       = bigip_ltm_persistence_profile_dstaddr.this.match_across_pools
}

output "match_across_services" {
  description = "returns a string"
  value       = bigip_ltm_persistence_profile_dstaddr.this.match_across_services
}

output "match_across_virtuals" {
  description = "returns a string"
  value       = bigip_ltm_persistence_profile_dstaddr.this.match_across_virtuals
}

output "mirror" {
  description = "returns a string"
  value       = bigip_ltm_persistence_profile_dstaddr.this.mirror
}

output "override_conn_limit" {
  description = "returns a string"
  value       = bigip_ltm_persistence_profile_dstaddr.this.override_conn_limit
}

output "timeout" {
  description = "returns a number"
  value       = bigip_ltm_persistence_profile_dstaddr.this.timeout
}

output "this" {
  value = bigip_ltm_persistence_profile_dstaddr.this
}
```

[top](#index)

repository: chadwickalex/tfwriter

repo_name: chadwickalex/tfwriter


text:
## Remail, an SMTP rerouter

Remail is a simple command that launches an SMTP server on the configured port and emits a JSON blob for each received email.

## Command-line Usage

```
$ remail
{"from":"ab@mydomain.com","to":["bab@mydomain.com"],"addr":"[::1]:52661","content":"From<EMAIL_ADDRESS><EMAIL_ADDRESS>test message\r\nDate: Right now\r\nMessage-Id: somestring\r\n\r\n This is a test message\r\n"}
{"from":"cd@mydomain.com","to":["dab@mydomain.com"],"addr":"[::1]:52661","content":"From<EMAIL_ADDRESS><EMAIL_ADDRESS>test message\r\nDate: Right now\r\nMessage-Id: somestring\r\n\r\n This is a test message\r\n"}
```

The default invocation of remail simply listens on port 25 and emits a json document for each email received. To override the port, use the SMTP_PORT environment variable.

`$ SMTP_PORT=:2500 remail`

Since each line is passed on standard out, client programs should be written with the goal of handling each line as an individual email.

## As a Go Library

The SMTP server can be started by invoking `remail.Serve` with a callback for each email received.

```go
package foo

import "github.com/anthonybishopric/remail/pkg"

func StartFakeSMTPServer() {
    remail.Serve(func(rec remail.ReceivedEmail, jsonContent []byte) error {
        if rec.From ==<EMAIL_ADDRESS>{
            // do something useful
        }
        return nil
    })
}

```

## License
Apache 2.0

repository: Asovsky/remail

repo_name: Asovsky/remail


text:
# Security Policy

## Supported Versions

These versions of vscode-6x09-assembly are currently being supported
with security updates.

| Version | Supported          |
| ------- | ------------------ |
| 0.7.x   | :white_check_mark: |
| < 0.7   | :x:                |

## Reporting a Vulnerability

Please send me a direct message (DM) on Twitter.

I need to know:
- Description of the problem
- Precise and detailed steps (include screenshots) that created the problem
- The affected version(s)
- Any possible mitigations, if known

You will receive a reply from me acknowledging receipt of the DM.

Please bear with me as I seek to understand the breadth and scope of the reported problem, recreate it, and confirm if there is a vulnerability present.

## Preferred Languages

We prefer all communications to be in English.


text:
# Scrumster Project
**_Help your team and yourself by using this daily task tracker_**

Performing daily stand-ups without discussing what was completed the day prior ignore critical information needed to evaluate how you and your team is performing on a daily basis. The Scrumster application complements your daily stand-up by allowing individuals to thoughtfully determine what their tasks are for the day, and easily keep track of tasks missed.

Features:

* Helps to improve your ability to estimate time taken on tasks and your ability to accomplish them
* Encourages breaking down user stories into manageable chunks
* Distinguishes between planned tasks vs unplanned, further enabling managers to determine if outward forces are impacting employees
* As a manager, improves your one on one's by giving your employees solid stats on their performance
* As a manager, improves your reporting to upper management by your ability to individually list each employee's accomplishments
* Promotes high performing teams

![screenshot](https://github.com/jtba/scrumster/blob/master/docs/scrumster_1.png)
![screenshot](https://github.com/jtba/scrumster/blob/master/docs/scrumster_2.png)

## Getting Started

This application is in the very early stages of development. The frontend is currently using AngularJS (1.x) with plans to convert to React.

### Prerequisites

* Webserver
* MongoDB
* NodeJS

### Installing
**Generic:**
1. Clone the repo into an empty directory
```git
git clone https://github.com/jtba/scrumster.git .
```

**Frontend:**
1. Place the public directory in your web root directory
2. Configure the your application to talk to the API by editing the /public/app/config.js file
```javascript
app.factory('Config', function() {
  return {
      apiURL : 'http://localhost:9000/api/v1/'
  };
});
```
3. Start your web server

**API:**
1. Ensure MongoDB is running
2. start the service by executing: node node/index.js from the root of the project directory

## Authors

* **Jason Baldwin** - *Initial work* - [JTBA](https://github.com/jtba)

## License

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

## Acknowledgments

* Thanks to all of the third party libraries that have brought this project here so far

repository: jtba/scrumster

repo_name: jtba/scrumster