text:
# A Boilerplate for Meteor using Meteoric as base

This boilerplate is based on [Product Hunt](http://meteorhunt.meteor.com) clone built using [meteoric:meteor-ionic](https://github.com/meteoric/meteor-ionic). **Currently in progress**

repository: DavidonRails/Meteor

repo_name: DavidonRails/Meteor


text:
# LPD Odin Integration Requirements Specification

Create ODIN plugin to receive, process and store data from the LPD detector, replacing the existing python system. Duplicate, adapt and optimise existing [Excalibur](https://github.com/dls-controls/excalibur-detector) code to work for LPD.

![](https://raw.githubusercontent.com/stfc-aeg/odin-workshop/master/images/odin_data.png)

*Note: This diagram represents the existing Excalibur system that the LPD system will be built from, not the eventual LPD system itself however there is currently no reason to assume this diagram requires any change beyond renaming.*

## LPD Frame Producer
Priority: Should Have

Port Excalibur frame producer script to simulate LPD packet flow.

| Requirement | Conditions | Status |
|:-----------:|:----------:|:-------:|
| All detector specific names use `lpd`, `Lpd` or `LPD`. | No detector specific names for files, class, functions, variables, object or keys referring to Excalibur or other non-LPD detectors. Script still functions with no resulting errors. | 19/06/18: Complete |
| Retrieve frame number, packet number and SOF/EOF from last 8 bytes (trailer) of UDP packet rather than first 8 bytes (header) without error. | All retrieved data matches that of pcap file | 18/06/18: Complete |
| Remove Excalibur subframe handling from script. | Script stills handles and packages data correctly, sent frames match pcap file. | 21/06/18: Complete |

## LPD Frame Receiver
Priority: Must Have

Port frame receiver for LPD.

| Requirement | Conditions | Status |
|:-----------:|:----------:|:------:|
| All detector specific names use `lpd`, `Lpd` or `LPD`. | No detector specific names for files, class, functions, variables, object or keys referring to `Excalibur` or other non-LPD detectors. Script still functions with no resulting errors. | 26/07/18: Complete |
| Upon startup, read config and create shared memory buffer. | Shared memory buffer created with name specified in config. | 29/06/18: Complete |
| Listen for buffer config request from FP. Reply upon request. | Receive request for buffer config from any FP on ZeroMQ address specified in config. | 29/06/18: Complete |
| Listen for incoming UDP packets. Upon detection, trigger decoder. | Packets sent to specified port are received and read. | 29/06/18: Complete |
| Add packet payload to shared memory buffer. | Add packet to frame buffer. Packets should be added to correct frame. Create new frame for packets not matching existing frames in buffer. | 26/07/18: Method C complete |
| Handle packet loss. | Timeout frame after specified time. Send frame-ready with empty buffers in frame making note of how many packets were dropped. | 29/06/18: Method C Complete |
| Handle out-of-order packets. | Packet payload position in buffer recorded in frame buffer header. | 26/07/18: Method C Complete |
| Upon filled/timed out frame. FR control thread sends frame-ready message to FP. | Frame-ready message sent from RX thread to control thread then sent to FP. | 29/06/18: Complete |
| When FR control thread receives frame-release message from FP, FR RX thread empties and opens buffer for re-use. | Frame-release message received from FP. Buffer emptied and made available for new frame. | 29/06/18: Complete |
| Remove multiple FEM handling. | Remove all unnecessary code relating to FEM mapping and indexing. LPD should only use one FEM. | 03/09/18: Complete |
| Remove bit depth handling. | Remove all unnecessary code relating to possible bit depth settings. LPD does not use them. | 31/08/18: Complete |
| Remove sub-frame handling. | Remove all unnecessary code relating sub-frames within frames. LPD does not use sub-frames. | 29/06/18: Complete |

The major change for the FR will be switching to reading the trailer of incoming packets rather than the header as Excalibur does. This is shown below with two possible methods of handling trailers.

Method A is simpler and retains the handling for out-of-order and lost packets however it requires copying the entire packet twice for every packet. With hundreds of packets every second this very resource intensive and likely too slow. (Complete)

Method B is more complex but packets are only copied more than once if it belongs to a different frame. Packets may be stored in the wrong order though this information is stored in the buffer and can be used to rearrange the data when needed. (Tested, not functional)

Method C involves copying the entire packet into the next available position then it reads the trailer. The next packet then overlaps the trailer of the previous one. The position of the payload is stored in the frame header. (Complete, this method is the one chosen after testing all three)

![](Diagrams.png)

## LPD Frame Processor
Priority: Must Have

Port frame processor for LPD.

| Requirement | Conditions | Status |
|:-----------:|:----------:|:------:|
| All detector specific names use `lpd`, `Lpd` or `LPD`. | No detector specific names for files, class, functions, variables, object or keys referring to `Excalibur` or other non-LPD detectors. Script still functions with no resulting errors. | 29/06/18: Complete |
| Upon startup, request shared memory configuration from FR. | Send request for buffer config to any FR on ZeroMQ address specifed in config. | 29/06/18: Complete |
| Listen for frame-ready notification from FR. Upon receiving, trigger proccessing. | Upon receiving frame-ready, read buffer, make note of missing packets, trigger frame process plugin. | 29/06/18: Complete |
| Reorder incoming frame data into images with the correct pixel data order. | 20 images per frame each in correct order. Skip frame header and train header. | 31/08/18: Complete |
| Write frame to HDF5 file. Send frame-release to FR upon completion. | File must contain all data from frame including 20 separate images per frame, the frame numbers and image numbers. Send frame-release to FR upon completion.  | 29/06/18: Complete |
| Remove multiple FEM handling. | Remove all unnecessary code relating to FEM mapping and indexing. LPD should only use one FEM. | 03/09/18: Complete |
| Remove bit depth handling. | Remove all unnecessary code relating to possible bit depth settings. LPD does not use them. | 31/08/18: Complete |
| Remove sub-frame handling. | Remove all unnecessary code relating sub-frames within frames. LPD does not use sub-frames. | 10/08/18: Complete |

## Travis CI Testing
Priority: Should Have

Use Travis CI to create testing for the above.

*NOTE: Exact requirements yet to be decided.*
27/09/18: Delegated to next developer on project

## Control Integration
Priority: Should Have

Integrate existing LPD python GUI with frame receiver and processor.

| Requirement | Conditions | Status |
|:-----------:|:----------:|:------:|
| Upon Run, send frames and packets to FR over configured port. | When both are running FR receives pkts without issue. | 27/09/18: Complete |
| Upon Run, send configurations to both FR and FP over configured IPC channels. | FR & FP both acknowledge the message and correctly configure. | 27/09/18: Complete |
| Upon Run, regularly poll FR & FP for Status and display in GUI. | Return Frames Received, Frames Processed, Bytes Received and Images Written. | 27/09/18: Complete |
| Launch FR from Config | | 27/09/18: Delegated to next developer on project |
| Launch FP from Config | | 27/09/18: Delegated to next developer on project |

## Live View
Priority: Could Have

Adapt ODIN to allow live view within GUI to still work.

*NOTE: Exact requirements yet to be decided.*
27/09/18: Delegated to another developer on project

repository: stfc-aeg/lpd-detector

branch_name: refs/heads/master

extension: md

gha_language: Python

license_type: permissive

repo_name: stfc-aeg/lpd-detector


text:
# DAO contracts
All contract sources are within this directory.

## Subdirectories
- [`FeeDistribution`](FeeDistribution): Contracts used to distribute admin fee.
- [`testing`](testing): Contracts used exclusively for testing. Not considered to be a core part of this project.

## Contracts
- [`InsureToken`](InsureToken.sol): InsureDAO Token (INSURE), and ERC20 with piecewise-linear mining supply
- [`GaugeController`](GaugeController.sol): Controls liquidity gauges and the issuance of INSURE through the liquidity gauges
- [`LiquidityGauge`](LiquidityGauge.sol): Measures the amount of liquidity provided by each user
- [`Minter`](Minter.sol): Token minting contract used for issuing new INSURE
- [`PoolProxy`](PoolProxy.sol): Insurance pool proxy contract for interactions between the DAO and pool contracts
- [`VestingEscrow`](VestingEscrow.sol): Vests INSURE tokens for multiple addresses over multiple vesting periods
- [`VestingEscrowSimple`](VestingEscrowSimple.sol): Simplified vesting contract that holds INSURE for a single address
- [`VestingEscrowFactory`](VestingEscrowFactory.sol): Factory to store INSURE and deploy many simplified vesting contracts
- [`VotingEscrow`](VotingEscrow.sol): Vesting contract for locking INSURE to participate in DAO governance

license: MIT

repository: kevinchristopherou/InsurancePlatform

branch_name: refs/heads/main

repo_name: kevinchristopherou/InsurancePlatform


text:
# Eyeson
eyeson ruby sdk for service app implementation

## Installation
Add this line to your application's Gemfile:

```ruby
gem 'eyeson', git: 'https://gitlab.infra.dev-visocon.com/eyeson/eyeson-ruby.git'
```

And then execute:
```bash
$ bundle install
```

## Configuration
```ruby
Eyeson.configure do |config|
  config.api_key      = 'YOUR_API_KEY'
  config.api_endpoint = 'https://api.eyeson.team'
end
```

## Receive webhooks for specific events

```ruby
Eyeson::Webhook.create!(
  url,       # Webhooks will be sent to this URL
  types: []  # currently supported: 'room_update', 'team_update', 'user_update', 'presentation_update', 'broadcast_update', 'file_update'
)
```

## Meeting reference

### Join a meeting room

Puts a user to a (specific) meeting room.

If no arbitrary ids are given, random ids will be generated.

```ruby
room = Eyeson::Room.join(id:   'ARBITRARY_ID',     # optional, e.g. to join a specific room
                         name: 'DISPLAY_NAME',     # optional
                         user: {
                        	 id:     'ARBITRARY_ID', # optional, e.g. your internal user_id
                        	 name:   'DISPLAY_NAME', # required!
                        	 avatar: 'IMAGE_URL'     # optional
                         })
```

The meeting room will be available immediately:

```ruby
# Temporary access key - only valid for current session:
# access_key = room.access_key

redirect_to room.url
```

### Upload a presentation file from remote URL

Uploads and converts any external stored PDF file for presentation.

```ruby
Eyeson::FileUpload.new(access_key).upload_from('FILE_URL')
```

### Start a live broadcast (YouTube only at the moment)

```ruby
Eyeson::Broadcast.new(access_key).create(
  platform:   'youtube',
  stream_url: 'YOUTUBE_STREAM_URL' # see YouTube documentation on how to get a stream url.
)
```

#### Stop specific broadcast

```ruby
Eyeson::Broadcast.new(access_key).destroy(
  platform: 'youtube'
)
```

#### Stop all broadcasts

```ruby
Eyeson::Broadcast.new(access_key).destroy_all
```

### Send a message into meeting chat

```ruby
Eyeson::Message.new(access_key).create(
  type:    'chat',
  content: 'YOUR_MESSAGE'
)
```

### Insert an image into video

```ruby
Eyeson::Layer.new(access_key).create(
  file:   FILE, # either file or url must be provided!
  url:    URL,  # either file or url must be provided!
  index:  1,    # (optional) use 1 (default) to set as foreground image and -1 to set as background image
  layout: nil   # (optional) currently supported: 'auto' (meeting participants will be arranged automatically), 'fixed' (meeting participants will be rendered at the bottom of the video, so your background content can be fully displayed.)
)
```

### Get download URL of a specific recording

It is assumed that the recording_id is known (e.g. from a webhook request).

```ruby
recording = Eyeson::Recording.find(recording_id)
redirect_to recording.url
```

## License
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

repository: mmaier/eyeson-ruby

repo_name: mmaier/eyeson-ruby


text:
---
layout: post
category : blog
tagline: "Supporting tagline"
tags : [food, meetings]
---

Today is one of those days when my start-up crusade take me away from my code and from my data analysys.
I have a business meeting 300 km far from here.
By the end of the day I'll take 4 trains, 2 taxis and will spend lots of money for an uncertain outcome.

In situations like these coffee plays a huge role.

When my travels take me towards Santa Maria Novella Rail Station the place to go for a good espresso and croissant is "Bar Tonarelli".
There are 2 or 3 more "Bar" inside the station: no way.

Later in the afternoon I'm at Venezia Mestre for the 4th coffee of the day (I prefer not to mention the second and third because I'm a gentlemen). In front of the rail station you find "Da Tura" Bar Restaurant: nice choice for a macchiato but just perfect if want to have an "aperitivo" tasting a good Prosecco while eating cod toasts or little meat balls.

That's not a bad way to close a business day.

For the record it was a good meeting...surprisingly good: maybe this will be a day to remember.

(remember: no more than 3/4 coffees a day otherwise you'll get a rant from your doctor )


text:
Getting Started
===============

I recommend running Pygmalion on a Fedora system. Builds are available in my COPR repository:

> https://copr.fedorainfracloud.org/coprs/bitbyt3r/Pygmalion/

gha_license_id: MIT


text:
---
layout: post
title:      "Arrays in Java Vs Ruby"
date:       2019-06-16 22:30:08 +0000
permalink:  arrays_in_java_vs_ruby
---

Think all programming languages are created equal? Not really. Back in college when I took programming classes I always thought language creators were trying way to hard just to make learning programming very difficult. Popular language like JAVA were very hard to understand because it was so different than human language like “English”. For past month, I have been learning Ruby and I have found it to be much more “human – friendly” language.

Lets see an example of simple Array:
In JAVA, if we like to declare an array of “cars” then we would write :

```
String[] cars;
String[] cars = {"Volvo","BMW","Ford","Mazda"};
```

Not so bad so far, but lets iterate through array and print out the element of the array:
```
    for(int i =0; i <cars.length; i++) {
     System.out.println(cars[i]);
    }
```
Output:
```
Volvo
BMW
Ford
Mazda
```

In Ruby, we can achieve the same result by simply doing the following:
```
	cars = ["Volvo","BMW","Ford","Mazda"]
	cars.each do |car|
		puts car
	end
```

Better, but still not that different from JAVA. But, what if we have an array of arrays. In JAVA, it is known as multi-dimensional array. Lets look at this example of iterating through multi-dimensional array.

```
 int[][] myNumbers = { {1, 2, 3, 4}, {5, 6, 7} };
   for (int i = 0; i < myNumbers.length; ++i) {
    for(int j = 0; j < myNumbers[i].length; ++j) {
   System.out.println(myNumbers[i][j]);
    }
   }
```
Output:
```
1
2
3
4
5
6
7
```
Lets look at Ruby code for doing the same thing.

```
  myNumbers = [[1,2,3,4],[5,6,7]]

  myNumbers.each do |number_array|
    number_array.each do |number|
    puts number
    end
  end
```

  This one definitely look much more readable. Its just few examples that I am comparing here but simplicity of Ruby is amazing. It may be the start of my journey of learning to code but I am loving Ruby so much. I am thankful to its developer Yukihiro Matsumoto, its because of him, learning to code is fun again!!

extension: markdown


text:
## Runtime Properties

The runtime behaviour of Initializer can to a certain extent be controlled by a handful of [OpenMRS runtime properties](https://wiki.openmrs.org/x/zhAz).

### 1) `initializer.domains` _(optional)_
Defines and inclusion or exclusion list of domains as a CSV string of domain names. If this property is unspecified all domains are being processed.
##### Example of inclusion list:
```java
initializer.domains='concepts,locations'
```
##### Example of exclusion list:
Just prefix the list with a negative `!` character:
```java
initializer.domains='!metadatasharing,privileges,roles'
```
This is exactly the same logic as for the Initializer Validator's `--domains` argument.
### 2) `initializer.exclude.<domain>` _(optional)_
##### Example
In the example below all 'concepts' domain files matching the [wildcard patterns](https://commons.apache.org/proper/commons-io/apidocs/org/apache/commons/io/FilenameUtils.html#wildcardMatchOnSystem-java.lang.String-java.lang.String-) `*diags*` and `*interventions*` will be filtered out:
```java
initializer.exclude.concepts='*diags*,*interventions*'
```
This is exactly the same logic as for the Initializer Validator's `--exclude.<domain>` argument.
### 3) `initializer.skip.checksums` _(optional)_
##### Example to skip the generation of checksums:
```java
initializer.skip.checksums=true
```
Omit this property or set it to false to let the checksum files be processed as usual.
<br/>This is the inverse logic as Initializer Validator's `--checksums` argument that _triggers_ the generation of checksums.

repository: IPLit/openmrs-module-initializer

repo_name: IPLit/openmrs-module-initializer


text:
# Handlebars Demo 2:<br>Get JSON data with AJAX

This demo uses the jQuery method `.getJSON()` with AJAX to request the data.

The data is in the local file `song.json`. In a production application, the data would typically be on a server with a URL that starts with `http` or `https`.

Caution: if you view this demo in the Chrome browser, this demo will not work. This is because Chrome blocks requests for local files. The solution is to use a different browser.

Advice: if you view this demo in Firefox, the console may show an error line that says "not well-formed". This is because Firefox expects the JSON file to have a MIME type. You can ignore this. In a production application, the data would have the correct MIME type which is `application/json`.


text:
---
layout: post
title:  "Extended Slices in Python"
date:   2018-04-26 13:00:00 +0800
categories:
---

In [a Leetcode practice](https://leetcode.com/explore/interview/card/top-interview-questions-easy/127/strings/879/), where I was asked to reverse the order of a string, my algorithm beat 97.49% of Python3 submissions. This is satisfactory but I was curious about what the top algorithm did, so I took a peek:

```
s[::-1]
```

This is highly efficient! What looks mysterious and confuses us is that this seemingly applies some kind of slicing that is suitable for 2D arrays but not for 1D arrays. Amazingly, the last _"index"_ doesn't not represent slicing but **steps**. Then all looks reasonable and obvious.

References:

- [15 Extended Slices](https://docs.python.org/2.3/whatsnew/section-slices.html)


text:
---
Title: Custom definition
FileName: custom-definition.html
Order: 500
---
### Writing custom definition

SPMeta2 can be extended with custom definition and model handler, so that you can plug in your own provision logic.
This article provides basics on creating a custom definion and model handler for SPMeta2 library.

Before you begin, make sure you are familiar with the following concepts:

* [Get started with SPMeta2](/spmeta2/getting-started)
* [Definitions concept](/spmeta2/reference/definitions)
* [Models concept](/spmeta2/reference/models)
* [Provisioning services concept](/spmeta2/reference/provisionservices)

Here is a big puctire on how SPMeta2 provision walks through the web model with lists and list views.

 "web definition": lookup handler;
"web definition" -> "web definition": DeployModel();
"web definition" -> "web definition": lookup children models;
"web definition" -> "list definition": WithResolvingModelHost(), get web instance;
"list definition" -> "list definition": lookup handler;
"list definition" -> "list definition": DeployModel();
"list definition" -> "list definition": lookup children models;
"list definition" -> "list view definition": WithResolvingModelHost(), get list instance;
"list view definition" -> "list view definition": lookup handler;
"list view definition" -> "list view definition": DeployModel();
"list view definition" -> "list definition": back;
"list definition" -> "web definition": back;@enduml' >

At the end, SPMeta2 provision service walks through the model tree resolving correct model handler and calling a pair of DeployModel() and WithResolvingModelHost() methods.

All model handlers must inherit ModelHandlerBase class and implement the following methods:

* DeployModel(object modelHost, DefinitionBase model) method
* TargetType property
* Optionally, WithResolvingModelHost(ModelHostResolveContext context) method

DeployModel() methods must also raise a pair of OnProvisioning / OnProvisioned event, so that it would be possible to get access to the raw SharePoint object during the provision.

Let's have a closer look and create a simple custom definition with model handler.

### Scenario
We need to have a custom defintion to change existing web title and description.

#### Creating definition
All definition should meet the following criterias:

* Inherit DefinitionBase class
* Have [Serializable] attribute

Here is how a custom ChangeWebTitleAndDescriptionDefinition might look like:

#### Creating model handlers
The next step would be creating a custom model handler:

#### Registering model handler
One you created a custom model handler, we need to let SPMeta2 know about it.

Provision service have the following methods to address this:

* RegisterModelHandler(ModelHandlerBase modelHandlerType)
* RegisterModelHandlers(Assembly assembly)

Let's use the first one and register our handler:

#### Custom syntax
There is a separate article on how to create a [custom syntax extensions](/spmeta2/extensibility/writing-custom-syntax/), so let's just improve our provision and add custom syntax for ChangeWebTitleAndDescriptionDefinition:

Now we can re-write provision with a better syntax:

#### Handling events
We expect that our model handler would raise OnProvisioning / OnProvisioned while pushing definition to SharePoint. Let's attache to these events and see how it goes.

license: MS-PL

gha_language: C#


text:
# go-oneof

This tool is aimed to generate a Go code to partially replicate lacking discriminated unions functionality in Go

Installation

```shell script
GO111MODULE=on go get github.com/sirkon/go-oneof
```

## How to use it

Need to write a special structure with name staring from `oneof` (there are further limitations, but they will be
reported by the utility itself). Like this:

```go
// node.go file

package node

//go:generate go-oneof node.go

type oneofNode struct {
    Value string
    OperatorSum struct {
        Left  *oneofNode
        Right *oneofNode
    }
}
```

And run `go generate` over it

The result will be

```go
package node

//go:generate go-oneof node.go

type oneofNode struct {
	Value       string
	OperatorSum struct {
		Left  *oneofNode
		Right *oneofNode
	}
}

// Node an interface to limit available implementations to emulate discriminated union type
type Node interface {
	isNode()
}

// Value branch of Node
type Value string

func (Value) isNode() {}

// OperatorSum branch of Node
type OperatorSum struct {
	Left  Node
	Right Node
}

func (OperatorSum) isNode() {}
```

Some notes:

* type `oneofName` will generate interface `Name` with private method `isName`
* each field causes an implementation of generated `Name`
* comments existed in the source file will disappear in its replacement
* free comments will stay, but will be moved on the top of the file
* You may use `--pointer` or `-p` call parameter to implement `Name` of source struct fields over pointer to these
 structs, not structs themselves, i.e. `Node` implementation for `OperatorSum` would be

     ```go
     func (*OperatorSum) isNode()
     ```
  in this example
* This source file may have errors like reference to entities that do not exists. This may work for self reference, but
the usage of `*oneofNode` (change to actual name) is preferable.

repository: sirkon/go-oneof

repo_name: sirkon/go-oneof


text:
---
title: "Sync Multi Key Value Secret"
description: "Sync a multi-key-value secret from Azure Key Vault into a Kubernetes Secret"
---

> **Note: The [prerequisites](../prerequisites) are required to complete this tutorial.**

Sometimes its necessary to have Kubernetes `Secret`'s with multiple keys and values. The problem
is that Secrets in Azure Key Vault has no concept of keys or values. Because of this akv2k8s
have introduced a new type called `multi-key-value-secret`
(see [AzureKeyVaultSecret Object Types](/reference/azure-key-vault-secret/#vault-object-types)).

In order to use `multi-key-value-secret`, just format a Azure Key Vault Secret using `yaml` or `json`:

```yaml
key1: value1
key2: value2
key3: value3
```

or

```json
{
  "key1": "value1",
  "key2": "value2",
  "key3": "value3"
}
```


text:
## Open Issues

### LShift + RShift modifier combination doesn't work

1. add CR for 3+ levels

1. maybe enforce LF for 2- levels (for 3+ levels CR is enforced)?

1. re-read https://metacpan.org/pod/UI::KeyboardLayout#Keyboard-input-on-Windows,-Part-I:-what-is-the-kernel-doing? and come up with some hacks?

1. generate all possible `Ctrl + Shift + Alt + AltGr` combination by MSKLC and compare sources to gain more knowledge about `CharModifiers` table

1. reevaluate `CharModifiers` table by taking inspiration from https://github.com/microsoft/Windows-driver-samples/blob/master/input/layout/fe_kbds/jpn/101/kbd101.c

1. dead keys chain
    - `.klc` files support dead keys: http://archives.miloush.net/michkap/archive/2011/04/16/10154700.html
        - the last row in a `.klc` dead keys table shouldn't have any special meaning but is a good practice to allow at least for one escape hatch from a dead keys chain => I'd prefer to specify as many escape hatches as needed to make the dead keys chain feel as "non-dead" as possible
    - note dead keys probably behave differently if triggered by a modifier key => test it!
    - use `Private Use` characters - see http://www.kbdedit.com/manual/ex17_compose_key_chained_dead.html

1. try `LShift + RCtrl` and `RShift + LCtrl` instead of `LShift + RShift`

1. try IME (with invisible/non-existent UI) in addition to `.klc` with a standard Shift state
    - check it works **by default** seamlessly (only turning IME on in system settings is acceptable but it's unacceptable to turn IME on at login screen every time it'll show up)
        - at the login screen
        - for all users
    - sometimes has some issues (e.g. shows a tiny annoying button/icon in just under every input field widget)
    - sometimes does not work on password input fields

## Available general solutions

1. Standalone [AutoHotkey](https://github.com/Lexikos/AutoHotkey_L ) - does not require install nor administrator priviliges and is open source

    * https://github.com/rubo77/Portable-Keyboard-Layout (see also the [updated version of the klc2ini.pl](https://github.com/amire80/msklc_reader ) script)
    * see `SendInput` etc. in https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/inputdev/about-keyboard-input.md
    * disadvantages
        * not easily made working on login screen (and even then it's error-prone)

1. [MSKLC](https://www.microsoft.com/en-us/download/details.aspx?id=22339 ) - does require administrator priviliges to install the resulting compiled DLL layouts and everything is closed source

    * [Virtual-Key Codes](https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx ) (see [Appendix 1](https://reactos.org/wiki/Create_a_keyboard_layout ) for hints which key is which on a HW keyboard)
    * [.klc format](https://pastebin.com/UXc1ub4V ) parser in C# (hopefully similar to the one in MSKLC)
    * [klc2ini.pl](https://github.com/amire80/msklc_reader ) - parses .klc files and converts them to AutoHotkey .ini format

## Useful links

* *extended key* means it's one from the "middle group" on a full/long keyboard (which has 3 separate blocks: alphanumeric, arrow, and numeric) - see https://docs.microsoft.com/en-us/windows/win32/inputdev/about-keyboard-input
* Michael Kaplan series about Windows internals of keyboard handling https://web.archive.org/web/20101013223255/http://blogs.msdn.com/b/michkap/archive/2006/04/22/581107.aspx
* a non-Microsoft reimplementation of some of the kernel building blocks of keyboard handling on Windows - it **dumps the content of structures** etc.: https://github.com/awakecoding/Win32Keyboard
* `kbd.h` from 1991 (in contrast to the current `kbd.h` from 1995 or newer): https://gist.github.com/ozh/5340054
* thorough explanation of reasoning behind the frozen state of the Windows keyboard handling internals (probably from the author of kbdedit.com ): https://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_devices-insiderplat_pc/how-to-implement-multiple-deadkey-strokes/4ff38c09-b58c-490a-963e-3cc745dfb396
* https://github.com/MaiaVictor/OSX/tree/master/windows_keyboard (modern AHK/AutoHotKey script initialization with superior speed and less issues)
    * note AHK can then produces `.exe` files (probably self contained) - that's super handy!
* https://www.windows-noob.com/forums/topic/6701-custom-keyboard-layout/
    * `[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\a0000420]`
* http://www.kbdedit.com/manual/admin_deploy.html#Language bar (`HKCU\Keyboard Layout\Preload`, `HKCU\Keyboard Layout\Substitutes`)
* Microsoft [TSF](https://msdn.microsoft.com/de-de/library/windows/desktop/ms538086(v=vs.85).aspx ) (Text Services Framework) is used by MS Office and similar, but not by many applications (in 2008 Notepad, etc.)
    * http://archives.miloush.net/michkap/archive/2005/04/16/408853.html
* Microsoft documentatin how winAPI for keyboard events looks like & behaves: https://github.com/MicrosoftDocs/win32/blob/docs/desktop-src/inputdev/about-keyboard-input.md
* http://www.sensefulsolutions.com/2010/08/how-to-fix-keyboard-shortcuts-in-klc-eg.html
* http://www.klm32.com/KbdEdit.html
* http://ahkscript.org/
* [dverty](https://github.com/chid/dvorak-qwerty/tree/master/dverty ) with simple regedit register files for better locale settings

license: Unlicense

repository: dumblob/ULKL

repo_name: dumblob/ULKL


text:
# Responsive Component

A responsive React component that takes a media query and renders its children only if the query matches. Handles changes if you resize your browser or flip your device...

## Implementation

Works natively with `Window.matchmedia` api that takes a media query and returns a `MediaQueryList` object representing the parsed result. [read more](https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia)

| Feature   |   Chrome | Firefox (Gecko) | Internet Explorer  | Opera  | Safari |
|:----------:|:-------------:|:------:|:-------------:|:------:|:-------------:|
| Basic support |  9    |    6.0 (6.0)     |    10       |       12.1  |  5.1 |

For older browsers, it falls back to Paul Irish's implementation of `matchMedia`: [read more](https://github.com/paulirish/matchMedia.js/)

### How to use this awesome piece of code?

[Try it out on codepen](http://codepen.io/jfkhoury/pen/MegmwV)

All you need to do is wrap your content (React Components or jsx or html...) for the specific screen/device you are trying to target, and set the media query accordingly:

```javascript
    import { ResponsiveComponent } from "react-responsive-component";
    ...
    <ResponsiveComponent query="only screen and (max-width: 480px)">
        <HamburgerBtn userId={userId} />
    </ResponsiveComponent>

    <ResponsiveComponent query="only screen and (min-width: 480px)">
        <ProfileDropDown userId={userId} />
    </ResponsiveComponent>
```

#### Optional props

You can pass a `tag` props to specify the tagname of the responsive component wrapper.

```javascript
    <ResponsiveComponent query="tv" tag="ul">
        <li>This feature is not supported on TVs yet :(</li>
    </ResponsiveComponent>
```

repository: donavon/react-responsive-component

gha_language: JavaScript

repo_name: donavon/react-responsive-component


text:
---
layout: post
title:      "Rails Porforlio Project:  Patch Uploader"
date:       2018-05-18 19:22:20 +0000
permalink:  rails_porforlio_project_patch_uploader
---

My final Ruby on Rails project is done.  The project is a social media platform where chiptune / tracker musicians can share instruments they make.  There are a few sites that are meant for sharing songs but I always wanted a site where composers and sound designers could share sound patches or instruments.  I've been primarily using the tracker Deflemask to make Sega Genesis style music for the last few years:

[Example of a song I made in Deflemask](https://www.youtube.com/watch?v=J8MfQLm-4GU)

During this time i used the program GensKmod to rip instrument patches from existing Sega Genesis ROMS:

[GensKmod Emulator](https://segaretro.org/Gens_KMod)

In other words, I stole some classic instruments from existing Sega Genesis soundtracks and I also created a lot of my own patches and tricks for the sound design.  I know a few other musicians who make some great Sega Genesis music.  I always want to get new ideas for sound design.  I have a unending appetite for new sounds.  So I wanted to facilitate more creativity in this are of music creation by letting people share sound design ideas more freely.

## Associations

My Patch Uploader site features a few interacting Ruby Objects:

* Users (have many Patches)
* Patches  (belong to Users and have many categories through patch categories)
* Categories (have many patches through patch categories)
* Patch Categories (uses a join table to facilitate patches having many categories and vice versa)

The idea is that users can upload patches and categorize them.  Other people can view the patches, their descriptions, download them and use them in their songs.  This is facilitated by Active Record's association methods and a join table called Patch Categories.

## Uploading Files

I used the carrier-wave gem to store and organize files.  Right now when a user uploads a file the gem's method stores the file in the public folder and organizes them in a logical manner.  The url of the file is then added to the Patch's object and stored in the database.  Carrier-wave was very easy to implement.   In order to upload files you create an uploader instance with the command:

``` rails g uploader <name>```

The uploader is then mounted to a Model using the syntax:

```mount_uploader :file, FileUploader```

Finally, in the view's form_for method a helper is needed:

```<%= f.file_field :file %>```

The carrier wave gem also give you access to a url method.  This allows downloading the file:

```<%= link_to 'Download', @patch.file.url %>```

## Nested Routes

In order to organize everything properly I used nested routes for the patches.  Patches belong to a User so therefor the url should look like:  /users/1/patches/1  or  /users/1/patches/new  etc.

```
Rails.application.routes.draw do
  # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
  root :to => 'welcome#index'

  resources :users, only: [:index, :show, :new, :create] do
    resources :patches, only: [:new, :create, :show, :edit, :update]
    get 'user/:id/patches/delete', to: 'patches#destroy', as: 'destroy_patch'
  end

  get '/patches', to: 'patches#index'

  get '/login', to: 'sessions#new'

  get '/logout', to: 'sessions#destroy'

  resources :sessions, only: [:create]

  resources :categories, only: [:index, :show, :new, :create]

  get '/auth/twitter/callback' => 'sessions#create'
end
```

You can see here that patches are nested underneath the user resources.  However, in order to list all of the patches the index view is not nested underneath the user.  The user view takes care of listing all of the user's patches.  I wanted to make that patches#index public so musicians who weren't loggeed in could see all of the patches / instruments uploaded.

## Helper Methods

Two helper methods were important to keep the views clean:

```
module UsersHelper
  def logged_in?
    session[:user_id]
  end

  def current_user
    if !session[:user_id]
      return nil
    else
      User.find(session[:user_id])
    end
  end
end
```

These are neccessary in order to detect if people are logged in.  The views display different information depending on whether a user is logged in and whether or not the user is currently viewing their own profile page.  An example of this is the welcome page:

```
<% if !logged_in? %>
  <p>Create an account, upload music tracker patches, download other people's patches.</p>
  <p><%= link_to('Log in / Sign up with Twitter', '/auth/twitter/') %> OR Use the normal stuff:</p>
  <h2><%= link_to 'Sign Up', new_user_path %></h2>
  <h2><%= link_to 'Log In', login_path %></h2>
<% end %>

<% if logged_in? %>
  <h2>NEWEST USER: <%= link_to User.newest_user.username, users_path(User.newest_user) %></h2>
  <h2>NEWEST Patch: <%= link_to Patch.newest_patch.name, patches_path(Patch.newest_patch) %></h2>
<% end %>
```

Here you can see that the homepage will display links to logins if the user is not logged in and if they are it displays the newest user and patch.


text:
# ErrbitPlugin
ErrbitPlugin provides a set of base classes that you can extend to create
Errbit plugins.

## Creating plugins
ErrbitPlugins are Ruby gems that extend the functionality of Errbit. To get
started, create a Ruby gem and add 'errbit_plugin' as a dependency in your
gem's gemspec.

Now you can start adding plugins. At the moment, there is only one kind of
plugin you can create, and that is the issue tracker.

### Issue Trackers
An issue tracker plugin is a Ruby class that enables you to link errors within
errbit to an issue in an external issue tracker like Github. An app within
errbit can be associated an issue tracker or not. When there is an association,
errbit users can choose 'create issue' from an error page which will both
create an issue on the external issue tracker out of the given error and link
that issue to the errbit error.

Your issue tracker plugin is responsible for providing the interface defined by
ErrbitPlugin::IssueTracker. All of the required methods must be implemented and
the class must extend ErrbitPlugin::IssueTracker. Here's an example:
```ruby
class MyIssueTracker < ErrbitPlugin::IssueTracker

  # A unique label for your tracker plugin used internally by errbit
  def self.label
    'my-tracker'
  end

  def self.note
    'a note about this tracker that users will see'
  end

  # Form fields that will be presented to the administrator when setting up
  # or editing the errbit app. The values we collect will be availble for use
  # later when we have an instance of this class.
  def self.fields
    {
      :field_one => {:label => 'Field One'},
      :field_two => {:label => 'Field Two'}
    }
  end

  # If this tracker can be in a configured or non-configured state, you can let
  # errbit know by returning a Boolean here
  def configured?
    # In this case, we'll say this issue tracker is configured when field_one
    # is set
    !!params['field_one']
  end

  # Called to validate user input. Just return a hash of errors if there are
  # any
  def check_params
    if @params['field_one']
      {}
    else
      { :field_one, 'Field One must be present' }
    end
  end

  # This is where you actually go create the issue on the external issue
  # tracker. You get access to everything in params, a problem resource and a
  # user resource (reported_by). Once you've created an external issue, save
  # its type and url on the problem resource.
  def create_issue(problem, reported_by = nil)
    # Create an issue! Then update the problem to link it.
    problem.update_attributes(
      :issue_type => 'bug',
      :issue_link => 'http://some-remote-tracker.com/mynewissue'
    )
  end

  # The URL for your remote issue tracker
  def url
    'http://some-remote-tracker.com'
  end

  # If you return false here, errbit will not show the built-in error comment
  # interface
  def comments_allowed?
    false
  end
end
```

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request


text:
---
layout: page
title: Not found!
permalink: /404.html
---

{:.brokenfile}
![Broken Link](/assets/images/noun_47682.png)

# Sorry, the page you are looking for cannot be found.  #

We recently simplified our website - to try and find what you're looking for - browse around our [products](/#products), look in the [blog](/blog), or [contact us](/#contact) if you're really lost!

repository: NetworkedPlanet/website

gha_language: HTML

repo_name: NetworkedPlanet/website


text:
makeright
=========

* A simple yet generic and flexible makefile.

Architecture
------------

Split into 3 files:
* **makefile_project** - which source files to compile, with what flags, to what architectures - by default include directories are all
directories named 'inc' or 'include' and the source directories is the directory named 'src'.
* **makefile_config** - which compiler to use, ideal for cross compilation settings.
* **makefile** - the generic logic, edit only on complex use cases.

Getting Started
---------------

1. Clone the project.
2. Create a 'src' directory.
3. Add your 'main.cpp' into 'src'.
4. Execute one of 'make', 'make mode=debug', 'make mode=release', and explore the directory tree.
5. Clean using 'make clean'.

**This documentation is incomplete, more to come soon**


text:
# Mapbox SDK in Titanium and Hyperloop

Use the Mapbox SDK (iOS and Android) in Axway Hyperloop! This is an example of using the SDK, so this does not
expose all possible API's of the SDK. See the [official](https://www.mapbox.com/ios-sdk/) documentation for details.

> **Note**: The examples here are written in ES6 (enable with `<transpile>true</transpile>` in your tiapp.xml) and Titanium SDK 7.1.0. You can still use it with Titanium 7.0.x and classic ES5 if you want!

<img src="example.jpg" width="800" alt="Mapbox SDK in Axway Hyperloop" />

## Features

### View

```js
import MapBox from 'ti.mapbox';
const mapView = MapBox.createView({
  region: {
    latitude: 52.020388,
    longitude: 9.580078,
    animated: true
  }
});

myWindow.add(mapView.getInstance());
```

### Annotation

```js
const annotation = Mapbox.createAnnotation({
  latitude: 52.020388,
  longitude: 9.580078
});

mapView.addAnnotation(annotation.getInstance());
```

## iOS Configuration

Add the following tags to your plist-section of the tiapp.xml and change `YOUR_MAPBOX_ACCESS_TOKEN` to your
actual access token
```xml
<!-- Mapbox configuration -->
<key>MGLMapboxAccessToken</key>
<string>YOUR_MAPBOX_ACCESS_TOKEN</string>

<!-- General Geolocation permissions -->
<key>NSLocationWhenInUseUsageDescription</key>
<string>Can we access your location while using the app?</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Can we access your location?</string>
```

## Android Configuration
1. Place your access token in `Resources/android/ti.mapbox/index.js`
2. Ensure you have installed at least Gradle 4.1 by running `brew install gradle` and `brew update gradle`
3. Run gradle to pull down the necessary android libraries into `platform/android`:
```sh
gradle getDeps
```
4. Now build!
```sh
appc run -p android
```

## License

Apache 2.0

## Authors

- Hans Knöchel (Axway Appcelerator)
- Chris Williams (Axway Appcelerator)

repository: hyperloop-modules/hyperloop-mapbox

gha_license_id: NOASSERTION

repo_name: hyperloop-modules/hyperloop-mapbox


text:
---
title: "glooctl create upstream static"
weight: 5
---
## glooctl create upstream static

Create a Static Upstream

### Synopsis

Static upstreams are intended to connect Gloo to upstreams to services (often external or 3rd-party) running at a fixed IP address or hostname. Static upstreams require you to manually specify the hosts associated with a static upstream. Requests routed to a static upstream will be round-robin load balanced across each host.

```
glooctl create upstream static [flags]
```

### Options

```
  -h, --help                       help for static
      --service-spec-type string   if set, Gloo supports additional routing features to upstreams with a service spec. The service spec defines a set of features
      --static-hosts strings       comma-separated list of hosts for the static upstream. these are hostnames or ips provided in the format IP:PORT or HOSTNAME:PORT. if :PORT is missing, it will default to :80
      --static-outbound-tls        connections Gloo manages to this cluster will attempt to use TLS for outbound connections. Gloo will automatically set this to true for port 443
```

### Options inherited from parent commands

```
      --dry-run            print kubernetes-formatted yaml rather than creating or updating a resource
  -i, --interactive        use interactive mode
      --name string        name of the resource to read or write
  -n, --namespace string   namespace for reading or writing resources (default "gloo-system")
  -o, --output string      output format: (yaml, json, table)
```

### SEE ALSO

* [glooctl create upstream](../glooctl_create_upstream)	 - Create an Upstream

repository: virajs/gloo

repo_name: virajs/gloo


text:
---
title:  "Chinese 60 yr olds love doing dance vids and watching weddings"
tags: [china, douyin, tik tok, tech]
published: true
---

**Takeaway**

The Chinese version of Tik Tok shows a surprising diversity in user base and content

**Douyin 2019 data report**

Douyin is the Chinese version of short video app [Tik Tok](https://techcrunch.com/2020/01/16/44-of-tiktoks-all-time-downloads-were-in-2019-but-app-hasnt-figured-out-monetization/ "Tik Tok"); both are owned by Bytedance \[1\]. [Katherine Wu](https://twitter.com/katherineykwu/status/1214322371567521792?s=20 "Katherine") translated the 2019 data report that Douyin published [here](https://www.katherinewu.me/writings/bytedance-tiktok-douyin-2019-report "katherine"), below are my highlights:

> Douyin claims >400mm daily active users DAUs

Note that Douyin is only popular in China, so this doesn't include Tik Tok's userbase internationally. We can quibble over how they define daily actives and the quality of chinese data, but even if we haircut that number, it's still large. Obviously this is a threat to WeChat (owned by Tencent), the main social app in China with [1.1bn monthly active users](https://www.tencent.com/en-us/investors.html "tencent").

What's also interesting for people watching Douyin/Tik Tok's growth is **the global nature of it.** I can't find a reliable DAU number for Tik Tok, but let's assume it's in the hundreds of millions as well \[2\] based on [this article](https://www.theverge.com/2019/11/4/20948731/tiktok-bytedance-china-social-media-growth-users-decline-first-time "Tik Tok"). We're seeing possible the first app that is used widely both in the insulated China tech ecosystem and the open Western one. It's not just a problem to WeChat, it's also one to Facebook [(1.7bn DAUs)](https://www.statista.com/statistics/346167/facebook-global-dau/ "FB") and Snapchat [(200mm DAUs)](https://www.statista.com/statistics/545967/snapchat-app-dau/ "SNAP").

> The report also shows the professions that got the most likes on their videos:

![post]({{ site.url }}{{ site.baseurl }}/assets/images/Kat Wu douyin 1.png)

I'm wondering if these groups have already found ways to monetise their popularity. Teachers have, via [live streaming their classes](https://shanghaiist.com/2017/01/13/chinese_english_teacher_makes_millions/ "live") \[3\]. The other professions all seem to be emergency services; would people pay for regular content from these jobs? There might be a market for realistic, educational content about the roles, to inform people interested in those careers. Like a "This is the day in the life of a doctor".

> The report also shows the top categories of videos created and watched by different generations:

![post]({{ site.url }}{{ site.baseurl }}/assets/images/Kat Wu douyin 2.png)

Anime has risen in popularity in Asian countries, contributing to the growth in companies such as [Bilibili](https://en.wikipedia.org/wiki/Bilibili "Bili"). The manga/anime series [One Piece has made more money than Lord of the Rings](https://comicbook.com/anime/2019/03/26/one-piece-anime-total-gross-lord-of-the-rings-franchise/ "LOTR"). I'd be bullish on anime continuing to grow as a segment.

I'm wondering how many weddings the '60s people are watching that it's the most watched category.

> The Chinese locations that had the most amount of short videos taken there:

![post]({{ site.url }}{{ site.baseurl }}/assets/images/Kat Wu douyin 3.png)

In case you wanted to know what Chinese people visited within their own country. I'm actually surprised Disneyland wasn't number one, goes to show how much I still don't know about China.

Katherine Wu gives some takes of her own as well:

> The behavioral differences between Douyin and Tiktok also underscore one major thing to me: there really isn’t a ‘one-size-fit-all’ social app that exists. Different regions like different types of content, even though the medium itself (in this case, short-form video) is the same

That's the power of being a platform at scale, where you're just \[4\] hosting whatever users are creating and then extracting value from that. Once you've hit product market fit, it's easier for you to scale compared to a distributor that creates all their own content. Your users will fragment into their niches and find each other; the dance loving grandma will find the wedding loving photographer. You don't need to make one type of content that's one-size-fit-all, but can depend on users to create thousands of types of content to cater to their own interests.

> Cultural factors (geography, age, local pop culture) play a huge role in how users end up using a product. \[...\] I remember when the first McDonalds and KFCs opened up in my hometown in China. KFC ended up doing sales that were multiples of McDonalds in the first year there because they were SUPER flexible on their menu items and incorporated a lot of local food items (Chinese soymilk, 油条, congee and the like)

I've written briefly on the [history of KFC in China](https://www.leonlinsx.com/KFC-China/ "KFC"), which was supposedly a reputation, management, and localisation effort to achieve superiority.

Here are my unanswered questions after reading the report (and likely won't be answered):

1. What is the DAU figure for Tik Tok?
2. What is the churn rate of users for Douyin, and for Tik Tok?
3. How much is Douyin and Tik Tok paying to acquire users? I've seen reports saying they're burning a lot of cash for low retaining users, but nothing official yet
4. What is the user breakdown for Douyin? By age, income, and geography? The data report implies a broad mix; I find that unlikely
5. What user group monetises the most effectively?
6. How much time are Douyin and Tik Tok users spending in app?

**Note to paid subscribers**

Thank you to everyone who's subscribed for paid weekly updates recently! As a reminder, although the monthly updates are on finance and tech, the weekly ones are shorter, less polished posts on any random topic I find interesting, and can range from [illusions in time](https://www.leonlinsx.com/temporal-illusions/ "time") to [art techniques](https://www.leonlinsx.com/tims-vermeer/ "art"). Also, all posts get uploaded on my blog after a substantial delay; the big benefit of subscribing is to get posts directly and early \[5\]. Just making sure everyone knows what they're getting into. Always happy to send paywalled articles to people you think might be interested in them as well, just lmk.

**Footnotes**

1. Tik Tok was an international release of Douyin to get around censorship requirements. It then bought Musical.ly to accelerate its growth. I'm unclear atm how many users were Musical.ly vs original Tik Tok users.
2. The verge article quotes a few hundred million monthly active users (MAU), based on another [SMCP post](https://www.scmp.com/tech/article/2155580/tik-tok-hits-500-million-global-monthly-active-users-china-social-media-video "MAU"). MAUs are a less restrictive way of counting users and will result in a higher number than counting DAUs.
3. The article seems dated, but I'm sure I read about China live streaming tuition recently as well
4. Ok, not just, it's a difficult, multi-billion business to do so, but you get the point.
5. Plus supporting a starving artiste, but nobody usually cares about that. And yes, I know this is not the most effective sales pitch  that want to support my writing but not censor me.

*If you liked this, sign up for my monthly* ***[finance and tech newsletter:](https://avoidboringpeople.substack.com/ "ABP")***

repository: leonlinsx/avoid-boring-people

repo_name: leonlinsx/avoid-boring-people


text:
# dockerutil

This package is for creating and controlling docker containers for testing
runsc, gVisor's docker/kubernetes binary. A simple test may look like:

```
 func TestSuperCool(t *testing.T) {
   ctx := context.Background()
   c := dockerutil.MakeContainer(ctx, t)
   got, err := c.Run(ctx, dockerutil.RunOpts{
     Image: "basic/alpine"
   }, "echo", "super cool")
   if err != nil {
      t.Fatalf("err was not nil: %v", err)
   }
   want := "super cool"
   if !strings.Contains(got, want){
     t.Fatalf("want: %s, got: %s", want, got)
   }
 }
```

For further examples, see many of our end to end tests elsewhere in the repo,
such as those in //test/e2e or benchmarks at //test/benchmarks.

dockerutil uses the "official" docker golang api, which is
[very powerful](https://godoc.org/github.com/docker/docker/client). dockerutil
is a thin wrapper around this API, allowing desired new use cases to be easily
implemented.

## Profiling

dockerutil is capable of generating profiles. Currently, the only option is to
use pprof profiles generated by `runsc debug`. The profiler will generate Block,
CPU, Heap, Goroutine, and Mutex profiles. To generate profiles:

*   Install runsc with the `--profile` flag: `make configure RUNTIME=myrunsc
    ARGS="--profile"` Also add other flags with ARGS like `--platform=kvm`.
*   Restart docker: `sudo service docker restart`

To run and generate CPU profiles run:

```
make sudo TARGETS=//path/to:target \
  ARGS="--runtime=myrunsc -test.v -test.bench=. --pprof-cpu" OPTIONS="-c opt"
```

Profiles would be at: `/tmp/profile/myrunsc/CONTAINERNAME/cpu.pprof`

Container name in most tests and benchmarks in gVisor is usually the test name
and some random characters like so:
`BenchmarkABSL-CleanCache-JF2J2ZYF3U7SL47QAA727CSJI3C4ZAW2`

Profiling requires root as runsc debug inspects running containers in /var/run
among other things.

### Writing for Profiling

The below shows an example of using profiles with dockerutil.

```
func TestSuperCool(t *testing.T){
  ctx := context.Background()
  // profiled and using runtime from dockerutil.runtime flag
  profiled := MakeContainer()

  // not profiled and using runtime runc
  native := MakeNativeContainer()

  err := profiled.Spawn(ctx, RunOpts{
    Image: "some/image",
  }, "sleep", "100000")
  // profiling has begun here
  ...
  expensive setup that I don't want to profile.
  ...
  profiled.RestartProfiles()
  // profiled activity
}
```

In the above example, `profiled` would be profiled and `native` would not. The
call to `RestartProfiles()` restarts the clock on profiling. This is useful if
the main activity being tested is done with `docker exec` or `container.Spawn()`
followed by one or more `container.Exec()` calls.

repository: google/gvisor

gha_language: Go

repo_name: google/gvisor


text:
# Equipollence

https://en.wikipedia.org/wiki/Equipollence_(geometry)

In Euclidean geometry, *equipollence* is a binary relation between directed line segments. Two parallel line segments are *equipollent* when they have the same length and direction. Symbol for equipollence `≏`.

`AB ≏ CD`


text:
# DisableSMBCompression
CVE-2020-0796 Flaw Mitigation - Active Directory Administrative Templates

The little we know about the new SMB3 flaw, is that we've been provided this mitigation for SMB3 servers:

```
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters" DisableCompression -Type DWORD -Value 1 -Force
```

This repository contains ADMX templates to provide a nice interface to this setting. This allows easy mass deployment of the given mitigation, and easy rollback when desired.

# Installation
See this Microsoft guide for installing new admx files:
https://support.microsoft.com/en-au/help/3087759/how-to-create-and-manage-the-central-store-for-group-policy-administra

Under "Administrative Templates", find the new "SMB Compression Support" setting as below.

![ADMX Template](https://github.com/technion/DisableSMBCompression/raw/master/SMBadmx.jpg)

# Applicability
I recommend careful consideration before deploying outside of Windows 10 machines. Windows 2016 Server is not vulnerable, and only the SAC builds of Windows 2019 (which are Server Core only) are considered vulnerable. There has been little (no) QA done on the impact of this setting on server roles such as S2D. As always, please test a small group before a larger deployment.

The majority of environments don't appear to be running SMB compression in practice, but please consider whether this is suitable to you.

# Limitations
Nothing described as a "mitigation" should be considered a complete fix. Please roll patches as soon as they are out. This change disables compression on the local SMB server, where Microsoft's guide appears to suggest this can still be exploited to attack the client. See Microsoft's guidance for further information.

# References:
https://www.bleepingcomputer.com/news/security/microsoft-leaks-info-on-wormable-windows-smbv3-cve-2020-0796-flaw/
https://portal.msrc.microsoft.com/en-US/security-guidance/advisory/ADV200005


text:
# Building
Describes how to build and run the language server and the editor extensions.

## Setup
* Java 11+ should be installed and located under `JAVA_HOME` or `PATH`.
* Note that you might need to use `gradlew` instead of `./gradlew` for the commands on Windows.

## Language Server

### Building
If you just want to build the language server and use its binaries in your client of choice, run:

>`./gradlew :server:installDist`

The language server executable is now located under `server/build/install/server/bin/kotlin-language-server`. (Depending on your language client, you might want to add it to your `PATH`)

Note that there are external dependent libraries, so if you want to put the server somewhere else, you have to move the entire `install`-directory.

### Packaging
To create a ZIP-archive of the language server, run:

>`./gradlew :server:distZip`

## Grammars

### Packaging
To create a ZIP-archive of the grammars, run:

>`./gradlew :grammars:distZip`

## Gradle Tasks
This paragraph assumes that you are familiar with Gradle's [task system](https://docs.gradle.org/current/userguide/build_lifecycle.html). In short: Every task describes an atomic piece of work and may depend on other tasks. Task dependencies will automatically be executed. The following subsections describe the available tasks for each module of this project.

### Language Server (:server)

| Task | Command | Description |
| ---- | ------- | ----------- |
| Package | `./gradlew :server:installDist` | Packages the language server as a bundle of JAR files (e.g. for use with an editor extension) |
| Package for Debugging | `./gradlew :server:installDebugDist` | Packages the language server with a debug launch configuration |
| Test | `./gradlew :server:test` | Executes all unit tests |
| Run | `./gradlew :server:run` | Runs the standalone language server from the command line |
| Debug | `./gradlew :server:debugRun` | Launches the standalone language server from the command line using a debug configuration |
| Build | `./gradlew :server:build` | Builds, tests and packages the language server |
| Package for Release | `./gradlew :server:distZip` | Creates a release zip in `server/build/distributions`. If any dependencies have changed since the last release, a new license report should be generated and placed in `src/main/dist` before creating the distribution. |
| Generate License Report | `./gradlew :server:licenseReport` | Generates a license report from the dependencies in `server/build/reports/licenses` |

### Grammars (:grammars)

| Task | Command | Description |
| ---- | ------- | ----------- |
| Package for Release | `./gradlew :grammars:distZip` | Creates a zip of the grammars in `grammars/build/distributions` |

repository: fwcd/kotlin-language-server

gha_language: Kotlin

repo_name: fwcd/kotlin-language-server


text:
# Adyen API Library for Ruby

The Adyen API Library for Ruby lets you easily work with Adyen's API.

## Integration

The Library supports all APIs under the following services:

* checkout
* checkout utility
* payments
* modifications
* payouts
* recurring
* marketpay
* postfmapi
* data_protection

## Requirements

Built for Ruby >= 2.1

## Installation

The sole dependency is faraday for http communication - run `bundle install` to install faraday if you don't already have it

To validate functionality of client, use `bundle install --with development` and `rspec` to run mock API tests.

## Documentation

Follow the rest of our guides from the [documentation](https://adyen.github.io/adyen-ruby-api-library/) on how to use this library.

## Usage

### Create a client to connect to the Adyen API
```ruby
require 'adyen-ruby-api-library'

adyen = Adyen::Client.new

# for API-key based implementations
adyen.api_key = 'AF5XXXXXXXXXXXXXXXXXXXX'

# for basic-auth based implementations
adyen.ws_user =<EMAIL_ADDRESS>adyen.ws_password = 'super_secure_password123'
```

### Make a Payment
```ruby
response = adyen.checkout.payments({
  :amount => {
    :currency => "EUR",
    :value => 1000
  },
  :reference => "Your order number",
  :paymentMethod => {
    :type => "scheme",
    :encryptedCardNumber => "adyenjs_0_1_18$MT6ppy0FAMVMLH...",
    :encryptedExpiryMonth => "adyenjs_0_1_18$MT6ppy0FAMVMLH...",
    :encryptedExpiryYear => "adyenjs_0_1_18$MT6ppy0FAMVMLH...",
    :encryptedSecurityCode => "adyenjs_0_1_18$MT6ppy0FAMVMLH..."
  },
  :returnUrl => "https://your-company.com/checkout/",
  :merchantAccount => "YourMerchantAccount"
})
```

### Change API Version
```ruby
adyen.checkout.version = 50
```

## List of supported methods

**checkout:**
- payment_session
- payments.result
- payment_methods
- payments
- payments.details
- payment_links

**checkout utility:**
- origin_keys

**payments:**
- authorise
- authorise3d

**modifications:**
- capture
- cancel
- refund
- cancel_or_refund
- adjust_authorisation

**payouts:**
- confirm_third_party
- decline_third_party
- store_detail
- submit_third_party
- store_detail_and_submit_third_party

**recurring:**
- list_recurring_details
- disable
- store_token

**marketpay.account:**
- create_account_holder
- get_account_holder
- update_account_holder
- update_account_holder_state
- suspend_account_holder
- un_suspend_account_holder
- close_account_holder
- create_account
- update_account
- close_account
- upload_document
- get_uploaded_documents
- delete_bank_accounts
- delete_shareholders

**marketpay.fund:**
- account_holder_balance
- account_holder_transaction_list
- payout_account_holder
- transfer_funds
- setup_beneficiary
- refund_not_paid_out_transfers

**marketpay.notification:**
- create_notification_configuration
- get_notification_configuration
- get_notification_configuration_list
- test_notification_configuration
- update_notification_configuration
- delete_notification_configurations

**marketpay.hop:**
- get_onboarding_url

**postfmapi:**
- assign_terminals
- find_terminal
- get_terminals_under_account

**data_protection:**
- request_subject_erasure

## Support
If you have a feature request, or spotted a bug or a technical problem, create a GitHub issue. For other questions, contact our [support team](https://support.adyen.com/hc/en-us/requests/new?ticket_form_id=360000705420).

## Contributing
We strongly encourage you to join us in contributing to this repository so everyone can benefit from:
* New features and functionality
* Resolved bug fixes and issues
* Any general improvements

Read our [**contribution guidelines**](CONTRIBUTING.md) to find out how.

## Licence

MIT license. For more information, see the LICENSE file.

repository: crrood/adyen-ruby-library

repo_name: crrood/adyen-ruby-library


text:
Project Deliverables:
- Account creation
- Account login
- Creation of new application stack
- Creation of new application

Delieverable Specification:
- Account Creation
  - Takes credentials (email, username, password)
  - Creates new user in Firebase
  - Sends access keys back to client
  - Creates namespace for user in cluster
  - Installs application builder ServiceAccount to users namespace
  - Automatically deploys default stack with default application
- Account Login
  - Take credentials (email/username, password)
  - Sends access keys back to client
- Creation of new application stack
  - Creates Helm Chart
- Creation of new application

CLI Command Spec:
- All commands start with the global `cloud`
- `cloud register`
  - Prompts user for email, username, and password
  - Creates account for user
  - Creates credential file locally for user
  - Creates namespace for user in cluster
  - Installs application builder ServiceAccount to namespace
  - Deploys "default" stack as a Helm chart
- `cloud login`
  - Either reports that user is already logged in,
    or requests the users credentials
  - Updates users credential file
- `cloud add stack <STACK_NAME>`
  - Creates a new Helm chart template in the users
    namespace
- `cloud delete stack <STACK_NAME>`
  - Deletes a chart from a users namespace, along with
    all apps added inside it
- `cloud add app <GIT_URL> <APP_NAME>`
  - `--stack=<STACK_NAME>`
    - Required, specifies the stack to create the app
    inside
  - `<GIT_URL>`
    - Optional, specifies the git repository to deploy
      from and listen to for updates
    - If not specified, packages the current directory
      to cloud storage and deploys from there
  - Deploys an application to the specified stack
- `cloud update app <APP_NAME>`
  - Manually redeploys and app. If using a repo, will
    rebuild and deploy app. If not using repo, this
    is the only way to redeploy code
- `cloud delete app <APP_NAME>`
  - `--stack=<STACK_NAME>`
    - Required, specifies which stack the deleted app
      resides
- `cloud list stacks`
  - Lists all stacks in users account
- `cloud list apps`
  - `--stack=<STACK_NAME>`
    - Optional, filters apps to only specified stack
  - Lists all apps deployed by user
- `cloud install <STACK_NAME>`
  - Installs a public Helm chart to the users namespace
- `cloud uninstall <STACK_NAME>`
  - Removes a public Helm chart from the users namespace


text:
# JDownloader 2

Docker JDownloader 2 headless image with automatic updates.

There is no embedded graphical interface, you should manage your downloads through the official JDownloader web interface here : [https://my.jdownloader.org](https://my.jdownloader.org).

You can report issues in the [github issues](https://github.com/antlafarge/jdownloader/issues).
You can send feedback and discuss the project in the [github discussions](https://github.com/antlafarge/jdownloader/discussions).

# Versions

## 1.1

Upgrade to OpenJDK 17. This upgrade required the removal of platforms `386`, `arm/v6`, `arm/v7`, `ppc64le` on alpine, and platform `ppc64le` on ubuntu.

| arch \ tags | [`latest`](https://hub.docker.com/repository/docker/antlafarge/jdownloader/tags?page=1&ordering=last_updated&name=latest) [`ubuntu`](https://hub.docker.com/repository/docker/antlafarge/jdownloader/tags?page=1&ordering=last_updated&name=ubuntu)
[`1.1`](https://hub.docker.com/repository/docker/antlafarge/jdownloader/tags?page=1&ordering=last_updated&name=1.1) [`1.1-ubuntu`](https://hub.docker.com/repository/docker/antlafarge/jdownloader/tags?page=1&ordering=last_updated&name=1.1-ubuntu) | [`alpine`](https://hub.docker.com/repository/docker/antlafarge/jdownloader/tags?page=1&ordering=last_updated&name=alpine)
[`1.1-alpine`](https://hub.docker.com/repository/docker/antlafarge/jdownloader/tags?page=1&ordering=last_updated&name=1.1-alpine) |
| :--------: | :--------------------: | :--------: |
| **amd64** | [*Need feedback*](https://github.com/antlafarge/jdownloader/discussions) | [*Need feedback*](https://github.com/antlafarge/jdownloader/discussions) |
| **arm64** | OK | OK |
| **arm/v7** | [*Need feedback*](https://github.com/antlafarge/jdownloader/discussions) | NA |
| **arm/v6** | NA | NA |
| **386** | NA | NA |
| **ppc64le** | NA | NA |
| **s390x** | [*Need feedback*](https://github.com/antlafarge/jdownloader/discussions) | [*Need feedback*](https://github.com/antlafarge/jdownloader/discussions) |

## 1.0

This version uses OpenJDK version 8 for greater platform compatibility.

| arch \ tags | [`1.0`](https://hub.docker.com/repository/docker/antlafarge/jdownloader/tags?page=1&ordering=last_updated&name=1.0) [`1.0-ubuntu`](https://hub.docker.com/repository/docker/antlafarge/jdownloader/tags?page=1&ordering=last_updated&name=1.0-ubuntu) | [`1.0-alpine`](https://hub.docker.com/repository/docker/antlafarge/jdownloader/tags?page=1&ordering=last_updated&name=1.0-alpine) |
| :--------: | :--------------------: | :--------: |
| **amd64** | OK | OK |
| **arm64** | OK | OK |
| **arm/v7** | OK | Avoid
[Issue 4](https://github.com/antlafarge/jdownloader/issues/4), [Issue 11](https://github.com/antlafarge/jdownloader/issues/11) |
| **arm/v6** | NA | [*Need feedback*](https://github.com/antlafarge/jdownloader/discussions) |
| **386** | NA | [*Need feedback*](https://github.com/antlafarge/jdownloader/discussions) |
| **ppc64le** | [*Need feedback*](https://github.com/antlafarge/jdownloader/discussions) | [*Need feedback*](https://github.com/antlafarge/jdownloader/discussions) |
| **s390x** | [*Need feedback*](https://github.com/antlafarge/jdownloader/discussions) | [*Need feedback*](https://github.com/antlafarge/jdownloader/discussions) |

# Docker run

[docker run (official documentation)](https://docs.docker.com/engine/reference/run)

docker run -d \
        --name <CONTAINER-NAME> \
        --restart <RESTART> \
        --user <UID>:<GID> \
    -v "<DOWNLOADS-PATH>:/jdownloader/downloads/" \
        -v "<CONFIG-PATH>:/jdownloader/cfg/" \
        -v "<LOGS-PATH>:/jdownloader/logs/" \
    -e "JD_EMAIL=<JD_EMAIL>" \
    -e "JD_PASSWORD=<JD_PASSWORD>" \
        -e "JD_DEVICENAME=<JD_DEVICENAME>" \
        -e "JAVA_OPTIONS=<JAVA_OPTIONS>" \
        -e "LOG_FILE=<LOG_FILE>" \
        -p "<PORT>:3129" \
    antlafarge/jdownloader:<TAG>

*Note : Parameters indented twice are optional.*

## Parameters

Name | Type | Description | Optional (default)
---- | ---- | ----------- | ------------------
**`<CONTAINER-NAME>`** | [Name](https://docs.docker.com/engine/reference/run/#name---name) | Container name. | Recommended (random)
**`<RESTART>`** | [Restart](https://docs.docker.com/engine/reference/run/#restart-policies---restart) | Container restart policy.
*Use `on-failure` to have a correct behavior of `Restart JD`, `Close` and `Shutdown` buttons in the JDownloader settings.
Use `unless-stopped` if the container doesn't restart on system reboot.* | Recommended (`no`)
**`<UID>`** | [User](https://docs.docker.com/engine/reference/run/#user) | Owner (User ID) of the files and directories created.
*You can use the `id -u` command in your shell to get your current user id.* | Recommended (`0`)
**`<GID>`** | [User](https://docs.docker.com/engine/reference/run/#user) | Owner (Group ID) of the files and directories created.
*You can use the `id -g` command in your shell to get your current groud id.* | Recommended (`0`)
**`<DOWNLOADS-PATH>`** | [Volume](https://docs.docker.com/engine/reference/run/#volume-shared-filesystems) | Directory where your downloads will be stored on your host machine.
*If you use the `user` parameter, check the permissions of the directories you mount as volumes.* | **REQUIRED**
**`<CONFIG-PATH>`** | [Volume](https://docs.docker.com/engine/reference/run/#volume-shared-filesystems) | Directory where the JDownloader settings files will be stored on your host machine.
*If you use the `user` parameter, check the permissions of the directories you mount as volumes.* | Recommended (in container)
**`<LOGS-PATH>`** | [Volume](https://docs.docker.com/engine/reference/run/#volume-shared-filesystems) | Directory where the JDownloader log files will be stored on your host machine.
*If you use the `user` parameter, check the permissions of the directories you mount as volumes.* | Not recommended (in container)
**`<JD_EMAIL>`** | [Env](https://docs.docker.com/engine/reference/run/#env-environment-variables) | Your [myJDownloader](https://my.jdownloader.org) email. | **REQUIRED**
**`<JD_PASSWORD>`** | [Env](https://docs.docker.com/engine/reference/run/#env-environment-variables) | Your [myJDownloader](https://my.jdownloader.org) password. | **REQUIRED**
**`<JD_DEVICENAME>`** | [Env](https://docs.docker.com/engine/reference/run/#env-environment-variables) | Device name in your [myJDownloader web interface](https://my.jdownloader.org). | Optional (hostname)
**`<LOG_FILE>`** | [Env](https://docs.docker.com/engine/reference/run/#env-environment-variables) | Write JDownloader logs from `java` command in a file.
You should create activate the volume parameter **`<LOGS-PATH>`** to access this log file from the host machine.
Useful if you have any issues with JDownloader.
Example : `"/jdownloader/logs/jd.docker.log"` | Optional (`/dev/null`)
**`<JAVA_OPTIONS>`** | [Env](https://docs.docker.com/engine/reference/run/#env-environment-variables) | Java options.
*Use `-Xms128m -Xmx1g` to change initial and max Java heap size memory.* | Optional (no options)
**`<PORT>`** | [Port](https://docs.docker.com/engine/reference/run/#expose-incoming-ports) | Network port used for Direct connection mode. | Optional
**`<TAG>`** | [Tag](https://docs.docker.com/engine/reference/run/#imagetag) | Docker hub tag. | Optional (`latest`)

## Example

docker run -d \
        --name jdownloader \
        --restart on-failure:10 \
        --user 1000:100 \
    -v "/mnt/hdd/JDownloader/downloads/:/jdownloader/downloads/" \
        -v "/mnt/hdd/JDownloader/cfg/:/jdownloader/cfg/" \
    -e<EMAIL_ADDRESS>\
    -e "JD_PASSWORD=MyGreatPassword" \
        -e "JD_DEVICENAME=JD-DOCKER" \
        -p 3129:3129 \
    antlafarge/jdownloader:1.1

*Note : Parameters indented twice are optional.*

# Docker Compose

[Docker Compose (official documentation)](https://docs.docker.com/compose)

services:
  jdownloader:
    image: antlafarge/jdownloader:<TAG>
    container_name: <CONTAINER-NAME> # optional
    restart: <RESTART> # optional
    user: <UID>:<GID> # optional
    volumes:
      - "<DOWNLOADS-PATH>:/jdownloader/downloads/"
      - "<CONFIG-PATH>:/jdownloader/cfg/" # optional
      - "<LOGS-PATH>:/jdownloader/logs/" # optional
    environment:
      - "JD_EMAIL=<JD_EMAIL>"
      - "JD_PASSWORD=<JD_PASSWORD>"
      - "JD_DEVICENAME=<JD_DEVICENAME>" # optional
      - "JAVA_OPTIONS=<JAVA_OPTIONS>" # optional
      - "LOG_FILE=<LOG_FILE>" # optional
    ports:
      - "<PORT>:3129" # optional

## Example

services:
  jdownloader:
    image: antlafarge/jdownloader:1.1
    container_name: jdownloader # optional
    restart: on-failure:10 # optional
    user: 1000:100 # optional
    volumes:
      - "/mnt/hdd/JDownloader/downloads/:/jdownloader/downloads/"
      - "/mnt/hdd/JDownloader/cfg/:/jdownloader/cfg/" # optional
    environment:
      -<EMAIL_ADDRESS>      - "JD_PASSWORD=MyGreatPassword"
      - "JD_DEVICENAME=JD-DOCKER" # optional
    ports:
      - "3129:3129" # optional

# Guides

## Setup

- Go to [my.jdownloader.org](https://my.jdownloader.org) and create an account.
- If you want to run the image as an unprivileged user, check the permissions of the directories you mount as volumes, and use the `user` parameter
    - Create the downloads directory : `mkdir /path/to/downloads/`
    - Setup the user and group owners : `sudo chown -R 1000:100 /path/to/downloads/`
        - You can get your User ID (UID) by using : `id -u`
        - You can get your User Group ID (GID) by using : `id -g`
        - I recommend to use `100` as GID (`users` group), because every users should be in this group, and it will be easier to manage multi-users privileges.
    - Setup the access rights : `sudo chmod -R 770 /path/to/downloads/`
    - Do the same for the config directory
- Run the container by choosing the [docker run](https://github.com/antlafarge/jdownloader#docker-run) or [docker compose](https://github.com/antlafarge/jdownloader#docker-compose) method and customize the parameters by using your [myJDownloader](https://my.jdownloader.org) credentials.
    - You can check the container logs : `docker logs --follow --tail 100 jdownloader` (`CTRL + C` to quit)
- Wait some minutes for JDownloader to update and be available in your [myJDownloader web interface](https://my.jdownloader.org).

## Update JDownloader

JDownloader will update itself automatically when it is idle (every 12 hours), so you have nothing to do.
To disable the automatic upates, go to your JD instance on [my.jdownloader.org](https://my.jdownloader.org), and go to `Settings` / `Event Scripter` and switch from `Enabled` to `Disabled`.

## Update the image

- [Docker run](https://github.com/antlafarge/jdownloader#docker-run) method :
    - Stop the current container : `docker stop jdownloader`
    - Remove the current container : `docker rm jdownloader`
    - Update the image : `docker pull antlafarge/jdownloader:1.1`
    - Remove the old untagged images : `docker rmi $(docker images --filter "dangling=true" -q --no-trunc)`
    - Restart the container : `docker start jdownloader`
- [Docker compose](https://github.com/antlafarge/jdownloader#docker-compose) method :
    - Stop the current container : `docker compose stop jdownloader`
    - Remove the current container : `docker compose rm -f jdownloader`
    - Update the image : `docker compose pull jdownloader`
    - Remove the old untagged images : `docker rmi $(docker images --filter "dangling=true" -q --no-trunc)`
    - Restart the container : `docker compose up -d`

## Change your email or password

- If you started the container by setting the email and password environment variables :
  - You must follow the [Update the image](https://github.com/antlafarge/jdownloader#update-the-image) guide by setting the new email or password on the final step.
- If you started the container without setting the email and password environment variables :
    - Run the **setup** script in the running container : `docker exec jdownloader /jdownloader/setup.sh<EMAIL_ADDRESS>"MyNewPassword" "JD-DOCKER"`.
    - Restart the container :
        - [Docker run](https://github.com/antlafarge/jdownloader#docker-run) method : `docker restart jdownloader`.
        - [Docker compose](https://github.com/antlafarge/jdownloader#docker-compose) method : `docker compose restart jdownloader`.

## Special characters in password

If you have special characters in your password, you have 2 solutions :

1. Modify your [docker run](https://github.com/antlafarge/jdownloader#docker-run) command or [docker-compose.yml](https://github.com/antlafarge/jdownloader#docker-compose) file :
    - If you have exclamation marks (`!`) in your password and you use a **bash** shell, this special character corresponds to commands history substitution. You might need to disable it by using the command `set +H` in your bash shell.
    - If your password contains double quotes (`"`), escape it with backslashes (`\`) in the [docker run](https://github.com/antlafarge/jdownloader#docker-run) command or [docker-compose.yml](https://github.com/antlafarge/jdownloader#docker-compose) file. ``"JD_PASSWORD=My\"Great`Password"``
        - If you use the [docker run](https://github.com/antlafarge/jdownloader#docker-run) method, also escape backticks (`` ` ``) with backslashes (`\`). ``"JD_PASSWORD=My\"Great\`Password"``
    - Start the container.

2. Or put your password manually in the settings file :
    - Modify your [docker run](https://github.com/antlafarge/jdownloader#docker-run) command or [docker-compose.yml](https://github.com/antlafarge/jdownloader#docker-compose) file parameters :
        - Set an empty `<JD_PASSWORD>` (for disabling password replacement on container start). `"JD_PASSWORD="`
        - Set a `<CONFIG-PATH>` volume to access the JDownloader settings files.
    - Start the container.
    - Go to your config directory and open the settings file named `org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json`.
    - Search for the password field and place your password in the empty double quotes. `"password":"MyGreatPassword",`
    - If your password contains double quotes (`"`), escape it with backslashes (`\`). ``"password":"My\"Great`Password",``
    - Save the file and restart the container. `docker restart jdownloader`

# Troubleshooting

## Files permissions issue

Check your user can read and write the directories you mounted as [volumes](https://docs.docker.com/engine/reference/run/#volume-shared-filesystems).
Read carefully the [Setup guide](https://github.com/antlafarge/jdownloader#docker-compose) and follow the steps.
Or run the container as root (remove `user` option).

## Armhf libseccomp2 issue

If you run the image on an armhf host (`arm/v7`), you may encounter many command errors (`wait`, `sleep`, `curl`, `date`)
This may be resolved by upgrading the `libseccomp2` library (docker dependency).
First you should try to upgrade your system by using the usual method.
If this upgrade didn't resolve the problem, add the backports repo for debian buster and update :
```
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138
echo "deb http://deb.debian.org/debian buster-backports main" | sudo tee -a /etc/apt/sources.list.d/buster-backports.list
sudo apt update
sudo apt install -t buster-backports libseccomp2
```

## Docker privileges

If nothing worked and many internal commands fail, your container may lack some privileges and you can try the [--privileged](https://docs.docker.com/engine/reference/run/#runtime-privilege-and-linux-capabilities) flag.

## Nothing worked / another issue

You can report issues in the [github issues](https://github.com/antlafarge/jdownloader/issues).
You can send feedback and discuss the project in the [github discussions](https://github.com/antlafarge/jdownloader/discussions).

# Docker commands reminder

## Container stop

docker stop jdownloader

## Container restart

docker restart jdownloader

## Container logs

docker logs --follow --tail 100 jdownloader

*Note: To access the JDownloader log files, you have to set the `<LOGS-PATH>` volume.*

repository: antlafarge/jdownloader

gha_language: Shell

repo_name: antlafarge/jdownloader


text:
.NET Compiler Platform ("Roslyn") Analyzers
===========================================

This repository contains a number of [Roslyn](https://github.com/dotnet/roslyn) diagnostic analyzers initially developed to help flesh out the design and implementation of the static analysis APIs.

Currently there are only a few projects here. Over time the collection will grow as more are migrated from the [dotnet/roslyn](https://github.com/dotnet/roslyn) repository.

Debug | Release
------|--------
[![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn-analyzers_windows_debug/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn-analyzers_windows_debug/) | [![Build Status](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn-analyzers_windows_release/badge/icon)](http://dotnet-ci.cloudapp.net/job/dotnet_roslyn-analyzers_windows_release/)

[![Join the chat at https://gitter.im/dotnet/roslyn](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/dotnet/roslyn?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Projects
========

AsyncPackage
-----------

*Created by summer 2014 interns Chardai Page, [Kendra Havens](https://github.com/kendrahavens), and Vivian Morgowicz*

The AsyncPackage analyzer enforces good practices when writing code that makes use of C#'s `async` and `await` language features.

MetaCompilation
---------------

*Created by summer 2015 interns [Zoë Petard](https://github.com/zoepetard), [Jessica Petty](https://github.com/jepetty), and [Daniel King](https://github.com/daking2014)*

The MetaCompilation Analyzer is an analyzer that functions as a tutorial to teach users how to write an analyzer. It uses diagnostics and code fixes to guide the user through the various steps required to create a simple analyzer. It is designed for a novice analyzer programmer with some previous programming experience.

Microsoft.AnalyzerPowerPack
---------------------------

General language rules implemented as analyzers using the .NET Compiler Platform ("Roslyn").

Microsoft.CodeAnalysis.Analyzers
--------------------------------

Provides guidelines for using .NET Compiler Platform ("Roslyn") APIs.

Getting Started
===============

1. Clone the repository
2. Install NuGet packages: `powershell -executionpolicy bypass src\.nuget\NuGetRestore.ps1`
3. Build: `msbuild src\Analyzers.sln`

Submitting Pull Requests
========================

Prior to submitting a pull request, ensure the build and all tests pass using BuildAndTest.proj:
```
msbuild BuildAndTest.proj
```

repository: jepetty/roslyn-analyzers

repo_name: jepetty/roslyn-analyzers


text:
@antdp/fullscreen
---

[![npm](https://img.shields.io/npm/v/@antdp/fullscreen.svg?maxAge=3600)](https://www.npmjs.com/package/@antdp/fullscreen)

设置页面全屏。

## Installation

```bash
npm i @antdp/fullscreen --save
```

## Basic Usage

```jsx
import Fullscreen from '@antdp/fullscreen';

<Fullscreen />
```

repository: Amber-Nan/antdp

repo_name: Amber-Nan/antdp


text:
pdftk-rb
========

This is a port of [pdftk-php](https://github.com/andrewheiss/pdftk-php)
([Andrew Heiss](www.andrewheiss.com)) to Ruby.
Based on [forge_fdf](http://www.pdfhacks.com/forge_fdf/) 1.1 by
[Sid Steward](http://www.oreillynet.com/pub/au/1754).

Released under the [New BSD license](http://www.opensource.org/licenses/bsd-license.php)

repository: jamesgecko/pdftk-rb

repo_name: jamesgecko/pdftk-rb


text:
# grizzly-pass

[![Build Status](https://travis-ci.org/p-jackson/grizzly-pass.svg?branch=master)](https://travis-ci.org/p-jackson/grizzly-pass) [![Coverage Status](https://coveralls.io/repos/github/p-jackson/grizzly-pass/badge.svg?branch=master)](https://coveralls.io/github/p-jackson/grizzly-pass?branch=master) ![Work in Progress](https://img.shields.io/badge/status-WIP-orange.svg)

A dashboard to show project health. It's a work in progress but you can see the
current state here:
[https://grizzly-pass.surge.sh](https://grizzly-pass.surge.sh)

If you drag drop a correctly formatted json file onto the page (you can find one
[here](./example/example.json)) then it will display those projects. Valid project
fields are:

- title (required, string)
- person (required, string)
- date (required, string in YYYY-MM-DD format)
- progress (required, number representing a percentage)
- health (required, one of "ontrack", "atrisk", "intervention" or "onhold")
- tags (optional, array of strings to be used as free-form tags on projects)

## Staging Server

You can see a recent build at
[https://grizzly-pass-staging.surge.sh/](https://grizzly-pass-staging.surge.sh/).

> The staging server doesn't show a good beta you can depend on, it just
> shows a recent development build from `master`.

repository: p-jackson/grizzly-pass

repo_name: p-jackson/grizzly-pass


text:
# reCAPTCHA Spring Boot Starter samples
Examples of how to use [reCAPTCHA Spring Boot Starter](https://github.com/mkopylec/recaptcha-spring-boot-starter) in web applications.

### Spring Web example
Running: `./gradlew :recaptcha-spring-web-sample:bootRun`

Testing: [http://localhost:8080/](http://localhost:8080/)

### Spring Security example
Running: `./gradlew :recaptcha-spring-security-sample:bootRun`

Testing: [http://localhost:8080/](http://localhost:8080/)

gha_language: Java


text:
---
name: New Park Request
about: Request adding a new park

---

Rather than create a new issue, could you implement this yourself with a pull request?
https://github.com/cubehouse/themeparks/wiki/Adding-New-Parks

**Park Name**
Name of the new park.

**Park Android/iOS/Web Apps**
Links to official Android, iOS, and web apps that show live wait times for the park.

**Additional Information**
Anything else that should be known about the park? Any unusual quirks or details that may help to implement it?

repository: cubehouse/themeparks

repo_name: cubehouse/themeparks


text:
# Storage Deck  [![Test](https://github.com/pseudosma/storage-deck/actions/workflows/push.yml/badge.svg?branch=master)](https://github.com/pseudosma/storage-deck/actions/workflows/push.yml) [![Coverage Status](https://coveralls.io/repos/github/pseudosma/storage-deck/badge.svg?branch=master)](https://coveralls.io/github/pseudosma/storage-deck?branch=master) ![License](https://img.shields.io/npm/l/storage-deck)

## Features
Storage Deck is a robust interface for interacting with a browser's localStorage and sessionStorage, capable of avoiding some of the common problems that come from using web storage directly. Some of the key features are:

### In-memory fall back

If browser storage is disabled, Storage Deck will automatically create a new window variable with a similar interface. The global objects do not persist data beyond the current page, but are ideal for use in single-page applications seeking to take advantage of an opportunistic storage model.

### Overflow Protection

Available size in either localStorage or sessionStorage varies by browser and can be very limited. If Storage Deck detects that the quota for storage is exceeded, it will automatically create a new global variable to store new items. If overflow has occurred, the Storage Deck functions will interact with both the original storage location and the overflow object seamlessly.

Clearing browser storage will also clear and remove the overflow object until an overflow happens again.

### Custom global storage

Another limitation of localStorage and sessionStorage is that data must be stored as a string. Storage Deck doesn't enforce that same restriction with any global objects that it creates. The core functions for creating and using overflow objects are exposed so that users can easily create their own custom in-memory, non-persistent storage objects for use across a web page.

A typical usage scenario could include using custom storage to temporarily store javascript File objects or even function references, both of which cannot be converted with JSON.stringify, in a convenient and globally available spot.

### What's new in version 2.1.0?

Storage-Deck now makes use of a [Searchable](https://github.com/pseudosma/searchability) object inside a StorageKey, as well as the original String and RegExp types. Searchables pair a string, which is the partial key to be searched for, along with the built-in search that needs to be performed: *EndsWith*, *Includes*, or *StartsWith*.

```typescript
{searchTerm: "example", searchType: SearchType.EndsWith }
```

## Usage

Storage Deck doesn't require any set up; all of the need to create and configure objects is obfuscated. Instead, Storage Deck exposes functions with similar signatures that can be imported on an as-needed basis.

### Local Storage Functions

#### Add items
```typescript
// add a single item
addToLocalStorage(keyValue: StorageKeyValuePair)
// or add multiple items
addToLocalStorage(keyValue: [...StorageKeyValuePair])
```

#### Clear all items
```typescript
clearLocalStorage()
```

#### Remove items
```typescript
// remove a single item from storage
removeFromLocalStorage(key: string)
// remove multiple items from storage
removeFromLocalStorage(key: RegExp)
removeFromLocalStorage(key: Searchable)
removeFromLocalStorage(key: [string, string])
removeFromLocalStorage(key: [string, RegExp])
```

#### Get items
```typescript
// retrieve a single item from storage
retrieveFromLocalStorage(key: string): null | string | StorageKeyValuePair[]
// retrieve multiple items from storage
retrieveFromLocalStorage(key: RegExp)
retrieveFromLocalStorage(key: Searchable)
retrieveFromLocalStorage(key: [string, string])
retrieveFromLocalStorage(key: [string, RegExp])
```

### Session Storage Functions

#### Add items
```typescript
//add a single item
addToSessionStorage(keyValue: StorageKeyValuePair)
// or add multiple items
addToSessionStorage(keyValue: [...StorageKeyValuePair )
```

#### Clear all items
```typescript
clearSessionStorage()
```

#### Remove items
```typescript
// remove a single item from storage
removeFromSessionStorage(key: string)
// remove multiple items from storage
removeFromSessionStorage(key: RegExp)
removeFromSessionStorage(key: Searchable)
removeFromSessionStorage(key: [string, string])
removeFromSessionStorage(key: [string, RegExp])
```

#### Get items
```typescript
// retrieve a single item from storage
retrieveFromSessionStorage(key: string): null | string | StorageKeyValuePair[]
// retrieve multiple items from storage
retrieveFromSessionStorage(key: RegExp)
retrieveFromSessionStorage(key: Searchable)
retrieveFromSessionStorage(key: [string, string])
retrieveFromSessionStorage(key: [string, RegExp])
```

### Custom Storage Functions

#### Add items
```typescript
// add single item
addToStorage(keyValue: StorageKeyValuePair, storageName: string)
// add multiple items
addToStorage(keyValue: [...StorageKeyValuePair], storageName: string)
```

#### Clear all items
``` typescript
clearStorage(storageName: string)
```

#### Create a new global storage instance
``` typescript
createNewStorage(name: string)
```
#### Delete a global storage instance
``` typescript
deleteStorage(storageName: string)
```

#### Remove items
``` typescript
// remove single item
removeFromStorage(key: string, storageName: string)
// remove multiple items
removeFromStorage(key: RegExp, storageName: string)
removeFromStorage(key: [string, string], storageName: string)
removeFromStorage(key: [string, RegExp], storageName: string)
```

#### Get items
``` typescript
// retrieve single item
retrieveFromStorage(key: string, storageName: string): any | StorageKeyValuePair[]
// retrieve multiple items from storage
retrieveFromStorage(key: RegExp, storageName: string)
retrieveFromStorage(key: [string, string], storageName: string)
retrieveFromStorage(key: [string, RegExp], storageName: string)
```

### Custom Types
```typescript
type StorageKey = string | RegExp;

interface StorageKeyValuePair {
  key: string;
  value: any;
  pattern?: string;
  addedSuccessfully?: boolean;
}
```

* The **StorageKey** type, or an array of that same type, is the input for the remove and retrieve functions.
* An object conforming to the  **StorageKeyValuePair** interface, or an array of that same type, is the input for the add functions.

> :warning: When using any of Storage Deck's retrieve function, if RegEx or an array of items is supplied, rather than a single value returned an array of **StorageKeyValuePair** is returned. The *key* or *pattern* fields denote which item the value returned matched.

### Do's

* If you're application is using ES6 or better, import just the functions you need. Storage Deck can be imported in its entirety in a `require` statement too, if using CommonJS.
* Use very specific RegEx for key searches. If part of the pattern matches the key, the corresponding value will be returned.

### Don'ts

* There are four reserved names that can't be used with the `createNewStorage` function:
  * "localStorage"
  * "sessionStorage"
  * "localOverflowStorage"
  * "localSessionStorage"

  Using these names will result in an error being thrown.
* It's possible to use the Custom Storage Functions to interact with localStorage and sessionStorage by specifying those for the `storageName` parameter, but doing so bypasses overflow handling.
* After using `createNewStorage` to make a new object, it's possible to interact with it using dot syntax as if it's a standard browser storage object:
  ```javascript
  import { createNewStorage } from "storage-deck";

  createNewStorage("customStorage");
  window.customStorage.setItem("foo", "bar");
  ```
  Doing this will work, but introduces an inconsistency in code structure. It's much better just to use the wrapper functions in all cases.

## Install with [npm](https://www.npmjs.com/)

```bash
npm i storage-deck --save
```
This package is provided in the CommonJS module format.

## Contributing

Pull requests are always welcome. For bugs and feature requests, [please create an issue](https://github.com/pseudosma/storage-deck/issues).

## License

Copyright (c) 2020 David Paige.
Released under the MIT license.

repository: pseudosma/storage-deck

repo_name: pseudosma/storage-deck