text:
# John Butcher's website

## Introduction

This project is an attempt to replace the current Drupal-based website at [http://jcbutcher.com](http://jcbutcher.com) with a static website hosted on Netlify.com. It is not finished yet, but the the changes are coming soon, and the website will be redirected to Netlify in the nearest future.

In the meantime, this website is avaliable at https://jcbutcher.netlify.com/.

## Project management

The project is managed in this [Trello board](https://trello.com/b/hs9JZPJ1/website).

## Technology

1. Obviously, this is a [Git](https://git-scm.com/) repository, hosted on [Github](https://github.com/). Git is a version control system, used not only for software development, but in many other areas, where having a history of changes in collections of text files is beneficial. Github is a popular service for hosting (storing) remote (online) copies of Git-enabled projects (repositories).

2. This project uses [Jekyll](https://jekyllrb.com/) as a [static website](https://www.netlify.com/blog/2016/05/18/9-reasons-your-site-should-be-static/) generator. Jekyll is a [Ruby](https://www.ruby-lang.org/en/) (a beautiful programming language) [gem](https://rubygems.org/) (a piece of software). Jekyll requires a [decent](https://jekyllrb.com/docs/installation/) version of Ruby to be installed on the system, on which it is supposed to run. The good news is that essentially any modern operating system will do, but using a [Mac computer](https://jekyllrb.com/docs/installation/macos/) has some benefits, such as easy-to-use package managers (e.g. [Homebrew](https://brew.sh/)).

3. A usable and nice looking layout for this website is provided by [Hyde](http://hyde.getpoole.com/), a popular Jekyll theme, which is totally awesome for individuals.

4. [Kramdown](https://kramdown.gettalong.org/index.html) is used as a parser for (a dialect of) Markdown. [Markdown](https://daringfireball.net/projects/markdown/) is a markup language, which is supposed to compile into HTML (the barebone language for web browsers). The files with Kramdown content have the extension `*.md`, the same as usual Markdown files do.

5. Kramdown has a nice support for insets written in [LaTeX](https://www.latex-project.org/) (via enabling [MathJax](https://www.mathjax.org/), for example), which makes it a popular choice for mathematically challenged developers (a joke, a joke...).

6. Jekyll can also compile [SASS](https://sass-lang.com/) into plain CSS, thus giving powerful tools for styling the website with unlimited possibilities. In order to repel the uninitiated, SASS files have `*.scss` extension.

7. This project has been bootstrapped with [Jekyll Boylerplate](https://github.com/HugoGiraudel/jekyll-boilerplate) by [Hugo Giraudel](https://twitter.com/HugoGiraudel).

## How to run this project locally

### Install Git

First of all, make sure that [Git](https://git-scm.com/) is installed onto your system. Here are [some instructions](https://gist.github.com/derhuerst/1b15ff4652a867391f03) on how to do this on a variety of systems.

### Clone the repository

Choose a separate folder for your website projects, and open it in a terminal. In this folder run the following command (the dollar sign `$` stands for the terminal prompt, which varies from system to system, and is not a part of the command):

```
$ git clone git@github.com:jcbutcher/website.git
```
After this command completes successfully, you may enter the folder by issuing
```
$ cd website
```
in the terminal.

### Install dependencies

Inside the 'website' folder, run
```
$ bundle install
```
This command will read 'Gemfile.lock' (or, if it is not found, 'Gemfile') file and install all the pieces of software ("dependencies"), that are necessary to run Jekyll (with the extensions, configured within the project).
If this command fails with errors, make sure that you have adequate versions of Ruby, Bundler and Jekyll installed (see the details [here]((https://jekyllrb.com/docs/installation/)).
Googling the error messages is the most efficient way to pin down the issues.

### Run the development server

Jekyll makes it easy to run a local copy of the website by issuing the command:

```
$ bundle exec jekyll serve
```

The `bundle exec` part ensures that the dependencies are taken from the project's 'Gemfile.lock'. In may cases this prefix may be safely omitted, and just `jekyll serve` will do. There is even shorter version of this command: `jekyll s`.

If this command runs successfully, it will show the link at which the local copy of the website can be opened in the browser. Usually, this is [http://localhost:4000](http://localhost:4000).

## How to make changes.

The project mainly consists of plain text files, with the exception of images, that may be binary files, of course. This means that any text editor will be good enough for making small changes, but for a convenient workflow a modern code editor would be a better choice. [Visual Studio Code](https://code.visualstudio.com/) is highly recommended (and free!)

Jekyll is simple enough but it still requires some time to get familiar with its concepts. Thomas Bradley created a great [video course](https://www.youtube.com/playlist?list=PLWjCJDeWfDdfVEcLGAfdJn_HXyM4Y7_k-) which can make getting started a pleasant journey.

## How to deploy this to production

If you are (the real) [John Charles Butcher](https://en.wikipedia.org/wiki/John_C._Butcher), then everything is already configured for you, and pushing commits to the repository will trigger automatic builds thanks to Netlify's magic.

In other cases, pressing the button below could be the easites way to go:

[![Deploy to Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/jcbutcher/website)

If you want to go an extra mile, then do the following steps:

- create an account on [Netlify.com](https://www.netlify.com) (using your Github account, obtained earlier, will simplify this task);
- install [Netlify-CLI](https://github.com/netlify/cli) following the instructions in the link;
- run `netlify login` and privide the required credentials to connect your computer to Netlify;
- check that everything is all right: `netlify status`.

More information can be found in [this article](https://www.netlify.com/blog/2015/10/28/a-step-by-step-guide-jekyll-3.0-on-netlify/).

## How to contribute

Open an issue, (find a solution), and (or) make a pull request!

## License

MIT

repository: jcbutcher/website

repo_name: jcbutcher/website


text:
---
layout: project
title: 'Openr'
at: { name: 'Afdeling Buitengewone Zaken', url: 'http://get.openr.nl' }
clients: [{ name: 'Openr', url: 'http://get.openr.nl' }]
---

![Screenshot](openr.jpg)

Openr is an intercom and access control service. A touch screen interface enables your guests to call you and the mobile app allows you to open the door, no matter if you are in the building or not.

<iframe width="560" height="315" src="https://www.youtube.com/embed/2nc6BnDJeOo" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

Openr opens ca. 150 doors for more than 4000 people each day.

I have maintained the project since 2017 and developed a new version of the mobile app, which adds a video calling feature.

Technology used:

- Python
- Django
- Particle IoT platform
- Android
- ReactJS
- React Native
- TypeScript

license: MIT

repository: luukschipperheyn/portfolio-netlify

branch_name: refs/heads/master

extension: md

gha_language: TypeScript

gha_license_id: MIT

license_type: permissive

repo_name: luukschipperheyn/portfolio-netlify


text:
# WaterMark

Add specific text or patterns to the page.

## When to Use

Suitable for preventing information theft.

## Demos

## WaterMark

### Props

| Name | Description | Type | Default |
| --- | --- | --- | --- |
| content | WaterMark text content | `string \| string[]` | - |
| fontColor | WaterMark text color | `string` | `rgba(0, 0, 0, .15)` |
| fontSize | WaterMark text font size | `string \| number` | `14` |
| fullPage | Whether to cover the whole page | `boolean` | `true` |
| gapX | Horizontal spacing between watermarks | `number` | `24` |
| gapY | Vertical spacing between watermarks | `number` | `48` |
| height | The height of the WaterMark | `number` | `64` |
| image | Image source, it is recommended to export 2x or 3x image, give priority to image rendering watermark | `string` | - |
| imageHeight | Image height | `number` | `64` |
| imageWidth | Image width | `number` | `120` |
| rotate | When the watermark is drawn, the angle of rotation, in ° | `number` | `-22` |
| width | The width of the WaterMark | `number` | `120` |
| zIndex | Z-index of the added watermark element | `number` | `2000` |

### CSS Variables

| Name | Description | Default | Global |
| --- | --- | --- | --- |
| --z-index | `z-index` of the water mark layer | `2000` | `--adm-water-mark-z-index` |

repository: ant-design/ant-design-mobile

repo_name: ant-design/ant-design-mobile


text:
# Akamai EdgeWorkers IntelliJ Plugin

## Install

1. Install IntelliJ IDEA: [https://www.jetbrains.com/idea/download/](https://www.jetbrains.com/idea/download/)

2.  Create or open a Project

3.  Open IntelliJ Preferences and go to the Plugins interface:

4.  Search for "EdgeWorkers" and hit the Install button.

5.  After a moment it should be installed.

## Dependencies / Usage

1.  The EdgeWorkers Explorer pane is available by going to View -> Tool Window -> EdgeWorkers Explorer. After selecting this it will appear on the left side of the window.

2.  The EdgeWorkers IntelliJ plugin depends on the Akamai CLI. Many of our customers will already have this set up, but if not on first launch of the EdgeWorkers Explorer pane they will be prompted to install and set up OPEN API credentials in .edgerc [as outlined in the developer docs](https://developer.akamai.com/cli/docs/getting-started). Usage from here assumes you have completed this step.

3.  Additional configuration is available in the IntelliJ Preferences; most customers will not need to use this but if they use multiple .edgerc sections or a custom edgerc path they will, and Akamai internal users will likely need to fill in Account Key here:
4.

## Functionality

1.  List EdgeWorkers in the explorer by using the refresh button as highlighted on the left:

2.  See EdgeWorker versions and version file contents by clicking through the tree:

3.  View file contents by clicking on them:

4.  Download a full EdgeWorker via right-click menu:

5.  Activate an EdgeWorker version via the same menu:

6.  Or by using the icon at the top of the pane:

7.  A brand new EdgeWorker can be registered by using the icon right of it:

8.  And a new version for an existing EdgeWorker can by added via the icon left:

9.  Finally a new EdgeWorker bundle/tgz can be created and automatically validated by right clicking on an EdgeWorker bundle.json source file in the Project pane:

10.  And that produced tgz, or any other EdgeWorker tgz, can be

1.  Tested in EdgeWorker sandbox or

2.  uploaded as a new version

via right click menu on the file:

repository: bmatthew/edgeworkers-intellij

branch_name: refs/heads/main

repo_name: bmatthew/edgeworkers-intellij


text:
---
title: mom_run_safeguard_saveloc_tele
category: var
tags:
  - saveloc
  - safeguard
minimum_value: 0
maximum_value: 2
default_value: 1
---

Changes the safeguard for teleporting to a saved location during a run.

Off = `0`, Teleport only when not pressing any movement keys = `1`, Teleport only on double press =`2`.


text:
### 2015-02-12

#### objective-c
* [
      TaimurAyaz
      /
      TAOverlay
](https://github.com/TaimurAyaz/TAOverlay):
      TAOverlay is a minimalistic and simple overlay meant to display useful information to the user.

* [
      jeffkibuule
      /
      JSKTimerView
](https://github.com/jeffkibuule/JSKTimerView):
      A simple custom UIView that acts as a self-contained, animating timer.

* [
      Flipboard
      /
      FLAnimatedImage
](https://github.com/Flipboard/FLAnimatedImage):
      Performant animated GIF engine for iOS

* [
      adamwulf
      /
      PerformanceBezier
](https://github.com/adamwulf/PerformanceBezier):
      A small library to dramatically speed up common operations on UIBezierPath, and also bring its functionality closer to NSBezierPath

* [
      syedhali
      /
      EZAudio
](https://github.com/syedhali/EZAudio):
      An iOS and OSX audio visualization framework built upon Core Audio useful for anyone doing real-time, low-latency audio processing and visualizations.

* [
      ayanonagon
      /
      Parsimmon
](https://github.com/ayanonagon/Parsimmon):
      Parsimmon is a wee Objective-C linguistics toolkit for iOS.

* [
      ReactiveCocoa
      /
      ReactiveCocoa
](https://github.com/ReactiveCocoa/ReactiveCocoa):
      A framework for composing and transforming streams of values

* [
      Flipboard
      /
      FLEX
](https://github.com/Flipboard/FLEX):
      An in-app debugging and exploration tool for iOS

* [
      facebook
      /
      AsyncDisplayKit
](https://github.com/facebook/AsyncDisplayKit):
      Smooth asynchronous user interfaces for iOS apps.

* [
      AFNetworking
      /
      AFNetworking
](https://github.com/AFNetworking/AFNetworking):
      A delightful iOS and OS X networking framework

* [
      zsk425
      /
      SKTagView
](https://github.com/zsk425/SKTagView):
      SKTagView is a view supports to display tags with auto layout.

* [
      jessesquires
      /
      JSQMessagesViewController
](https://github.com/jessesquires/JSQMessagesViewController):
      An elegant messages UI library for iOS

* [
      appfarms
      /
      CoreTextLabel
](https://github.com/appfarms/CoreTextLabel):
      With CoreTextLabel you are able draw NSAttributedString or HTML with custom font and color in iOS (>= 5.0) applications. "numberOfLines" and "truncation" (NSLineBreakByTruncatingTail) is also supported.

* [
      justMaku
      /
      UXKit-Headers-And-Sample
](https://github.com/justMaku/UXKit-Headers-And-Sample):
* [
      Grouper
      /
      FlatUIKit
](https://github.com/Grouper/FlatUIKit):
      A collection of awesome flat UI components for iOS.

* [
      hackiftekhar
      /
      IQKeyboardManager
](https://github.com/hackiftekhar/IQKeyboardManager):
      Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more.

* [
      uranusjr
      /
      macdown
](https://github.com/uranusjr/macdown):
      Open source Markdown editor for OS X.

* [
      relatedcode
      /
      NotificationChat
](https://github.com/relatedcode/NotificationChat):
      This is a full native iPhone app to create realtime, text based group or private chat with Parse.

* [
      magicalpanda
      /
      MagicalRecord
](https://github.com/magicalpanda/MagicalRecord):
      Super Awesome Easy Fetching for Core Data 1!!!11!!!!1!

* [
      usebutton
      /
      ios-deeplink-sdk
](https://github.com/usebutton/ios-deeplink-sdk):
      A splendid route-matching, block-based way to handle your deep links.

* [
      BradLarson
      /
      GPUImage
](https://github.com/BradLarson/GPUImage):
      An open source iOS framework for GPU-based image and video processing

* [
      qvacua
      /
      vimr
](https://github.com/qvacua/vimr):
      Project VimR — Refined Vim experience for OS X

* [
      jdg
      /
      MBProgressHUD
](https://github.com/jdg/MBProgressHUD):
      MBProgressHUD + Customizations

* [
      realm
      /
      realm-cocoa
](https://github.com/realm/realm-cocoa):
      Realm is a mobile database: a replacement for Core Data & SQLite

* [
      kevinzhow
      /
      PNChart
](https://github.com/kevinzhow/PNChart):
      A simple and beautiful chart lib used in Piner and CoinsMan for iOS

#### go
* [
      haxpax
      /
      gosms
](https://github.com/haxpax/gosms):
      Your own local SMS gateway in Go

* [
      Workiva
      /
      go-datastructures
](https://github.com/Workiva/go-datastructures):
* [
      FogCreek
      /
      logging
](https://github.com/FogCreek/logging):
      A Go package for logging that supports a tagged style of logging

* [
      golang
      /
      go
](https://github.com/golang/go):
      The Go programming language

* [
      koding
      /
      kite
](https://github.com/koding/kite):
      Micro-service framework in Go

* [
      tinylib
      /
      synapse
](https://github.com/tinylib/synapse):
      Simple & Performant RPC

* [
      docker
      /
      docker
](https://github.com/docker/docker):
      Docker - the open-source application container engine

* [
      lunixbochs
      /
      struc
](https://github.com/lunixbochs/struc):
      Better binary packing for Go

* [
      prometheus
      /
      prometheus
](https://github.com/prometheus/prometheus):
      The Prometheus monitoring system and time series database.

* [
      strace
      /
      sequence
](https://github.com/strace/sequence):
      High performance sequential log analyzer and parser

* [
      Swatto
      /
      td
](https://github.com/Swatto/td):
      Your todo list in your terminal

* [
      Sirupsen
      /
      logrus
](https://github.com/Sirupsen/logrus):
      Structured, pluggable logging for Go.

* [
      martingallagher
      /
      gawp
](https://github.com/martingallagher/gawp):
      A simple, configurable, file watching, job execution tool implemented in Go.

* [
      pachyderm
      /
      pfs
](https://github.com/pachyderm/pfs):
      A git-like distributed file system for a Dockerized world.

* [
      codingsince1985
      /
      geo-golang
](https://github.com/codingsince1985/geo-golang):
      GeoService in Go

* [
      afex
      /
      hystrix-go
](https://github.com/afex/hystrix-go):
      Netflix's Hystrix latency and fault tolerance library, for Go

* [
      coreos
      /
      etcd
](https://github.com/coreos/etcd):
      A highly-available key value store for shared configuration and service discovery

* [
      docker
      /
      machine
](https://github.com/docker/machine):
      Machine management for a container-centric world

* [
      coreos
      /
      rocket
](https://github.com/coreos/rocket):
      App Container runtime

* [
      GoogleCloudPlatform
      /
      kubernetes
](https://github.com/GoogleCloudPlatform/kubernetes):
      Container Cluster Manager

* [
      odeke-em
      /
      drive
](https://github.com/odeke-em/drive):
      Pull or push Google Drive files

* [
      docker
      /
      swarm
](https://github.com/docker/swarm):
      Swarm: a Docker-native clustering system

* [
      cockroachdb
      /
      cockroach
](https://github.com/cockroachdb/cockroach):
      A Scalable, Geo-Replicated, Transactional Datastore

* [
      github
      /
      hub
](https://github.com/github/hub):
      hub helps you win at git.

* [
      bradfitz
      /
      http2
](https://github.com/bradfitz/http2):
      HTTP/2 support for Go (in active development)

#### javascript
* [
      Flipboard
      /
      react-canvas
](https://github.com/Flipboard/react-canvas):
      High performance <canvas> rendering for React components

* [
      sdelements
      /
      lets-chat
](https://github.com/sdelements/lets-chat):
      Self-hosted chat app for small teams

* [
      thebinarysearchtree
      /
      regexpbuilderjs
](https://github.com/thebinarysearchtree/regexpbuilderjs):
      Create regular expressions using chained methods.

* [
      reapp
      /
      reapp
](https://github.com/reapp/reapp):
      Reapp - next gen hybrid apps

* [
      HubPress
      /
      hubpress.io
](https://github.com/HubPress/hubpress.io):
      A web application to build your blog on GitHub

* [
      grayghostvisuals
      /
      transformicons
](https://github.com/grayghostvisuals/transformicons):
      Transformicons: Animated icons, symbols and buttons using SVG and CSS. Inspired by the article from Sara Soueidan and the work of Bennett Feely.

* [
      crockpotveggies
      /
      tinderbox
](https://github.com/crockpotveggies/tinderbox):
* [
      BrowserSync
      /
      browser-sync
](https://github.com/BrowserSync/browser-sync):
      Keep multiple browsers & devices in sync when building websites. http://browsersync.io

* [
      facebook
      /
      react
](https://github.com/facebook/react):
      A declarative, efficient, and flexible JavaScript library for building user interfaces.

* [
      webrtc
      /
      samples
](https://github.com/webrtc/samples):
      WebRTC demos and samples

* [
      arasatasaygin
      /
      is.js
](https://github.com/arasatasaygin/is.js):
      Micro check library

* [
      grafana
      /
      grafana
](https://github.com/grafana/grafana):
      Grafana - A Graphite & InfluxDB Dashboard and Graph Editor

* [
      littleark
      /
      githut
](https://github.com/littleark/githut):
      Visualization of data from github archive.

* [
      iojs
      /
      io.js
](https://github.com/iojs/io.js):
      A friendly fork of Node.js with an open governance model

* [
      yanhaijing
      /
      zepto.fullpage
](https://github.com/yanhaijing/zepto.fullpage):
      专注于移动端的fullPage.js

* [
      angular
      /
      angular.js
](https://github.com/angular/angular.js):
      HTML enhanced for web apps

* [
      davidjbradshaw
      /
      iframe-resizer
](https://github.com/davidjbradshaw/iframe-resizer):
      Keep same and cross domain iFrames sized to their content with support for window/content resizing, in page links, nesting and multiple iFrames. (Dependency free, IE8+)

* [
      mbostock
      /
      d3
](https://github.com/mbostock/d3):
      A JavaScript visualization library for HTML and SVG.

* [
      GoogleCloudPlatform
      /
      PerfKitExplorer
](https://github.com/GoogleCloudPlatform/PerfKitExplorer):
      PerfKit Explorer is a dashboarding and performance analysis tool built with Google technologies and easily extensible. PerfKit Explorer is licensed under the Apache 2 license terms. Please make sure to read, understand and agree to the terms of the LICENSE and CONTRIBUTING files before proceeding.

* [
      lapwinglabs
      /
      x-ray
](https://github.com/lapwinglabs/x-ray):
      The next web scraper. See through the  noise.

* [
      gorhill
      /
      uBlock
](https://github.com/gorhill/uBlock):
      µBlock - An efficient blocker for Chromium, Firefox, and Safari. Fast and lean.

* [
      enaqx
      /
      awesome-react
](https://github.com/enaqx/awesome-react):
      A collection of awesome React libraries, resources and shiny things.

* [
      KrisSiegel
      /
      msngr.js
](https://github.com/KrisSiegel/msngr.js):
      msngr.js is a small messaging library

* [
      Semantic-Org
      /
      Semantic-UI
](https://github.com/Semantic-Org/Semantic-UI):
      Semantic is a UI component framework based around useful principles from natural language.

* [
      webpack
      /
      webpack
](https://github.com/webpack/webpack):
      Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jade, coffee, css, less, ... and your custom stuff.

#### ruby
* [
      factor-io
      /
      websockethook
](https://github.com/factor-io/websockethook):
      A simple web service to receive web hooks over a web socket.

* [
      Thibaut
      /
      devdocs
](https://github.com/Thibaut/devdocs):
      API Documentation Browser

* [
      Homebrew
      /
      homebrew
](https://github.com/Homebrew/homebrew):
      The missing package manager for OS X.

* [
      chanks
      /
      que
](https://github.com/chanks/que):
      A Ruby job queue that uses PostgreSQL's advisory locks for speed and reliability.

* [
      spree
      /
      spree
](https://github.com/spree/spree):
      Spree is a complete open source e-commerce solution for Ruby on Rails.

* [
      tcopeland
      /
      pippi
](https://github.com/tcopeland/pippi):
      pippi

* [
      caskroom
      /
      homebrew-cask
](https://github.com/caskroom/homebrew-cask):
      A CLI workflow for the administration of Mac applications distributed as binaries

* [
      rails
      /
      rails
](https://github.com/rails/rails):
      Ruby on Rails

* [
      ruby
      /
      ruby
](https://github.com/ruby/ruby):
      The Ruby Programming Language

* [
      discourse
      /
      discourse
](https://github.com/discourse/discourse):
      A platform for community discussion. Free, open, simple.

* [
      jekyll
      /
      jekyll
](https://github.com/jekyll/jekyll):
      Jekyll is a blog-aware, static site generator in Ruby

* [
      gitlabhq
      /
      gitlabhq
](https://github.com/gitlabhq/gitlabhq):
      Open source software to collaborate on code

* [
      cantino
      /
      huginn
](https://github.com/cantino/huginn):
      Build agents that monitor and act on your behalf. Your agents are standing by!

* [
      intridea
      /
      grape
](https://github.com/intridea/grape):
      An opinionated micro-framework for creating REST-like APIs in Ruby.

* [
      mitchellh
      /
      vagrant
](https://github.com/mitchellh/vagrant):
      Vagrant is a tool for building and distributing development environments.

* [
      lynndylanhurley
      /
      devise_token_auth
](https://github.com/lynndylanhurley/devise_token_auth):
      Token based authentication for Rails JSON APIs. Designed to work with http://github.com/lynndylanhurley/ng-token-auth

* [
      KrauseFx
      /
      fastlane
](https://github.com/KrauseFx/fastlane):
      Connect all iOS deployment tools into one streamlined workflow

* [
      bbatsov
      /
      rubocop
](https://github.com/bbatsov/rubocop):
      A Ruby static code analyzer, based on the community Ruby style guide.

* [
      rapid7
      /
      metasploit-framework
](https://github.com/rapid7/metasploit-framework):
      Metasploit Framework

* [
      mperham
      /
      sidekiq
](https://github.com/mperham/sidekiq):
      Simple, efficient background processing for Ruby

* [
      plataformatec
      /
      devise
](https://github.com/plataformatec/devise):
      Flexible authentication solution for Rails with Warden.

* [
      bkeepers
      /
      dotenv
](https://github.com/bkeepers/dotenv):
      Loads environment variables from `.env`.

* [
      igrigorik
      /
      githubarchive.org
](https://github.com/igrigorik/githubarchive.org):
      GitHub Archive is a project to record the public GitHub timeline, archive it, and make it easily accessible for further analysis.

* [
      michaeldv
      /
      awesome_print
](https://github.com/michaeldv/awesome_print):
      Pretty print your Ruby objects with style -- in full color and with proper indentation

* [
      KrauseFx
      /
      snapshot
](https://github.com/KrauseFx/snapshot):
      Automate taking localized screenshots of your iOS app on every device

repository: josephyzhou/github-trending

gha_language: Go

repo_name: josephyzhou/github-trending


text:
# random-messages-from-3000-words

Whenever I start a new project, I don't know what to write for the first commit. This packages allows you to write random words from the 3000 most use words in english.

## Install

```npm
npm install -g random-messages-from-3000-words
```

## Usage

To get 10 random words type to your CLI:

```bash
npx random-msg
```

## Contributing

If someone wants to add or improve something, I invite you to collaborate directly in this repository: [random-messages-from-3000-words](https://github.com/luissberenguer/random-messages-from-3000-words)

## License

random-messages-from-3000-words is released under the [MIT License](https://opensource.org/licenses/MIT).


text:
List Installed Files from Source Directories
============================================

`list_installed_file_from_source.py` helps users to list the vendor source
files or vendor prebuilts that will be installed into the system image.

This tool lists all *possible* file that *may* be installed to the system
image.  Some listed files are not actually installed because they are not
specified in `PRODUCT_PACKAGES`.

## Usage

First, build an Android target:

```
lunch aosp_sailfish-userdebug
make -j8
```

Then, in `${ANDROID_BUILD_TOP}`, run `list_installed_file_from_source.py`:

```
./development/vndk/tools/sourcedr/sourcedr/list_installed_file_from_source.py \
    out/combined-sailfish.ninja \
    --ninja-deps out/.ninja_deps \
    | tee files.txt
```

Be patient.  It may take for 3-5 mintues.

## Re-use the Parsed Dependency Graph

`list_installed_file_from_source.py` spends a lot of time parsing ninja
files.  It is desirable to keep the parsed dependency graph for further
investigation.  You can create a parsed dependency graph with:

```
./development/vndk/tools/sourcedr/sourcedr/ninja.py pickle \
    out/combined-sailfish.ninja \
    --ninja-deps out/.ninja_deps \
    -o sailfish.pickle
```

And then, load dependency graph with:

```
./development/vndk/tools/sourcedr/sourcedr/list_installed_file_from_source.py \
    sailfish.pickle
```

## Filters

By default, `list_installed_file_from_source.py` lists the files that are from
`device` or `vendor` directories and installed to the system partition.  This
can be tweaked with `--installed-filter` and `--source-filter`:

* `--installed-filter` filters the paths of the files that may be installed to
  the device.  The specified path must be relative to the file system root of
  the device.  The default value is `system`.

* `--source-filter` filters the paths of the source files.  The paths must be
  relative to Android source tree root (i.e. `${ANDROID_BUILD_TOP}`).  Multiple
  paths may be specified and separated by semicolons.  The default value is
  `device:vendor`.

### Examples

List the files from `device/google` and installed to `/system`:

```
./development/vndk/tools/sourcedr/sourcedr/list_installed_file_from_source.py \
    sailfish.pickle \
    --source-filter device/google \
    --installed-filter system
```

List the files from `device/google` and installed into `/system/lib64` with:

```
./development/vndk/tools/sourcedr/sourcedr/list_installed_file_from_source.py \
    sailfish.pickle \
    --source-filter device/google \
    --installed-filter system/lib64
```

List the files from `frameworks/base` or `frameworks/native` and installed
into `/system/lib` or `/system/lib64` with:

```
./development/vndk/tools/sourcedr/sourcedr/list_installed_file_from_source.py \
    sailfish.pickle \
    --source-filter frameworks/base:frameworks/native \
    --installed-filter system/lib:system/lib64
```


text:
# HTMLValidator  [![Build Status](https://secure.travis-ci.org/Watermelon-Sauce/htmlValidator.png)](http://travis-ci.org/Watermelon-Sauce/htmlValidator)

An HTML5 validator written in [node](http://www.nodejs.org).

## Installation

Not ready yet for distribution, but will be available via [npm](http://www.npmjs.org) when it is.

## Contributors

* Jesse Mullan ([jmullan](https://github.com/jmullan))
* Paul Armstrong ([paularmstrong](http://github.com/paularmstrong))

## Running Tests and JSLint

To run the test suite, first make sure all developer dependencies have been installed:

```
$ npm install -d
```

Then run the tests and JSLint:

```
$ make test
$ make lint
```

## License

(MIT License)

Copyright (C) 2011 by Jesse Mullan, Paul Armstrong

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: jmullan/htmlValidator

repo_name: jmullan/htmlValidator


text:
---
name: Feature request
about: Propose a new feature or change to the project
title: ""
labels: "Status: Pending,Type: Feature"
assignees: "kasperhesthaven"
---

## Description

<!--
Please describe the general purpose and value of the feature request or change you'd like to see.
-->

## Usage Example

<!--
Please provide an example or scenario that demonstrates the value of the request.
-->

## Risks

<!--
Please mention any risks that to your knowledge the feature request might entail, such as breaking changes, performance regressions, etc.
-->

license: Unlicense


text:
---
layout:		post
title:		Effective C++ Notes(1)
subtitle:
date:		2017-12-18
author: 	Grant6899
header-img: img/post-bg-c++.jpg
catalog: true
tags:
    - c++
    - Interview
---

## Item 1: View C++ as a federation of languages

- **C**. Way down deep, C++ is still based on C. Blocks, statements, the preprocessor, built-in data types, arrays, pointers, etc., all come from C.

- **Object-Oriented C++**. This part of C++ is what C with Classes was all about: classes (including constructors and destructors), encapsulation, inheritance, polymorphism, virtual functions (dynamic binding), etc.

- **Template C++**. This is the generic programming part of C++, the one that most programmers have the least experience with. Template
considerations pervade C++, and it’s not uncommon for rules of good programming to include special template-only clauses.

- **The STL**. The STL is a template library, of course, but it’s a very special template library. Its conventions regarding containers, iterators, algorithms, and function objects mesh beautifully.

## Item 2: Prefer consts, enums, and inlines to #defines

Marcos are hard to debug since it's simple replacement.
- For simple constants, prefer const objects or enums to #defines.
- For function-like macros, prefer inline functions to #defines.

## Item 3: Use const whenever possible

- Declaring something const helps compilers detect usage errors. const can be applied to objects at any scope, to function parameters and return types, and to member functions as a whole.
- Compilers enforce bitwise constness, but you should program using logical constness.
- When const and non-const member functions have essentially identical implementations, code duplication can be avoided by having the
non-const version call the const version.

## Item 4: Make sure that objects are initialized before they’re used

Reading uninitialized values yields undefined behavior. The best way to deal with this seemingly indeterminate state of affairs
is to always initialize your objects before you use them.

- For nonmember objects of built-in types, you’ll need to do this manually.
- For almost everything else, the responsibility for initialization falls on constructors. Make sure that all constructors initialize everything in the object. In a constructor, prefer use of the member initialization list to assignment inside the body of the constructor. List data members in the initialization list in the same order they’re declared in the class.

## Item 5: Know what functions C++ silently writes and calls

Compilers may implicitly generate a class’s default constructor, copy constructor, copy assignment operator, and destructor.

```c++
class Empty {
public:
	Empty() { ... } // default constructor
	Empty(const Empty& rhs) { ... } // copy constructor
	~Empty() { ... } // destructor — see below
	// for whether it’s virtual
	Empty& operator=(const Empty& rhs) { ... } // copy assignment operator
};

{
	Empty e1; // default constructor;
	Empty e2(e1); // copy constructor
	e2 = e1; // copy assignment operator
} // e1, e2's destructor when going out of scope
```

## Item 6: Explicitly disallow the use of compiler-generated functions you do not want

Before C++11, we can declare functions in class definition but not provide their implementations. In this way, complier will not generate them implicitly.

After C++11, you can explicitly tell complier if a function should be generated by default:

```c++
class Empty {
public:
	Empty() = delete; // default constructor
	Empty(const Empty& rhs) = delete; // copy constructor
	~Empty() { ... } // destructor — see below
	// for whether it’s virtual
	Empty& operator=(const Empty& rhs) = delete; // copy assignment operator
};
```

## Item 7: Declare destructors virtual in polymorphic base classes

```c++
class ClxBase{
public:
    ClxBase() {};
    virtual ~ClxBase() {};

    virtual void DoSomething() { cout << "Do something in class ClxBase!" << endl; };
};

class ClxDerived : public ClxBase{
public:
    ClxDerived() {};
    ~ClxDerived() { cout << "Output from the destructor of class ClxDerived!" << endl; };

    void DoSomething() { cout << "Do something in class ClxDerived!" << endl; };
};
```

Call them by
```c++
ClxBase *pTest = new ClxDerived;
pTest->DoSomething();
delete pTest;
```

Output:
```
Do something in class ClxDerived!
Output from the destructor of class ClxDerived!
```

**If desctructor is not virtual, when you delete a derived object by a base class pointer, derived class's destructor will not be called.**

- Polymorphic base classes should declare virtual destructors. If a class has any virtual functions, it should have a virtual destructor.

- Classes not designed to be base classes or not designed to be used polymorphically should not declare virtual destructors.

## Item 8: Prevent exceptions from leaving destructors

- Destructors should never emit exceptions. If functions called in a destructor may throw, the destructor should catch any exceptions, then swallow them or terminate the program.

   - Swallow:
     ```c++
     DBConn::~DBConn(){
		try { db.close(); }
		catch (...) {
		//make log entry that the call to close failed;
		}
	 }
     ```

   - Terminate:
   	 ```c++
     DBConn::~DBConn(){
	  	 try { db.close(); }
		 catch (...) {
		 //make log entry that the call to close failed;
		 std::abort();
		 }
	 }
     ```

- If class clients need to be able to react to exceptions thrown during an operation, the class should provide a regular (i.e., non-destructor) function that performs the operation.

## Item 9: Never call virtual functions during construction or destruction

- During base class construction, virtual functions never go down into derived classes. Instead, the object behaves as if it were of the base type. Because base class constructors execute before derived class constructors, derived class data members have not been initialized when base class constructors run.

- The same reasoning applies during destruction. Once a derived class destructor has run, the object’s derived class data members assume undefined values, so C++ treats them as if they no longer exist.

## Item 10: Have assignment operators return a reference to *this

Chain assignment in C++:

```c++
int x, y, z;
x = y = z = 15;
```

To make the chain assignment work, you should follow a certain convention when implementing assignment operator:
```c++
Widget& operator=(const Widget& rhs){ // return type is a reference to
...
return *this; // return the left-hand object
}
```

## Item 11: Handle assignment to self in operator=

- Make sure operator= is well-behaved when an object is assigned to itself. Techniques include comparing addresses of source and target objects, careful statement ordering, and copy-and-swap.

	- Identity test
		```c++
    	Widget& Widget::operator=(const Widget& rhs){
			if (this == &rhs) return *this; // identity test: if a self-assignment,
			// do nothing
			delete pb;
			pb = rhs.pb;
			return *this;
		}
    	```
	- Share underlying resource

      above will make a shallow copy, make pointer of two instances point to the same underlying object.
	- Deep copy
		```c++
    	Widget& Widget::operator=(const Widget& rhs){
			if (this == &rhs) return *this; // identity test: if a self-assignment,
			// do nothing
			delete pb;
			pb = new Bitmap(*rhs.pb);
			return *this;
		}
    	```
	- Copy and swap
		```c++
        Widget& Widget::operator=(const Widget& rhs){
			Widget temp(rhs); // make a copy of rhs’s data
			swap(temp); // swap *this’s data with the copy’s
			return *this;
		}
        ```

- Make sure that any function operating on more than one object behaves
correctly if two or more of the objects are the same.

## Item 12: Copy all parts of an object

When you declare your own copying functions, you are indicating to compilers that there is something about the default implementations you don’t like. If you add a data member to a class, you need to make sure that you update the copying functions, too.

**Derived class copying functions must invoke their corresponding base class functions.**

- Copy all local data members
- Invoke the appropriate copying function in all base classes

```c++
PriorityCustomer::PriorityCustomer(const PriorityCustomer& rhs) : Customer(rhs), // invoke base class copy ctor
priority(rhs.priority) // copy local member
{
	logCall("PriorityCustomer copy constructor");
}

PriorityCustomer& PriorityCustomer::operator=(const PriorityCustomer& rhs)
{
	logCall("PriorityCustomer copy assignment operator");
	Customer::operator=(rhs); // assign base class parts
	priority = rhs.priority;
	return *this;
}
```


text:
### v6.1.1 (2023-03-29)

* Leave it up to implementations how to interpret `last_modified` for
  dictionaries, or even not implement it (then returning ``Error
  (`Value_expected _)``. The previous definition was not well founded when the
  dictionary doesn't contain any values directly, and some implementations
  implements `last_modified` differently from the description on dictionaries.
  (reported in #41, fixed in #42 by @reynir)
* Leave it up to implemetations how to interpret `digest` for dictionaries,
  or even not implement it (returning ``Error (`Value_expected _)``.
  (reported mirage/ocaml-tar#111, fixed in #43 by @reynir)

### v6.1.0 (2023-01-31)

* Mirage_kv.Key.add now raises Invalid_argument (instead of Failure). Document
  that it raises (#40 @reynir)

### v6.0.1 (2022-12-15)

* Specify in RO.list that the returned list consists of keys being absolute, and
  kinds (#38 #39 @reynir @hannesm)
* BREAKING: Before 6.0.0, the return type of RO.list consisted of a string and
  kind list, where the string was relative. Now it is absolute.

### v6.0.0 (2022-12-12)

* Use ptime directly for RO.last_modified, instead of the int * int64 pair
  (#34)
* Add RW.allocate to allocate a key and fill it with zero bytes (#34)
* RO.list: return Key.t instead of string (#37, fixes #33)
* Introduce a custom error for RW.rename with a source which is a prefix of
  destination (#37, fixes #31)
* Use Optint.Int63.t for RO.size, RO.get_partial, RO.set_partial (#37, fixes #32)
* Remove RW.batch (#37, fixes #29 #36, discussed at the MirageOS meeting in
  November, and on the mirageos-devel mailing list in January 2022)
* Key.pp: escape the entire string, not individual fragments (#35)

### v5.0.0 (2022-09-07)

* Add `get_partial` and `size` to the RO interface (@palainp #28, review by
  @yomimono @hannesm)
* Add `set_partial` and `rename` to the RW interface (@palainp #28, review by
  @yomimono @hannesm)
* Mirage_kv.Key.pp: escape binary keys (#30 @hannesm)

### v4.0.1 (2022-02-28)

* Return `/` for `parent /` and `basename /` (@yomimono, @talex5, #25)

### v4.0.0 (2021-11-15)

* Remove Mirage_kv_lwt module (#24 @hannesm)
* remove mirage-device dependency (#24 @hannesm)
* Adapt to fmt 0.8.7 dependency (#23 @MisterDA)

### v3.0.1 (2019-11-04)

* provide deprecated Mirage_kv_lwt for smooth transition (#21 @hannesm)

### v3.0.0 (2019-10-22)

* remove mirage-kv-lwt (#19 @hannesm)
* specialise mirage-kv on Lwt.t and value being string (#19 @hannesm)
* raise lower OCaml bound to 4.06.0 (#19 @hannesm)

### v2.0.0 (2019-02-24)

* Major revision of the `RO` signature:
 - values are of type `string`
 - keys are segments instead of a string
 - `read` is now named `get`, and does no longer take an offset and length
 - the new function `list` is provided
 - the new functions `last_modified` and `digest` are provided
* A module `Key` is provided with convenience functions to build keys
* An `RW` signature is provided, extending `RO` with
 - a function `set` to replace a value
 - a function `remove` to remove a key
 - `batch` to batch operations

### v1.1.1 (2017-06-29)

* Remove `open Result` statements (and drop support to 4.02)

### v1.1.0 (2017-05-26)

* Port to Jbuilder.

### v1.0.0 (2016-12-27)

* First release, import `V1.KV_RO` and `V1_LWT.KV_RO` from mirage-types.

license: ISC

repository: mirage/mirage-kv

gha_language: OCaml

gha_license_id: ISC

repo_name: mirage/mirage-kv


text:
# Working with Inferred Record Types

## How records work in PureScript

In PureScript, a `Record` type is parameterized by `# Type`

```hs
data Record :: # Type -> Type
```

As seen on [Pursuit](https://pursuit.purescript.org/builtins/docs/Prim#t:Record), this means that records are an application of row types of `Type`, such that the two definitions are equivalent:

```hs
type Person = { name :: String, age :: Number }

type Person = Record ( name :: String, age :: Number )
```

With this knowledge, we can work with records in a generic way where any operation with the correct row type constraints is valid.

This is unlike other languages where records are often simply product types with selector information. Let's look at some examples of this at work.

## Modifying a field's type

Say that we wanted to read in JSON into this type:

```hs
type RecordWithEither =
  { apple :: Int
  , banana :: Either Int String
  }
```

We know that there's no representation of this `Either Int String` in JavaScript, but it would be convenient to read some value into it. First, let's define a function to read in any `Either`:

```hs
readEitherImpl
  :: forall a b
   . JSON.ReadForeign a
  => JSON.ReadForeign b
  => Foreign
  -> Foreign.F (Either a b)
readEitherImpl f
    = Left <$> JSON.readImpl f
  <|> Right <$> JSON.readImpl f
```

Now we can read in to an `Either` any `a` and `b` that have instances for `ReadForeign`. We can then use this to modify a field in an inferred context:

```hs
readRecordWithEitherJSON :: String -> Either Foreign.MultipleErrors RecordWithEither
readRecordWithEitherJSON s = runExcept do
  inter <- JSON.readJSON' s
  banana <- readEitherImpl inter.banana
  pure $ inter { banana = banana }
```

So what goes on here is that since the result of the function is our `RecordWithEither` with a field of `banana :: Either Int String`, the type is inferred "going backwards", so with the application of our function that is now concretely typed in this context as `readEitherImpl :: Foreign -> Foreign.F (Either Int String)`, the `inter` is read in as `{ apple :: Int, banana :: Foreign }`.

In this case, we used record update syntax to modify our inferred record, but we also could have done this generically using `Record.modify` from the [Record](https://pursuit.purescript.org/packages/purescript-record) library.

## PureScript-Record in a nutshell

Most of PureScript-Record revolves around usages of two row type classes from [Prim.Row](https://justinwoo.github.io/generated-docs-12/generated-docs/Prim.Row.html):

```hs
class Cons
  (label :: Symbol) (a :: Type) (tail :: # Type) (row :: # Type)
  | label a tail -> row, label row -> a tail

class Lacks
  (label :: Symbol) (row :: # Type)
```

`class Cons` is a relation of a field of a given `Symbol` label (think type-level `String`), its value `Type`, a row type `tail`, and a row type `row` which is made of the `tail` and the field put together. This is very much like your normal `List` of `Cons a` and `Nil`, but with the unordered row type structure at the type level (that `(a :: String, b :: Int)` is equivalent to `(b :: Int, a :: String)`).

`class Lacks` is a relation of a given `Symbol` label not existing in any of the fields of `row`.

With this bit of knowledge, we can go ahead and look at the docs of the [Record](https://pursuit.purescript.org/packages/purescript-record) library.

Let's go through a few of these. First, `get`:

```hs
get
  :: forall r r' l a
   . IsSymbol l
  => Cons l a r' r
  => SProxy l
  -> { | r }
  -> a
```

So here right away we can see that the `Cons` constraint is used to declare that the label `l` provided by the `SProxy` argument must exist in the row type `r`, and that there exists a `r'`, a complementary row type, which is `r` but without the field `l, a`. With this, this function is able to get out the value of type `a` at label `l`. This function doesn't know what concrete label is going to be used, but it uses this constraint to ensure that the field exists in the record.

```hs
insert
  :: forall r1 r2 l a
   . IsSymbol l
  => Lacks l r1
  => Cons l a r1 r2
  => SProxy l
  -> a
  -> { | r1 }
  -> { | r2 }
```

With `insert`, we work with the input row type `r1` and the output row type `r2`. The constraints here work that the `r1` row should not contain a field with label `l`, and that the result of adding a field of `l, a` to `r1` yields `r2`.

Now, the most involved example:

```hs
rename
  :: forall prev next ty input inter output
   . IsSymbol prev
  => IsSymbol next
  => Cons prev ty inter input
  => Lacks prev inter
  => Cons next ty inter output
  => Lacks next inter
  => SProxy prev
  -> SProxy next
  -> { | input }
  -> { | output }
```

Because PureScript does not solve multiple constraints simultaneously, we work with three row types here: `input`, `inter` (intermediate), and `output`. This function takes two `Symbol` types: one for the current label of the field and one for the next label. Then the constraints work such that `inter` is `input` without the field `prev, ty` and lacks any additional fields of `prev`, as row types can have duplicate labels as they are not only for records. Then `output` is constructured by adding the field `next, ty` to `inter` and checking that the `inter` does not already contain a field with the label `next`. While this seems complicated at first, slowly reading through the constraints will show that this is a series of piecewise operations instead of being a multiple-constraint system.

## Application of generic Record functions

Say we have a type where we know the JSON will have the wrong name:

```hs
type RecordMisnamedField =
  { cherry :: Int
  }
```

If the JSON we receive has this field but with the name "grape", what should we do?

We can apply the same inferred record type method as above but with `Record.rename`:

```hs
readRecordMisnamedField :: String -> Either Foreign.MultipleErrors RecordMisnamedField
readRecordMisnamedField s = do
  inter <- JSON.readJSON s
  pure $ Record.rename grapeP cherryP inter
  where
    grapeP = SProxy :: SProxy "grape"
    cherryP = SProxy :: SProxy "cherry"
```

So again, by applying a function that renames `grape, Int` to `cherry, Int`, the inferred record type of the `inter` is `{ grape :: Int }` and that is the type used to decode the JSON.

Hopefully this page has shown you how powerful row type based Records are in PureScript and the generic operations they allow.

*You might be interested in reading through [slides](https://speakerdeck.com/justinwoo/easy-json-deserialization-with-simple-json-and-record) for further illustrations of how generic record operations work and how they can be used with Simple-JSON.*

repository: purerl/purescript-simple-json

gha_language: PureScript

repo_name: purerl/purescript-simple-json


text:
## Explore

run

``` sh
$ dpkg -L spectrwm | grep conf
```

show

```
/etc/spectrwm.conf
/usr/share/doc/spectrwm/examples/spectrwm_cz.conf
/usr/share/doc/spectrwm/examples/spectrwm_es.conf
/usr/share/doc/spectrwm/examples/spectrwm_fr.conf
/usr/share/doc/spectrwm/examples/spectrwm_fr_ch.conf
/usr/share/doc/spectrwm/examples/spectrwm_se.conf
/usr/share/doc/spectrwm/examples/spectrwm_us.conf
```

## Copy

``` sh
cp /etc/spectrwm.conf .
cp /usr/share/doc/spectrwm/examples/spectrwm_us.conf .
```

* [spectrwm.conf](spectrwm.conf)
* [spectrwm_us.conf](spectrwm_us.conf)


text:
# Virtual Bank

This module manages the integration between the Cosmos x/bank module and the VM.

"Bank purses" connect Cosmos-level bank module accounts with Agoric-level ERTP
purses and payments. A "bank purse" is created at the ERTP level which be
observed and manipulated as other purses, but modifications to it are sent over
the bridge to act upon the bank account. Updates to the bank account balance are
sent over the bridge to update the bank purse, whose balance can be queried
entirely at the ERTP level.

## Parameters

- `feeCollectorName`: the module which handles fee distribution to stakers.
- `reward_epoch_duration_blocks`: the duration (in blocks) over which fees should be given to the fee collector.

## State

The Vbank module maintains no significant state, but will access stored state through the bank module.

## Protocol

Purse operations which change the balance result in a downcall to this module to update the underlying account. A downcall is also made to query the account balance.

Upon an `EndBlock()` call, the module will scan the block for all `MsgSend` and `MsgMultiSend` events (see `cosmos-sdk/x/bank/spec/04_events.md`) and perform a `VBANK_BALANCE_UPDATE` upcall for all denominations held in *only the mentioned module accounts*.

The following fields are common to the Vbank messages:
- `"address"`, `"recipient"`, `"sender"`: account address as a bech32-encoded string
- `"amount"`: either amount to transfer or account balance, as an integer string
- `"denom"`: denomination as a string
- `"nonce"`: unique integer, as a number
- `"type"`: string of the type of message (enumerated below)
- `"updated"`: list of objects with the fields `"address"`, `"denom"`, `"amount"`.

Downcalls from JS to Cosmos (by `type`):
- `VBANK_GET_BALANCE (type, address, denom)`: gets the account balance in the given denomination from the bank. Returns the amount as a string.
- `VBANK_GIVE (type, recipeient, denom, amount)`: adds amount of denomination to account balance to reflect a deposit to the virtual purse. Returns a `VBANK_BALANCE_UPDATE` message restricted to the recipient account and denomination.
- `VBANK_GIVE_TO_FEE_COLLECTOR (type, denom, amount)`: stores rewards which will be gradually sent to the fee collector
- `VBANK_GRAB (type, sender, denom, amount)`: burns amount of denomination from account balance to reflect withdrawal from virtual purse. Returns a `VBANK_BALANCE_UPDATE` message restricted to the sender account and denomination.

Upcalls from Cosmos to JS: (by `type`)
- `VBANK_BALANCE_UPDATE (type, nonce, updated)`: inform virtual purse of change to the account balance (including a change initiated by VBANK_GRAB or VBANK_GIVE).

## Testing

Test the following transfer scenarios:
- Purse-to-bank-purse
- bank-purse-to-purse
- bank-purse-to-bank-purse

The initial BLD and IST purses are bank purses, but newly-created purses will
not be bank purses by default.

## Governance

To use Cosmos governance to change the `reward_epoch_duration_blocks` value:

```sh
$ agd query vbank params
reward_epoch_duration_blocks: "720"
$ cat <<EOF > epoch-duration-proposal.json
{
  "title": "Vbank param-change test",
  "description": "Decrease the fee disbursal epoch parameter to 30 blocks.",
  "changes": [
    {
      "subspace": "vbank",
      "key": "reward_epoch_duration_blocks",
      "value": "30"
    }
  ],
  "deposit": "1000000ubld"
}
EOF
$ agd tx gov submit-proposal param-change epoch-duration-proposal.json --from=mykey --chain-id=agoric
# Then vote on the proposal.
$ agd tx vote ...
# After passing,
$ agd query vbank params
reward_epoch_duration_blocks: "30"
$
```

repository: Agoric/agoric-sdk

gha_language: JavaScript

repo_name: Agoric/agoric-sdk


text:
Irresistible APIs Webapp
==========================

This repository can be grabbed using the usual git methods, or
installed as a docker container using the instructions found
here:

http://www.princesspolymath.com/princess_polymath/?p=768

The system includes a basic flask-based REST API as well
as a front-end application running on that API.

## License

Apache 2.0

## Copyright

Copyright Kirsten Hunter<EMAIL_ADDRESS>


text:
# Collections

Python has a few different ways that you can create collections. Collections make it easy to store large amounts of values into just one variable. The two most common types are **Lists** and **Dictionaries**.

## Lists

Lists are Python's equivalent of Arrays. They store multiple values of the same type, and those values can be accessed by their index in the list. Lists are very easy to instantiate:

```python
mylist = []
```

This will make an empty list with no elements. This doesn't really help us, so let's make a list with a few things in it:

```python
pets = ["Dog", "Cat", "Fish"]
```

Now we have a list of three strings. We can access elements by using `pets[i]`, which will give us the item at index i of the list. Since programming always starts counting at 0, `pets[0]` will give us the first element of the list, which is "Dog". So the following code should print "Dog".

```python
pets = ["Dog", "Cat", "Fish"]
pet_dog = pets[0]
print(pet_dog)
```

You can also change elements of the list using the same syntax. The following code should now print "Bird"

```python
pets = ["Dog", "Cat", "Fish"]
pets[1] = "Bird"
print(pets[1])
```

If you want to add an element to a list without changing one that's currently in it, you can use the append() function. This will add a value to the end of the list:

```python
pets = ["Dog", "Cat", "Fish"]
pets.append("Bird")
```

Removing an element from the list is just as easy:

```python
pets = ["Dog", "Cat", "Fish"]
pets.remove("Fish")
```

## Dictionaries

Sometimes you don't want to access elements of a collection by their index. Instead, you might want to associate keys with every value in your collection. This key-value pair is the idea behind dictionaries.

A dictionary is very similar in syntax to lists, but uses {} instead of []. So making a new Dictionary looks like this:

```python
my_dict = {}
```

And making a dictionary with values in it looks like this:

```python
pets = {"Dog": "Rufus", "Cat": "Ringo", "Fish": "Bubbles"}
```

For every entry, the basic format is **Key: Value**. The keys must always be strings, but the values can be any data type.

Now we have a dictionary of pets with the type of animal as the key and the name of that animal as the value. Instead of using indexes to access values, we can now just use the keys we've made:

```python
pets = {"Dog": "Rufus", "Cat": "Ringo", "Fish": "Bubbles"}
my_dog = pets["Dog"]
```

This will store the value associated with the key "Dog" into the **my_dog** variable, which in this case will be "Rufus". It's important to note that even though we use {} around a dictionary itself, we still use [] to access elements of the dictionary.

Adding elements to the dictionary or changing values associated with keys already in the dictionary is done very similarly:

```python
pets = {"Dog": "Rufus", "Cat": "Ringo", "Fish": "Bubbles"}
pets["Bird"] = "Polly"
```

Now the list will have a fourth element with key "Bird" and value "Polly".

Removing an element from a dictionary is very similar to removing from a list, but the function is called pop() instead of remove(). This will remove both the key and the value from the dictionary. :

```python
pets = {"Dog": "Rufus", "Cat": "Ringo", "Fish": "Bubbles"}
pets.pop("Fish")
```

gha_license_id: Unlicense


text:
---
title: "Captain's Log"
---

## Overview

The [Captain's Log](https://github.com/target/captains-log) plugin enables the ability to manage release logs through slack in a Vela pipeline.

Source Code: https://github.com/target/captains-log

Registry: https://hub.docker.com/r/target/captains-log

## Usage

Basic Usage

```yaml
steps:
  - name: captains-log
    image: target/captains-log:1
    pull: always
    secrets: [GITHUB_TOKEN, SLACK_URL]
    parameters:
      github_owner: target
      github_repo: captains-log
      github_tag_id: "v([0-9]+-release)$"
      enterprise_host: https://git.myteam.com
      jira_team_domain: myteamnamespace
```

Utilize "teams" organization:

```yaml
steps:
  - name: captains-log
    image: target/captains-log:1
    pull: always
    secrets: [GITHUB_TOKEN, SLACK_URL]
    parameters:
      github_owner: target
      github_repo: captains-log
      github_tag_id: "v([0-9]+-release)$"
      enterprise_host: https://git.myteam.com
      jira_team_domain: myteamnamespace
      teams:
        - name: Team1
          color: "#FFDC18"
          emoji: "✨"
          mentions: "<@person1>  <@person2>"
          issueTracking:
            jira:
              projects:
                - TEAM1
                - TEAM1SUBGROUP
        - name: Team2
          color: "#F48642"
          emoji: "🔥"
          mentions: "<@person3>"
          issueTracking:
            jira:
              projects:
                - TEAM2
```

## Secrets

{{% alert color="warning" %}}
Users should refrain from configuring sensitive information in their pipeline in plain text.
{{% /alert %}}

The plugin accepts the following `parameters` for authentication:

| Parameter      | Environment Variable Configuration |
| -------------- | ---------------------------------- |
| `github_token` | `GITHUB_TOKEN`                     |
| `slack_token`  | `SLACK_URL`                        |
| `slack_url`    | `SLACK_TOKEN`                      |

Users can use [Vela secrets](/docs/tour/secrets/) to substitute these sensitive values at runtime:

```diff
steps:
  - name: captains-log
    image: target/captains-log:1
    pull: always
+   secrets: [ github_token, slack_url ]
    parameters:
      github_owner: target
      github_repo: captains-log
      github_tag_id: "v([0-9]+-release)$"
      enterprise_host: https://git.myteam.com
      jira_team_domain: myteamnamespace
-     github_token: superSecretToken
-     slack_url: https://hooks.slack.com/services/super/secret/url
```

{{% alert color="info" %}}
This example will add the `secrets` to the `captains-log` step as environment variables:

- `GITHUB_TOKEN`=<value>
- `SLACK_URL`=<value>
{{% /alert %}}

## Parameters

For more on configuration options, visit the Captain's Log documentation.

https://target.github.io/captains-log/#/configuration/

repository: go-vela/docs

gha_language: CSS

repo_name: go-vela/docs


text:
---
tags: perl
layout: post
title: "Managing source for web apps"
---

[OTish] Version Control? - This is mostly Perl specific, but lots of good advice on how to manage code for web applications. The original poster asked about version control but it quickly branched out into how to organize projects, how to push/pull changes to many servers at once and how to ensure consistent module versions. It's a long thread, but if you're short of time focus on posts from Rob Nagler, Jesse Erlbaum and Ask.


text:
# StringTemplate Standalone Tool - for StringTemplate v4

A simple command line utility to process a [StringTemplate](http://www.stringtemplate.org/) template with a [JSON](http://json.org/) file supplying data for the template.

See this blog [post](http://hardlikesoftware.com/weblog/2007/04/26/on-learning-stringtemplate/) for motivation for this tool.
That post was written about StringTemplate v3 and the corresponding STST but the motivation still applies to v4.
The old v3 STST is still [available](http://hardlikesoftware.com/weblog/stst/).

This project is an update to STST so that it works with StringTemplate v4.

StringTemplate is both a language for describing text generation and a tool (template engine) that implements that
language and provides an API to connect the tool to another program.

The StringTemplate language by design has no way to perform computation or evaluation. It also has no general way to
specify structural data. It is up to some driving program to produce and or make data available to the StringTemplate
template engine. The lack of readily available data makes learning the template language difficult without also
learning the StringTemplate API.

In theory one benefit of the separation of presentation from business logic is that a project can be divided between
people who work on the business logic and people who work on the presentation. The people working on presentation
don't need to be programmers.

Tutorials on StringTemplate tend to describe both the template syntax and how to invoke it from the Java API at the
same time. In some cases it is confusing to learn two things at once and more importantly it excludes non-programmers
from learning StringTemplate.

In contrast, trying out XSLT is is easy (even if learning XSLT is hard) because all you need is a text editor to create
both your input documents and your stylesheet and a XSLT program to process the stylesheet with the input documents.

The intent of this Standalone Tool is to make StringTemplate easy to try out without having to program in Java (or some
other language). It does this by providing a textual data format that can be input to the tool along with a set of templates.

This command line program takes input from a text file in JSON format, the name of a template and optional group and
produces an output file that results from processing the named template with the data from the JSON file.

Comments, questions, or other feedback are welcome.

NOTES:

 * There is a basic renderer that can be used to try out the format option syntax. The formats are toUpper, toLower,
 lpad,nn rpad,nn where nn is a the number of characters to pad. See the book samples.
 * In version 0.4.1 you need to use the -f basic option to get the basic renderer. There is also -f javascript
 renderer that supports format options "string" and "key"

## INSTALL INSTRUCTIONS
This is a Java program. You need java to run it. I used java 1.7 but other versions may work. Make sure java can be
found on your path.

 1 Download [stst-0.4.1.zip](http://www.hardlikesoftware.com/weblog/download/stst-0.4.1.zip)

 2 Unzip stst-0.4.1.zip into a folder of your choice. For example C:\util\stst or ~/util/stst

   This folder is referred as STST_HOME in the rest of the steps

 3 Edit the script used to run the tool

For Windows

In the STST_HOME folder copy stst.bat.init to stst.bat.
Then edit stst.bat and replace <home> with the path for STST_HOME
You can copy stst.bat to somewhere on your path or update the path to include the STST_HOME folder.

For Linux

In the STST_HOME folder copy stst.sh.init to stst.sh.
Then edit stst.sh and replace <home> with the path for STST_HOME
You can copy stst.sh to somewhere on your path or update the path to include the STST_HOME folder.
Change the mode so it can be executed.
Optionally you can rename the file to "stst".

 4) From a command prompt type stst -h for usage. Then try out some of the samples in the samples folder.

## USE
Type stst -h for help.

Depending on your OS and where you put the stst shell script and what you called it you may need to use
./stst.sh, stst.sh or give a relative path to it.

Just create some data files and template files.

Then run stst from the same directory or use the -d option to specify a different
directory.

See the samples folder. Here are some commands you can try in the samples folder

```
    stst -h
    stst hello hello.json
    stst hello hello_empty.json
    stst things things_drinks.json
    stst things_base.main things_drinks.json
    stst things_HTML.main things_drinks.json
    stst -i -v things things_song.json
    stst -s "<>" things_ab things_song.json
```

## BUILDING
You don't need to build anything but if you want too...

You need a JDK and ant to build it. Get the [source](https://github.com/jsnyders/STSTv4) and use ant to build.

gha_language: Java

gha_license_id: NOASSERTION


text:
# proto_annotations and proto_generator packages usage example

This is an example project that demonstrates the usage of the proto_annotations and proto_generator packages.

## Getting started

While this project is an example of a completely setup project, the steps performed to create it are explained below as if the project hadn't been prepared already.

### pubspec.yaml

The first step is to add package proto_annotations to the dependencies section.

Next, the proto_generator and build_runner packages are also to be added to the dev_dependencies section.

### Annotations

Decorate each class for which a corresponding .proto message is to be generated with a @proto annotation:

```dart
@proto
class Recipe { ... }
```
This will generate a .proto file, in this example, recipe.proto, that will contain a message that, unless configured otherwise, will have the same name of the class, but prefixed with a G, which in this example is GRecipe:

```proto
...

message GRecipe
{
  ...
}
```

When running the protoc compiler (see below), a corresponding GRecipe dart will be created.

Decorate each class for which mapping code is to be generated with a @mapProto annotation and add a part statement:

```dart
part 'recipe.g.dart';

@proto
@mapProto
class Recipe { ... }
```

This will create an extension class on Recipe that contains a toProto() function that maps the conversion between Recipe and GRecipe. It will also create an extension on the GRecipe class that maps the conversion between GRecipe and Recipe.

### running the generators

In order to generate the .proto files and the mapping code, at the root of the project, run:

```bash
dart run build_runner build
```

Next, to generate the serialization code from the .proto files, ensure that the lib/src/grpc directory exists and run:

```bash
protoc --dart_out=grpc:lib/src/grpc/ -Ilib/src/ ./lib/src/*.proto
```

### customizing code generation

There are other annotations that can be used to further control the code generation process.

Furthermore, defaults can be tweeked by using the included build.yaml file.


text:
# Examples using reProto

## [Heroic](heroic)

This models the [heroic][heroic] API using reProto.

Test using:

```bash
$> make heroic
```

[heroic]: https://github.com/spotify/heroic

repository: isgasho/reproto

repo_name: isgasho/reproto


text:
# Student Survey for 10/6 Hackathon

## Have you taken a statistics class before or studied statistics on your own?
I took statistics with computer application, which is an economics course. We learned about regression, probability, and using excel for statistics.

## Have you done statistics on a computer before?  If so, what language and toolkit did you use?
I used excel with a special toolkit (don’t remember what its called).

## Would you like the final class project to be a group installation or an individual/small-group project?
Individual/small-group project.

## For our hackathon on 10/6, would you rather work on the data side of the final project or the making/designing part? (There will be a bit of both regardless)
Both equally.

## What do you find to be the most intriguing topic within big data [e.g., quantified self, recommendation systems, tracking, data management, surveillance, etc, etc..]
Data management and visualizations.

## What do you hope to have learned by the end of this semester?
Would love to dive into Hadoop and MongoDB.

repository: nikitavoskoboynik/project-survey

repo_name: nikitavoskoboynik/project-survey


text:
---
id: version-0.31-engine-rn-web
title: React Native Web Engine
sidebar_label: React Native Web
original_id: engine-rn-web
---

<img src="https://renative.org/img/ic_engine.png" width=50 height=50 />

<!--AUTO_GENERATED_START-->

## Overview

React native based engine with web transpiler provided by react-native-web

## Supported Platforms

[tizen](platform-tizen.md), [web](platform-web.md), [webos](platform-webos.md), [tizenwatch](platform-tizenwatch.md), [tizenmobile](platform-tizenmobile.md), [chromecast](platform-chromecast.md), [kaios](platform-kaios.md), [firefoxos](platform-firefoxos.md), [firefoxtv](platform-firefoxtv.md)

## Required Plugins

[react](plugins#react), [react-art](plugins#react-art), [react-dom](plugins#react-dom), [react-native](plugins#react-native), [react-native-web](plugins#react-native-web), [@react-native-community/cli-platform-ios](plugins#react-native-communitycli-platform-ios), [@react-native-community/cli](plugins#react-native-communitycli)

## Required NPM Packages

tizen (dependencies)
  - [raf](https://www.npmjs.com/package/raf)

<!--AUTO_GENERATED_END-->

repository: rohanray/renative

repo_name: rohanray/renative


text:
# Changelog
All notable changes to this project will be documented in this file.

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

## [3.0.0] - 2023-01-03
### Added
- Support for Django 4.0+

### Removed
- Support for Django versions less than 2.2
- Support for Python versions less than 3.7

## [2.0.2] - 2021-02-14
### Fixed
- Store source content as a string rather than a bytes object

## [2.0.1] - 2020-08-25
### Fixed
- Render HTML links in the Django admin by using `format_html` instead of the now-deprecated `allow_tags` attribute

## [2.0.0] - 2020-08-20
### Removed
- Support for Python 3.5

### Added
- Compatibility in the `include_webmention_information` decorator for versions of Django with new-style middleware

## [1.1.0] - 2019-07-22
### Changed
- Use static `setup.cfg` for package metadata and tooling configuration
- Use black code style
- Lint with pyflakes

## [1.0.1] - 2018-04-12
### Fixed
- Made `setup.py` aware that the README content type is, in fact, markdown

## [1.0.0] - 2018-04-12
### Added
- Better documentation about testing
- Coverage configuration

### Changed
- Use markdown for PyPI README

## [0.1.0] - 2018-01-02
### Added
- Mention use of `path()` over `url()` in README
- Mention use of new-style `MIDDLEWARE` over old-style `MIDDLEWARE_CLASSES` in README
- Add system check to detect presence of incorrect middleware configuration
- Update imports and other syntax for forward compatibility with Django 1.10+ and Django 2.0+

## [0.0.4] - 2016-07-15
### Changed
- Reworked the unit tests to be runnable under Travis CI to support continuous integration

## [0.0.3] - 2016-01-22
### Changed
- Successful POST requests will now receive a 202 Accepted response rather than a 200 OK response

### Added
- Django 1.9 in frameworks listed in setup.py

### Fixed
- Errors in documentation

## [0.0.2] - 2015-07-11
### Added
- Webmentions are now available for review in the admin console
- Webmentions are now updated or invalidated when a new webmention notification request is sent
- Thorough unit testing

## [0.0.1] - 2015-07-10
### Added
- Pre-alpha initial release

repository: easy-as-python/django-webmention

gha_language: Python

repo_name: easy-as-python/django-webmention


text:
cookiecutter-golang-cmd
=======================

Creates a golang package with cmd line

Requirements
------------
Install `cookiecutter` command line: `pip install cookiecutter`

Usage
-----
Generate a new Cookiecutter template layout: `cookiecutter gh:mhristof/cookiecutter-golang-cmd`

License
-------
This project is licensed under the terms of the [MIT License](/LICENSE)

repository: mhristof/cookiecutter-golang-cmd

repo_name: mhristof/cookiecutter-golang-cmd


text:
---
title: Multiparty Encryption
position: 1
---

Multiparty encryption operates in a closed group of participants, managed by one admin. Multiparty messaging is implemented as an application on top of SophiaTX's `custom_json_operation`.

# Use cases

## Group creation
Group is created by assigning it a new random name ("group address"), a group key, and individually inviting initial participants to it. The invite is encrypted and readable only to the sender (admin) and recipient (new group member).

## Group update
Group can be updated any time with new name and/or new group key. Whenever new participants are being added or deleted, the group key must be updated. Group name might be optionally updated. Regular updates of the group will prevent external observers to map group activity, i.e. the potential attacker might not even learn of the existence of the group, its lifetime, and/or members. The group updates are updated to the group address and encrypted using the group key, and thus readable only to group members.

## Group messaging
Any member of the group can send message to the group address. This message is encrypted using the group key.

## Participant list change
Whenever admin adds new group member(s), he updates the group key and sends invite to these new members. Updating the group key prevents new members to be able to read old messages.
Whenever admin removes participants from the group, new group address and group key has to be generated. The new group key is encrypted in the way that only remaining participants can read it.

## Group disband
Admin can discontinue the group by disbanding it. No new messages, updates or messages, can be sent to the group anymore.

## Receiving group messages
Group participants can read the new group messages only if they know the actual group name (group address) and group key. To keep track, the group updates needs to be monitored and group parameters updated accordingly.

# Message format
There are three basic types of messages:
* Group invites
* Group updates
* Group message

First two are so called system message. They don't carry the actual communication between participants, just the various group parameters. The last one, group message, is carrying actual information between users.

## Group invite
Group invite is sent from admin to individual user. The format of the JSON payload is as follows:
```json
{
  "type" : 0,                       //<aka "system message"
  "operation_data" : {
    "version" : 1,                  //<always 1
    "type" : "add",
    "new_group_name" : "<NEW GROUP NAME>",
    "description" : "<A SHORT DESCRIPTION OF THE PURPOSE OF THE GROUP>",
    "user_list" : ["<OPTIONAL LIST OF OTHER PARTICIPANTS>"],
    "senders_pubkey" : "<ADMIN PUBLIC MEMO KEY>",
    "new_key" : [["<RECIPIENT PUBLIC MEMO KEY>", "<GROUP KEY ENCRYPTED WITH SENDER-RECIPIENT SHARED SECRET>"]]
  }
}
```
NOTE: Public memo keys are stored in the structure for references. In case one of the participants changes her memo key, one can easily find which key was used in construction of the shared secret.

This payload is then encrypted using sender-recipient shared secret, and packed into a JSON wrapper:
```json
{
  "sender": "<ADMIN PUBLIC MEMO KEY>",
  "recipient": "<RECIPIENT PUBLIC MEMO KEY>",
  "data" : "<HEX ENCODED BYTE ARRAY OF THE ENCRYPTED PAYLOAD>"
}
```

## Group update
Group update is sent from admin to the actual group address.
The format of the JSON payload is as follows:
```json
{
  "type" : 0,                       //<aka "system message"
  "operation_data" : {
    "version" : 1,                  //<always 1
    "type" : "update",
    "new_group_name" : "<NEW GROUP NAME>", //optional parameter, in case group name changes. Can be omitted.
    "description" : "<A SHORT DESCRIPTION OF THE PURPOSE OF THE GROUP>", //optional parameter, in case group description changes. Can be omitted.
    "user_list" : ["<OPTIONAL LIST OF OTHER PARTICIPANTS>"],
    "senders_pubkey" : "<ADMIN PUBLIC MEMO KEY>",
    "new_key" : [["SEE BELOW"]]
  }
}
```

Would the group key change, the new key is encoded either with group key or with shared secrets for each individual group participant. The later must be used in case of deleting participants.
The first case has then the following format:
```json
"new_key" : [["SPH1111111111111111111111111111111114T1Anm", "<ENCRYPTED_GROUP_KEY>"]]
```

The second case will end in a list of encrypted keys:
```json
"new_key" : [
    ["<RECIPIENT1 PUBLIC MEMO KEY>", "<GROUP KEY ENCRYPTED WITH SENDER-RECIPIENT1 SHARED SECRET>"],
    ["<RECIPIENT2 PUBLIC MEMO KEY>", "<GROUP KEY ENCRYPTED WITH SENDER-RECIPIENT2 SHARED SECRET>"],
(...)
    ["<RECIPIENT_N PUBLIC MEMO KEY>", "<GROUP KEY ENCRYPTED WITH SENDER-RECIPIENT_N SHARED SECRET>"]
]
```

This payload is then encrypted using group key, and packed into a JSON wrapper:
```json
{
  "iv": "<INITIAL VECTOR FOR AES>",
  "data" : "<HEX ENCODED BYTE ARRAY OF THE ENCRYPTED PAYLOAD>"
}
```

## Group message
Group update is sent from a group member to the actual group address.

```json
{
  "type" : 1,
  "message_data" : "<HEX ENCODED COMMUNICATION>"
}
```

This payload is then encrypted using group key, and packed into a JSON wrapper:
```json
{
  "iv": "<INITIAL VECTOR FOR AES>",
  "data" : "<HEX ENCODED BYTE ARRAY OF THE ENCRYPTED PAYLOAD>"
}
```

# Encryption

As a base, AES256 is used.

Group key is of length 256 bits. Initialisation vector of length 256 bits is randomly generated and added as a parameter to the messages where group key encryption is used.

Shared secret between sender and recipient is derived from sender's private and recipient's public keys or recipient's private and sender's public keys using Elliptic curve integrated encryption scheme (ECIES) over SECP256K1 curve. The resulting 512 bits are split to halfs, one half used as IV and the other as key in AES256 schema.

# API
The multiparty messaging plugin was developed as a reference implementation. Its usability is limited to be run on end-user's node, and the node must not expose its API to general public. The plugin is started when the following parameters are added to the daemon when starting:
```
--plugin multiparty_messaging --mpm-app-id 2 --mpm-account <MYACCOUNT> --mpm-private-key <PRIVATE_MEMO_KEY>
```
NOTE: The `mpm-account` and `mpm-private-key` can be repeated more than once.

Once the plugin is started, it starts listening for `custom_json_operations` with the given application ID and executes the logic as described above. It stores in database information about all past and active groups the user has been involved in, as well as all decoded messages.
The API calls can be split into two logical part:
* Retrieving the group and messages info from the database, namely `get_group`, `get_group_name`, `list_my_groups` and `list_messages`.
* Preparing encrypted `custom_json_operations` payloads. The returned payloads has to be sent to the provided addresses either with Alexandria SDKs or cli_wallet.

### Example
First create the group invitation by user `initminer` using wscat:
```json
> {"jsonrpc":"2.0", "id":1, "method":"multiparty_messaging.create_group", "params":{"admin":"initminer", "description":"blah", "members":["kpX6yHkAb_RIEuQ7g7UVoGwpUKo"]}}
< {"jsonrpc":"2.0","result":{"group_name":"wY8SqXZDuH3SL0Im0G5vuZOch6g","operation_payloads":[["kpX6yHkAb_RIEuQ7g7UVoGwpUKo",{"sender":"SPH8HWPUynRQnH8QCHdCvebNKbKGuVpZ9FZpg3EWv9UN5qayA8v7k","recipient":"SPH7t5298LP6CDuC8SHT7PGaH7rvqCYgV6sCsrT55VLJXEuQXWnPw","data":"396a3370a56a188403c1185b6ac98d69d01a2c42699a986da80f1d762e54671d82a9097983a228da8635d157d24c01bd9fe20ea0c1a390a6d6c7a247eea80ab3b6f4649c1dc1d3539307a36e9f525f8bab3416ccaf1bac26ee539ea0e289489a1f0261ac9a9f5a95317c3fe62bd49b3b0a5f85db3708eab406e6f181deb6a6fce851154f7ded1495befd308a33abe7002798f4a3d45adbb0c52a97175dbe14e76850d40b05d1147e4d070320051c6c46de600307e5ad59aa0290deb6368e92974a98047f96c5b70a7be005dd455c1557"}]]},"id":1}
```
Group name `"wY8SqXZDuH3SL0Im0G5vuZOch6g"` was generated, as well as one invitation.
The returned invitation payload is then sent using cli_wallet:
```json
unlocked >>> send_custom_json_document 2 initminer ["kpX6yHkAb_RIEuQ7g7UVoGwpUKo"] "{\"sender\":\"SPH8HWPUynRQnH8QCHdCvebNKbKGuVpZ9FZpg3EWv9UN5qayA8v7k\",\"recipient\":\"SPH7t5298LP6CDuC8SHT7PGaH7rvqCYgV6sCsrT55VLJXEuQXWnPw\",\"data\":\"396a3370a56a188403c1185b6ac98d69d01a2c42699a986da80f1d762e54671d82a9097983a228da8635d157d24c01bd9fe20ea0c1a390a6d6c7a247eea80ab3b6f4649c1dc1d3539307a36e9f525f8bab3416ccaf1bac26ee539ea0e289489a1f0261ac9a9f5a95317c3fe62bd49b3b0a5f85db3708eab406e6f181deb6a6fce851154f7ded1495befd308a33abe7002798f4a3d45adbb0c52a97175dbe14e76850d40b05d1147e4d070320051c6c46de600307e5ad59aa0290deb6368e92974a98047f96c5b70a7be005dd455c1557\"}" true
{
  "ref_block_num": 2417,
  "ref_block_prefix":<PHONE_NUMBER>,
  "expiration": "2018-12-13T13:34:00",
  "operations": [[
      "custom_json",{
        "fee": "0.000000 SPHTX",
        "sender": "initminer",
        "recipients": [
          "kpX6yHkAb_RIEuQ7g7UVoGwpUKo"
        ],
        "app_id": 2,
        "json": "{\"sender\":\"SPH8HWPUynRQnH8QCHdCvebNKbKGuVpZ9FZpg3EWv9UN5qayA8v7k\",\"recipient\":\"SPH7t5298LP6CDuC8SHT7PGaH7rvqCYgV6sCsrT55VLJXEuQXWnPw\",\"data\":\"396a3370a56a188403c1185b6ac98d69d01a2c42699a986da80f1d762e54671d82a9097983a228da8635d157d24c01bd9fe20ea0c1a390a6d6c7a247eea80ab3b6f4649c1dc1d3539307a36e9f525f8bab3416ccaf1bac26ee539ea0e289489a1f0261ac9a9f5a95317c3fe62bd49b3b0a5f85db3708eab406e6f181deb6a6fce851154f7ded1495befd308a33abe7002798f4a3d45adbb0c52a97175dbe14e76850d40b05d1147e4d070320051c6c46de600307e5ad59aa0290deb6368e92974a98047f96c5b70a7be005dd455c1557\"}"
      }
    ]
  ],
  "extensions": [],
  "signatures": [
    "1f6b1c7281e2d875aed831d9f117a1c65f84c5b806dcac88f395a9635247418a104a0c69b0935dcc848be8171c288ff56b8e3e944041c3e4000d93afb3d10bf8d1"
  ],
  "transaction_id": "e76c37b71a3ca23ddc044edd2224880295a0bce0",
  "block_num": 2418,
  "transaction_num": 0
}
unlocked >>>
```
We can check success of the operation again with wscat:
```json
> {"jsonrpc":"2.0", "id":2, "method":"multiparty_messaging.get_group", "params":{"group_name":"wY8SqXZDuH3SL0Im0G5vuZOch6g"}}
< {"jsonrpc":"2.0","result":{"group_name":"wY8SqXZDuH3SL0Im0G5vuZOch6g","current_group_name":"wY8SqXZDuH3SL0Im0G5vuZOch6g","description":"blah","members":["kpX6yHkAb_RIEuQ7g7UVoGwpUKo","initminer"],"admin":"initminer","group_key":"b019a8e962d111b020f0fd0181f3e59e6f7727076fce2486bc28cf8c0270a589","messages":1},"id":2}
```

repository: abilitiinc/devportal

repo_name: abilitiinc/devportal


text:
apple_compressor CHANGELOG
==========================

This file is used to list changes made in each version of the apple_compressor cookbook.

0.5.1
-----
- [rchristensen] - Updated app to version 4.1.1
- [rchristensen] - Switched to pkg captured from MAS.

0.5.0
-----
- [rchristensen] - Updated app to version 4.1
- [rchristensen] - Brought README/metadata/CHANGELOG up to code.

0.4.0
-----
- [rchristensen] - Updated app version to 4.0.7

0.3.0
-----
- [rchristensen] - Updated app version to 4.0.6

0.2.0
-----
- [rchristensen] - Updated app version to 4.0.5

0.1.0
-----
- [rchristensen] - Initial release of compressor cookbook
- [rchristensen] - Current app version: 4.0.4

repository: wesleyan/chef-cookbooks

repo_name: wesleyan/chef-cookbooks


text:
TodenGraphDay
=============

This web application show daily power consumption using data of at Tokyo Electric Power Company.

This web application is made with Sinatra.

Sinatra is WebFramework made with Ruby.

repository: HAYASAKA-Ryosuke/TodenGraphDay

repo_name: HAYASAKA-Ryosuke/TodenGraphDay


text:
ynab-reconcile
==============

Reconciles a Mint data dump with a YNAB register

Usage
=====

Point the program at the directories where your YNAB and Mint exports live. It'll find the latest one of each.

`./yr.py --ynab-dir ~/ynab_exports --mint-dir ~/Downloads`

You can also point it at a specific file:

`./yr.py --ynab ~/ynab_export.csv --mint ~/Downloads/transactions.csv`

You may also apply a start date parameter (`--start-date 2014-01-31`) to only show unmatched transactions starting on a certain date.

repository: brendancsmith/ynab-reconcile

repo_name: brendancsmith/ynab-reconcile


text:
# CCBN
Simulation code for CCBN on BTG

To run a simulation, edit 'param.py' with the conditions you wish to simulate, then run 'CCBNsim.py'. Results are logged in unique files in the specified subfolder.

The simulator will run multiple conditions simultaneously for multiple attack hashpowers and multiple notarychains defending; always test your configuration for a short run to confimr you're capturing the desired data before running a long simulation.

The main simulator code is in `CCBNsim.py`. Parameters & contants for readability are in `param.py`. `CCBNdefs.py` contains supporting functions & initializations, while `CCBNlogger.py` contains the code for creating the output to screen and file.

### Subfolders

- DAA Validation: code & output validating this implementation of the BTG DAA (Difficulty Adjustment Algorithm)
- BTG Blocktime Mean: code for long simulation to determine actual BTG mean (which is not exactly 600 seconds)
- BTG Blocktime SD: code for long simulation to estimate BTG Standard Deviation, which does not match the Exponential distribution


text:
---
code: true
type: page
title: updateRoleMapping
description: Updates the internal role storage mapping.
---

# updateRoleMapping

Updates the internal role storage mapping.

```dart
Future<Map<String, dynamic>> updateRoleMapping(
      Map<String, dynamic> mapping)
```

| Property | Type | Description |
|--- |--- |--- |
| `mapping` |
Map<String, dynamic>
 | Role collection [mapping definition](/core/2/guides/main-concepts/data-storage) |

## Return

Returns a Map representing the new mapping.

## Usage

<<< ./snippets/update-role-mapping.dart

gha_language: Dart


text:
# JUnit 5 Parameterized Tests: Using Different Input

This is the accompanying source code for the article [JUnit 5 Parameterized Tests: Using Different Input](http://www.arhohuttunen.com/junit-5-parameterized-tests/).

These examples demonstrate how to:

- Setup the required dependencies for Maven and Gradle
- Use different sources of arguments for parameterized tests
- Customize display names of parameterized tests
- Use the built-in parameter type converters or write your own


text:
# ZipExpander
Checks if the stream is zipped, and if so, decompresses, if not, returns the original.

## What is it good for
When uploading website data, there is often an upload limit. If I request the data this way, the data can be zip, gzip or uncompressed.

## Usage

Expander ex = Expander.GetExpander(stream);
Stream expandedStream = ex.Expand(stream);

If the stream was not compressed, we get it back.
If it was compressed with Zip or Gzip, we get back the decompressed data.
For a zip stream, if you find more than one file, you will get an error message.

repository: lszabados/ZipExpander

repo_name: lszabados/ZipExpander


text:
[@fruk/simulator-core](../README.md) › [Globals](../globals.md) › [WheelMountingPoint](wheelmountingpoint.md)

# Enumeration: WheelMountingPoint

## Index

### Enumeration members

* [LEFT_CENTER](wheelmountingpoint.md#left_center)
* [LEFT_FRONT](wheelmountingpoint.md#left_front)
* [LEFT_REAR](wheelmountingpoint.md#left_rear)
* [RIGHT_CENTER](wheelmountingpoint.md#right_center)
* [RIGHT_FRONT](wheelmountingpoint.md#right_front)
* [RIGHT_REAR](wheelmountingpoint.md#right_rear)

## Enumeration members

###  LEFT_CENTER

• **LEFT_CENTER**:

*Defined in [engine/specs/RobotSpecs.ts:6](https://github.com/FRUK-Simulator/SimulatorCore/blob/cdc4cfb/src/engine/specs/RobotSpecs.ts#L6)*

___

###  LEFT_FRONT

• **LEFT_FRONT**:

*Defined in [engine/specs/RobotSpecs.ts:5](https://github.com/FRUK-Simulator/SimulatorCore/blob/cdc4cfb/src/engine/specs/RobotSpecs.ts#L5)*

___

###  LEFT_REAR

• **LEFT_REAR**:

*Defined in [engine/specs/RobotSpecs.ts:7](https://github.com/FRUK-Simulator/SimulatorCore/blob/cdc4cfb/src/engine/specs/RobotSpecs.ts#L7)*

___

###  RIGHT_CENTER

• **RIGHT_CENTER**:

*Defined in [engine/specs/RobotSpecs.ts:9](https://github.com/FRUK-Simulator/SimulatorCore/blob/cdc4cfb/src/engine/specs/RobotSpecs.ts#L9)*

___

###  RIGHT_FRONT

• **RIGHT_FRONT**:

*Defined in [engine/specs/RobotSpecs.ts:8](https://github.com/FRUK-Simulator/SimulatorCore/blob/cdc4cfb/src/engine/specs/RobotSpecs.ts#L8)*

___

###  RIGHT_REAR

• **RIGHT_REAR**:

*Defined in [engine/specs/RobotSpecs.ts:10](https://github.com/FRUK-Simulator/SimulatorCore/blob/cdc4cfb/src/engine/specs/RobotSpecs.ts#L10)*

repository: stevenvaneyck/SimulatorCore

repo_name: stevenvaneyck/SimulatorCore


text:
Vim Basics
==========

Here are a few basic things I've learned while flirting with Vim.

Modes
-----

Vim loves modes. As a designer, modes typically bug me. But like most things
Vim, you have to spend a bit of time warming up to it's way of doing things.

Vim's main modes are:

* `-- NORMAL --`: a.k.a "I just hit `esc` and I'm not in a mode.
* `-- INSERT --`: (hit the `i` key). This is how you enter text.
* `-- VISUAL --`: (hit the `v` key). This is how you select and manipulate text.
  Visual also has 2 "sub-modes", `-- VISUAL BLOCK --` and `-- VISUAL LINE --`.

Motions
-------

When in normal mode, you can type a number, followed by a command or
text manipulation. The next time you `esc`, the action you took will be
duplicated that many times.

Opening/Writing/Saving/Quitting
-------------------------------

Write to file
  `:w`

Force quit without saving
  `:q!`

Open a file in a buffer
  `:e` (edit)

Create a new file
  `:e <new file name>`

[Save all open buffers](http://vim.wikia.com/wiki/VimTip652)

Manipulating text
-----------------

* Changing the [indentation of a block of text](http://vim.wikia.com/wiki/VimTip224).

  In visual mode, you can use the `>` and `<` command to indent and outdent a
  block by one tab stop, respectively. Like all commands, you can precede it
  with a number to indent by that amount.

Search/Replace
--------------

[Search/Replace in a file]: http://vim.wikia.com/wiki/Search_and_replace

[Search/Replace across files]: http://vim.wikia.com/wiki/Find_in_files_within_Vim

Getting around
--------------

Vim's default navigation tool is a plugin called Netrw. It lets you edit both
local and remote files.

* [Explore files](http://vim.wikia.com/wiki/File_explorer)
  `:Explore` Gives you a Netrw list file explorer in a buffer. Use the arrow/
  text navigation keys to go up and down the list. Hitting enter will open
  files and directories.

* Hitting `i` while viewing a Netrw list in `-- NORMAL --` mode will change
  the display style for the directory.

* [Where is the file you're working on?](http://vim.wikia.com/wiki/Set_working_directory_to_the_current_file)
  `:pwd`

If Netrw isn't cutting it for you, you may want to give
[NERDTree](https://github.com/scrooloose/nerdtree) a shot. It's a tree
explorer that creates a project drawer buffer.

Working with [Buffers](http://vim.wikia.com/wiki/Buffers)
---------------------------------------------------------

Split the screen between buffers (horizontal)
  `:split <filename>`

Split the screen between buffers (vertical)
  `:vsplit`

List all buffers
  `:ls`

Jump to a buffer
  `:b <buffer number or name>` (tab completion works here, too)

Programming
-----------

[Create a patch file](http://vim.wikia.com/wiki/Create_patch_for_currently_editing_file)

repository: gordonbrander/vim-flirt

extension: markdown

repo_name: gordonbrander/vim-flirt


text:
**Prerequisite**

See the documentation at https://mobilefirstplatform.ibmcloud.com/blog/2017/05/03/beacon-support-in-mobilefirst-foundation-service to use the beacon adapter for IBM MobileFirst Foundation 8.0.

repository: mfpdev/mobilefirst-beacons-adapter

repo_name: mfpdev/mobilefirst-beacons-adapter