text:
# VAMPIRE

VAMPIRE (Variation-Aware model of Memory Power Informed by Real Experiments) is an open-source DRAM power model
based on an extensive experimental characterization of the power consumption of real DRAM modules.
VAMPIRE can operate on any trace that is generated in the [DRAMPower format](http://www.drampower.info),
and is compatible with widely-used memory simulators such as
[Ramulator](https://github.com/CMU-SAFARI/ramulator/) and
[DRAMSim2](https://github.com/umd-memsys/DRAMSim2/).

*Current version: 1.1.0 (released March 1, 2019)*

## Key Features

VAMPIRE includes the following major features that are not included in prior DRAM power modeling tools:

- typical-case power consumption values (as opposed to worst-case power consumption)
- data-dependent power consumption behavior
- the impact structural variation within a module on power consumption
- power consumption models based on extensive data collected from DRAM modules by three major vendors

For more information, please read our paper:
>S. Ghose, A. G. Yağlıkçı, R. Gupta, D. Lee, K. Kudrolli, W. X. Liu, H. Hassan, K. K. Chang, N. Chatterjee, A. Agrawal, M. O'Connor, O. Mutlu.
>"[**What Your DRAM Power Models Are Not Telling You: Lessons from a Detailed Experimental Study**](http://users.ece.cmu.edu/~saugatag/papers/18sigmetrics_vampire.pdf)".
>In _Proceedings of the ACM International Conference on Measurement and Modeling of Computer Systems (SIGMETRICS)_, June 2018.
>In _Proceedings of the ACM on Measurement and Analysis of Computing Systems (POMACS)_, Vol. 2, No. 3, December 2018.

## Using VAMPIRE

### Building the VAMPIRE Executable
```shell
make -j
```

*Note: VAMPIRE currently requires a C++11 compiler (e.g., `clang++`, `g++-5`).*

### Running tests
VAMPIRE includes some inbuilt test to verify functional correctness, however, please note that these tests do not cover 100% of the functionalities.
```shell
make tests
```

On a successful run `make` will exit will code 0
### Generating an Input Trace File

VAMPIRE requires an input file that contains a trace (i.e., list) of DDR3 DRAM commands.  This can take one of two formats:

1. Binary
2. ASCII (compatible with [DRAMPower trace format](http://www.drampower.info))

#### Binary Trace Format

```
<64-bit timestamp of current cycle><31 bits of zero padding><command type (3 bits)><channel ID (2 bits)><rank ID (2 bits)><bank ID (3 bits)><row ID (16 bits)><column number (7 bits)>[<64-byte data value; optional, for reads and writes only>]
```

Valid values for the command type (in binary) are:
1. 000: RD
2. 001: WR
3. 010: ACT
4. 011: PRE
5. 100: RDA
6. 101: WRA

#### ASCII Trace Format

```
<timestamp (i.e., current cycle)>,<command>,<bank>[,row/col][,<data>]
```

**NOTES:**
1. `ACT` commands require a row number while I/O commands (`RD`, `RDA`, `WR` and `WRA`) require a column number.
1. Certain data dependency models require data for corresponding I/O command (e.g. for `WR` and `WRA` with WR data dependency model).

#### Generating Random Binary Test Traces Using `traceGen`
```shell
./traceGen 10000
```

This generates a number of trace files with 10000 random requests in each trace file.

### Running VAMPIRE

```shell
./vampire -f <file_name> -c <config_file> -d {MEAN|DIST|WR|RD_WR} -p {BINARY|ASCII} [-v {A|B|C|Cust}] [-s] [-dramSpec <dramspec_file>]
```

#### Required Command-Line Arguments

```
   -f <trace_filename>                 Trace file to parse
   -c <config_filename>                Configuration file
   -d {MEAN|DIST|WR|RD_WR}             Data dependency model
   -p {BINARY|ASCII}                   Parsing format to use for trace file
```

#### Optional Command-Line Arguments

```
   -v {A|B|C|Cust}                     Vendor to perform power calculations for (default: A; see the paper for more information).
                                       Cust vendor requires an additional dramspec file, specified using -dramSpec option.
   -dramSpec <dramspec_file>           Specifies DRAM specifications for calculations, required for Cust vendor type (An example in dramSpec/example.cfg).
   -s                                  Enables structural variation modeling (default: disabled).
   -csv <csv_filename>                 Specifies filename for VAMPIRE to write stats as csv to. If the file exists, it is overwritten else a new file is
                                       created.
```
#### Data Dependency Models
1. __MEAN__:
   VAMPIRE assumes that all read and write requests consume a mean energy value.
   The energy of each read/write request is based on the mean number of ones in a 64-byte cache line for your application.
   The mean number of ones is read from the configuration file.
   The input trace should *not* contain any data values for read or write requests.
2. __DIST__:
   VAMPIRE assumes that the energy consumed by the read and write requests follows a distribution based on the number of ones in all cache lines.
   The energy of each read/write request is selected to fit the distribution of cache lines based on the number of ones in each 64-byte line.
   The distribution is read from the configuration file.
   The input trace should *not* contain any data values for read or write requests.
3. __WR__:
   VAMPIRE models the energy consumed by reads and writes based on the actual data value used by the application.
   In this model, VAMPIRE allocates a memory data block, where the current data value of each line is stored in the simulator.
   The data value for each write request is read directly from the trace file, and the data value for each read request is determined from the memory data block.
   The input trace should contain data values for write requests, but not for read requests.
   (Note: this model requires a large amount of RAM on your system to model all of the memory data.)
4. __RD_WR__:
   VAMPIRE models the energy consumed by reads and writes based on the actual data value used by the application.
   In this model, VAMPIRE does *not* need to allocate a memory data block.
   The data value for each read/write request is read directly from the trace file.
   The input trace should contain data values for both read and write requests.
   (Note: unlike the WR model, this model does not consume a large amount of RAM.)

#### Example
The following command uses the RD_WR data dependency model, a compatible RD_WR binary trace generated by traceGen, the default configuration file (`configs/default.cfg`), and Vendor B to estimate energy.

```shell
./vampire -f ./trace_rd_wr_t.bin -v B -c configs/default.cfg -d RD_WR
```

### Piping Commands to VAMPIRE
VAMPIRE supports reading trace commands from a pipe (`/dev/stdin`) instead of a trace file, allowing VAMPIRE to process the commands as they are fed. To read input from a pipe, use `/dev/stdin` as the input trace file (option `-f`) and pipe the commands to VAMPIRE binary.

```shell
cat sample_vampire_trace.trace | ./vampire -f /dev/stdin [options]
```

## Summary of VAMPIRE Execution Flow
A short description of the execution flow of VAMPIRE through the source code is available [here](src/README.md).

## Maintainers

VAMPIRE is maintained by the SAFARI Research Group at Carnegie Mellon University and ETH Zürich.

Contributors include:

- Raghav Gupta
- Suyash Mahar
- Sumit Kumar Yadav
- Saugata Ghose
- A. Giray Yağlıkçı

VAMPIRE is released under the MIT License.

repository: Shiangjun/VAMPIRE

repo_name: Shiangjun/VAMPIRE


text:
## Mycroft Youtube Mpv
Searches and plays youtube videos with help of mpv media player

## Description
Youtube Mpv is a powerful tool on base of the mpv player that uses the mpv unix
socket to play and control youtube videos only with help of voice commands.<br>
It also checks if mpv is running to avoid not wanted simultaneous mpv sessions.

## Examples
* "Youtube arianna grande 7 rings" -- plays first result
* "Youtube cancel|exit" -- stops playing
* "Youtube pause|wait" -- pause playing
* "Youtube resume|play" -- resume playing
* "Youtube volume up|down|20" -- set volume up, down, to number from 0 - 100
* "Youtube speed up|down|2" -- set spee up, down, to floating point number from 0 - 5
* "Youtube get duration" -- get video duration
* "Youtube get remaining" -- get remaining video time
* "Youtube get position" -- get current time stamp
* "Youtube get volume" -- get current volume
* "Youtube get speed" -- get current speed
* "Youtube seek forward|backward|num" -- seek for/backward or with integer num (+/-)

## Requiements
Programs:
* mpv
* youtube-dl

Python-libs:
* bs4

## Supported plattforms
* Linux Desktop (KDE)

## TODO
* Playing more than first search result
* Playing yt playlists
* Config file with default values
* No-GUI mode for Raspian
* German translation

## Credits
Philip Mayer

## License
MIT

license: MIT

repository: Shadowsith/mycroft-youtube-mpv

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: Shadowsith/mycroft-youtube-mpv


text:
# AnnotatedComments

A Sublime Text Packge that allows you navigate through annotated comments.

*What is an annotated comment?*

For now, an annotated comment is a comment that starts with one of the following: `TODO`, `NOTE`, or `FIXME`, followed by a tag within parentheses (such as "refactor" or "new feature"), and optionally followed by a description. In code, this looks like the following:

```c
// TODO(ergz) - make this work with more languages
/* TODO(ergz) - it currently has too many things baked in */
```
![annoted-comments-readme](https://user-images.githubusercontent.com/10622214/233309492-4a583eea-1175-4629-ba0c-2e49b3f6056f.gif)

## TODO

Make this more flexible when I have more time.

repository: ergz/AnnotatedComments

branch_name: refs/heads/main

repo_name: ergz/AnnotatedComments


text:
# Optimize your checkout experience

We'll show you how you can optimize your checkout experience using its main components and how best to achieve a specific goal, which will result in more sales conversions.

## Improve scannability

**Scannability** helps visually navigate the screen and understand the different sections and instances of it. Here are some elements you can add to help scannability and provide context for the user:

### Headings, subheadings and explanatory texts

Keep the data grouped thematically and provide context to the user about the steps to follow to complete their transaction. This will help scannability and make the user feel more secure when sharing their information. For this, we recommend you use:

* **Headings**: use them to group the required details by theme and to indicate the users which section they are  in.
* **Subheadings**: use them to give context or explain which action is expected.
* **Explanatory texts**: use them to provide explanations or deepen information, whenever necessary, to avoid doubts.

![en aspectos generales - segmenta tu contenido](/images/best-practices-guide/EngAspectosGeneralesSegmentaTuContenido.png)

### Progress indicator

It is a **progress bar** that tells the user which stage of your checkout they are in. You can segment it into equal parts, indicating each step of the checkout. In this way, your user will have visibility of the step they are in and how much remains to finish the payment process.

![en Progress indicator](/images/best-practices-guide/EngCreaUnChoAgilProgressIndicator.png)

### Bullets and highlights

**Bullets** are a dotted list of different elements. Use bullets to make lists that help you read the information faster. A list causes less cognitive effort than a paragraph.

**Highlights** are underlined or highlighted text. Use highlights to call attention to important keywords or sentences that add value and make the screen easier to scan.

![en Bullets y highlights](/images/best-practices-guide/EngCreaUnChoAgilBulletsv3.png)

## Facilitate data filling

We recommend using **forms** to collect the data you need from the user. Forms are **sets of related inputs** that have a common purpose, for example, such as those in which personal data is requested.

In turn, the **inputs** are fields where the users must fill and edit the required information. They should have a logical order within the form and the required ones should be differentiated from the optional ones. Additionally, they must be long enough so that users can view the information they have entered and easily review and edit them.

In order to make filling out the form easier and not tire the user:

* Use a few inputs per form, use only the essential ones.
* Remove any request of information that is not essential for the purchase process.
* Request each detail only once to avoid being redundant.

![en aspectos generales optimizatusformularios dos&don't](/images/best-practices-guide/EngAspectosGeneralesOptimizaTusFormulariosDoDont.png)

## Provide context

### Labels and placeholders

**Labels** are the names of each input and indicate which detail should be entered. They should be constantly visible so that users can scan and fill out the form faster, since they work as a guide and prevent users from having to remember what information they should enter.

In turn, the **placeholders** are the filler texts of each input. They serve to exemplify or explain the data to be entered. Take advantage of this instance to place formatting or actionable examples.
It is important to know that the placeholder disappears when the cursor is placed on the input or the data is completed. Take this feature into account and avoid using them as the only reference for your inputs so that the user does not have to make an effort to remember what data goes in each field, or has to delete what was entered if they want to confirm it.

Both the labels and the placeholders must be short, direct and clear to prevent users from making mistakes.

![en labels y placeholders dos&don't](/images/best-practices-guide/EngAspectosGeneralesLabelsPlaceholdersDoDont.png)

### Helpers and tooltips

**Helpers** are the explanatory texts that go below the inputs and allow providing additional information about what the detail is and why it is being requested. Use them to justify the request of sensitive details or give relevant information about the field.

The **tooltips** are notifications that offer an extra layer of information when the helper is not enough. Use them to add definitions, complementary information or actionables through links.

![en helpers y tooltips dos&don't](/images/best-practices-guide/EngAspectosGeneralesHelpersTooltipv2.png)

### Success and error messages

**Success and error messages** validate the information entered in the inputs. To add emphasis, it is possible to use the green color in the success messages and red in the error ones.

Use success messages only if the confirmation is necessary or if the entered detail adds value to the user (e.g: free shipping or discount). In case of an **error**, it is important to clarify what the problem was and provide a solution so that the user does not make the mistake again and gets frustrated. If the input has a helper, it should be replaced by the error message.

![en Mensajes de éxito y error](/images/best-practices-guide/EngAspectosGeneralesMsjErrorDoDont.png)

## Add clear actionables

**Call to action** (CTAs) are calls for the user to perform a certain action. They allow performing the main and secondary actions of a page and can be applied in different styles, such as buttons, icons or links, with different hierarchies and in different places, such as cards and tootltips, among others.

Here are some tips:

* Use contrasting colors so that the CTAs can stand out and be differentiated from the page background.
* Make sure they are clear and direct in order to provide context.
* Use buttons for the main actions and write them in the infinitive verb tense so that there is no ambiguity.
* Add links for secondary actions that add context and make sure it is a self explanatory text that makes reference to where the users are being redirected to.

![en Agrega accionables claros](/images/best-practices-guide/EngAspectosGeneralesAccionablesClaros.png)

## Highlight the options

In a checkout, the user must choose between different options throughout the payment process, such as the type of delivery, payment methods, number of installments, among others. In this process, the conversion can vary according to different factors and the context of each one.

Therefore, **offer options** that include different possible variables and write them in descending order, taking into account the most used or beneficial for your customers. However, we recommend **offering only the most common ones** because otherwise you can confuse and hinder the selection process.

* Use **radio buttons** when there are few options and you can only choose one of them
* Offer **dropdowns** when there are several options and you don't want to take up so much screen space
* Use **cards** when it comes to visual options, among others.

In addition, you can add the most outstanding value propositions in each option to help the user have more information to make a decision.

![en Ofrece opciones do&don't](/images/best-practices-guide/EngAspectosGeneralesOfreceOpcionesDoDont.png)

## Skip the unnecessary steps

Avoid asking for repeated data or data that is not necessary to complete the purchase. To do this, take advantage of the steps where required details are requested to get information you will need later.

For example, you can use the personal and shipping information to get the billing details. This way you will avoid adding an extra form that slows down the payment process.

![en Saltea pasos innecesarios](/images/best-practices-guide/EngAspectosGeneralesSalteaPasosInnecesarios.png)

## Give visibility during the process

Add a fixed **summary component** or a direct access to the shopping cart that shows the total price to pay according to the actions that the user is performing.

Although most users review their purchase at the end, they feel more secure if they can control what they are doing throughout the process.

![en da visibilidad del proceso](/images/best-practices-guide/EngAspectosGeneralesVisibilidadDelProceso_V2.gif)

Also, before finalizing the purchase, allow your users to **review** the entire process and the final price. For this, add a confirmation or review page, prior to making the payment, that includes a summary of all the decisions made, all the information uploaded and the detail of the total to pay. It is important to give the possibility to edit any of the data from there, without the need to go back to the previous steps.

![en confrima tu compra](/images/best-practices-guide/EngAspectosGeneralesConfirmaTuCompra_V2.gif)

repository: mercadopago/devsite-docs

branch_name: refs/heads/development

gha_license_id: MIT

repo_name: mercadopago/devsite-docs


text:
## Getting Up and Running

In this chapter you're setting up the basics for unit testing.

### Create a New Class Library Project

Start by creating a new ASP.NET MVC project. You'll use this project throughout the rest of this tutorial to build your application.

    Exercise: Create a new project

Click **File > New Project > Class Library**

Delete Class1.cs

### Install the xUnit, unit testing framework

With the new project created, it's time to start building unit tests. For this guide, we are using xUnit. xUnit is a commonly used unit testing framework in .NET.

    Exercise: Install xUnit

Open the package manager console, in quick launch, type: package manager console

Using the package manager console, run the following commands

    PM> Install-Package xunit
    PM> Install-Package xunit.runner.visualstudio
    PM> Install-Package FluentAssertions

Alternatively, you can use the package manager GUI


text:
webext-tx-fix
=============

[![Build Status](https://travis-ci.com/eight04/webext-tx-fix.svg?branch=master)](https://travis-ci.com/eight04/webext-tx-fix)
[![Coverage Status](https://coveralls.io/repos/github/eight04/webext-tx-fix/badge.svg?branch=master)](https://coveralls.io/github/eight04/webext-tx-fix?branch=master)

A CLI tool which re-adds placeholders to webextension locales pulled from Transifex. **Note that Transifex has fixed this problem for newly uploaded message files**, see [#4](https://github.com/eight04/webext-tx-fix/issues/4).

Installation
------------
```
npm install -d webext-tx-fix
```

Use it as npm script:

```
"scripts": {
	"build-locales": "tx pull -a --mode=developer && webext-tx-fix",
}
```

Usage
-----
<!-- $inline.start("./cli.js|docstring|markdown:codeblock") -->
```
webext-tx-fix

Usage:
  webext-tx-fix [--source SOURCE_DIR]

Options:
  -s --source SOURCE_DIR  Source folder containing manifest.json. [default: .]
  -h --help               Show this.
  -v --version            Show version.
```
<!-- $inline.end -->

Changelog
---------

* 0.3.3 (Jan 22, 2020)

  - Fix: strip unknown keys.

* 0.3.2 (Jun 5, 2019)

  - Update to<EMAIL_ADDRESS>
* 0.3.1 (May 13, 2018)

  - Exclude test files from the dist.

* 0.3.0 (May 13, 2018)

  - Update neodoc.
  - Add: files are processed in parallel.
  - Add: detect the indent style of the source language and fix the indent if translation.

* 0.2.1 (Dec 26, 2017)

	- Add: use ordered-json.

* 0.2.0 (Dec 14, 2017)

	- **Add: messages which is not translated are removed.**
	- **Add: re-order the messages to match source language.**

* 0.1.0 (Dec 12, 2017)

    - First release.

gha_language: JavaScript


text:
This directory has various data files used in the examples.

To keep the github repo small, the git version does not include the actual
data files.  Instead those files are stored in a separate repo:
https://github.com/JeffFessler/MIRTdata/

The files are fetched when needed from that data repo via `ir_get_data`
and stored in the `downloads/` folder.

Data files include:

* George Zubal's phantom from http://noodle.med.yale.edu/zubal/

* some slices of the NCAT phantom from UNC (or maybe now JHU)
`ncat,256,slice,140,ct,dens.fld`
see:
@a segars:02:sot ieee-t-ns 49 3 675-679 jun 2002
W P Segars  B M W Tsui
Study of the efficacy of respiratory gating in myocardial SPECT using the new 4-D NCAT phantom
http://doi.org/10.1109/TNS.2002.1039548

Please cite Paul Segar's paper(s) if you use that phantom image!

See subdirectories too.

repository: JeffFessler/mirt

gha_language: MATLAB

repo_name: JeffFessler/mirt


text:
---
layout: kanji
v4: 379
v6: 405
kanji: 正
keyword: correct
elements: correct, one, ceiling, stop, footprint
strokes: 5
image: E6ADA3
on-yomi: セイ、ショウ
kun-yomi: ただ.しい、ただ.す、まさ、まさ.に
permalink: /rtk/正/
prev: 賦
next: 証
---

1) [meolox] 19-10-2007(223): If you do it correct on the first attempt you can stop.

2) [tom2000] 4-8-2009(43): My (Japanese) wife tells me that Japanese people use this kanji to tally up numbers (instead of 4 vertical lines and a diagonal across). I remember this one by writing the kanji while counting out the strokes to myself and saying this is the correct way to tally numbers.

3) [burritokun] 20-8-2008(22): The correct way of learning Japanese? First, stop everything you're doing. Then, go pick up a copy of Heisig's book and work from there.

4) [muddyhill] 31-1-2009(9): The correct way to tackle any problem is one step at a time.

5) [icamonkey] 10-9-2008(9): You want a correct answer in one stop? Google is your friend...


text:
---
layout: post
title: Navel Gazing Science
wordpress_id: 2334
wordpress_url: http://www.danallan.com/?p=2334
categories: notes
comments: true
tags: []
---
Speaking of the [analysis of common words and phrases in my Gmail](http://www.danallan.com/projects/2012/in-so-many-words/) from a few days ago, _Wolfram Alpha_ developed another tool for scientific navel gazing. Their [Facebook app](http://www.wolframalpha.com/input/?i=facebook) analyzes usage habits, characteristics of your friends (age, gender, political leanings), and so on. My favorite is this graph of how my friends are connected.

![friend network]({% asset_path friend-network.gif %})

The large clusters are hometown friends, college friends, graduate school friends, and Baltimore friends generally. The small clusters are friendships made at conferences. Neat.

repository: danielballan/blog

repo_name: danielballan/blog


text:
# WMS Layer (URL)
Display a WMS Layer from an online URL.

![WMS Layer URL App](wms-layer-url.png)

## How to use the sample
Simply run the app.

## How it works
A `WmsLayer` is constructed by setting the URL and layerNames parameters. The URL must be the URL to the "GetCapabilities" endpoint of the WMS Service. Alternatively, the layer could be constructed by setting the layerInfos parameter.

NOTE: The Web Map Service (WMS) in this sample is managed by the United States Geological Survey (USGS). ESRI, has no control over service uptime.

## Relevant API
* Map
* MapView
* WmsLayer

#### Tags
Layers


text:
# rdf-shell

rdf shell

# Installation

```
    sudo npm install -g rdf-shell
```

# Usage

```
    commands
    rdf cat <uri>                    - displays a uri
    rdf cp <source> <dest>           - copies from source to dest uris
    rdf help                         - shows help message
    rdf ls <uri>                     - shows files in a container
    rdf mv <scource> <dest>          - moves from source to dest uris
    rdf obj <uri> [value]            - watches the first found object
    rdf patch <uri> <data>           - patch turtle data to a file
    rdf post <uri> <data>            - posts turtle data to a file
    rdf put <uri> <data>             - puts turtle data to a file
    rdf rm <uri>                     - removes a uri
    rdf sub <uri>                    - subscribes to a uri
    rdf tail <uri>                   - watches a URI for changes
    rdf touch <uri>                  - touches a uri
    rdf ws <uri>                     - tests websocket to a uri
```

# Advanced

When working with access control lists and client side certificates, it is possible to add a cert using the environment variable

    CERT=<certificate_path>

repository: melvincarvalho/rdf-shell

repo_name: melvincarvalho/rdf-shell


text:
# Case-Study-1-Mobile-Recharge

There are two files for this project:

* connection.js - File where API-dataase connection as well as endpoints have been defined.
* queries.sql - List of queries which were part of creating tables as well as procedure.

To run this code:
* Create a directory in local system.
* Fork and clone the repository.
* Paste the files (especially connection.js) into the created folder.
* Create table in MySQL under a database.
* Add stored procedure into the database (You can use MySQL WorkBench 8.0 CE)
* Make sure you have express, express-headers, body-parser, nodemon and mysql packages installed in directory.
  * To install, run command npm install --save <package name>. (Make sure you have nodejs and npm installed).
* Run npm init to create package.json (if not pasted from here).
* Finally, run nodemon main.js
* Use Postman to check endpoints.


text:
# ShipmentStatusUpdate

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**purchase_order_number** | **string** | Purchase order number of the shipment for which to update the shipment status. |
**selling_party** | [**\TNT\Amazon\VendorDirectFulfillmentShipping\V1\Model\PartyIdentification**](PartyIdentification.md) | ID of the selling party or vendor. |
**ship_from_party** | [**\TNT\Amazon\VendorDirectFulfillmentShipping\V1\Model\PartyIdentification**](PartyIdentification.md) | Warehouse code of vendor. |
**status_update_details** | [**\TNT\Amazon\VendorDirectFulfillmentShipping\V1\Model\StatusUpdateDetails**](StatusUpdateDetails.md) | Provide the details about the status of the shipment at that particular point of time. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


text:
# dodex-quarkus

An asynchronous server for Dodex, Dodex-input and Dodex-mess using the Quarkus Supersonic Subatomic Java Framework.

## Install Assumptions

1. Java 17/18/19 installed with JAVA_HOME set.
2. Gradle 7.6 installed. If you have sdkman installed, execute `sdk install gradle 7.6` otherwise executing gradlew should install gradle.
3. Javascript **node** with **npm** package manager installed.

__Note:__ The static directory was changed from **src/main/resources/static** to **src/main/resources/META-INF/resources** in compliance with v2.5.

## Getting Started

### Quick Getting Started

1. Execute __`docker build -t dufferdo2/dodex-quarkus:latest -f kube/quarkus/Dockerfile ./kube`__
2. Execute __`docker run -d -p 8088:8088 -p 8071:8071 -p 9901:9901 --name dodex_quarkus dufferdo2/dodex-quarkus`__
3. View in browser; __localhost:8088/ddex__ or __localhost:8088/ddex/bootstrap.html__ or __localhost:8088/handicap.html__
4. To verify that the image is working, execute __`docker exec -ti  --tty  dodex_quarkus /bin/sh`__ and then __`cat logs/quarkus.log`__
5. To keep and run later, execute `docker stop dodex_quarkus` and later `docker start dodex_quarkus`
6. To cleanup execute `docker stop dodex_quarkus` and `docker rm dodex_quarkus` and `docker rmi dufferdo2/dodex-quarkus` and `docker rmi envoyproxy/envoy:v1.25.0`

### Building `dodex-quarkus`

1. `npm install dodex-quarkus` or download from <https://github.com/DaveO-Home/dodex-quarkus>. If you use npm install, move node_modules/dodex-quarkus to an appropriate directory.
2. `cd <install directory>/dodex-quarkus/src/main/resources/META-INF/resources` and execute `npm install --save` to install the dodex modules.
3. `cd <install directory>/dodex-quarkus` and execute `gradlew quarkusDev`. This should install java dependencies and startup the server in development mode against the default sqlite3 database. In this mode, any modifications to java source will be recompiled(refresh browser page to recompile).
4. Execute url `http://localhost:8089/test` in a browser.
5. You can also run `http://localhost:8089/test/bootstrap.html` for a bootstrap example.
6. Follow instructions for dodex at <https://www.npmjs.com/package/dodex-mess> and <https://www.npmjs.com/package/dodex-input>.
7. The Cassandra database has been added via an `Akka` micro-service. See; <https://www.npmjs.com/package/dodex-akka>.
8. Added Cassandra database to the **React** demo allowing the **login** component to use Cassandra.
9. See the **Firebase section** for using Google's **Firestore** backend.

   ___Note:___ In dev mode(`gradlew quarkusDev`), when modifying Java code, all you have to do is refresh the browser window. You can also use `gradlew run`(in build.gradle) to set ENVIRONMENT variables first.

   ___See:___ Single Page React Section below on using Dodex in an SPA.

### Operation

1. Execute `gradlew tasks` to view all tasks.
2. Building the Production Uber jar
    1. Before running the Uber jar for production, do: (graalvm requires the Uber jar)
        * Make sure that the spa react javascript is installed. Execute `npm install` in the `src/spa-react` directory.
        * cd to src/spa-react/devl & execute `gulp prod` or `gulp prd` (bypasses tests) or `npx gulp prod`
        * `npm install` must also populate the `node_modules` directory in `src/main/resources/META-INF/resources`
        * (optional) rm src/spa-react/node_modules (makes a smaller uber jar)
    2.
        * **Important** When building the **Uber** jar, set **DEFAULT_DB**=h2 or mariadb or postgres and **USE_HANDICAP**=true

3. Execute `java -jar build/dodex-quarkus-2.1.0-runner.jar` to startup the production server.
4. Execute url `http://localhost:8088/ddex/index.html` or `.../ddex/bootstrap.html` in a browser. __Note:__ This is a different port and url than development. Also __Note;__ The default database on the backend is "Sqlite3", no further configuation is necessay. Dodex-quarkus also has Postgres/Cubrid/Mariadb/DB2/H2 implementations. See `<install directory>/dodex-quarkus/src/main/resources/database_config.json` and `<install directory>/generate/src/main/resources` for configuration.
5. Swapping among databases; Use environment variable __`DEFAULT_DB`__ by setting it to either `sqlite3` ,`postgres`, `cubrid`, `mariadb`, `ibmdb2`, `h2`, `cassandra`, `firebase`, `neo4j` or set the default database in `database_config.json`.
6. When Dodex-quarkus is configured for the Cubrid database, the database must be created using UTF-8. For example `cubrid createdb dodex en_US.utf8`.
7. The dodex server has an auto user clean up process. See `application-conf.json` and `DodexRouter.java` for configuration. It is turned off by default. Users and messages may be orphaned when clients change a handle when the server is offline.

__Important Note:__ Since building __`jooq`__ source code, the database configurations from the .../dodex-quarkus/generate project may override the __database_configs__ in the the dodex/spa configurations. When making a change to __`src/main/resources/database_(spa)_config.json`__ also make the change in __`generate/src/main/resources`__

## Java Linting with PMD

* Run `gradlew pmdMain` and `gradlew pmdTest` to verify code using a subset of PMD rules in `dodexstart.xml`
* Reports can be found in `build/reports/pmd`

## Single Page React Application to demo Development and Integration Testing

* Integrated in ***Dodex-Quarkus*** at `src/spa-react`
* Documentation <https://github.com/DaveO-Home/dodex-quarkus/blob/master/src/spa-react/README.md>
* Uses ***Sqlite3*** as default backend database
* Router added to `src/main/java/dmo/fs/router/DodexRoutes.java`, see the `init` method.

## Debug

* Executing `gradlew quarkusDev` defaults to debug mode.
* Tested with VSCode, the `launch.json` =

```javascript
    {
            "type": "java",
            "name": "Debug (Launch) - Dodex",
            "request": "attach",
            "hostName": "localhost",
            "port": 5005
    }
```

## Test Dodex

1. Make sure the demo **dodex-quarkus** server is running in development mode.
2. Test Dodex-mess by entering the URL **localhost:8089/test/index.html** in a browser.
3. Ctrl+Double-Click a dial or bottom card to popup the messaging client.
4. To test the messaging, open up the URL in a different browser and make a connection by Ctrl+Double-Clicking the bottom card. Make sure you create a handle.
5. Enter a message and click **send** to test.
6. For dodex-input Double-Click a dial or bottom card to popup the input dialog. Allows for uploading, editing and removal of private content. Content in JSON can be defined as arrays to make HTML more readable.

## Native execution with Graalvm

The quarkus documentation can be found at: <https://quarkus.io/guides/building-native-image>

A quick start (Assuming graalvm 21+ is installed and configured with `native-image`):

__The Quarkus Method:__ Execute `gradlew build -Dquarkus.package.type=native`. The additional arguments are in `application.properties` (quarkus.native.additional-build-args). The build fails with numerious errors.

__The Old Fashion Method:__ Execute the supplied script - `dodexvm17`. This will build an executable named `dmo.fs.quarkus.Server`. This script should work, however it uses the fallback javaVM.

## Docker, Podman and Minikube(Kubernetes)
* Assumes **docker**, **podman** and **minikube** are installed

### Building an *image* and *container* with docker
1. cd to the `dodex-quarkus` install directory
2. make sure **dodex** and the **spa-react** node_modules and application are installed

    * in `src/main/resources/META-INF/resources` execute __`npm install`__
    * in `src/spa-react` execute __`npm install`__
    * startup Quarkus in dev mode - __`gradlew quarkusDev`__
    * in **src/spa-react/devl** execute __`npx gulp prod`__ or __`npx gulp prd`__(does not need dodex-quarkus started)
    * stop the quarkus server - ctrl-c or enter __`q`__
    * build the production uber jar - __`./gradlew quarkusBuild -Dquarkus.package.type=uber-jar`__
      * **Important** When building the **Uber** jar, set **DEFAULT_DB**=h2 or mariadb or postgres and **USE_HANDICAP**=true
    * verify the jar's name - if different than `dodex-quarkus-2.1.0-runner.jar`, change in `./kube/Dockerfile`

3. execute __`cp build/dodex-quarkus-2.1.0-runner.jar`__ to **./kube**
4. execute __`docker build -t dufferdo2/dodex-quarkus:latest -f kube/Dockerfile ./kube`__
5. execute __`docker create -t -p 8088:8088 -p 8071:8071 -p 9901:9901 --name dodex_quarkus dufferdo2/dodex-quarkus`__
6. execute __`docker start dodex_quarkus`__
7. use browser to view - <http://localhost:8088/handicap.html> or <http://localhost:8088/ddex> or <http://localhost:8088/ddex/bootstrap.html>, if the spa-react was installed this link should work, <http://localhost:8088/dist/react-fusebox/appl/testapp.html>
8. execute __`docker stop dodex_quarkus`__
9. to clean-up execute __`docker rm dodex_quarkus`__ and __`docker rmi dodex-quarkus`__. However you should keep the **dufferdo2/dodex-quarkus** image if trying out **podman** or **minikube**.
10. to pull and generate a local image from the docker hub, execute __`docker build -t dodex-quarkus:latest -f kube/quarkus/Dockerfile .`__
11. you can also build/run dodex-quarkus(image) and dodex_quarkus(container) with; __`docker compose -f kube/docker-compose.yaml up -d`__
12. Use `run` to test different databases; __`docker run --rm -p 8088:8088 -p 8071:8071 -p 9901:9901 -e DEFAULT_DB=postgres -e USE_HANDICAP=true --name dodex_quarkus dufferdo2/dodex-quarkus`__. To stop, run `docker container stop dodex_quarkus`.

   __Note:__ When running a dufferdo2/dodex-quarkus image, there is no need to have **envoy** running on the machine. Envoy is included in the image.

### Building an *image* and *container* with podman
1. generate an empty pod execute __`podman pod create -n quarkus-pod -p <IP_ADDRESS>:8088:8088 -p <IP_ADDRESS>:8071:8071 -p 9901:9901`__
2. generate a container execute __`podman create -t --pod quarkus-pod --name quarkus_server dufferdo2/dodex-quarkus:latest`__.
3. start the container execute __`podman start quarkus_server`__
4. view in browser
5. to clean-up execute __`podman stop quarkus_server`__, __`podman rm quarkus_server`__, __`podman pod rm quarkus-pod`__
6. before cleaning up, you can generate a yaml template. Execute __`podman generate kube quarkus_pod > quarkus.yaml`__

### Building a *deployment*, *service* and *persistent volume* with minikube
   * Since including the **Handicap** application(multiple exposed ports, persistent volume) to **dodex-quarkus**, the **minikube** deployment must be from configuration files.
1. execute __`minikube start`__
2. edit kube/quarkus.yml and change **env:** to desired database(DEFAULT_DB) - defaults to **h2**(embedded), no database configuration necessary otherwise set **DEFAULT_DB** to **mariadb** or **postgres**
3. execute `kubectl create -f kube/h2-volume.yml`
4. execute `kubectl create -f kube/quarkus.yml`
5. execute `minikube service quarkus-service` to start **dodex-quarkus** in the default browser - add **--url** to get just the URL
6. verify that **dodex-quarkus** started properly - execute `./execpod` and `cat ./logs/quarkus.log` - enter `exit` to exit the pod
    ```
        For postgres make sure postgres.conf has entry:

             listen_addresses = '*'          # what IP address(es) to listen on;

        and  pg_hba.conf has entry:

             host    all    all    <ip from minikube quarkus-service --url>/32   <whatever you use for security> (default for dodex-quarkus "password")

        and database_config.json(also in ../dodex-quarkus/generate...resources/database(_spa)_confg.json) entry:

             postgres...
              "config": {
              "host": "<ip value from `hostname -i`>", - (both dev/prod)

        netstat -an |grep 5432 should look like this

             tcp        0      0 <IP_ADDRESS>:5432            <IP_ADDRESS>:*               LISTEN
             tcp6       0      0 :::5432                 :::*                    LISTEN
             unix  2      [ ACC ]     STREAM     LISTENING     57905233 /var/run/postgresql/.s.PGSQL.5432
             unix  2      [ ACC ]     STREAM     LISTENING     57905234 /tmp/.s.PGSQL.5432
    ```
#### Development
1. Make changes to the **dodex-quarkus** code
2. execute `gradlew clean`
3. build the **uber** jar and **image** as described in the **Operation** and **Building an *image* and *container* with docker** sections, e.g.
   * build the production uber jar - __`./gradlew quarkusBuild -Dquarkus.package.type=uber-jar`__
     * **Important** When building the **Uber** jar, set **DEFAULT_DB**=h2 or mariadb or postgres and **USE_HANDICAP**=true
     * verify the jar's name - if different than **dodex-quarkus-2.1.0-runner.jar**, change in **./kube/Dockerfile**
   * copy the build/**dodex-quarkus-2.1.0-runner.jar** to **./kube**
   * if the **dodex_quarkus** and/or the **dufferdo2/dodex-quarkus** exist, remove them `docker rm dodex_quarkus` and `docker rmi dufferdo2/dodex-quarkus`
   * build the image `docker build -t dufferdo2/dodex-quarkus:latest -f ./kube/Dockerfile ./kube`
4. execute `./deleteapp`
5. execute `minikube image rm dufferdo2/dodex-quarkus`
6. execute `minikube load image dufferdo2/qodex-quarkus`
7. execute `kubectl create -f kube/quarkus.yml`
8. execute `minikube service quarkus-service`
9. clean-up execute __`./deleteapp`__, __`kubectl delete pvc quarkus-pvc`__, __`kubectl delete pv quarkus-pv`__
10. execute __`minikube stop`__

#### Exposing the minikube **dodex-quarkus** container to the internet
1. cd .../dodex-quarkus and execute **`npm install`** - this will install **localtunnel**
2. execute `minikube service quarkus-service --url` to view the local host **ip** address - can be used for the **--local-host** value
3. in separate terminals
   * execute `npx localtunnel  --host https://localtunnel.me --subdomain my-app --port 30088 --local-host $(minikube service quarkus-service --url | cut -d":" -f2 | cut -d"/" -f3)`
   * for the gRPC tunnel, execute `npx localtunnel  --host https://localtunnel.me --subdomain my-app2 --port 30071 --local-host $(minikube service quarkus-service --url | cut -d":" -f2 | cut -d"/" -f3)`
     * the **--subdomain** for **my-app** and **my-app2** should be changed to unique values
     * the naming convention is required(otherwise edit src/grpc/client/js/client.js and tweak) e.g. **coolapp** for port 30088 and **coolapp2** for port 30071
   * view <https://YOUR-UNIQUE-APP.loca.lt> or <https://YOUR-UNIQUE-APP.lt/handicap.html> in browser

   __Note:__ Make sure your Ad-Blocker is turned off for the web site.

### Firebase

* Create an account: <https://firebase.google.com>
* Getting started: <https://firebase.google.com/docs/admin/setup#java>
* Make sure you create a `Service-Account-Key.json` file as instructed. Dodex-Vertx uses the environment variable option to set the service-account - `GOOGLE_APPLICATION_CREDENTIALS`. See gradle.build as one way to set it.
* You will need to login to the `Firebase` console and create the `dodex-firebase` project. See `src/main/java/dmo/fs/router/FirebaseRouter.java` for usage of the project-id and Google Credentials. __Note:__ The `Firebase` rules are not used, so they should be set to `allow read, write:  if false;` which may be the default.
* You only need the `Authentication` and `Firestore` extensions.
* If you want a different project name, change `.firebaserc`.
* Gradle for development can set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable if you exec `gradlew run` instead of `gradlew quarkusDev`. Don't forget to modify the build.gradle file with the location of your  `Service-Account-Key.json` file.

 #### Firebase Testing

  * To make sure your project is created and the setup works, you should run the tests. __Note:__ They are written in Typescript.
  * cd `../dodex-quarkus/src/firebase` and run `npm install`
  * execute `npm run emulators` to startup the emulators for testing.
  * To test the model and rules after starting the emulators, in a different terminal window, run `npm test`.

### Neo4j

* See <http://quarkus.io/guides/neo4j> for usage.
* To use a docker with `apoc` you can try: __Note:__ this has `--privileged` set.
    ```
    docker run \
    -p 7474:7474 -p 7687:7687 \
    -v $PWD/neo4j/data:/neo4j/data -v $PWD/neo4j/plugins:/neo4j/plugins \
    --name neo4j-apoc \
    --privileged \
    -e 'NEO4J_AUTH=neo4j/secret' \
    -e NEO4J_apoc_export_file_enabled=true \
    -e NEO4J_apoc_import_file_enabled=true \
    -e NEO4J_apoc_import_file_use__neo4j__config=true \
    -e NEO4JLABS_PLUGINS=\[\"apoc\"\] \
    -e NEO4J_dbms_security_procedures_unrestricted=apoc.\\\* \
    neo4j:4.3
    ```
To restart and stop: `docker start neo4j-apoc` and `docker stop neo4j-apoc`

The Neo4j was tested with the `apoc` install, however the database should work without it.

Simply execute `export DEFAULT_DB=neo4j` to use, after database setup.

### Dodex Monitoring

#### Getting Started

* Apache Kafka must be installed.
    *  [Kafka Quickstart](https://kafka.apache.org/quickstart) - A container should also work
    *  .../config/server.properties should be modified if using a local install
        * advertised.listeners=PLAINTEXT://localhost:9092
        * num.partitions=2   # at least 2
    * local startup
        *  ./bin/zookeeper-server-start.sh config/zookeeper.properties
        *  ./bin/kafka-server-start.sh config/server.properties

* Setup Quarkus for Kafka
    *  __set environment variable `DODEX_KAFKA=true`__
    * Modify Quarkus application.properties file
        *  __uncomment the `mp.messaging` entries__
        *  modify the server entries if necessary
    *  startup Quarkus - the monitor should work with any of the databases
    *  the monitor configuation can be found in `application-conf.json`

* Monitor Dodex
    * in a browser enter `localhost:8089/monitor` or `localhost:8088/monitor` in production.
    * as dodex messaging executes the events should be recorded.
    * in the browser's `developer tools` console execute `stop();` and `start();` to stop/start the polling. Polling is started by default.

    __Note:__ you can open the messaging dialog with `ctrl-doubleclick` on the dials

### Kotlin, gRPC Web Application

* This web application can be used to maintain golfer played courses and scores and to calculate a handicap index. The application has many moving parts from the ___envoy___ proxy server to ___kotlin___, ___protobuf___, ___gRPC___, ___jooq___ and __code generator__, ___bootstrap___, ___webpack___, ___esbuild___, ___gradle___, ___java___ and ___javascript___.

  See documentation at: <https://github.com/DaveO-Home/dodex-quarkus/blob/master/handicap/README.md>

## ChangeLog

<https://github.com/DaveO-Home/dodex-quarkus/blob/master/CHANGELOG.md>

## Authors

* *Initial work* - [DaveO-Home](https://github.com/DaveO-Home)

## License

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

repository: DaveO-Home/dodex-quarkus

gha_language: Java

repo_name: DaveO-Home/dodex-quarkus


text:
---
layout: twoColumn
section: resources
type: article
title:  "Customer verification"
description: "How to verify a customer before sending a bank transfer with Dwolla's ACH API."
---

# Customer Verification

This article will walk through the identity verification process for verified Customers within the Dwolla API. For more information on going live with the Dwolla API, please [contact sales](https://www.dwolla.com/contact).

A `Customer` represents an individual or business that intends to send or receive funds on your platform. In any transaction at least one party—either the sender or the recipient—must complete the [identity verification](https://www.dwolla.com/updates/guide-to-cip-customer-identification-program-dwolla-payments-api/) process as outlined in this article. In cases where a Customer is only sending funds to or receiving funds from your full Dwolla account, the Customer is not required to complete the process set out below.

First, you should have an active [webhook subscription](https://docsv2.dwolla.com/#webhook-subscriptions). This active webhook subscription allows information about a Customer’s `status` in the verification process to be sent asynchronously to your application.
## Quick overview
We’ll outline the verification process for both `personal` and `business` Customers.

1. [Personal verified Customer](/resources/customer-verification/personal-verified-customers.html)
 * • Create a personal verified Customer
 * • Check the status of the personal Customer
2. [Business verified Customer](/resources/customer-verification/business-verified-customers.html)
 * • Create a business verified Customer
 * • Check the status of the business Customer
3. [Handling verification statuses](/resources/customer-verification/handling-verification-statuses.html)
 * • If necessary, `retry` verification
 * • If necessary, upload a `document`
 * • Overview of `suspended` status

* * *

#### View:

* [Personal verified Customers](/resources/customer-verification/personal-verified-customers.html)
* [Business verified Customers](/resources/customer-verification/business-verified-customers.html)
* [Handling verification statuses](/resources/customer-verification/handling-verification-statuses.html)

repository: dondeng/open-source-developer-portal

repo_name: dondeng/open-source-developer-portal


text:
### [CVE-2007-6497](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2007-6497)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

Hosting Controller 6.1 Hot fix 3.3 and earlier (1) allows remote attackers to change arbitrary user profiles via a request to Hosting/Addreseller.asp with modified loginname and email parameters; and (2) allows remote authenticated users to change a credit amount and increase a discount via an UpdateUser action to Accounts/AccountActions.asp with modified UserName, FullName, CreditLimit, and DefaultDiscount parameters, a related issue to CVE-2005-2219.

### POC

#### Reference
- https://www.exploit-db.com/exploits/4730

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
---
title: Neural Networks Compression
subtitle: Machine Learning
layout: default
modal-id: 6
date: 2014-07-15
img: roundicons.png
thumbnail: roundicons-thumbnail.png
alt: image-alt
project-date: Jan 2018 - Apr 2018
client: Start Bootstrap
category: Machine Learning
github: Latest Release
link: https://github.com/yashgangrade09/Compression-of-Neural-Networks.git
description: Developed and modified the famous paper on Soft Weight Sharing for Neural Net Compression with the aim to store multi- million parameter network on small devices like phones. Tested on MNIST dataset and found similar results to original implementation.
---

extension: markdown


text:
# Simple_Neural_Network
Simple 1-Layer, **N Neurons Neural Network**.

## Files

### Simple_NN.py
Contains all the functions building the Neural Network

### utils_file.py
Contains functions for plotting and example dataset

### Functions_description
Contains descriptions of all the input and output arguments of the functions in Neural Network

### testfiles.py
Cotains debugging datasets

___
___
___
___

The codes are based on the course [Neural Networks and Deep Learning](https://www.coursera.org/learn/neural-networks-deep-learning).


text:
# Privacy policy

This Privacy Policy describes our policies and procedures on the collection, use and disclosure of Your information when You use the Service and tells You about Your privacy rights and how the law protects You.
We use Your Personal data to provide and improve the Service. By opting in, You agree to the collection and use of information in accordance with this Privacy Policy.

# Interpretation and Definitions

## Interpretation

The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural.

## Definition

For the purposes of this Privacy Policy:
* __Organisation__ (referred to as either "We", "Us" or "Our" in this Agreement) refers to the IAI Research Group ath the University of Stavanger, Norway.
* __Bot__ refers to the reccomendation service agent you interract with.
* __Service__ refers to the movie recommender service.
* __You__ means the individual accessing or using the Service, or the Organisation, or other legal entity on behalf of which such individual is accessing or using the Service, as applicable.
* __Personal Data__ is any information that relates to an identified or identifiable individual.
* __Usage Data__ refers to data collected automatically, either generated by the use of the Service or from the Service infrastructure itself.

# Collecting and Using Your Personal Data
## Types of Data Collected

### Personal Data

While using Our Service, We may ask You to provide Us with certain personally identifiable information that can be used to contact or identify You. Personally identifiable information may include, but is not limited to:
* PSID
* Messages

### PSID

PSID is an ID assigned to you when you first initiate a conversation with the bot, which is permanent, and specific to the Bot's Facebook Page MovieBot. This is stored along with the conversation messages to identify you.

### Messasges

Messages are all messages exchanged with the bot, both sent by you and the bot.

# Your Pesonal Data

## Use of Your Personal Data

The Bot will use Personal Data for the purpose of improving the Service to make reccomendations that are believed to be more relevant to You.

## Retention of Your Personal Data

The Organisation will retain Your Personal Data only for as long as is necessary for the purposes set out in this Privacy Policy. We will retain and use Your Personal Data to the extent necessary to comply with our legal obligations (for example, if we are required to retain your data to comply with applicable laws), resolve disputes, and enforce our legal agreements and policies.

The Organisation will also retain Usage Data for internal analysis purposes. Usage Data is generally retained for a shorter period of time, except when this data is used to strengthen the security or to improve the functionality of Our Service, or We are legally obligated to retain this data for longer time periods.

If at any point you want to delete your data, you may do so by sending "/delete" to the Bot.

## Transfer of Your Personal Daata

Your information, including Personal Data, is processed at the Organisation's operating offices and in any other places where the parties involved in the processing are located. It means that this information may be transferred to — and maintained on — computers located outside of Your state, province, country or other governmental jurisdiction where the data protection laws may differ than those from Your jurisdiction.

Your consent to this Privacy Policy followed by Your submission of such information represents Your agreement to that transfer.

The Organisation will take all steps reasonably necessary to ensure that Your data is treated securely and in accordance with this Privacy Policy and no transfer of Your Personal Data will take place to an Organization or a country unless there are adequate controls in place including the security of Your data and other personal information.

## Disclosure of Your Personal Data

### Business Transactions

If the Organisation undergoes changes in name, ownership, or any significant changes in its structure, Your Personal Data may be transferred. We will provide notice before Your Personal Data is transferred and becomes subject to a different Privacy Policy.

### Law enforcement

Under certain circumstances, the Organisation may be required to disclose Your Personal Data if required to do so by law or in response to valid requests by public authorities (e.g. a court or a government agency).

### Other legal requirements

The Organisation may disclose Your Personal Data in the good faith belief that such action is necessary to:
* Comply with a legal obligation
* Protect and defend the rights or property of the Organisation
* Prevent or investigate possible wrongdoing in connection with the Service
* Protect the personal safety of Users of the Service or the public
* Protect against legal liability

# Contact US

If you have any questions about this Privacy Policy, You can contact us:
* By email: iai.moviebot@gmail.com


text:
# VoronoiDiagram

This code is an JAVA implementation of Fortune's Algorithm to compute voronoi diagram 2D.

## Demo:
![demo](code/figure.png)

## Features:
This code can output voronoi edges as ArrayList. each edges has built in functions that allows:

1. get points that share this edge.

2. get direction of this edge.

There is an function to compute polygon for each input point.

![alt tag](https://github.com/wuga214/VoronoiDiagram/blob/master/code/figure.png)

## How to use:
Please see example in src/Main.java

## Glitch:
This code has a glitch that can cause voronoi graph draw some unreasonable lines for data points that share similary y-axis values.

But for small data set (less than 1000 points), it is very unlikely happen.

If you can fix it, please contact me.

## About Fortune's Algorithm:
Tutorial Slides [here](http://www.cs.sfu.ca/~binay/813.2011/Fortune.pdf)

Someone's Blog [here](http://blog.ivank.net/fortunes-algorithm-and-implementation.html)


text:
# JS_Practice
Java Script Practice set as per standard

# Design Pattern
1. Moduler Pattern -- Object Literals
2. Revealing Pattern
3. Creational Pattern
4. Constructor Pattern
5. Singleton Pattern
6. Observer Pattern
7. Mediator Pattern
8. Prototype Pattern
9. Command Pattern
10. Facade Pattern
11. Factory Pattern
12. Mixin Pattern
13. Decorator Pattern
14. Pub Sub Pattern
15. MV* Pattern
>>1. MVC
>>2. MVP
>>3. MVVM

# Data Structure
1. Bubble Sort
2. Insertion Sort
3. Selection Sort
4. Merge Sort
5. Quick Sort

Operations
1. Comparison
2. Swap

Measurement Performance
1. Time Complexity
2. Space Complexity

Set Algorithms
1. Union  - {1,2,3,4} - { 3,5,6} = {1,2,3,4,5,6}
2. Intersection - {1,2,3,4} - {3,4,5,6} = {3,4}
3. Set difference - { 1,2,3,4} - {3,4,5,6} = {1,2}
4. Symmentic difference - { 1,2,3 } - { 2,3,4 } = {1,4}

Principal
1. Single Responsibility

Thanks,
<b>Manoj</b>


text:
Arkane Web3 Provider Example
===

# Building the example

This example relies on the library that can be built in the parent folder of this project. You'll need to build that one first.

```
npm i
```

# Running the example

```
npm run start
```

The application will be available on https://localhost:4000


text:
# CarND-Path-Planning-Project
Self-Driving Car Engineer Nanodegree Program

The goal of this project are the following:
* Safely navigate around a virtual highway with other traffic that is driving +-10 MPH of the 50 MPH speed limit
* Car's localization and sensor fusion data, as well as map waypoints data are provided
* The car should try to go as close as possible to the 50 MPH speed limit
* When there is a slower traffic, the car should be able to change lanes if safe to do so
* The car should avoid hitting other cars and keep in the lane
* The car should not experience total acceleration over 10 m/s^2 and jerk that is greater than 10 m/s^3

The image below is an example of the project:

The project is written by C++. The code for this project are under the `src` directory.

### Simulator.
The simulator for this project is provided by Udacity from the [releases tab (https://github.com/udacity/self-driving-car-sim/releases/tag/T3_v1.2).

## Details

### Car detection

Sensor fusion is key to safe driving. The strategy that I took was:

First, mark the lanes of all the other cars around us detected by sensor fusion. We need to know if they are in our lane, our left, or our right.

```c++
float d = sensor_fusion[i][6];  //  Sensor fusion data
if (d > 0 && d <= 4)
{
  //  Left lane
  car_lane = 0;
}
else if (d > 4 && d <= 8)
{
  //  Middle lane
  car_lane = 1;
}
else if (d > 8)
{
  //  Right lane
  car_lane = 2;
}
```

Then, I made three variables `too_close`, `left_too_close` and `right_too_close` to represent if the other cars are too close to us. `left_too_close` and `right_too_close` are indications of the result of "shoulder check".

 Otherwise, we will reduce speed and follow the traffic.

Because of the if statements below, the order matters. We have a bias of tend to change to left lane than right lane.

```c++
if (too_close)
{
  if (lane == 1 && !left_too_close) // We are in middle lane
  {
    lane--;
  }
  else if (lane == 1 && !right_too_close)
  {
    lane++;
  }

  else if (lane == 0 && !right_too_close) //  We are in left lane
  {
    lane++;
  }
  else if (lane == 2 && !left_too_close) //  We are in right lane
  {
    lane--;
  }
  else
  {
    ref_vel -= MAX_ACC;
  }
}
else if (ref_vel < MAX_SPEED)
{
  ref_vel += MAX_ACC;
}
```

This is an example of a safe lane change.

This is an example of following the traffic. There is no safe gap for lane change.

### Trajectory generation

Spline libarary is used for making the driving lane smooth. We create far points and use a spline to fit the points, and make points by the spline.

## Reflection

The project has been running reliably. The car is driving well and safe. However, although all the rubricks are met, there are lots of improvements.

For instance, if there is a slow car infront of us and there is no safe gap for us to change lane, we should follow the slow traffic. In the real world, adaptive cruise control systems are designed to match the same speed as the traffic goes. However in the project, our car slows down quite a bit and accelerate to keep up the distance, and then when it gets too close, it slows down again. This creates uncomfortable driving experience for the passengers. To solve this problem, acceleration and braking variables need to be fine-tuned. We could also implement a feedback system to adjust the speed to reduce the damp.

Furthermore, there are some edge cases like there is a car in the center lane beside us while we are at the right lane. The right lane goes slow, but we could not make a safe lane change because of the car on our left. If the left most lane is almost empty, in the real world we are more likely trying to slow down more to create a safe gap (by letting the middle lane car overtake us), and change our lane to the very left. This type of cases are not implemented by this project.

repository: aresgtr/Learn

repo_name: aresgtr/Learn


text:
---
layout: post
title:  "Deploy a Microservice in Kubernetes with zero lines of code"
date:   2021-09-22
categories: [kubernetes]
---

In general, To deploy a Microservice in Kubernetes you have to perform the following tasks:

![Import a Google Kubernetes Engine](https://raw.githubusercontent.com/sagar-jadhav/sagar-jadhav.github.io/master/static/img/_posts/deploy-microservice.JPG)

1. Build a Docker Image of a Microservice
2. Push that Docker Image into an Image Registry
3. Create a YAML's for different Kubernetes objects such as Deployment, Service, Secret, etc.
4. Apply those YAMLs using the following command:

   ```
   kubectl apply -f <FILE_NAME>
   ```

All the above tasks require you to write a lot of code. **What If I do all this in a single command?**

Yes, It is possible. Using [gopaddle](https://www.gopaddle.io/) you can deploy a Microservice in Kubernetes without writing any extra code in just one command.

### Let me show you How?

#### Before you start deploying, finish the below prerequisites:

I. Sign up for a free trial account in [gopaddle](https://gopaddle.io/)

II. Import a Google Kubernetes Engine (GKE) into your gopaddle account.

![Import a Google Kubernetes Engine](https://raw.githubusercontent.com/sagar-jadhav/sagar-jadhav.github.io/master/static/img/_posts/import_cluster.png)

III. Add an Image Registry in your gopaddle account.

![Add an Image Registry](https://raw.githubusercontent.com/sagar-jadhav/sagar-jadhav.github.io/master/static/img/_posts/add_image_registry.png)

IV. Add a source code repository in your gopaddle account that will have a source code of a Microservice that you want to deploy in Kubernetes. For this blog, I have used [node-hello](https://github.com/sagar-jadhav/node-hello) repository.

![Add a source code repository](https://raw.githubusercontent.com/sagar-jadhav/sagar-jadhav.github.io/master/static/img/_posts/add_code_repository.png)

V. Install `gpctl` CLI using the below commands:

```
wget https://gpctl.s3-ap-southeast-1.amazonaws.com/gpctl
```

```
chmod +x gpctl
```

```
cp gpctl /usr/local/bin/
```

**Note:** Refer [Official Documentation](https://portal.gopaddle.io/tutorials) for more details.

#### Gear up yourself to deploy a Microservice in Kubernetes

![Gear Up](https://media.giphy.com/media/WoiaGtXaOYwRqS2J3m/giphy.gif?cid=ecf05e47e4mh6bo9ec1wp7uag3hrkl9k6fjb5dk4ii82002f&rid=giphy.gif&ct=g)

Follow the below steps along with me.

I. Clone [node-hello](https://github.com/sagar-jadhav/node-hello) git repository using the following command:

```
git clone https://github.com/sagar-jadhav/node-hello.git
```

II. Go to the node-hello directory using the following command:

```
cd <path_to_node_hello_repo>/
```

III. Install dependencies using the following command:

```
sh buildScript.sh
```

IV. log in to gopaddle account using the following command:

```
gpctl login -emailID=<EMAIL> --password=<PASSWORD> --endPoint=https://portal.gopaddle.io
```

- EMAIL: Email to connect to gopaddle account
- PASSWORD: Password to connect to gopaddle account

V. Deploy Microservice in Kubernetes using the following command:

```
gpctl init --startScript=./runScript.sh --buildScript=./buildScript.sh --buildImage=node:8
```

The above command will prompt you to select the Cluster, Registry, and Policy. Please select appropriately to proceed further.

That's it !! with this, you have deployed a Microservice in Kubernetes without writing any deployment code.


text:
FlashSocket.js
=========================

FlashSocket is a JavaScript/Flash library which adds WebSocket support to old browsers such as IE6.

This project is aimed to enable WebSocket in old browsers while maintaining a decent performance.
**Currently all features are implemented but still in a beta state**.

If IE6 support is not required I highly recommend you use one of the libraries listed below. They are more stable and well maintained.
[https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills](https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills)

Example
-------------------------

    <!DOCTYPE html>
    <html>
    <script src="swfobject.js"></script>
    <script src="flashsocket.js"></script>
    <script>
    var socket = new FlashSocket("ws://localhost:8080/websocket");

    socket.onopen = function (e) {
        console.log("Socket opened");
        socket.send("hello world");
    };
    socket.onmessage = function (e) {
        console.log("Recieved message: " + e.data);
        socket.close();
    };
    socket.onclose = function (e) {
        console.log("Socket closed");
    };
    </script>
    </html>

Client Requirements
-------------------------

Adobe Flash Player 9 or above.

Tested browsers
-------------------------

* Internet Explorer: 6 and 9
* Opera 11.62
* Firefox 3.6.16
* Safari 5.1.5 (Win7)

Dependencies
-------------------------

[SWFObject 2.2][SWFObject]

[SWFObject]: http://code.google.com/p/swfobject/

repository: bkrukowski/FlashSocket

repo_name: bkrukowski/FlashSocket


text:
# Terraform remote state

By default, Terraform stores the state in a local file (`terraform.tfstate` in project directory).
In any real-world project the state is kept (and shared) on a remote store, for teamwork, backup etc.

Terraform directly supports storing the state in an S3 bucket.

## Create S3 bucket

You need to have AWS CLI on your machine, for creating and removing the S3 Bucket (not required by Terraform).

Create an S3 bucket for storing Terraform remote state. AWS CLI uses `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables for authentication.

```
$ aws s3api create-bucket \
  --bucket etcd-sample-state \
  --region eu-west-1 \
  --create-bucket-configuration LocationConstraint=eu-west-1
```

In any real project, you should also enable Bucket Versioning, as recommended by [Terraform documentation](https://www.terraform.io/docs/state/remote/s3.html#s3).

To enable Bucket Versioning:
```
$ aws s3api put-bucket-versioning \
  --bucket etcd-sample-state \
  --versioning-configuration Status=Enabled
```

If you enable versioning, beware cleaning up the bucket will be a bit more tricky (see *Cleanup*, below).

## Initialise Terraform

Move to `./terraform` subdirectory and initialise Terraform project to use remote state.

```
$ terraform remote config \
  -backend=s3 \
  -backend-config="bucket=etcd-sample-state" \
  -backend-config="key=sample/terraform.state" \
  -backend-config="region=eu-west-1"
```

If any remote state exists, it is automatically pulled locally.
Otherwise, a remote state is created (possibly empty) based on the current local state.

Terraform maintains the state locally, in `.terraform/terraform.tfstate` file (when remote state is enabled).

## Remote state update

Remote state is automatically updated when you make any change that affects the state,
updating the `sample/terraform.state` file in the S3 bucket.

You may explicitly push your local state to remote using `terraform remote push`, but this is not usually required.

As we enabled Bucket Versioning, a new version of the file is created, as you may verify listing object versions:
```
$ aws s3api list-object-versions --bucket etcd-sample-state
```

## Pull remote state

To sync from the remote:
```
$ terraform remote pull
```

## Cleanup: remove S3 bucket

To completely destroy the bucket, after deleting the content:
```
$ aws s3api delete-object --bucket etcd-sample-state --key sample/terraform.state
...
$ aws s3api delete-bucket --bucket etcd-sample-state
```

If you have enabled bucket versioning, things are more tricky [see this, for example](http://stackoverflow.com/questions/29809105/ow-do-i-delete-a-versioned-bucket-in-aws-s3-using-the-cli).
The easiest solution is using  AWS web console.


text:
# Reactions by FriendsOfFlarum

![License](https://img.shields.io/badge/license-MIT-blue.svg) [![Latest Stable Version](https://img.shields.io/packagist/v/fof/reactions.svg)](https://packagist.org/packages/fof/reactions) [![OpenCollective](https://img.shields.io/badge/opencollective-fof-blue.svg)](https://opencollective.com/fof/donate) [![Donate](https://img.shields.io/badge/donate-datitisev-important.svg)](https://datitisev.me/donate)

A [Flarum](http://flarum.org) extension. A Flarum extension that adds reactions to your Flarum Community!

- Just click the react button when hovering over a post, and choose the reaction!
- Custom reactions can be easily added via the admin page
- Integration with `flarum/likes` and `fof/gamification`

### Installation

Install manually with composer:

```sh
composer require fof/reactions:"*"
```

### Updating

```sh
composer update fof/reactions
```

### Links

[![OpenCollective](https://img.shields.io/badge/donate-friendsofflarum-44AEE5?style=for-the-badge&logo=open-collective)](https://opencollective.com/fof/donate) [![GitHub](https://img.shields.io/badge/donate-datitisev-ea4aaa?style=for-the-badge&logo=github)](https://datitisev.me/donate/github)

- [Packagist](https://packagist.org/packages/fof/reactions)
- [GitHub](https://github.com/FriendsOfFlarum/reactions)
- [Discuss](https://discuss.flarum.org/d/20655)

An extension by [FriendsOfFlarum](https://github.com/FriendsOfFlarum).

repository: FriendsOfFlarum/reactions

gha_language: PHP

repo_name: FriendsOfFlarum/reactions


text:
---
title: Session Title
type: session type
dateTime: '2021-03-04T16:00+01:00'
durationInMinutes: 60
imageSrc: https://images.unsplash.com/photo-1596920566403-2072ed25d7f5?ixid=MXwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=1500&q=80
learnerNames:
  - "@First Last"
  - "@JustAFirstName"
sharerNames:
  - "@One Sharer"
  - "@orMore"
resources:
  - text: Notes
    href: https://www.bit.ly/SUlifehacks
cta:
  text: Check out the Notes
  href: https://www.bit.ly/SUlifehacks
---

Everything above the 'more' statement on the next line can be easily split as a summary.

<!--more-->

You can use this template as follows:

1. Duplicate this file under a new name with the `.md` extension
2. Fill in relevant frontmatter values (between ---) (resources and cta are optional)
3. Fill in content below the frontmatter
4. Commit your changes on a **new branch** (never commit to the `master` branch)
5. Open a Pull Request and select Philo as a reviewer, so he can check and merge the changes to production
6. 🥂

You can format content using [Markdown](https://www.markdownguide.org/basic-syntax).

branch_name: refs/heads/develop

gha_language: Vue


text:
# Deploy a static website to EC2 using CodeStar

## Learning Aims
### 1. Introduction to Continuous Integration, Delivery, and Deployment
### 2. Introduction to AWS CodeStar, CodeCommit, and CodeDeploy

## Key concepts
- "*Continuous Integration*  is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible." - Martin Fowler, Chief Scientist, ThoughtWorks.
- "*Continuous Delivery* is the natural extension of Continuous Integration, an approach in which teams ensure that every change to the system is releasable, and release any version with the push of a button. Continuous Delivery aims to make releases boring, so that we can deliver frequently and get quick feedback on what users care about." - Thoughtworks.
- "*Continuous Deployment* is the next step of continuous delivery: Every change that passes the automated tests is deployed to production automatically. Continuous deployment should be the goal of most companies that are not constrained by regulatory or other requirements." - Puppet Labs

## Key technologies used
- AWS CodeStar: https://aws.amazon.com/codestar/
- AWS EC2: https://aws.amazon.com/ec2/
- AWS CodeCommit: https://aws.amazon.com/codecommit/
- AWS CodeDeploy: https://aws.amazon.com/codedeploy/
- Git: https://git-scm.com/

## Module Overview
- Setup and a deploy a new static website project in AWS CodeStar
- Download static files from an AWS S3 bucket. These files will be used to customise the static website
- Commit and push downloaded static files to CodeCommit repository using Git
- Observe CodeDeploy trigger a deployment from the detected Git push
- Marvel at your website available for the world to see

![Git to EC2](/images/3-1-ec2-static-site/CCtoEC2.svg)

## Prerequisites
You will need the following software installed on your workstation:
- [Git client](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git).

**How to Install Git Client**

- For **Windows** download the latest installer [here](https://gitforwindows.org/) . Once the file has been downloaded successfully, double click on the downloaded file to start the installation process, configuring it with the default options.

- For **macOS** download the latest installer from [here](https://sourceforge.net/projects/git-osx-installer/files/). Once the file has been downloaded successfully, start the installation process configuring it with the default options.

- For **Debian/Ubuntu** using apt-get, open a terminal command line and run:

```javascript
sudo apt-get update
sudo apt-get install git
```

- For **all platforms**, confirm the installation was successful by typing:

```javascript
git --version
```

**Note**: If you would like to know more about how to use git [here is a link to a book](https://git-scm.com/book/en/v2) to understand everything about **git**. Enjoy it ;)!

Also you will need a **Text editor** such as [Sublime](www.sublimetext.com/3) or [Visual Studio Code](https://code.visualstudio.com/download).

## You'll be a CodeStar in no time
### 1. Log in to AWS
1.1. Open a web browser and go to https://console.aws.amazon.com/console/home. Log in using your supplied account credentials.
![AWS Signin](/images/3-1-ec2-static-site/1_awssignin.png)
### 2. Ensure you're in the right AWS region
2.1. On the top-right side, make sure you select *Asia Pacific (Sydney)*.
![AWS Signin](/images/3-1-ec2-static-site/region.png)
### 3. Create CodeStar Project
3.1. Under the AWS services search field, search for *codestar*, and click on the CodeStar auto drop down element
3.2. Click on the '+ Create a new project' link
![CodeStar Create Project](/images/3-1-ec2-static-site/2_createcodestarproj.png)
3.3. On the left hand side, under Application Category, select *Static Website*
3.4. Under *Choose a project template*, click on 'HTML - Static Website - Amazon EC2'
3.5. Under the *Project name* field enter your first name, and last name without a space. For example *sallytran*
3.6. Select *AWS CodeCommit* as your source code repository
3.7. Under the *Repository name* field, enter the same value you did in step 3.5. I.e. *firstnamelastname*
3.8. Click the *Next* button
![CodeStar Project Name](/images/3-1-ec2-static-site/3_projectname.png)
3.9.1. **IMPORTANT:** On the *Review project details* page, click the *Edit Amazon EC2 Confirguration link*.
![Edit EC2 Options Link](/images/3-1-ec2-static-site/editEC2.png)
Choose a t2.micro instance. Choose the VPC ID, and Subnet ID by referencing the table below. To find the correct VPC ID, look in the AWS Account ID column, and find the row that contains the AWS Account ID that has been supplied to you via email. For the Subnet, you can choose either Public Subnet 1 or Public Subnet 2 from the row that features your supplied AWS Account ID.

| AWS Account ID | VPC ID | Public Subnet 1 ID | Public Subnet 2 ID |
| ------------ | ------------ | --------------- | --------------- |
|<PHONE_NUMBER>01 | vpc-d83c9ebf | subnet-2cdeb14b | subnet-cc56ce85 |
|<PHONE_NUMBER>49 | vpc-a33c9ec4 | subnet-e9dfb08e | subnet-604cd429 |
|<PHONE_NUMBER>92 | vpc-c53a98a2 | subnet-f74bd3be | subnet-6ec3ac09 |

![Edit EC2 Options](/images/3-1-ec2-static-site/5_editec2options.png)
3.9.2. On the *Review project details* page, observe the AWS tools that will be utilised and connected by CodeStar. In this case, you should see that:
* CodeCommit is being used for Source Control Management
* CodeDeploy is being used for Application Deployment, and
* CloudWatch is being used for Monitoring

3.10. Click on the *Create Project* button
![Review Project](/images/3-1-ec2-static-site/4_reviewproject.png)
3.11. When you see the *Choose an Amazon EC2 Key Pair*, select *devops_girls* from the dropdown list, tick the acknowledgement box, and click the *Create Project* button (Normally you would make very sure you have access to this key in case you ever needed access to the EC2 instance)
![Choose EC2 Key](/images/3-1-ec2-static-site/6_chooseec2key.png)
3.12. On the *It looks like this is your first time here.* screen, enter your name in the *Display Name* field, and an accessible email address in the *Email* field
3.13 On the *Pick how you want to edit your code* choose *Command line tools* and click the *See instructions* link
![Pick your tools](/images/3-1-ec2-static-site/7_picktools.png)
3.14 On the *Connect to your tools*, choose the Operating System that applies to you. For example Windows
3.15 Choose *HTTPS* as the Connection Method
3.16. Right click on the Generate Git Credentials *here* link and open the link in a new browser tab
![Connect your tools](/images/3-1-ec2-static-site/8_connecttools.png)
3.17. Under the *HTTPS Git credentials for AWS CodeCommit* click the Generate button. Save your login details somewhere securely such as Keepass. For the purposes of this exercise, a text file will be okay
![Generate CodeCommit HTTPS Credentials](/images/3-1-ec2-static-site/9_generategitcreds.png)
![CodeCommit HTTPS Credentials](/images/3-1-ec2-static-site/10_gitcredscreated.png)
3.18. Go back to your other browser tab, and click the *copy* link next to the CodeCommit repository URL
3.19. Open up a command line terminal and navigate to a directory where you wish to clone the new repository into. If you don't already have a parent directory to keep your git repositories, let's create one

Windows:
```
C:
cd\
mkdir code
cd code
```
Linux & Mac OSX:
```
cd /
mkdir code
cd code
```

3.20. Paste the git clone command and press enter. For example:
```
git clone https://git-codecommit.ap-southeast-2.amazonaws.com/v1/repos/sallytran
```

3.21. Enter your CodeCommit credentials as previously saved
![git clone](/images/3-1-ec2-static-site/gitclone.png)
3.22. Click the *Back* button on the AWS Choose your tools page
3.23. On the *Pick how you want to edit your code*, press the *Skip* button
3.24. Now CodeStar will start deploying your website via CodeDeploy
3.25. Refresh the CodeStar Dashboard to see what is happening
3.26. Have a look at the Commit history panel, the Continuous Deployment, and the Application endpoint panel
3.27. Right click on the endpoint URL, and open the link in a new tab. You will see the standard AWS Blueprint template website
![CodeDeploy in action](/images/3-1-ec2-static-site/13_codedeploy.png)

### 4. Download custom static HTML file from AWS S3
4.1. Open your web browser and paste in the following URL, https://s3-ap-southeast-2.amazonaws.com/devopsgirls1/index.html
4.2. Click on the new tab, then right click anywhere on the webpage and select *Save as...*
4.3. Change the filename to be index.html and save it in the webpage directory of your cloned git project repository on your workstation. For example, sallytran/webpage/index.html
![Save index.html file](/images/3-1-ec2-static-site/11_saveindex.png)

### 5. Push changes to CodeCommit Repo
5.1. In your command terminal, navigate to the home (root) directory of your CodeCommit repository on your workstation. This is the directory that you cloned from the CodeCimmit Git repository in step For example:
`cd C:\code\sallytran`
5.2. 'Add' the modified files to be ready for git commit. Enter this command:
`git add .`
5.3. Commit the changes to your local git repository, including a comment. Enter this command:
`git commit -m "Replaced the index.html file"`
5.4. Push the changes to the AWS CodeCommit hosted repository:
`git push`
5.5. Enter your CodeCommit Git username
5.6. Enter your CodeCommit Git password
![git push](/images/3-1-ec2-static-site/12_gitpush.png)

### 6. Observe CodeDeploy redeploy your website with the changes
6.1. Go back to your web browser and open up the AWS CodeStar Dashboard for your project, and refresh the page (Ctrl-F5)
6.2. Have a look at the Commit history panel, the Continuous Deployment , and the Application endpoint panel
6.3. Right click on the endpoint URL, and open the link in a new tab. You will see your newly customised website has been deployed to the cloud!
![CodeDeploy](/images/3-1-ec2-static-site/13_codedeploy.png)


text:
RSC SSH Tunneler
================

## Abstract

This is a plugin for JetBrains' family of IDEs.  PHPStorm, PyCharm, CLion, IDEA, etc.

We wrote this plugin as a workaround for a issue related to debugging PHP code over a VPN.  Due to the nature of how XDebug works,
debugging is not possible when working over a NATed VPN, such as an IpSec VPN.  This plugin will allow the user to establish
an SSH tunnel to the server to connect to an instance of DBGp, which will proxy debug requests to the XDebug service.  The
end result is that debugging will then work over the VPN.

## Disclaimer

*I am not a Java developer.*

Let me say that again.

*I am not a Java developer.*

This is my first Java project.  As such, it may be buggy.  It may have issues.  It may have oversights.  It may not
stick to any form of best practices.  It may not work at all.

You assume all risk from using this plugin.  I make no warranties or guarantees regarding its quality or fitness for use.
RSC is not liable for ANY issues resulting from the use of this plugin.  You're completely on your own if something blows up.

## Requirements

This requires that a DBGp proxy be installed and configured somewhere on the local network.  For this documentation, we will
assume that DBGp is installed on the same server as Apache.  If this is not the case in your environment, adjust the settings
as needed to facilitate the connection.  This documentation will also assume that you have an existing VPN setup, and that
you are connected to the VPN during all parts of the configuration, except where otherwise noted.

Obviously, you will also need a copy of an IntelliJ-based IDE to use this plugin.  See www.jetbrains.com for an IDE that will work.
This plugin was designed with PHPStorm in mind, but will work with any IntelliJ family IDE.

Additionally, this plugin establishes TWO forms of tunnel -- A local tunnel and remote tunnel.  The remote tunnel binds to a
specific loopback adapter address.  To allow this, you will need to edit your SSH configuration (located by default at /etc/ssh/sshd_config) to set `GatewayPorts`
to `clientspecified`.  Note that if you have any other services that use SSH tunneling, this will change the syntax of
ssh connection strings when creating a remote tunnel.  Simply add a leading colon to the any remote tunnel creation requests (ie: `ssh -R :9000:localhost:9000`)

Build depends on an IntelliJ SDK and the JSCh library, available at http://www.jcraft.com/jsch/.

## Configuration

Once requirements have been met, Install the plugin via the IDE's settings pane.  Use the 'Install from disk' button in the
plugins section.  Once the plugin is installed, restart your IDE.

Next, open the IDE's settings pane again, and locate the new section titled 'RSC SSH Tunnel Manager'.  It may be located
under 'Other Settings.'  Configure the settings for your network as follows:

| Field Name              | What it does                                                                                |
|-------------------------|------------------------------------------------------------------------------------------------------------------------------------|
| **Remote Host:**        | This is the IP or DNS address of the server hosting your XDebug instance.                                                          |
| **IDE Port:**           | This is the port that XDebug expects your IDE to be listening for debug sessions on.  Default is 9001.                             |
| **XDebug Port:**        | This is the port that XDebug communicates with Apache on.  See your Apache and XDebug configuration.  Default is 9000.             |
| **Username:**           | Username of the SSH user to use.                                                                                |
| **Password:**           | Password for the SSH user.                                                                                |
| **Loopback Interface:** | See the 'Loopback Interface' section below.  The plugin will choose a random interface at every connection if you leave this blank.|

Click Ok to save and exit.

#### The Loopback Interface

This plugin works by binding both a client-side and server-side SSH tunnel to a loopback adapter interface.  By default on
linux servers, this can be any IP address in the <IP_ADDRESS>/8 subnet.  However, your server configuration may vary.

You may specify a loopback IP to use.  If you do so, the same address will be used for all tunnels.  This may save you from
having to register and unregister your IDE with DBGp every time you connect.

If you do not specify a loopback IP, the plugin will choose one automatically at random every time it opens the tunnel.
Note that this may result in invalid IPs being chosen if your server does not allow any IP in <IP_ADDRESS>/8 to loopback.
Also please note that you will need to register and unregister your IDE with every tunnel connection, as DBGp will
associate your IDE key with your loopback address.

## Usage

Usage is very simple.  Once configured, simply go to `Tools->Manage RSC SSH Tunnel->Open SSH Tunnel to Server` to open your SSH tunnel.
If all goes well, you will be notified that you have been connected.  You may then XDebug as normal.

Once you are finished, go to `Tools->Manage RSC SSH Tunnel->Close SSH Tunnel` to disconnect.

## DBGp Help

Installing DBGp is beyond the scope of this document.  [Here](http://matthardy.net/blog/configuring-phpstorm-xdebug-dbgp-proxy-settings-remote-debugging-multiple-users/) is a
fairly decent howto on the subject.

## Contributions

Contributions are gladly accepted. Please submit a pull request on the development branch.

## License

This module is licensed under the Apache 2.0 license, a copy is included in the repository.

repository: RadioSystems/RSC-SSH-Tunneler

repo_name: RadioSystems/RSC-SSH-Tunneler


text:
---
tags: politics
layout: post
title: "Shifting to and fro in the administration"
---

Pride and Prejudice:

Now that he hasn't found any weapons, Mr. Bush says the war was worth it so Iraqis could experience democracy. But when our allies [Spain] engage in democracy, some Republicans mock them as lily-livered.

Talking Points Memo:

This is more than just simple buck-passing. It is a sort of through-the-looking-glass version of how problem-solving and accountability are supposed to work. It also has the perverse benefit of allowing the scope of the administration's failures to become reasons for not discussing those failures -- a sort of self-reinforcing anti-accountability causality loop, with all manner of moral hazards built in.

We've created such a mess that we don't have the time or the luxury to start second-guessing how badly we screwed things up!

gha_language: CSS


text:
---
name: Bug report
about: Create a bug report to help us improve
title: "[BUG]"
labels: bug
assignees: ''

---

!!! **DO NOT REPORT SECURITY ISSUES HERE** !!!

If the issue is security related, copy this template and email the issue to
[adam@canonical-ledgers.com](mailto:adam@canonical-ledgers.com).

!!! **DO NOT REPORT SECURITY ISSUES HERE** !!!

**Describe the bug**
A clear and concise description of what the bug is.

**Describe the environment (please complete the following)**
- OS: [e.g. Windows 10, Max OS X, Linux 5.2.13]
- Factom Network: [e.g. mainnet, testnet, or custom]
- `fatd` State: [e.g. starting up, syncing, synced, shutting down]
- `fatd` Version: [e.g. v0.6.0.r54.ge7a7ca1]
- `fat-cli` Version: [Will likely be the same as `fatd`'s version, but not necessarily]

NOTE: The `fatd` version is printed on the first INFO line, which is the most
reliable way to retrieve the version after a crash. If the first line was lost,
simply re-run the same binary. Use `fat-cli --version` for the `fat-cli`
version and to retrieve the `fatd` version from a running instance.

**To Reproduce**
Steps to reproduce the behavior:
1. Start `fatd` with following flags/environment variables ...
2. Wait for sync ...
3. Use `fat-cli` to query for transaction ...
4. See error ...

**Expected behavior**
A clear and concise description of what you expected to happen.

**Output**
If applicable, please attach as much relevant `fatd` or `fat-cli` output as
possible.

**Additional context**
Add any other context about the problem here.

repository: kompendium-ano/fatd

gha_language: Go

repo_name: kompendium-ano/fatd


text:
## Installing all the dependencies

### Global tools installation

You need to have these globally installed:
* `NodeJS` (https://nodejs.org/en/, version >= 4.3.1)
* `npm` (by default is installed with Node, but use the script below to update to latest, to make sure version >= 3.7.5)
* `bower` (version >= 3.9.1)
* `gulp` (version >= 1.7.7)

```
$ sudo npm install npm@latest -g
$ sudo npm install -g gulp
$ sudo npm install -g bower
```

### Local dependencies installation

Run `npm install` to pull all the dependencies (both server-side and client-side with `bower`), and to run the ES6 -> JS Babel transcoding.

```
$ npm install

```

## Running the server
1) Open `server.js` and start the app by clicking on the "Run" button in the top menu.

2) Alternatively you can launch the app from the Terminal:

```
$ node server.js
```

## Transcoding the client
Client is written in ES6, so to properly run it in any server, it needs to be transcoded via `Babel`.
We have a gulp default task to do that, including watch and transcode, simply start this in a separate terminal:

```
$ gulp
```
> NOTE: transcoded sources are placed in `client/app/` folder, from where its read by both client and unit test HTMLs. That folder is not part of git repo, and is going to be ignored by git, but the `npm install` step should run the transcoding

## Unit Testing

Open `client/unit_test.html` in a local browser to run a Jasmine unit test suite.

## Project description
### Browser-server NTP synchronization
1) Synchronizer client side is implemented from scratch, referenced by the `socket-ntp/ntp.js`. All the implementation is  now encapsulated in `client/app/services/socket-ntp-sync.js`

2) Synchronizer server side is node-modules/socket-ntp, installed via "npm install socket-ntp"  ([https://github.com/calvinfo/socket-ntp](https://github.com/calvinfo/socket-ntp) ), see the package.json dependencies. All the implementation is in `server.js`

3) Both Client and Server need Socket.io ([http://socket.io/](http://socket.io/)) library installed.

### Server-NTP.ORG synchronization
Server-NTP.ORG synchronization is implemented in `timeServer.js`, powered by `ntp-client` NodeJS module: [https://github.com/moonpyk/node-ntp-client](https://github.com/moonpyk/node-ntp-client)

## Unit Testing
Starting to write unit tests based on this tutorial: [http://www.bradoncode.com/tutorials/angularjs-unit-testing/](http://www.bradoncode.com/tutorials/angularjs-unit-testing/)

# References
- Logo generated at [http://bigtext.org/](http://bigtext.org/)

repository: observeris/time-server

repo_name: observeris/time-server