text:
# Engineering Report template

OGC uses [Metanorma](https://www.metanorma.org) software for creating Engineering Report documents.

You can compile documents using either a local installation of Metanorma or optionally a docker-containerized instance of Metanorma.

## Using Metanorma from a local installation

### Pre-requisite

Confirm that you have Metanorma installed locally on your operating system. If you do not have Metanorma installed, follow the steps at the [Metanorma website](https://www.metanorma.org/install/) to install it.

### Getting the Templates

**Step 1**. Obtain the template for a Draft OGC Engineering Report document from the `template` sub-folder.

### Editing a Draft OGC Engineering Report document for compilation with Metanorma

Now that you have obtained a copy of the template, you can edit the document. The following steps assume that you have read the **authoring guidelines** are at https://www.metanorma.org/author/ogc/authoring-guide/

**Step 2**. Next, edit the asciidoc file `document.adoc` by filling the document properties: `docsubtype`, `status`, `abbrev`, `edition` (i.e. version of the document), `docnumber` (OGC Document Number), `keywords`, `fullname` (of the editors).

**Step 3**. Ensure that the `doctype` property is set to `engineering-report`.

Refer to the authoring guidelines for the complete list of document properties.

NOTE: If there are multiple editors, the names of the editors are listed in the sequence `fullname`, `fullname_2`, `fullname_3`,...

### Compiling a Draft OGC Engineering Report document with a local Metanorma instance

To convert the draft document from asciidoc format to HTML and PDF formats, we use the metanorma software to **compile** the document.

**Step 4**. From the folder containing the `document.adoc` file, run the following command.

`metanorma compile --agree-to-terms -t ogc -x xml,html,doc document.adoc`

NOTE: You need to add this option to retrieve licensed fonts  `--agree-to-terms`

## Using Metanorma from within Docker

### Pre-requisite

Confirm that you have docker installed on your operating system. If you do not have docker installed, follow the steps at the [Get Docker page](https://docs.docker.com/get-docker/) to install it.

### Creating a copy of the template

The template for Engineering Report documents is organized as a folder of asciidoc files, with nested folders for sections, and other resources.

To create a copy of the template, follow these steps.

**Step 1**. Pull the latest version of the Metanorma image on to your local docker installation.

`docker pull metanorma/metanorma:latest`

**Step 2**.  Generate a copy of the template for OGC Engineering Report documents by running the following command from a terminal (i.e. from the command prompt).

`docker run --rm -v "$(pwd)":/metanorma metanorma/metanorma  metanorma new -d engineering-report -t ogc  -l https://github.com/metanorma/metanorma-templates-ogc folder_for_engineering_report`

NOTE: The `-d engineering-report -t ogc` flags instruct metanorma that the template is for OGC Engineering Report documents.

NOTE: The `folder_for_engineering_report` value can be replaced with whatever you would like to be the name of the folder that contains the copy of the template.

### Editing a Draft OGC Engineering Report document for compilation with Metanorma

Now that you have generated a copy of the template, you can edit the document. The following steps assume that you have read the **authoring guidelines** are at https://www.metanorma.org/author/ogc/authoring-guide/

**Step 3**. Next, edit the asciidoc file `document.adoc` by filling the document properties: `status`, `abbrev`, `edition` (i.e. version of the document), `docnumber` (OGC Document Number), `keywords`, `fullname` (of the editors).

**Step 4**. Ensure that the `doctype` property is set to `engineering-report`.

Refer to the authoring guidelines for the complete list of document properties.

NOTE: If there are multiple editors, the names of the editors are listed in the sequence `fullname`, `fullname_2`, `fullname_3`,...

### Compiling a Draft OGC Engineering Report document with a docker-containerized Metanorma instance

To convert the draft OGC Engineering Report from asciidoc format to HTML and PDF formats, we use the metanorma software to **compile** the document.

**Step 5**. From the folder containing the `document.adoc` file, run the following command.

`docker run -v "$(pwd)":/metanorma -v ${HOME}/.fontist/fonts/:/config/fonts  metanorma/metanorma  metanorma compile --agree-to-terms -t ogc -x xml,html,doc document.adoc`

NOTE: You need to add this option to retrieve licensed fonts  `--agree-to-terms`

repository: opengeospatial/templates

gha_language: Makefile

repo_name: opengeospatial/templates


text:
# Minimum Constraints

When running the toolkit in network mode, the positions of receivers and satellites may be estimated simultaneously. This presents a complication in that the absolute positions of all elements may be unconstrained - the model of the system would be completely consistent if every element of the network (receivers and satellites) were on the opposite side of the planet! For the results of such processing to be of value, the system needs to be referenced to a standard reference frame.

One method of ensuring the system is referenced to a suitable reference frame is to constrain receiver positions to their nominal position in the reference frame. Constraining 3 receivers is sufficient to ensure the system is well defined, but this gives select receivers precedence over all others - a movement of one of these receivers will instead show up as a movement of every other receiver on the planet.

An alternative method may be to weakly constrain all receivers to their nominal positions. This removes the priority effect of choosing 3 receivers, but will also apply a small restoring bias to the estimated position of the receivers.

Minimum constrains is a method of referring a system of estimates to a standard reference frame without unduly prioritising any receiver, or biasing the measurements.

## Computation

To compute a minimally constrained system, the deviations of all receivers from their nominal positions are used as pseudo-observations in a filter to estimate a transformation between reference frames.

The filter estimates a rigid transformation comprising of 3d rotation and translation components, which when applied produces a least-squares solution of the errors of all desired receivers.

The estimated transformation is then applied to the network solution, transforming both the estimated position states, as well as the covariances associated with them.

## Usage

    minimum_constraints:

        estimate:
            translation:    true
            rotation:       true
            #scale:          false   #not yet implemented

        station_default_noise: -1        #constrain none by default (negative numbers are not constrained)
        #station_default_noise: +1       #constrain all by default

        #station_noise:
        #    ALIC: 0.001     #constrain strongly
        #    AGGO: 1
        #    BOAV: 100       #constrain weakly

If minimum constraints is enabled, the transformation will be applied after the completion of all forward processing, and configured according to the yaml file.

### estimate:

Booleans to enable the modelling of the transformation operations.

### station_noise, station_default_noise:

These parameters allow the different stations in the solution to be weighted according to their priority.

The station default noise is applied to all stations unless they are specifically overridden using a station\_noise entry.

High noise values indicate that the station should only be weakly constrained to its a-priori position, while low values indicate they should be weighted more strongly. Only the relative weighting between stations is important.

Stations may have zero weighting applied by assigning a negative value to the station_noise override for that station.

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
## Design System

The Florence design system is hosted at: [https://design.florence.co.uk](). It is a themed version of Semantic-UI that is a fork of: [lolero/semantic-ui-theme-builder](https://github.com/lolero/semantic-ui-theme-builder). More info can be found in the README of that repo if needed.

### Installation

1. Clone the design system repo: `git clone git@github.com:team-florence/semantic-ui-theme-builder.git`
2. Run: `yarn` to install all dependencies
3. Run the yarn script: `yarn start:florence` or `yarn start:flexibank` (see below for explanation)
4. Navigate to: `localhost:5001` to view the interactive Semantic UI React documentation
5. The compiled CSS file will be running locally at: `localhost:5000/css/sui-florence.css`

### Explanation

Running `yarn start:florence` or `yarn:start:flexibank` does a number of things:

1. Builds & compiles the `sui-florence.css` file that is used within the Florence app
2. Starts the semantic documentation server which allows you to view (and interact with) all components in the design system
3. Runs a gulp watcher that will look for any changes within `themes/src/themes` and recompile the main CSS file
4. Runs a gulp watcher that will hot reload any .css/.less changes into the components in the Semantic UI React documentation
5. Runs a node.js server that serves the `sui-florence.css` file. This is used in both development & production

### Contributing

Read the Semantic UI documentation to get an understanding of how "theming" works before making any changes: https://semantic-ui.com/usage/theming.html.

1. Navigate to `themes/src/themes/parent-theme`.
2. You will see a number of folders such as: `collections`, `elements` etc. This folder structure directly relates to the Semantic UI documentation for how it "groups" different elements.
3. Navigate into the `elements` directory. You will see for every 'element', there are two files - ending in `.variables` and `.overrides`.
4. Most configuration of an element can be changed simply by adjusting the Semantic LESS variables in the respective `.variables` file, however if you need fine grained control you can write CSS changes directly into the `{element}.overrides` file instead (we have already used this quite a lot!).

### Deploying

The project is configured in Heroku such that any changes pushed to the `master` branch will automatically be deployed to: [https://design.florence.co.uk]().

license: MIT

repository: team-florence/semantic-ui-theme-builder

gha_language: JavaScript

gha_license_id: MIT

repo_name: team-florence/semantic-ui-theme-builder


text:
# Reproducing OSS-Fuzz issues
## Reproducible vs non-reproducible
OSS-Fuzz generates two kinds of issues; reproducible and non-reproducible. It _generally_ only raises issues for reproducible problems; that is, a testcase that can be passed to the relevant fuzzer which causes a crash. They are marked as such in the OSS-Fuzz dashboard.

These instructions are for diagnosing reproducible problems.

## Getting started
### Reading the testcase
OSS-Fuzz should have given you a testcase that causes a crash in a fuzzer. Often the general area of the problem can be divined by reading the contents.

For most fuzzers, this is done using `read_corpus.py`:
```
$ python read_corpus.py --input ../clusterfuzz-testcase-minimized-6660139718279168
TLVHeader(type='CURLOPT_URL' (1), length=15, data='smb:/ @ /   /  ')
TLVHeader(type='Server banner (sent on connection)' (2), length=82, data='  \x00      \x00\x00\x00\x00                                                                     ')
2017-11-04 12:38:06,213 INFO  Returning 0
```
This example shows a testcase consisting of a configured URL (`CURLOPT_URL`) and a message sent to libcurl when it connects to that URL for the first time. There are many other options available; check `generate_corpus.py` for a comprehensive list.

The fnmatch fuzzer uses a special format of two null terminated strings, representing the pattern and string passed to Curl_fnmatch. This can be examined in your favourite text editor.

## Determining how to reproduce
Assuming the previous step didn't immediately reveal the problem, you can run the testcase against the fuzzer. OSS-Fuzz uses lots of different types of fuzzing engine, so it's worth checking if you can run against the mainline fuzzer.

When OSS-Fuzz raises an issue, it includes information at the top of the report:

```
Detailed report: https://oss-fuzz.com/testcase?key=6660139718279168

Project: curl
Fuzzer: libFuzzer_curl_fuzzer_smb
Fuzz target binary: curl_fuzzer_smb
Job Type: libfuzzer_ubsan_curl
Platform Id: linux
```
This shows:
- which fuzzing binary was being run
- what engine was being used (libfuzzer, afl)
- what sanitization options were being used (libasan = address sanitization, libubsan = undefined behaviour sanitization)

The fuzzing binaries built by `mainline.sh` can be used to reproduce issues which are using `libasan`. **For issues hit using libubsan, these should be reproduced using the OSS-Fuzz environment!**

## Reproducing using a `mainline.sh` binary
To reproduce, execute the fuzzer with the testcase as a parameter. Setting the environment variable FUZZ_VERBOSE=yes will cause the fuzzer to output in-depth information about what it's doing at each stage:
```
$ FUZZ_VERBOSE=yes ./curl_fuzzer_smb ../clusterfuzz-testcase-minimized-6660139718279168
* STATE: INIT => CONNECT handle 0x62a000000208; line 1425 (connection #-5000)
* Unwillingly accepted illegal URL using 1 slash!
* Connecting to hostname: <IP_ADDRESS>
* Added connection 0. The cache now contains 1 members
[../clusterfuzz-testcase-minimized-6660139718279168] Opened.. Read 109 bytes, fuzzing.. FUZZ: Using socket manager 0
FUZZ[0]: Using socket manager 0
FUZZ[0]: Sending initial response
FUZZ[0]: Shutting down server socket: 4
*   Trying <IP_ADDRESS>...
* Could not set TCP_NODELAY: Operation not supported
* STATE: CONNECT => WAITCONNECT handle 0x62a000000208; line 1477 (connection #0)
* Connected to <IP_ADDRESS> () port 445 (#0)
* STATE: WAITCONNECT => SENDPROTOCONNECT handle 0x62a000000208; line 1594 (connection #0)
* Marked for [keep alive]: SMB default
* STATE: SENDPROTOCONNECT => PROTOCONNECT handle 0x62a000000208; line 1608 (connection #0)
FUZZ: Initial perform; still running? 1
* SMB conn 0x61d000001ac0 state change from SMB_CONNECTING to SMB_NEGOTIATE
curl_fuzzer_smb: memdebug.c:167: void *curl_domalloc(size_t, int, const char *): Assertion `wantedsize != 0' failed.
Aborted
```
Hooray, we hit the bug!

From here, you can either:
- modify libcurl to output extra diagnostics and rerun after recompiling
- use GDB to diagnose the fuzzer live
  - Setting a breakpoint on `__asan::ReportGenericError` will stop execution at the point where libasan detects a failure; this can be very useful to get to the correct point of failure.

If this hasn't worked then you may want to run in the OSS-Fuzz environment.

## Running in the OSS-Fuzz environment
Rather than reiterate OSS-Fuzz's guidance, you can read it at [https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md](https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md).

As an example, building the environment for the SMB example in previous sections would consist of running:
```
$ python infra/helper.py build_image curl
$ python infra/helper.py build_fuzzers --sanitizer undefined curl
$ python infra/helper.py reproduce curl curl_fuzzer_smb ../clusterfuzz-testcase-minimized-6660139718279168
```

repository: curl/curl-fuzzer

repo_name: curl/curl-fuzzer


text:
# videojs-related

End screen for the Brightcove Player that presents a list of content to a user to watch next. Not a recommendation engine itself.

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*

- [Configuration](#configuration)
  - [Data source](#data-source)
    - [Video Cloud Playlist](#video-cloud-playlist)
    - [Custom data URL](#custom-data-url)
    - [Media API Related Videos (deprecated)](#media-api-related-videos-deprecated)
  - [Click behaviour](#click-behaviour)
  - [Custom URL data](#custom-url-data)
- [License](#license)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

## Configuration

Add the plugin to your player configuration in the Studio:

*   **Javascript:** URL to Javascript
*   **Stylesheet:** URL to CSS
*   **Name:** `related`
*   **Options:** Example - see options below

        {
          "source": "playlist",
          "playlistField": "custom_fields.mycustomfield",
          "link": {
            "url": "http://example.com/videopage/{mediainfo.id}"
          }
        }

### Data source

#### Video Cloud Playlist

You can use a playlist as a source of related videos. This might be a smart playlist of videos with tags, or a manual playlist with curated items.

You can specify the id of the playlist to be used as `playlistId`:

    {
      "source": "playlist",
      "playlistId": "123456"
    }

Alternatively, you can use a field on the video to specify what playlist to use:

    {
      "source": "playlist",
      "playlistField": "custom_fields.mycustomfield"
    }

If both `playlistField` and `playlistId` are used, `playlistField` takes precedence. If the field is not populated on a video, the `playlistId` is used as fallback.

#### Custom data URL

    {
      "source": "url",
      "url": "http://example.com/relatedvideos/{mediainfo.id}"
    }

Fetches an array of videos from a URL. This will need CORS if hosted separately at a different domain as the page the player is embedded.

The URL may contain macros for video fields, such as `{mediainfo.id}` or `{mediainfo.custom_fields.myfield}`. Any [standard video field](http://docs.brightcove.com/en/video-cloud/playback-api/references/video-fields-reference.html) that is a string or a number should work, as well as `{mediainfo.tags}`, which becomes a comma separated list of the video's tags.

{
  "source": "url",
  "url": "http://example.com/relatedvideos?tags={mediainfo.tags}"
}

See below for the format of data that your URL would need to return.

#### Media API Related Videos (deprecated)

This option used the deprecated related videos API.

**Important:** The Media API used by this option is [deprecated and will unavailable after the end of 2017](https://brightcove.status.io/pages/incident/534ec4a0b79718bb73000083/579f4ae52d8d333607000250). Make sure you update to a different content source before then.

### Click behaviour

By default when a video in the end screen is clicked on, that video will be loaded into the existing player. You may redirect to a new page instead, e.g. to the article page featuring that video.

    {
      "link": {
        "field": "custom_fields.articlepage",
        "url": "http://example.com/videopage/{mediainfo.id}"
      }
    }

If `link.field` is specified and that field contains a value, the browser will navigate to that page. If not, the video will be loaded into the player.

To use the standard "related link" field in Video Cloud, use `link.url`.

The URL may also include macros as with the custom data URL option.

### Custom URL data

If you are using your own URL as the source of data, it should return videos in the same format as the Playback API. The following fields are required:

    [
      {
        "id": 1234,
        "name": "Video name",
        "description": "Video description",
        "poster": "https://example.com/image.jpg",
        "duration": 120,
        "custom_fields": {
          "myfield": "some value"
        },
        "link": {
          "text": "Related link text",
          "url": "http://example.com"
        }
      },
      { ... }
    ]

You only need `custom_fields` and/or `link` if you intend to use them for customising the behaviour when the item is clicked, as described above.

## License

Apache-2.0. Copyright (c) mister-ben<EMAIL_ADDRESS>

[videojs]: http://videojs.com/

repository: mister-ben/brightcove-related

gha_license_id: NOASSERTION

repo_name: mister-ben/brightcove-related


text:
# AudioRecorder Module

## Description

Android module for record audio in different format like(mp4,3gp) without using intent.

## Permission

This module needs following permissions

    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_INTERNAL_STORAGE" />

Note: These permissions already added in timodule.xml, so no need to add in tiapp.xml

## Features

* Support mp4 and 3gp formats
* Support for different audio encoders
* Support for different sampling rates
* Support for different bitrates
* Option to stop recording process by specifying maxFileSize and maxDuration
* Save files in external storage
* Method to check whether audio recorder
* Success and error callback methods

## Accessing the AudioRecorder Module

To access this module from JavaScript, you would do the following:

    var audioRecorder = require("titutorial.audiorecorder");

The audiorecorder variable is a reference to the Module object.

## Reference

Based on Android MediaRecorder http://developer.android.com/reference/android/media/MediaRecorder.html

## Methods

### startRecording()

Method to start the audio recording process.

**Parameters**

* **outputFormat** - output file format either `audioRecorder.OutputFormat_MPEG_4` or `audioRecorder.OutputFormat_THREE_GPP`; default = `audioRecorder.OutputFormat_THREE_GPP`
* **audioEncoder** - audio encoder type `audioRecorder.AudioEncoder_AAC`, `audioRecorder.AudioEncoder_AMR_NB`, `audioRecorder.AudioEncoder_AMR_WB`, `audioRecorder.AudioEncoder_DEFAULT`; default = `audioRecorder.AudioEncoder_AMR_NB`
* **audioEncodingBitRate** - audio encoding bit rate in bits per second; default = 16000
* **audioSamplingRate** - sampling rate for audio in samples per second (not all rates are supported by all encoders, consult android MediaRecorder documentation); default = 22050
* **directoryName** - directory name(directory will be created with this name in SD card); default = `audio_recorder`
* **fileName** - file name; default file name is current timestamp
* **maxFileSize** - filesize (in bytes) of the recording session (optional)
* **maxDuration** - duration (in ms) of the recording session (optional)
* **success** - function to handle success
* **error** - function to handle error response

### isRecording()

Method to check recording process

### getMaxAmplitude()

Method to check amplitude of microphone input

## Usage

    audioRecorder.startRecording({
	    outputFormat : audioRecorder.OutputFormat_THREE_GPP,
	    audioEncoder : audioRecorder.AudioEncoder_AMR_NB,
        audioEncodingBitRate: 128000,
        audioSamplingRate: 44100,
	    directoryName : "testdir",
	    fileName : "testfile",
	    maxFileSize : 7000,
	    success : function(e) {
		    alert("success => " + e.filePath);
		    Ti.API.info("response is => " + JSON.stringify(e));

		    var audioDir = Titanium.Filesystem.getFile(Titanium.Filesystem.externalStorageDirectory, "testdir");
		    var audioFile = Ti.Filesystem.getFile(audioDir.resolve(), e.fileName);
		    Ti.API.info("audioFile.nativePath = " + audioFile.nativePath);
		    audioPlayer.url = audioFile.nativePath;
	    },
	    error : function(d) {
		    alert("error => " + e.message);
		    Ti.API.info("error is => " + JSON.stringify(d));
	    }
    });

refer example/app.js for more info

## Todo

* Local storage option

## Author

Karthi Ponnusamy -<EMAIL_ADDRESS>
## License

Copyright (c) 2013 titaniumtutorial.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


text:
# ShiftRegister 74HC595 Arduino Library
This library simplifies shift registers usage. It allows, for instance, to set shift register pins just like normal Arduino pins: `sr.set(1, HIGH)`.

The **documentation** is available at http://shiftregister.simsso.de/.

An **example** sketch can be found in this repository at [/examples/example/example.ino](https://github.com/Simsso/ShiftRegister74HC595/blob/master/examples/example/example.ino).


text:
# Threads
adepted from:
https://www.olcf.ornl.gov/support/system-user-guides/accelerated-computing-guide/#2661

http://cuda-programming.blogspot.co.il/2013/01/vector-addition-in-cuda-cuda-cc-program.html

CUDA threads are logically divided into 1,2, or 3 dimensional groups referred to as thread blocks.
Threads within a block can cooperate though access to low latency shared memory as well as synchronization capabilities.
All threads in a block must reside on the same streaming multiprocessor and share the limited resources, additionally a 1024
threads per block upper limit is imposed.

The thread blocks of a given kernel are partitioned into a 1,2, or 3 dimensional logical grouping referred to as a grid.
The grid encompasses all threads required to execute a given kernel. There is no cooperation between blocks in a grid,
as such blocks must be able to be executed independently. When a kernel is launched the number of threads per threadblock
and the number of threadblocks is specified, this in turn defines the total number of cuda threads launched.

Each thread has access to it's integer position within it's own block as well as the integer position of the thread's
enclosing block within the grid, as displayed below. In general the thread uses this position information to read/write
to/from device global memory. In this fashion although each thread is executing the same kernel code each thread has it's
own data to operate on.

(from stack overflow)
# Calculations
#### Hardware
If a GPU device has, for example, 4 multiprocessing units, and they can run 768 threads each: then at a given moment no more than 4*768 threads will be really running in parallel (if you planned more threads, they will be waiting their turn).

#### Software

threads are organized in blocks. A block is executed by a multiprocessing unit. The threads of a block can be indentified (indexed) using 1Dimension(x), 2Dimensions (x,y) or 3Dim indexes (x,y,z) but in any case xyz <= 768 for our example (other restrictions apply to x,y,z, see the guide and your device capability).

Obviously, if you need more than those 4*768 threads you need more than 4 blocks. Blocks may be also indexed 1D, 2D or 3D. There is a queue of blocks waiting to enter the GPU (because, in our example, the GPU has 4 multiprocessors and only 4 blocks are being executed simultaneously).

#### Now a simple case: processing a 512x512 image

Suppose we want one thread to process one pixel (i,j).

We can use blocks of 64 threads each. Then we need 512*512/64 = 4096 blocks (so to have 512x512 threads = 4096*64)

It's common to organize (to make indexing the image easier) the threads in 2D blocks having blockDim = 8 x 8 (the 64 threads per block). I prefer to call it threadsPerBlock.

dim3 threadsPerBlock(8, 8);  // 64 threads
and 2D gridDim = 64 x 64 blocks (the 4096 blocks needed). I prefer to call it numBlocks.

dim3 numBlocks(imageWidth/threadsPerBlock.x,  /* for instance 512/8 = 64*/
              imageHeight/threadsPerBlock.y);
The kernel is launched like this:

myKernel <<<numBlocks,threadsPerBlock>>>( /* params for the kernel function */ );
Finally: there will be something like "a queue of 4096 blocks", where a block is waiting to be assigned one of the multiprocessors of the GPU to get its 64 threads executed.

In the kernel the pixel (i,j) to be processed by a thread is calculated this way:

uint i = (blockIdx.x * blockDim.x) + threadIdx.x;
uint j = (blockIdx.y * blockDim.y) + threadIdx.y;

http://on-demand.gputechconf.com/gtc-express/2011/presentations/StreamsAndConcurrencyWebinar.pdf

repository: nathanie/Deep-Learning-Boot-Camp

repo_name: nathanie/Deep-Learning-Boot-Camp


text:
# Thesis Template

Basic template for reports, bachelor and master theses at the [Technische Hochschule Nürnberg Georg Simon Ohm](https://www.th-nuernberg.de/).
It is set up to be printed as a book including a coverpage.

## Important!

You need to download, fill and save-as-pdf the official [statement and copyright form](https://intern.ohmportal.de/fileadmin/Gelenkte_Doks/Abt/SZS/SB/SB_0050_FO_Pruefungsrechtliche_Erklaerung_und_Erklaerung_zur_Veroeffentlichung_der_Abschlussarbeit_public.pdf), in its most recent version.
It will be included in the final `thesis.pdf`.

## A few tips for writing your thesis:

- Create a branch for your thesis; this allows you to easily sync with upstream (this repository).
- Disable automatic hard line wrap (with newlines); use soft wrap instead. [(What's that about?)](https://stackoverflow.com/questions/319925/difference-between-hard-wrap-and-soft-wrap)
- Write one sentence per line -- this makes for nice diffs in git.
- For capitalization of headlines etc., follow the [IEEE Style Manual](https://journals.ieeeauthorcenter.ieee.org/your-role-in-article-production/ieee-editorial-style-manual/)
- Use UTF-8 encoding on your files to make special characters wörk.
- Keep your literature up to date -- add references to your bib file as you read them.

## Other resources regarding your thesis

- [Informationen und Vorlagen](https://intern.ohmportal.de/institutionen/fakultaeten/informatik/studierende/infos-zum-studium/abschlussarbeiten/informationen-und-vorlagen/page.html) (German, Ohm intranet)
- [Wie schreibe ich eine Abschlussarbeit](https://www.in.th-nuernberg.de/Professors/Weber/Abschlussarbeit%20Methodik.pdf) by Prof. Dr. Rainer Weber (German, Ohm intranet).

repository: th-nuernberg/thesis-template

gha_language: TeX

repo_name: th-nuernberg/thesis-template


text:
[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com)
[![Code Style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-green.svg)](https://conventionalcommits.org)

# questdb.io

[This website](https://questdb.io) is built using
[Docusaurus 2](https://v2.docusaurus.io/). Pages & components are written in
TypeScript, the styles in vanilla CSS with variables using
[CSS Modules](https://github.com/css-modules/css-modules).

    questdb.io

## Installation

```script
yarn
```

## Local development

```script
yarn start
```

This command starts a local development server and open up a browser window.
Most changes are reflected live without having to restart the server.

## Build for production

```script
yarn build
```

This command generates static content into the `build` directory and can be
served using any static contents hosting service. For that purpose, you can also
use:

```script
yarn serve
```

# Contributing

Feel free to contribute to the project by forking the repository and submitting
pull requests.

## Guidelines

Consult the
[guidelines](https://github.com/questdb/questdb.io/blob/master/docs/__guidelines/markdown.md).

## Lexicon

Consult the
[lexicon](https://github.com/questdb/questdb.io/blob/master/docs/__guidelines/lexicon.md)
for terminology we commonly use

## Commits

The commit messages must follow the
[Conventional Commits](https://conventionalcommits.org/) spec.

# Code Quality

## 1. Linting

The coding style rules are defined by [Prettier](https://prettier.io/) and
enforced by [Eslint](https://eslint.org)

On top of this, we follow the rules set by the
[JavaScript Standard Style](https://standardjs.com/rules.html).

You do not need to run the linting task manually, Webpack will take care of that
for you.

## 2. Git Hooks

We use [Husky](https://github.com/typicode/husky) to automatically deploy git
hooks.

On every `git commit` we check that images added to `static/img/*` do not exceed
10MB.

repository: yidengliangmin/-

repo_name: yidengliangmin/-


text:
# 99 Problems and NP Aint an Element of the Subsets

While the trivial recursive solution to the problem would be easy to iterate over, efficiently solutions at scale will involve some more complex handling.  Also, the interest of a _demonstration_ means addressing more issues with detail.

### Context

In the interest of a fair self-evaluation, I have avoided reading any literature on the topic, including the XKCD forums, as they're surely rife with answers.  I have re-read the header of the wikipedia article, to ensure that I didn't forget anything foundational from my CS coursework.

### Demonstration Breadth

Since this exercise is principally one to demonstrate code thinking, it's reasonable to write several solutions, and include a profiling module for benchmarking the execution.

I've also not decided to search for all solutions, vs whatever is the first hit.

The most trivial answer will be when any menu item is an even denominator do the total target spent.  Since this requires no recursion or cache/branch solutions, I think it's reasonable to have a minimal check for such, before searching for a 'variety' solution.

For a class that can handle a wide range of problem-spaces, an optimal strategy may attempt some cursory analysis of the input, before deciding a strategy.

So this leaves us with:

#### Problem Cases

*Each in need of an algorithm*

* trivial cases
* basic recursion
* cache solutions
* branching solutions

#### Sidecars

* time benchmarking
* input generator
  * input constraints
* tests

## Next

* Make `Menu` a class, to handle generation, parsing, etc
* Make a `Profiler` class to start generically handling the calculation of the problem space
* `FoodOrder` should be concerned with the _strategy_ of which of its Search tools it can use.

I think after this, we have enough to generically profile any `search` function, and attach the performance metadata to it.  This can be stored as training data, so that newly-available `search` functions can be categorized for use, or excluded, based on profile.

gha_language: Ruby


text:
+++
title = "About Chef Workstation"
[menu]
  [menu.docs]
    parent = "Chef Workstation"
    weight= "30"
+++

Start your infrastructure automation quickly and easily with Chef Workstation.
Chef Workstation gives you everything you need to get started with Chef — ad hoc
remote execution, remote scanning, configuration tasks, cookbook creation tools
as well as robust dependency and testing software — all in one easy-to-install
package.

Chef Workstation replaces ChefDK, combining all the existing features with
new features, such as ad-hoc task support and the new Chef Workstation desktop
application. Chef will continue to maintain ChefDK, but new development will
take place in Chef Workstation without backporting features.

## Open Source

We're keeping the tradition of open source development in Chef. You'll find the
Chef Workstation source code on
[GitHub](https://github.com/chef/chef-workstation). We're releasing Chef
Workstation under the open source [Apache 2.0
license](https://github.com/chef/chef-workstation/blob/master/LICENSE).

### Contributing to Chef Workstation

We always welcome (and deeply appreciate!) new contributions to the project.
The best way to start contributing to Chef Workstation is to provide us with
in-depth feedback by creating GitHub issues.

See the [Community Contribution Guidelines](https://docs.chef.io/community_contributions.html)
and our [community guidelines](https://docs.chef.io/community_guidelines.html) for
keeping the development of the project awesome for all contributors.

## Supported Platforms

Supported Host Operating Systems:

| Platform                         | Version  |
| -------------                    | -----:|
| Apple macOS                      | 10.11, 10.12, 10.13|
| Microsoft Windows                | 10, Server 2008 R2, Server 2012, Server 2012 R2, Server 2016 |
| Red Hat Enterprise Linux / CentOS| 6.x, 7.x |
| SUSE Enterprise Linux Server     | 11 SP4, 12 SP1+ |
| Ubuntu                           | 14.04, 16.04, 18.04 |
| Debian                           | 7.x, 8.x, 9.x |

Supported Target Operating Systems:

| Platform                         | Version  |
| -------------                    | -----:|
| Microsoft Windows                | 10, Server 2008 R2, Server 2012, Server 2012 R2, Server 2016 |
| Red Hat Enterprise Linux         | 6.x, 7.x |
| SUSE Enterprise Linux Server     | 11 SP4, 12 SP1+ |
| Ubuntu                           | 14.04, 16.04, 18.04 |
| Debian                           | 7.x, 8.x, 9.x |

## System Requirements

### Chef Workstation

#### Minimum

* RAM: 2GB
* Disk: 4GB
* Running minimum settings may limit your ability to take advantage of Chef
  Workstation tools such as Test Kitchen which creates and manages virtualized
  test environments.

#### Recommended

* RAM: 4GB
* Disk 8GB

#### Chef Workstation App

* Windows: No additional requirements
* Mac: No additional requirements
* Linux:
  * You must have a graphical window manager running
  * Additional libraries may be required. See [Running the Chef Workstation App]({{< ref "chef-workstation-app.md#linux" >}})
    for more details.

repository: ls-brentsmith/chef-workstation

repo_name: ls-brentsmith/chef-workstation


text:
# Domainos

[![Latest Stable Version](https://poser.pugx.org/mojoblanco/domainos/v/stable)](https://packagist.org/packages/mojoblanco/domainos)
[![Total Downloads](https://poser.pugx.org/mojoblanco/domainos/downloads)](https://packagist.org/packages/mojoblanco/domainos)
[![Latest Unstable Version](https://poser.pugx.org/mojoblanco/domainos/v/unstable)](https://packagist.org/packages/mojoblanco/domainos)
[![License](https://poser.pugx.org/mojoblanco/domainos/license)](https://packagist.org/packages/mojoblanco/domainos)

A laravel package for allowing or blocking specific email domains

## Installation
Open your terminal or command prompt, go to the root directory of your Laravel project, then follow the following steps.

1. Run
    ```
    composer require mojoblanco/domainos
    ```

2. Add the provider to the providers array in config/app.php

   _If you are using laravel 5.5, you don't need to place the code below_
    ```
    Mojoblanco\Domainos\DomainosServiceProvider::class,
    ```

3. Run ```composer dump-autoload```

4. Publish the config file
    ```
    php artisan vendor:publish --provider="Mojoblanco\Domainos\DomainosServiceProvider" --tag="config"
    ```

## Usage
1. Go to the `config/domainos.php` file and customize it.
There are two options;

`block` is for blacklisting domains,

`allow` is for whitelisting.

2. Go to the validation of the email address and add the following
```
'email' => 'domainos:allow'
```

3. Test the validation

### Notice
This package can be very useful when you want to prevent or allow specific email addresses during user registration.

### How can you thank me?
You can like this repo, follow me on [github](https://github.com/mojoblanco) and [twitter](https://twitter.com/themojoblanco)
Thanks.

repository: mojoblanco/domainos

gha_language: PHP

repo_name: mojoblanco/domainos


text:
# fpingx

![Language](https://img.shields.io/badge/language-Swift%205-green.svg)
[![CocoaPods](https://img.shields.io/cocoapods/v/fpingx.svg)]()
[![Carthage Compatible](https://img.shields.io/badge/Carthage-✓-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![CocoaPods](https://img.shields.io/cocoapods/p/fpingx.svg)]()

A wrapper of [fping](https://github.com/schweikert/fping) which is a high performance ping tool. More information about fping is available [here](https://fping.org/).

## Installation

### CocoaPods

add the following line to your Podfile:

``` ruby
pod "fpingx"
```

### Carthage

```
github "jzau/fpingx"
```

## Usage

``` swift
import fpingx

fpingx.ping(hosts: ["google.com", "baidu.com", "apple.com", "abc.c"], progress: { (progress) in
    print(progress)
}) { (result) in
    print(result)
}
```

The `progress` is a float number between 0-1.

The `result` is a dictionary which key is host string, value is `FpingxResult`.

Notice that FpingxResult is a struct defined as:

``` swift
public struct FpingxResult {

    public let host: String

    /// number of sent
    public let xmt: Int

    /// number of received
    public let rcv: Int

    /// loss percentage (value from 0-100)
    public var loss: Int {
        return xmt > 0 ? (xmt - rcv) * 100 / xmt : 0
    }

    /// nil if rcv is 0
    public let avg: Int?

    /// nil if rcv is 0
    public let min: Int?

    /// nil if rcv is 0
    public let max: Int?

}

```

## Author

[jzau](https://github.com/jzau) (Twitter: [@Jie](https://twitter.com/jzzzau))

## Credits of fping

Current maintainer: David Schweikert<EMAIL_ADDRESS>
The original author: Roland Schemers<EMAIL_ADDRESS>Previous maintainer: RL "Bob" Morgan<EMAIL_ADDRESS>Initial IPv6 Support: Jeroen Massar<EMAIL_ADDRESS>/<EMAIL_ADDRESS>Other contributors: see ChangeLog

repository: jzau/fpingx

gha_language: C

repo_name: jzau/fpingx


text:
Server-Side-React

## About Repository

Server-Side-React is ReactJS boilerplate with Redux and server side rendering. The boilerplate containing modern web development tools such as Webpack, Babel and Nodemon.

## Quick start

1. Clone this repo using `git clone https://github.com/david-babunashvili/Server-Side-React.git`
2. Move to the appropriate directory: `cd Server-Side-React`.
3. Run `npm install` to install dependencies.
4. Run `npm start` to start the development server.
5. Run `npm run build` to build production version.
6. Run `npm run serv` to run node server.

repository: Babunashvili/Server-Side-React

repo_name: Babunashvili/Server-Side-React


text:
---
layout: post
title:  Super massive content update
---

Gutted just about every page on the site. There’s more of a focus on trim information without a lot of BS.  Rewrote / updated the text on some pages to update their accuracy and revamp based on my own writing skills progressing. Oh, I also wrote this bitchin’ age calculator plugin for Smarty:

	<?php

	/**
	 * Smarty Age Calculator for PICKLES
	 *
	 * PICKLES is free software: you can redistribute it and/or modify
	 * it under the terms of the GNU Lesser General Public License as
	 * published by the Free Software Foundation, either version 3 of
	 * the License, or (at your option) any later version.
	 *
	 * PICKLES is distributed in the hope that it will be useful,
	 * but WITHOUT ANY WARRANTY; without even the implied warranty of
	 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	 * GNU Lesser General Public License for more details.
	 *
	 * You should have received a copy of the GNU Lesser General Public
	 * License along with PICKLES.  If not, see
	 * <http://www.gnu.org/licenses/>.
	 *
	 * @author	Joshua John Sherman<EMAIL_ADDRESS>	 * @copyright Copyright 2009 Joshua John Sherman
	 * @link	  http://phpwithpickles.org
	 * @license   http://www.gnu.org/copyleft/lesser.html
	 * @package   PICKLES
	 */

	/**
	 * Smarty Function: age
	 *
	 * Pass it a date, it spits back an age.
	 *
	 * @param  array Parameters array
	 * @param  object Smarty object
	 * @return integer calculated age
	 * @usage  <code>{age dob="1981-02-23"}</code>
	 */
	function smarty_function_age($params, &$smarty)
	{
		// Checks for our parameter
		if (empty($params['dob']))
		{
			$smarty->trigger_error('assign: missing \'dob\' parameter');
		}
		else
		{
			// Breaks the date apart
			list($dob_year, $dob_month, $dob_day) = split('-', $params['dob'], 3);

			// Determines the age regardless of the day
			$age = date('Y') - $dob_year;

			// If today's month day is less than the DOB then decrement
			if (date('md') < $dob_month . $dob_day)
			{
				$age--;
			}

			// Returns the age
			return $age;
		}
	}

	?>


text:
# yp.ca-scrape
Scrapes the [Yellowpages Canada web site](yp.ca) for specific business types in a city and output as CSV.

This node.js based scraper uses [x-ray](https://www.npmjs.com/package/x-ray) to extract specific attributes from the yp.ca results page.

The yp.ca result page has an infinite scrolling feature for pagination - the scraper uses x-ray's built-in paginate directive to extract all the results in one shot.

The business types are setup in the searchTerms array, and the city and province are setup in the URLsuffix variable.


text:
# ALLIES: New Woking's military support

Posted by: new_woking

Nations involved: Samsonia3, NOPS

Early this morning, it was announced that NOPS nations were to launch a militaristic attack towards Samonia3's base in Portmany. Many allies have already landed in the area, and New Woking will be following shortly.

"During the early hours of the morning, our brave troops marched on through unmarked territories to supply our allies with the help they need." The defense minister speaks out. "We sent the our military towards Boston, where we were able to deploy our troops overseas."

Due to a geographical disadvantage, New Woking hasn't been able to send as many troops as desired, as they don't have a port accessible to the ocean, and their planes can't carry more than 40 soldiers at a time.


text:
# apodbot

Astronomy Picture of the Day Slack Bot

## Purpose

Post the image and text from [apod.nasa.gov](https://apod.nasa.gov) each day to Slack channel. We acknowledge that several projects already exist that do the same thing, but we wanted to learn how to do it ourselves.

## Usage

This code relies on the following packages: `slackclient`, `urllib2`, `json`, `uuid`, `re`, and `datetime`.

## People

This project was a [Dunlap Institute](https://dunlap.utoronto.ca) retreat hack done by [Bob Abraham](https://github.com/robertoabraham), [Suresh Sivanandam](https://github.com/fudgefactor), [Bryan Gaensler](https://github.com/bgaensler), [Anna O'Grady](https://github.com/AnnaOG), [Tina Peters](https://github.com/tinapeters), and [Keith Vanderlinde ](https://github.com/kvand).

## License, Contributing etc

The code in this repo is available for re-use under the MIT license, which means that you can do whatever you like with it, just don't blame us. If you are interested in this project, please do drop us a line via the hyperlinked contact names above, or by [writing us an issue](https://github.com/robertoabraham/apodbot/issues).

repository: robertoabraham/apodbot

repo_name: robertoabraham/apodbot


text:
[![Latest Stable Version](https://poser.pugx.org/mouf/html.template.templateinterface/v/stable.svg)](https://packagist.org/packages/mouf/html.template.templateinterface)
[![Total Downloads](https://poser.pugx.org/mouf/html.template.templateinterface/downloads.svg)](https://packagist.org/packages/mouf/html.template.templateinterface)
[![Latest Unstable Version](https://poser.pugx.org/mouf/html.template.templateinterface/v/unstable)](https://packagist.org/packages/mouf/html.template.templateinterface)
[![License](https://poser.pugx.org/mouf/html.template.templateinterface/license)](https://packagist.org/packages/mouf/html.template.templateinterface)
[![Build Status](https://travis-ci.org/thecodingmachine/html.template.templateinterface.svg?branch=3.0)](https://travis-ci.org/thecodingmachine/html.template.templateinterface)
[![Coverage Status](https://coveralls.io/repos/thecodingmachine/html.template.templateinterface/badge.svg?branch=3.0&service=github)](https://coveralls.io/github/thecodingmachine/html.template.templateinterface?branch=3.0)

TemplateInterface: a base interface to manage HTML templates in your project
============================================================================

TemplateInterface is a [Mouf package](http://mouf-php.com) that is the base building block of all HTML templates in Mouf.

You can use it without Mouf, but most of the time, you will use Mouf and its install process to get quickly started.
Also, most of the time, you will not use the TemplateInterface package directly. Instead, you will use a Mouf template that is built using the TemplateInterface.

When you use a template object that implements TemplateInterface, you know this:
- The object has a "toHtml" method that will trigger the HTML output of the template. Call this method, and your template is displayed.
- The object has a "setTitle" method to set the title of the page.
- The object has a "getWebLibraryManager" method that returns a [web library manager](https://github.com/thecodingmachine/html.utils.weblibrarymanager).
  The WebLibraryManager can be used to add JS/CSS files to your template.

Depending on the template you will use, there will be one or more zones (main content, left menu, header, etc...)
This is *template specific*. If you use Mouf, each zone of the template will be represented by a HtmlBlock object.
You will directly access this block to add content in it.

Here is a sample pseudo code:

```php
// Let's access the "content" block:
Mouf::getContent()->addText("Hello world!");

// Let's write the template:
Mouf::getTemplate()->toHtml();
```

Internally, the template uses the "content" block, but you should not care about it.


text:
# Rubocop Composite Github Action

This action runs natively on the host instead of being in a docker. Internally it uses [setup-ruby](https://github.com/actions/setup-ruby) and [setup-python](https://github.com/actions/setup-python). Why `setup-python` you may ask: because I like python better than ruby, that's all.

It allows you to choose the `ruby-version` and the `rubocop-version` to be installed. **TODO**: Ideally this would have been part of the action itself, but composite actions **do not** support `uses` at the moment. **So you must use setup-ruby and setup-python yourself** before calling the action. [See actions/runner#646](https://github.com/actions/runner/issues/646)

It will run rubocop, and use the github REST API to create a check-runs that will add annotations to your code where warning and failures where found.

The idea of using a composite action rather than a docker is it will pull ruby and python from the host's cache instead of having to build the docker, which should be faster.
Also, technically speaking, if you wanted to integrate this rubocop call into a workflow that runs on anything but linux it would work as well, whereas docker-based actions are limited
to Linux hosts.

## Usage

Here is an example workflow `rubocop.yml` that you could use in your project. Note that you need Python 3.8+ as I'm using f-strings.

Note that if rubocop is already installed on your host, it will not install it again.

```
name: Rubocop
on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master, develop ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:

    - uses: actions/checkout@v2

    - uses: actions/setup-ruby@v1
      with:
        ruby-version: 2.5

    - uses: actions/setup-python@v2
      with:
        python-version: 3.8

    - name: Run Rubocop
      uses: jmarrec/rubocop-composite-action@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
        rubocop-version: '0.80.1'
        # ruby-version: '2.5'
```

There is also an `autocorrect` argument that will run `rubocop --auto-correct` first if set to `true`. Defaults to `false`.
If you set this to `true`, you can also use `commit-auto-correct` set to `true` to that the resulting auto-corrected files are pushed to your branch

```
name: Rubocop
on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master, develop ]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout for PR
      if: ${{ github.event_name == 'pull_request' }}
      uses: actions/checkout@v2
      with:
        ref: ${{ github.event.pull_request.head.sha }}  # Checkout the PR branch instead of the merge commit

    - name: Checkout for push
      if: ${{ github.event_name != 'pull_request' }}
      uses: actions/checkout@v2

    - uses: actions/setup-ruby@v1
      with:
        ruby-version: 2.5

    - uses: actions/setup-python@v2
      with:
        python-version: 3.8

    - name: Run rubocop
      id: rubocop
      uses: jmarrec/rubocop-composite-action@v1
      with:
        autocorrect: true
        commit-auto-correct: true
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

repository: jmarrec/rubocop-composite-action

repo_name: jmarrec/rubocop-composite-action


text:
# 1011. [中等] 在 D 天内送达包裹的能力

**题目链接：**[https://leetcode-cn.com/problems/capacity-to-ship-packages-within-d-days](https://leetcode-cn.com/problems/capacity-to-ship-packages-within-d-days)

---

<Cards card="leetcode_1011_capacity-to-ship-packages-within-d-days"></Cards>

---

```java
class Solution {
    public int shipWithinDays(int[] weights, int D) {

    }
}
```

repository: gujiacun/Leetcode-Hub

repo_name: gujiacun/Leetcode-Hub


text:
---
layout: post
authors: ["Juan Steyn"]
title: "Juan Steyn: Nomination for 2018 Steering Committee"
date: 2017-11-09
time: "00:00:00"
tags: ["Steering Committee"]
---

### 2018 Election: Juan Steyn

Hi! I'm Juan Steyn, currently employed at
the [South African Centre for Digital Language Resources](http://humanities.nwu.ac.za/unit-languages-and-literature-sa-context/sadilar)
as project manager. I'm an enabler at heart and I want to contribute and give back to the African and international
Carpentry community. I especially want to help ensure that the core values of the Carpentries get transferred and
integrated into how our workshops are conducted within new loci. Africa has **A LOT** of potential and I would like to
play my part to enable and catalyze this potential into action.

#### My involvement with the Carpentries

The first Software Carpentry workshop I attended was organised by [Anelda van der Walt](https://twitter.com/aneldavdw)
towards the end of 2015. This workshop provided me with a foundation to try new things when it came to
programming and working with data.

In 2016, I completed my instructor training and during my instructor checkout demo session the "penny dropped".
During this session at 1 AM in the morning, it was an inspiring experience to see how people connecting
from four different continents shared similar approaches and cared about the same thing.
At that point, I started to appreciate the potential of the Carpentries' approach to enable and
grow communities from the bottom up.  You do not need to be a tenured professor or a manager or
anybody "important". You only need to be yourself and volunteer a bit of your time to make a
difference and get a wealth of experience and life lessons in return.

During 2017, I got more involved with workshop organisation. I also joined the mentoring sub-committee
and completed my Trainer training in September. To date, I've been involved with more than seven carpentry instructor
events as instructor, host, helper, co-planner, mentor and trainer trainer.

I'm also an advocate for the Carpentries approach, especially in growing computation capacity within the commons
of Digital Humanities in Southern Africa as well as its potential to be a vehicle to introduce the workshop
participant to digital scholarship and e-research.

I am also involved in the second round of Carpentry mentorship groups in order to contribute back
to the community and further grow initiatives and support structures for Africa.

#### Going forward

With the Carpentries expanding into new under-represented environments, cultures and languages, I believe it is
important to emphasize the role of mentorship to transfer core values and approaches.
In the African context, it is our experience that firstly a context-specific understanding
is required to host successful workshops.  Secondly, it is important to share knowledge and
especially the "ways of doing" through hands-on mentorship. I believe this is essential to
successfully expand the Carpentries community further into new territories.

As [Bruce Becker](https://twitter.com/brusisceddu) recently [tweeted](https://twitter.com/brusisceddu/status/926346054097952769):

"What did we learn from [@aneldavdw](https://twitter.com/aneldavdw) at [#UC2017](https://twitter.com/search?q=%23UC2017&src=typd)? Get up and do something. Your ripple might raise a tide."

So let's get up and start our ripples ...

repository: swcarpentry/website

branch_name: refs/heads/main

gha_language: HTML

repo_name: swcarpentry/website


text:
# Figuring Things Out
---
February, 17, 2018

I started to organise the 'v' values:
- I copied the first 50 values into another Notepad++ document
- I then removed the 'vn' values, and ended up with 25 'v' values
- Then I changed the data from three columns into three rows by copying them into excell
- I then copied these rows of data individually into the Pitch Input of [Musical Algorithms](http://www.musicalgorithms.org/3.2/)
- I played around with different decimal places and ways of representing the values

I found that using 25 values was too short and decided to create a longer final sonified piece.

path: /process notes/Process Notes 3.md

filename: Process Notes 3.md


text:
//[astronomy](../../index.md)/[io.github.cosinekitty.astronomy](index.md)/[searchPeakMagnitude](search-peak-magnitude.md)

# searchPeakMagnitude

fun [searchPeakMagnitude](search-peak-magnitude.md)(body: [Body](-body/index.md), startTime: [Time](-time/index.md)): [IlluminationInfo](-illumination-info/index.md)

Searches for the date and time Venus will next appear brightest as seen from the Earth.

This function searches for the date and time Venus appears brightest as seen from the Earth. Currently only Venus is supported for the body parameter, though this could change in the future.  Planets other than Venus and Mercury reach peak magnitude at opposition, which can be found using [searchRelativeLongitude](search-relative-longitude.md). The Moon reaches peak magnitude at full moon, which can be found using [searchMoonQuarter](search-moon-quarter.md) or [searchMoonPhase](search-moon-phase.md). The Sun reaches peak magnitude at perihelion, which occurs each year in January. However, the difference is minor and has little practical value.

## Parameters

| | |
|---|---|
| body | Currently only [Body.Venus](-body/-venus/index.md) is allowed. Any other value causes an exception. |
| startTime | The date and time to start searching for the next peak magnitude event. |

repository: cosinekitty/astronomy

repo_name: cosinekitty/astronomy


text:
# Changelog

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

## Release 1.1.0 (2021-03-29)

[Full Changelog](https://github.com/webalexeu/puppet-windows_firewall/compare/v1.0.1...v1.1.0)

**Features**

- local_user, remote_user and remote_machine are now based on user/group name. Automatic NAME to SID lookup is performed in order to generate the correct SDDL string required for those variables (Those variables are hash variables. Previously string variables)

**Bugfixes**

**Known Issues**

## Release 1.0.1 (2021-03-23)

[Full Changelog](https://github.com/webalexeu/puppet-windows_firewall/compare/v1.0.0...v1.0.1)

**Features**

- Removing support for: 2008 Server/2008R2 Server/2012 Server/Windows 7

**Bugfixes**

- [Update of rule not working when using square brackets in the name](https://github.com/webalexeu/puppet-windows_firewall/issues/6)

**Known Issues**

## Release 1.0.0 (2021-03-22)

[Full Changelog](https://github.com/webalexeu/puppet-windows_firewall/compare/v0.2.0...v1.0.0)

**Features**

- Add update function for rules. Previously, in case of firewall rule parameters change, rule was deleted and created with new parameters, now rule is in-place updated (Only firewall rule name change will trigger a delete/create process)

**Bugfixes**

**Known Issues**

## Release 0.2.0 (2020-12-18)

[Full Changelog](https://github.com/webalexeu/puppet-windows_firewall/compare/v0.1.0...v0.2.0)

**Features**

- Listing of rules is now based on PowerShell (Previously netsh)

**Bugfixes**

**Known Issues**

## Release 0.1.0 (2020-12-17)

**Features**

- Initial Release (Forked from https://github.com/GeoffWilliams/puppet-windows_firewall)
- Add management of Connection Security Rules (IPsec)

**Bugfixes**

**Known Issues**

repository: MG-Puppet/projectwerk

repo_name: MG-Puppet/projectwerk


text:
# Thelopsis Nyl. GENUS

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Mém. Soc. natn. Sci. nat. math. Cherbourg 3: 194 (1855)

#### Original name
Thelopsis Nyl.

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
## Objectives
Quantify a gene within DNA or RNA using quantitative real-time PCR

## Materials
1. qPCR master mix (SsoAdvanced Universal SYBR® Green Supermix)
2. Forward and reverse primers for gene of interest
3. Standard for gene of interest compatible with the primers
4. Molecular grade water
5. 96-well plate (use a plate specifically for qPCR, others do not work)
6. Plate seal (use a plate seal specifically for qPCR, others do not work)
7. Pipets
8. Pipet tips, filtered preferable with DNA, required with RNA
9. 70% ethanol for cleaning

## Procedures
### Clean work area
1. Wipe your work area with 70% ethanol. qPCR is VERY sensitive. Keep your work area SUPER CLEAN. If you work with RNA, all your work MUST be done in a biosafety cabinet.

### Prepare primers

Each qPCR run needs fresh primers.  The costs of primers is much less than the 96 tubes of reagants so be thoughtful!

1. Stock solution: If the primer is still powdered, resuspend it in TE buffer or water to make a 100 µM solution. For example, for 20.91 nmol of powdered primer, add 209.1 µL of TE buffer or water. It is best practice to divide your stock solution into several aliquots to minimize the number of freeze-thaw cycles and contamination risk. The stock solution(s) should be stored at -80°C and you should remove only what you need. Be courteous if you are digging through the freezer and make sure other people's stocks are kept frozen at all times.

2. Working solution: Make a 1:10 dilution. For example, add 10 µL of stock solution to 90 µL water. The concentration of your primer working solution will be 10 µM. Store leftover working solution at -20°C.

3. Each qPCR reaction will require 1 µL of each primer. If your reaction volume is 20 µL, the final concentration of your primer in the reaction will be 500 nM. Optimal reaction concentrations are considered to be from 250-500 nM.

### Prepare Control / Standard
1. Stock solution: If the standard is still powdered, resuspend it in TE buffer to make a 10 ng/µL solution. For example, for 500 ng of powdered standard, add 50 µL TE buffer. Vortex briefly, then incubate the tube in a 50°C water bath for 20 min. It is best practice to divide your stock solution into several aliquots to minimize the number of freeze-thaw cycles and contamination risk. The stock solution(s) should be stored at -80°C and you should remove only what you need. Be courteous if you are digging through the freezer and make sure other people's stocks are kept frozen at all times.

2. Working solutions: Make 7 serial dilutions of your standard, each 1:10. Please look up how to perform a serial dilution if you are unsure how to do so. It may take a couple runs to determine the best range of dilutions to use. Using your first dilution as your most concentrated standard is a good place to start.

3. Diluted standard solutions degrade quickly and easily. It is CRITICAL to make a fresh serial dilutions from frozen stock each day and keep the dilutions cold between uses. Minimize the number of freeze-thaw cycles for your stock solution.

### Prepare sample
1. Determine the concentration of the samples, for example, using [Quant-iT](https://github.com/germs-lab/SOPs/blob/master/DNA_SOPs/Quant-iT_dsDNA_Assay.md). Preferred sample concentrations are between 500 ng - 50 pg. The final concentration in the reaction will be 50 ng - 5 pg.

### Prepare mix
* Master Mix : 10 µL
* Water: 6 µL
* F Primer: 1 µL
* R Primer: 1 µL
* Sample : 2 µL
* Total : 20 µL

1. Make mix

| ingredients | full plate | half plate |
| :--------- | --------- | ---------: |
| Master Mix | 1000 µL | 500 µL |
| Water | 600 µL | 300 µL |
| F Primer | 100 µL | 50 µL |
| R Primer | 100 µL | 50 µL |

2. Load mix into plate, 18 µL each well
3. Add standard and samples into plate, 2 µL each well. Each standard and sample should be added in triplicate.
4. Seal tightly to prevent evaporation.
5. Spin briefly to ensure all liquid is at the bottom of the well and there are no bubbles. Spin again if this is not the case.

### Run
1. Load plate on to the machine
2. Start software
3. Choose protocol set temperature
4. Choose plate
5. Start run

### Clean up
1. Store leftover reagents at appropriate temperatures
2. Clean work area
3. Wipe with 70% ethanol

### Analyze
Standard curve, efficiency, etc.

repository: germs-lab/SOPs

gha_language: Roff

repo_name: germs-lab/SOPs


text:
# Using MySQL

## Using MySQL with vscode mysql extension
---
- The extension lives in the File Explorer Tab, in the MySQL section.
- Click the '+' icon.
- When prompted for hostname and username, enter "localhost" and "root", respectively. Hit enter for everything else. You should see a new connection show up.
- To write a query, right-click on the database you want to use and select "New Query", or create a `.sql` file and prepend "USE" to any queries you with to run.
- To run the query, right-click the `.sql` file and select "Run MySQL Query".
- Right-click on the connection and select refresh to see database updates reflected.
- More details on the extension: [MySQL](https://marketplace.visualstudio.com/items?itemName=formulahendry.vscode-mysql)

## Using MySQL from the command line
----
- Open a terminal, run the command `mysql` .
- You can now type in sql commands to interact with mysql server.

## Instructors: Populate the database for a new lab
---
- **DON'T modify mysql data directory (`/var/lib/mysql/`) directly.**
- Create a new lab, upload your data files (csv files, sql dump files etc.) and sql files to `/home/coder/project` (or any other mount point that is not `/var/lib/mysql`).
- Open the instructor lab, an empty mysql server should already be running in the background.
- Populate the database by running your sql queries, database changes will automatically be saved and made available to students when lab is published.

### Miscellaneous
---
- To restart the mysql server: find the pid for mysqld by `ps -aux | grep mysqld`, then `kill {pid}` to stop the server , `mysqld` to start the server.
- When creating a new sql users, create it with `IDENTIFIED WITH mysql_native_password` so that this user can work with the vscode mysql extension, or else you can only use this user from the command line mysql client.

repository: coursera/coursera-labs

repo_name: coursera/coursera-labs


text:
# Vapor

Here is how you setup Vapor

```swift
brew install vapor/tap/vapor
vapor new Hello
cd Hello
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
vapor xcode
```

## Trouble Shooing

### App Transport Security has blocked a cleartext HTTP (http://)

You need to allow unsecure requests from your application making the request to Vapor server. Add the following to your info.plist file.

<img src="https://github.com/jrasmusson/ios-starter-kit/blob/master/howtos/images/localhost-plist.png" alt="drawing" width="409"/>

### Exporting

Putting your existing instance of vapor under source control is a bit weird because it comes already setup in an instance of git. Worse than that however is the project doesn't like version controlling project files. You need to regenerate these yourself.

To export your instance of vapor and to put it in version control somewhere else do the following.

Goto the directory where you setup and run vapor.

Export it from git to a temp dir

`git checkout-index -a -f --prefix=/Users/jrasmusson/Downloads/temp/`

Goto that git directory and commit the files you exported there. This is bare bones vapor with no libraries (I think this is why they do that, else your project would be huge by committing all the libs).

```
git add .
git commit -m "Adding vapor"
```

Now build and test run the project. After that you can create an xcode project to debug from. Note everything you add here should be ignored via the vapor `.gitignore` file.

```bash
vapor build
vapor run
vapor xcode
```

You will now have a running setup instance of your vapor project with xcode. Feel free to version control everything from there.

### App crashing - port taken

Sometimes the port is taken. Find and kill the process by going

`sudo lsof -iTCP -sTCP:LISTEN -n -P`

then

`kill -9 PID`

### Links that help

* [Vapor models](https://docs.vapor.codes/3.0/fluent/models/)
* [Content](https://docs.vapor.codes/3.0/getting-started/content/)

repository: jrasmusson/ios-starter-kit

gha_language: Swift

repo_name: jrasmusson/ios-starter-kit


text:
Hi! I'm a Mac admin based in Austin, TX and I've uploaded some helpful scripts and configuration profiles compatible with macOS High Sierra and Mojave. You may freely use or modify anything I upload.

### Resolve an out-of-sync FileVault password with mobile AD user accounts
* There is a major bug in Mojave with AD-bound mobile user accounts. If a user's password is reset off of the Mac (like in Active Directory, Okta, or an AD-bound Windows PC) the FileVault password is never updated to reflect the password change.
* Users may report that their Keychain or account password at the login screen alternates between the old and new/current network password based on whether they are connected to the corporate network.
* `Mojave_FileVault_Sync.sh` in the scripts folder revokes and reissues a Secure Token, then updates the FileVault preboot volume
* I use a [LAPS script](https://github.com/ducksrfr/LAPSforMac) in a Jamf extended attribute at my org, so this script also pulls that password value for use with `sysadminctl`
* Members of the MacAdmins Slack report that Apple has acknowledged the issue, however a resolution date is unknown. The issue is still present as of 10.14.3.

### Mojave: Privacy Preferences Policy Control (TCC) profiles

* In macOS Mojave a user might encounter new privacy permission pop-ups when they launch apps like Microsoft Office, Parallels, Citrix, or TeamViewer.
* You can find more information about the PPPC profiles from Apple <https://help.apple.com/deployment/mdm/#/mdm38df53c2a>
* My profiles tend to focus on granting access to:
  * `SystemPolicyAllFiles`
  * `AppleEvents`
  * `Accessibility`
* You cannot pre-approve Location Services, Microphone, or Camera access.

### Scripts

The scripts folder contains helpful scripts compatible with macOS Mojave and High Sierra.

* **New** Local_pw_expiration
   * If your organization is using a configuration profile to enforce a local password expiration policy, then a user doesn't receive any proactive notification that their password is nearing expiration.
   * This script pulls the value from a [Jamf extended attribute](https://github.com/jamf/Current-User-Password-Age) (which contains the password age) and based on that value presents a "change password" warning dialogue to the user.
   * If you're not using Jamf, you can modify the script to pull the password age locally. Find the value in epoch time: `/usr/bin/dscl . -read /Users/$localUser accountPolicyData | /usr/bin/awk -F'<real>|</real>' '{print $2}' | tail -4`
   * If the user decides to reset their password, the Users & Groups pref pane will launch to allow the user to change their password.
   * This script avoids `dscl` to change the password, because that causes isses with secureToken in macOS High Sierra and Mojave
   * `osascript` simulates a click on the "Change Password..." button to take the user directly to the pw change interface. If your users are on Mojave they will need Jamf to be whitelisted for Accessibility in a [PPPC profile](https://github.com/ducksrfr/mac_admin/blob/master/Privacy%20Preferences%20Policy%20Control%20Profiles/Jamf_accessibility.mobileconfig).
   * PPPC profile will also need [Jamf whitelisted for AppleEvents to control System Events](https://github.com/rtrouton/privacy_preferences_control_profiles).
   * I'm testing a revised version with `sysadminctl` that will respect your org's password complexity policy.

* resetTCC_mic_camera
  * Resets the camera and microphone properties in the TCC database
  * Useful if an end user unintentionally denies access to the camera or microphone in a chat app like Skype, Slack, WebEx, or Lifesize.

* create_admin_user: updated script with interactive `osascript` prompts to create a new user account with `sysadminctl`

* admin_pwreset: Reset a user account password in High Sierra
  * updated script with interactive `osascript` prompts to reset a user password using `sysadminctl`

* outlook_timezone: If a user is unable to resolve time zone mismatch errors in Microsoft Outlook.

### Profiles

The profiles folder contains helpful mobileconfig files for use with your MDM service. The `PayloadRemovalDisallowed` key may be set to `-bool` value `true` or `false` depending on the profile. Please adjust the profile removal restrictions as needed when uploading to your MDM service.

* Hide 32-bit Alerts: suppresses the 32-bit compatibility warnings for legacy software in High Sierra and Mojave

* Suppress secureToken Window: suppresses the secureToken activation window that appears when an Active Directory-bound account signs into the Mac for the first time. Helpful for loaner Macs or computer lab environments

* Skip Choose Your Look: skips the Setup Assistant screen for choosing between Light and Dark mode in Mojave

* Skip Privacy Warning: skips the Setup Assistant screen for Data & Privacy in High Sierra and Mojave

* block_macosbeta: Prevents users from installing macOS beta releases

* chrome_settings: Sets some basic Chrome browser settings including:
  * preset bookmarks folder on bookmarks toolbar
  * preload Chrome extensions
  * set Java and Flash URL exceptions
  * set homepage
  * set first run tabs
  * previous versions of this profile set Chrome as the default browser, however in macOS High Sierra the user will still encounter default browser confirmation alerts regardless if that specific key is preconfigured in a profile

* Multiple Microsoft Office profiles: Settings to reduce the number of dialog windows need to configure a user account if your org is using Office 365.
  * Suppresses "new feature" alerts & autodiscover auto-acceptance alerts.
  * Suppresses user requests for diagnostic info.
  * Sets the default save location to a "local" Mac location, and not OneDrive.

* delay_updates: Delay macOS software updates by 30 days. Apple has the ability to bypass this restriction to push critical security patches.

* disable_icloud_sync: Allows users to enable iCloud Drive on their Mac, however the iCloud Documents & Desktop sync feature is disallowed

* disable_pw_change: If your users should reset their local Mac passwords using NoMAD, this restriction disables the Change Password button in System Preferences. Admins may still reset user passwords using the `sysadminctl` command or via your MDM service

* expand_dialogs: Forces the expanded save and print dialog windows in macOS

* kernelext_symantec: Allows macOS to load kernel extensions for Symantec Anti Virus 14

* nomad_example: template for deploying NoMAD in your environment

* block_profiles: Prevents users from clicking the Profiles pref pane in System Preferences

* lock_screen: multiple settings for the lock and login screens
  * sets a lock screen message (and prevents users from changing it)
  * Allows Touch ID and auto unlock with Apple Watch
  * Disables the guest account
  * Enforces fast-user switching
  * Requires a user password 5 seconds after screensaver or sleep
  * Shows the Sleep, Restart, and Shutdown buttons at the lock screen
  * Disables auto user login
  * Presents username and password fields instead of user account icons at the lock screen.
    * Note: The FileVault login screen will always show user account icons

 * menubar_icons: Hide the Siri button in the menu bar, and __always show:__
   * AirPlay
   * Wifi
   * User's full name (for fast-user switching)
   * Battery icon with percentage
   * Bluetooth __(macOS hides this by default)__
   * Clock
   * Volume __(hidden by default)__
   * VPN __(hidden by default)__

* enable_firewall: enforces the firewall, installed apps are able to receive incoming connections

### Munki_pkgsinfo

I use Munki to deploy apps and custom pkgs at my organization. Munki supports `startosinstall` to re-image already-deployed Macs.

* An admin (or the user) visits Managed Software Center and downloads the macOS installer as an `OnDemand` `optional_install`
* Munki supports the `startosinstall` command, I add additional flags like...
  * `--eraseinstall`
  * `--agreetolicense`
  * `--nointeraction`
  * `--installpackage` (can be used multiple times, but keep the total number of pkgs and file sizes to a minimum)
  * `--newvolumename`


text:
flip.js
=======

Mobile first, flat style JavaScript Page Flip Library. Cross browser support, and works on most desktop browsers.

This library creates a page folding effect using a flat visual style. No curling effects are used, and shadows are kept to a minimum.

<EMAIL_ADDRESS>
Examples
--------

[Basic Example](http://www.terrill.ca/flipjs/basic-book/)

[Advanced Example](http://www.terrill.ca/illustrations/)

Basic Example
-----------

First import the CSS and JS files from the '/dist' directory into your project.

The easiest way to get started is by calling `flip.basic(element)`. It expects the provided element to have a single child containing all the pages in the book, as in the example below.

```
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link rel='stylesheet' type='text/css' media='all' href='flip.css'>
</head>
<body>

<div id="book" class="flip-book">
    <div>
        <div><h1>Title Page</h1></div>
        <div><h2>Page Two Content</h2></div>
        <div>Page Three Content</div>
        <div>Page Four Content</div>
        <div>Page Fiv Content</div>
    </div>
</div>

<script type='text/javascript' src='flip-v1.0.0.js'></script>
<script type='text/javascript'>
    window.addEventListener( 'DOMContentLoaded', function(){
        flip.basic( 'book' );
    }, true );
</script>
</body>
</html>
```

Advanced Usage
--------------

Advanced usage example coming soon.

API
===

### flip.basic(bookElement)
Creates a flip book using the contents of the provided element. Expects provided element to have a single child element that contains all the pages. This is wrapper, and the easiest way to build a book. No need to look at the rest of the API if this works for you.

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

### flip.init(bookElement, firstPage)
Creates a flip book using the contents of the provided element. Expects provided element to have a single child element that contains all the pages. `firstPage` is an object created by flip.page.create().

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

### flip.prime(nextPage)
Creates a flip book using the contents of the provided element. Expects provided element to have a single child element that contains all the pages.

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

### flip.getStackHeight()
Returns the height of the page stack

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

### flip.push(page)
Push a new page immediately onto the book, and transition it into view.

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

### flip.pop()
Go back one page and pop the current page off the stack.

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

### flip.close()
Close the book and return to the first page, removing all other pages from stack.

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

### flip.page.create(pageContentElement, listener)
Creates a page for the book with the provided content element. The optional page event listener parameter expects an object with functions named the following (all optional):

    ```
    {
        onObscure:      function(){},
        onStay:         function(){},
        onShowComplete: function(index){}
    }
    ```

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

Limitations
-----------

Making changes to page content during a transition is not handled very well. The library creates a shadow copy of the original HTML for use while flipping. Modifying the page during transit can result in a partial rendering. It's best to modify pages after flipping is complete. You can register a callback for the end of various animation events with the API.

Build Instructions
------------------

You can build the library yourself using npm and grunt. Clone the repo, then run the `grunt` command from the root directory. It will produce output in the `/dist/` folder.

```
npm install
grunt
```

Looking for a JavaScript Wizard?
------------------

This library was made by Terrill Dent. [I am available for hire, or consulting](http://www.terrill.ca/about/). Get in touch and let's work together!

repository: tied/DevArtifacts

repo_name: tied/DevArtifacts


text:
# Build Guide
***
This is a walkthrough to manually build the install files for auter. This is not the release process, this is specifically for building the .rpm or .deb files for testing purposes.

**Better way of generating the files:**
- Install docker-ce on your PC
- from the auter directory execute the following:
  - For rpm file:
  ```# tests/10-rpmbuild.sh```
  - For deb file (This is only once PR#119 has been merged):
  ```# 20-debuild.sh```

# Manual steps
****
**Steps to create a .deb file:**
1) Build a debian 9 cloud server
2) Update the system and reboot:
    ```
    # apt-get update && apt-get upgrade
    # reboot
    ```
3) Install the required tools:
    ```
    # apt-get update && apt install debhelper devscripts build-essential vim dh-make help2man
    ```

4) Create a build user and switch to that account
notes:
- "adduser" NOT "useradd"
- Use a valid password
- Other details can be blanks
    ```
    # adduser builder
    # su - builder
    ```
5) Clone the auter repo and switch to the required tagged version:
    ```
    # git clone git@github.com:rackerlabs/auter.git
    # cd auter
    # git checkout <TAG>          eg: git checkout 0.11
    ```
6) Make the sources files
    ```
    # make deb
    # cd auter-<TAG>
    ```
7) build the package:
    7.a) To build an unsigned package:
    ```
    # debuild -us -uc
    ```
    7.b) To build a gpg signed package:
    ```
    # debuild -S -sa -k$(gpg --list-key --with-colons | awk -F: '/^pub:/ { print $5 }')
    ```
***
**Steps to create a .rpm file:**
1) Build a CentOS cloud server (6 or 7)

2) Install the required packages:
    ```
    yum -y install rpm-build elfutils-libelf rpm-libs rpm-python gcc make help2man sudo
    ```
3) Add a build user:
    ```
    useradd builduser
    ```
4) Make the build directories:
    ```
    mkdir -p /home/builduser/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
    ```
5) Create the .macros config:
    ```
    echo '%_topdir %(echo $HOME)/rpmbuild' > /home/builduser/.rpmmacros
    ```
6) Clone the auter repo and switch to the required tagged version:
    ```
    # git clone git@github.com:rackerlabs/auter.git
    # cd auter
    # git checkout <TAG>          eg: git checkout 0.11
    ```
7) Make the sources files and copy them to /home/builduser:
    ```
    make sources
    cp auter-*.tar.gz /home/builduser/
    cp auter.spec /home/builduser/rpmbuild/SPECS
    chown -R builduser.builduser /home/builduser
    ```
8) Switch to the builduser account and extract the sources
    ```
    su - builduser
    cd /home/builduser
    ```
9) Move the sources into the correct location with the correct sources name
    ```
    mv auter*.tar.gz /home/builduser/rpmbuild/SOURCES/$(awk '/Version/ {print $2}' /home/builduser/rpmbuild/SPECS/auter.spec).tar.gz
    ```
10) Start building the rpm
    ```
    cd /home/builduser/rpmbuild/SPECS
    rpmbuild -ba auter.spec
    ```
***

repository: rackerlabs/auter

branch_name: refs/heads/develop

gha_language: Shell

repo_name: rackerlabs/auter