text:
#GDX-Proto - A lightweight 3D engine built with [libgdx](http://libgdx.badlogicgames.com)

When I decided to create GDX-Proto, I had been playing with libgdx's 3D API for about 6 months on and off. I often see libgdx users at a loss when it comes to starting with 3D.  The 2D side of libgdx is well documented and has many examples and tutorials, but when it comes to 3D, there are much less resources available (side note: Xoppa's [3D tutorial series](http://blog.xoppa.com/basic-3d-using-libgdx-2/) are a must read!)

I made GDX-Proto to show how one might implement all the basic pieces you need to create a simple FPS (first person shooter) with libgdx.  I don't recommend using GDX-Proto to create a game, since it might be a little rough in some areas, but I think it is a great resource to see how one could implement physics, graphics, and networking for a 3d game.

![screenshot](img/fps-demo-screen2.jpg)

## Overview of Features

### Graphics
- Basic 3d rendering with the new libgdx 3D API.
- 3D Particle system based on the new libgdx 3d particle system (version 1.2.1+, not included in 1.2.0)
- Game entities that can be rendered as 3d models or flat sprites that face the camera

### Physics
- The Bullet physics library is used for collision detection, but not for collision resolution.  This allows for fast and efficient collision detection without the performance hit of a fully simulated bullet world.  A default collision resolution system is included in the Physics class.
- Raycasting for projectile hit detection

### Networking
- Supports local or online play
- KryoNet based
- Mix of TCP and UDP where appropriate
- Entity interpolation
- Client prediction (for movement only, not yet implemented for projectiles)
- Simple chat system
- Supports libgdx headless backend for creating a headless server, such as on a VPS
- Server transmits level geometry to client upon connection
- "The server is the man": Most logic is run server-side to prevent cheats or hacking.

### Other
- Basic Entity system with DynamicEntities, represented by either Decals (Billboard sprites) or 3D models
- Movement component class handles acceleration, velocity, position, rotation, max speeds
- Subclasses of Movement: GroundMovement and FlyingMovement

## Demo - First Person Shooter

**A pre-built jar of the [desktop demo can be downloaded here](https://github.com/jrenner/gdx-proto/blob/master/bin/desktop-1.0.jar?raw=true).**

**[Android APK](https://github.com/jrenner/gdx-proto/blob/master/bin/android.apk?raw=true)**
The apk is currently setup just to launch a localclient

To play a simple local, singleplayer demo run the `desktop:run` gradle task
There are also many command line options available, such as setting screen size, starting a server, choosing what hostname to connect to, etc. To see a full list:
Run the `desktop:dist` gradle task to create the desktop jar.
the desktop jar file should be located in: `desktop/build/libs`
Then run the desktop jar with the command argument `-h` or `--help`

To start a local, non-networked single-player demo:
`java -jar desktop.jar`
To start a server:
`java -jar desktop.jar -s`
To start a server and connect to it yourself:
`java -jar desktop.jar -s -c`
To connect to an online server, www.example.com, port 19000:
`java -jar desktop.jar -c -a "www.example.com" -p 19000`

If you wish to run a headless server, run the `:headless:dist` gradle task, and run:
`java -jar headless.jar -s`

Here is an example usage output, but for a more up-to-date version run -h on the command line.
```
 -a,--address <arg>      supply hostname address to connect to
 -c,--client             connect to server as a client
 -d,--lag-delay <arg>    simulate lag with argument = milliseconds of lag
 -h,--help               print help
 -p,--port <arg>         specify TCP port to either host on (server) or
                         connect to (client)
 -s,--server             start online server
 -z,--screensize <arg>   suppley screen size in the form of WIDTHxHEIGHT,
                         i.e. 1920x1080
```

## Contributions
Contributions are welcome! If you have a large contribution you wish to make, make an issue first for discussion to make sure it's something that could be included in the project.

## TODO
- Profile and improve networking
- General refactoring, check all disposables are disposed (avoid memory leaks)
- Implement frustum and distance culling

## License
Apache 2.0

repository: catmanjan/gdx-proto

repo_name: catmanjan/gdx-proto


text:
# Prism.OrchardCore

Prism module for Orchard Core.
Allows you to add syntax highlighting to an Html content.

## Status

[![AppVeyor](https://ci.appveyor.com/api/projects/status/qe7lut75b91xhvno?svg=true)](https://ci.appveyor.com/project/agriffard/prism-orchardcore)
[![NuGet](https://img.shields.io/nuget/v/Prism.OrchardCore.svg)](https://www.nuget.org/packages/Prism.OrchardCore)

## Getting Started

- Add the nuget package Prism.OrchardCore as a reference to your application using Orchard Core.

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: CSS

gha_license_id: MIT

license_type: permissive


text:
The Ping-Pong Application
----------------------
Created on 29/3/2018
By Jared Ahaza
----------------------
Description
----
This application is part of my independent projects that I did at Moringa.
-----------
Technologies used
--------
The application uses HTML, CSS and JAVASCRIPT to carry out its functions. Git is also used to track changes on the local and remote repository.
----------------
Procedure for development And deployment to git pages.
Html file first created to give the site a structure then styles added using css as the changes are being tracked continuously using git.

Follow along.

  .Create a remote repository on github.
  --------
  .Initialize a local repository using git init command on the project directory.
  -------
  .Create the required html and css files and image directories.
  -------
  .Create a new branch called gh-pages git branch gh-pages.
  -------
  .Use git add . to add files and folders to git so that the project can be monitored then issue git commit -m "message here" to commit to staging area.
  -----
  .Then connect with the remote repository git remote add origin <url.git>
  ------
  .Then push to the remote repository on github.git push origin master.
  ------
Accessing the portfolio.
--------------
License
------------
The site and materials can be accessed by the public freely

Copyright (c) 2018 Jared

repository: JaredAhaza/Ping-pong

repo_name: JaredAhaza/Ping-pong


text:
# fibr

Web File Browser and Manager.

- Lightweight (11MB self-sufficient binary, low memory consumption at runtime).
- Mobile-first interface, with light payload. Dark themed.
- Thumbnail generation for image, PDF and video (with help of sidecars)
- Works in pure HTML or with very little javascript for improved file upload
- Can share directory with ou without password and with or without edit right.
- Support multiple storage backend (basic filesystem implemented, but can be anything like Minio or S3)

![](docs/fibr.png)

[![Build](https://github.com/ViBiOh/fibr/workflows/Build/badge.svg)](https://github.com/ViBiOh/fibr/actions)
[![Go Report Card](https://goreportcard.com/badge/github.com/ViBiOh/fibr)](https://goreportcard.com/report/github.com/ViBiOh/fibr)
[![codecov](https://codecov.io/gh/ViBiOh/fibr/branch/master/graph/badge.svg)](https://codecov.io/gh/ViBiOh/fibr)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=ViBiOh_fibr&metric=alert_status)](https://sonarcloud.io/dashboard?id=ViBiOh_fibr)

Thanks to [FontAwesome](https://fontawesome.com) for providing awesome svg.

## Concepts

Fibr aims to provide simple browsing of your filesystem. It's a single static binary with html templates. No Javascript framework. HTTP and HTML have all we need.

Fibr aims to be compatible with the most platforms available, on a best-effort basis. Fibr itself is already compatible with `x86_64`, `arm`, `arm64` architectures. But sidecars, which depends on system library, are not all ready yet.

### Folder

Fibr browses files of given `-data` option folder, called "root folder". For security reason, it's not possible to browse parent.

It aims to be consistent accross all existing filesystem (block storage, object storage, etc.) and thus enforces filenames in lowercase, with no space or special character. At start, it walks every files and reports names that breaks its policy. It doesn't modify existing files unless you set `-sanitizeOnStart` option.

Fibr creates a `.fibr` folder in _root folder_ for storing its metadata: shares' configuration and thumbnails. If you want to stop using _fibr_ or start with a fresh installation (e.g. regenerating thumbnails), you can delete this folder.

### Files

Fibr generates thumbnails of images, PDF and videos when these [mime-types are detected](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) and sidecars are provided. Sidecars are [h2non/imaginary](https://github.com/h2non/imaginary) and [ViBiOh/vith](https://github.com/vibioh/vith).

You can refer to these projects for installing and configuring them and set `-thumbnailImageURL` and `-thumbnailVideoURL` options.

### Security

Authentication is made with [Basic Auth](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication), compatible with all browsers and CLI tools such as `curl`. I _strongly recommend configuring HTTPS_ in order to avoid exposing your credentials in plain text.

You can set `-cert` and `-key` options, it uses [Golang's standard net/http#ServeTLS](https://golang.org/pkg/net/http/#ServeTLS) under the hood.

You can also configure a reverse proxy with Let's Encrypt to manage encryption, such as [Traefik](https://docs.traefik.io).

### Sharing

You can share folders or just one file: it generates a short link that gain access to shared object and is considered as "root folder" with no parent escalation.

It can be password-protected: user _has to_ enter password to see content (login is not used, you can leave it blank).

It can be read-only or with edit right. With edit-right, user can do anything as you, uploading, deleting, renaming, except generating new shares.

> It's really useful for sharing files with friends. You don't need account at Google, Dropbox, iCloud or a mobile-app: a link and everyone can see and share content!

This is the main reason I've started to develop this app.

### SEO

Fibr provides [OpenGraph metadatas](https://ogp.me) to have nice preview of link when shared. These metadatas don't leak any password-protected datas.

![](docs/opengraph.png)

### Users

You can start `fibr` with no user, with the `-noAuth` option. Although available, I don't recommend using it in public Internet. Anybody has access to the _root folder_ for viewing, uploading, deleting or sharing content with anybody.

Users are set with the `-authUsers` option and are in the form `[id]:[login]:[bcrypted password]`.

- `id` is used to add profile to your user
- `login` is the user for Basic Auth prompt
- `bcrypted password` is the password for Basic Auth prompt, [encrypted with `bcrypt`](https://en.wikipedia.org/wiki/Bcrypt)

You can easily encrypt your `login:password` value with [`htpasswd`](https://httpd.apache.org/docs/2.4/programs/htpasswd.html)

```bash
htpasswd -nBb login password
```

In order to work, your user _must have_ `admin` profile sets with the `-authProfiles` option.

## Getting started

### As a binary, without authentification

This is for local purpose with simple and hassle-free sharing in a private network.

```bash
go get github.com/ViBiOh/fibr/cmd/fibr
fibr \
  -noAuth \
  -templates "${GOPATH}/src/github.com/ViBiOh/fibr/templates/" \
  -fsDirectory "$(pwd)" \
  -publicURL "http://localhost:1080"
```

### As a single Docker container, with admin/password user

For long-living sharing with password and self-contained app in Docker, with no thumbnail generation.

```bash
docker run -d \
  -p 1080:180/tcp \
  --name fibr \
  -v ${PWD}:/data/ \
  -e FIBR_PUBLIC_URL="http://localhost:1080" \
  -e FIBR_AUTH_PROFILES="1:admin" \
  -e FIBR_AUTH_USERS="1:$(htpasswd -nBb login password)" \
  vibioh/fibr
```

### As a docker-compose stack

For prod-ready run with thumbnails generation of image, PDF and videos, _this is the recommended approach_.

You can inspire yourself from the [docker-compose.yml](docker-compose.yml) file I personnaly use. Beware of `-authUsers` option: bcrypted passwords contain dollar sign, which `docker-compose` tries to resolve as a shell variable, [you must escape it](https://docs.docker.com/compose/compose-file/compose-file-v2/#variable-substitution).

## Endpoints

- `GET /health`: healthcheck of server, respond [`okStatus (default 204)`](#usage) or `503` during [`graceDuration`](#usage) when SIGTERM is received
- `GET /version`: value of `VERSION` environment variable
- `GET /metrics`: Prometheus metrics values

## Usage

```bash
Usage of fibr:
  -address string
        [http] Listen address {FIBR_ADDRESS}
  -authProfiles string
        [auth] Users profiles in the form 'id:profile1|profile2,id2:profile1' {FIBR_AUTH_PROFILES}
  -authUsers string
        [auth] Users credentials in the form 'id:login:password,id2:login2:password2' {FIBR_AUTH_USERS}
  -cert string
        [http] Certificate file {FIBR_CERT}
  -csp string
        [owasp] Content-Security-Policy {FIBR_CSP} (default "default-src 'self'; base-uri 'self'; script-src 'unsafe-inline'; style-src 'unsafe-inline'; img-src 'self' data:")
  -frameOptions string
        [owasp] X-Frame-Options {FIBR_FRAME_OPTIONS} (default "SAMEORIGIN")
  -fsDirectory string
        [fs] Path to served directory {FIBR_FS_DIRECTORY} (default "/data")
  -graceDuration string
        [http] Grace duration when SIGTERM received {FIBR_GRACE_DURATION} (default "30s")
  -hsts
        [owasp] Indicate Strict Transport Security {FIBR_HSTS} (default true)
  -idleTimeout string
        [http] Idle Timeout {FIBR_IDLE_TIMEOUT} (default "2m")
  -ignorePattern string
        [crud] Ignore pattern when listing files or directory {FIBR_IGNORE_PATTERN}
  -key string
        [http] Key file {FIBR_KEY}
  -loggerJson
        [logger] Log format as JSON {FIBR_LOGGER_JSON}
  -loggerLevel string
        [logger] Logger level {FIBR_LOGGER_LEVEL} (default "INFO")
  -loggerLevelKey string
        [logger] Key for level in JSON {FIBR_LOGGER_LEVEL_KEY} (default "level")
  -loggerMessageKey string
        [logger] Key for message in JSON {FIBR_LOGGER_MESSAGE_KEY} (default "message")
  -loggerTimeKey string
        [logger] Key for timestamp in JSON {FIBR_LOGGER_TIME_KEY} (default "time")
  -metadata
        [crud] Enable metadata storage {FIBR_METADATA} (default true)
  -noAuth
        [auth] Disable basic authentification {FIBR_NO_AUTH}
  -okStatus int
        [http] Healthy HTTP Status code {FIBR_OK_STATUS} (default 204)
  -port uint
        [http] Listen port {FIBR_PORT} (default 1080)
  -prometheusIgnore string
        [prometheus] Ignored path prefixes for metrics, comma separated {FIBR_PROMETHEUS_IGNORE}
  -prometheusPath string
        [prometheus] Path for exposing metrics {FIBR_PROMETHEUS_PATH} (default "/metrics")
  -publicURL string
        [fibr] Public URL {FIBR_PUBLIC_URL} (default "https://fibr.vibioh.fr")
  -readTimeout string
        [http] Read Timeout {FIBR_READ_TIMEOUT} (default "1m")
  -sanitizeOnStart
        [crud] Sanitize name on start {FIBR_SANITIZE_ON_START}
  -shutdownTimeout string
        [http] Shutdown Timeout {FIBR_SHUTDOWN_TIMEOUT} (default "10s")
  -templates string
        [fibr] HTML Templates folder {FIBR_TEMPLATES} (default "./templates/")
  -thumbnailImageURL string
        [thumbnail] Imaginary URL {FIBR_THUMBNAIL_IMAGE_URL} (default "http://image:9000")
  -thumbnailVideoURL string
        [thumbnail] Video Thumbnail URL {FIBR_THUMBNAIL_VIDEO_URL} (default "http://video:1080")
  -url string
        [alcotest] URL to check {FIBR_URL}
  -userAgent string
        [alcotest] User-Agent for check {FIBR_USER_AGENT} (default "Alcotest")
  -version string
        [fibr] Version (used mainly as a cache-buster) {FIBR_VERSION}
  -writeTimeout string
        [http] Write Timeout {FIBR_WRITE_TIMEOUT} (default "1m")
```

repository: gtaglang/fibr

repo_name: gtaglang/fibr


text:
# Extract Finess data in a (real) CSV file
This work is still in progress

## Download files
 * clone this repository
 * Download data from [this page](https://www.data.gouv.fr/fr/datasets/finess-extraction-du-fichier-des-etablissements/), take the file named `Extraction Finess des Etablissements Geolocalisés au 29/01/2018Extraction Finess des Etablissements Geolocalisés au 29/01/2018`

## Install libraries and run the script
You will need a recent NodeJS version (tested with version 8, should work with 6 and above)

```
npm install
node build-real-csv.js
```

The output is the file `etablissements_geolocalises_20180129.csv`

## TODO
 * Reorganize this repo

repository: koumoul-dev/finess

repo_name: koumoul-dev/finess


text:
---
order: 1
label: 'Introduction'
---

# UI Components Introduction

Provide basic components can be customized, all use [ViewEncapsulation.None](https://angular.io/api/core/ViewEncapsulation) attribute to define, to adjust the display, at present there are about `69` basic components:

{{ ____动图:Basic/Button 按钮.gif:true:true:48 }}

repository: NG-NEST/ng-nest

gha_language: TypeScript

repo_name: NG-NEST/ng-nest


text:
[![Build Status](https://travis-ci.org/ggggggggg/Physical.jl.svg?branch=master)](https://travis-ci.org/ggggggggg/Physical.jl)

Use `Unitful.jl` instead of this package. This won't be maintained.

```Physical``` provides simple support for arbitrary unit systems in Julia, as well a nice set of predefined units and constants. The keys are the types `Quantity` and `Unit`, but you should just use predefined unit constants for the most part. Since `Physical` is not yet an official package, install with `Pkg.clone("https://github.com/ggggggggg/Physical.jl.git")`.

```
julia> using Physical
julia> f = 1*ElectronVolt/H_planck # H_planck is in units of h, so resulting expression have units with h
1.0 eV h⁻¹
julia> asbase(f)
2.4270444990211597e14 s⁻¹ # all Quantities can be reduced to base units
julia> f+1e9*(Mega*Hertz)
5.120237599283019 eV h⁻¹
julia> 1e9*(Mega*Hertz)+f # adding compatible Quantities casts to units of the first Quantity
1.242704449902116e9 MHz

```
Using units is as simple as multiplying any number or array by the predefined unit constants.  Convert units to base units and other units using ```asbase``` and ```as```.  Warning, when you use ```as(from,to)``` it uses the unit of `to` but ignores the value of `to`.
```
julia> Foot = DerivedUnit("ft",0.3048*Meter)
1 ft
julia> l=22*Foot+3*Meter
31.84251968503937 ft
julia> l*Volt
31.84251968503937 ft V
julia> asbase(l)
9.7056 m
julia> as(l,Angstrom)
9.7056e10 Å
```
```BaseUnit(x::String)``` creates a new base unit. If you just want to add to the existing base units, feel free to use ```BaseUnit```.  If you want to change the base units, on the fly you can. Look at ```testQuantities.jl``` if you want to replace a prefixed base unit like kg. If you add a ``.jl`` file to the ``data/default`` folder it will be loaded in a fixed order automatically by ``Physical``.  This allows you to add or replace units and constants easily. For debugging purposes, ``Physical.loaded_files`` contains the file names in the order they were loaded. Also you can define a totally different unit system in without messing with ```default```, take a look at ```data/what_to_load.jl```.
```
julia> Foot = BaseUnit("ft")
1 ft
julia> DerivedUnit("m", 3.28084*Foot)
1 m
julia> asbase(Meter)
3.28084 ft
```
There is also a Type for uncertain numbers, with error propagation. It currently treats the covariance and correlation between numbers as 0.  If you have a good idea of how to implement covariance and correlation, let me know, or do it yourself. It usually chooses a reasonable format given the number of significant digits.  If there is only one significant digit or less it will print out the entire representation of the value and uncertainty, because that usually means something has gone wrong.  There is room to improve the choice of representations.
```
julia> a = Uncertain(100,1)
100 ± 1.0
julia> b = Uncertain(50,0.4)
50.0 ± 0.40
julia> a+b
150 ± 1.1
julia> a*b
5000 ± 64
julia> (a*b*Meter)^2
25000000 ± 640000 m²
```

You can also check out ```SIUnits.jl``` which is similar.  The main difference is that ```SIUnits``` uses the type system and multiple dispatch to have high performance and pretty much just does SI base units. ```Physical``` uses dictionaries to allow for arbitrary units like `eV` instead of a combination of a large prefactor and many other base units.  As a result ```Physical``` is not reccomended for high performance.  You can do something like ```y=eV*Meter*performance_sensitive_function(x/(eV*Meter))``` such that performance sensitive parts of your code don't interact with ```Physical``` at all.

Potential future features
- [ ] LaTeX printing in iJulia
- [ ] Guesses at pretty unit reduction
- [ ] Maximally accurate fundamental units from CODATA

Feel free to start an issue if you have any problems or questions or just want to get in contact with me.

gha_language: Julia


text:
# ResolveMe

C# .NET Core solution for parsing and resolving mathematical expressions. Project has own expression context free grammar defined by Extended Backus–Naur form. Grammar is parser using **Amy** library.

Actual version supports:

* operators +,-,*,/,^, %
* Functions: sin, cos, argsin, argcos, tan, argtang, logx, ln, min, max, sum, avg
* Variables: PI, e,
* Using of Recursive Functions `sin(cos(sin(cos(0.1))))`
* Custom Context
* Return expression in tokens
* Return expression in tokens postfix notation
* Using custom types as a results or as function parameters
* And much more..

## How to use it
It's simply to use, just create new instance of MathCalculator class and call Calculate method with arguments. MathCalculator use default context which has defined all basic functions.

```C#
var calculator = new MathCalculator();
var expression = "cos(24-23.8*0.2)";
var result = calculator.Calculate<double>(expression);
```

### Custom Variable
If you want to use custom variables just add it.
```C#
var calculator = new MathCalculator();
calculator.Context.AddVariable("ab", (double)10);
var expression = "max(25,1)+45-ab*12";
var result = calculator.Calculate<double>(expression);
```

### Custom Function
Example of defining custom standart deviation function.
```C#
var calculator = new MathCalculator();
var stdv = new Func<object[], object>((args) =>
{
  calculator.Context.TryGetFunction("avg", out var avgFunct);
  var avg = (double)avgFunct(args);
  var result = (double)0;
  foreach (var arg in args)
  {
      if (arg is double number)
      {
        var temp = number - avg;
        result += Math.Pow(temp, 2);
        continue;
      }

      throw new ArgumentException("args", "Function expects double");
   }
   return Math.Sqrt(result / (double)args.Length);
});

calculator.Context.TryAddFunction("stdv", stdv);
var expression = "stdv(25,1,6,15,17)";
var result = this.calculator.Calculate<double>(expression);
```

### Custom Function with array as parameter and as result
Example of defining custom function which expects array as one of input parameter.
```C#
var calculator = new MathCalculator();
var sumArray = new Func<object[], object>((args) =>
{
  var constant = (double)args[0];
  var array = (double[])args[1];

  for (var i = 0; i < array.Length; i++)
  {
    array[i] += constant;
  }

  return array;
 });

var inputArray = new double[] { 1, 2, 3, 4, 5, 6 };
var constant = (double)1;

calculator.Context.AddVariable("ar", inputArray);
calculator.Context.AddVariable("con", constant);
calculator.Context.TryAddFunction("addarray", sumArray);

var expression = "addarray(con,ar)";
var result = calculator.Calculate<double[]>(expression);
```

### Custom Context
You can define your own context which has to inherite from IContext interface and then pass it as argument to calculator constructor.
```C#
var context = new MyOwnContext();
var calculator = new MathCalculator(context);
calculator.Context.AddVariable("ab", (double)10);
var expression = "max(25,1)+45-ab*bc+12";
var result = calculator.Calculate<double>(expression);
```

repository: Gramli/ResolveMe

gha_language: C#

repo_name: Gramli/ResolveMe


text:
# otuspy-memcload
Load tracker logs to memcache

memc_load.py - single process version

memc_load_mp.py - muptiprocess version

## Timing on one file
- Single process version ~ 5m 12s
- One worker version ~ 4m32s
- Two worker version ~2m39s
- Three-workers version ~ 2m24s
- Four worker version ~ 2m 19s


text:
(sec:termynal)=

# `termynal` module #

The `sphinx_term.termynal` [Sphinx] extension implements the `termynal`
directive, which builds [termynal] terminal windows.
In this section we discuss various aspects of this directive in the context
of [Jupyter Book].
Instructions on how to install and enable the extension are provided
[here](sec:sphinx-term).
A technical documentation of this extension can be found in the [README] file
of the [so-cool/sphinx-term] GitHub repository.

:::{note}
Each example of the `termynal` embedded on this page is displayed along
the raw Markdown source used to generate it.
To switch between the two views use the tabs -- *Outcome* and *Syntax* --
visible above each terminal window.
:::

## Simple terminal window ##

Basic [termynal] windows are embedded with the `termynal` directive like so:

:::{tabbed} Outcome
```{termynal} termynal:example
---
typeDelay: 40
lineDelay: 700
---
- value: pip install spacy
  type: input
- type: progress
- Successfully installed spacy
-
- value: python -m spacy download en
  type: input
- type: progress
- Installed model 'en'
-
- value: python
  type: input
- value: import spacy
  type: input
  prompt: '>>>'
- value: nlp = spacy.load('en')
  type: input
  prompt: '>>>'
- value: doc = nlp(u'Hello world')
  type: input
  prompt: '>>>'
- value: print([(w.text, w.pos_) for w in doc])
  type: input
  prompt: '>>>'
- "[('Hello', 'INTJ'), ('world', 'NOUN')]"
```
:::
:::{tabbed} Syntax
````text
```{termynal} termynal:example
---
typeDelay: 40
lineDelay: 700
---
- value: pip install spacy
  type: input
- type: progress
- Successfully installed spacy
-
- value: python -m spacy download en
  type: input
- type: progress
- Installed model 'en'
-
- value: python
  type: input
- value: import spacy
  type: input
  prompt: '>>>'
- value: nlp = spacy.load('en')
  type: input
  prompt: '>>>'
- value: doc = nlp(u'Hello world')
  type: input
  prompt: '>>>'
- value: print([(w.text, w.pos_) for w in doc])
  type: input
  prompt: '>>>'
- "[('Hello', 'INTJ'), ('world', 'NOUN')]"
```
````
:::

:::{note}
You can restart the animation by clicking the button below.
If the termynal window is reset while it is still being rendered,
the animation will break.

<button type="button"
        class="btn btn-primary"
        onclick="new Termynal('#termynal-example')">Restart animation</button>
:::

This approach requires you to list the terminal output directly within the
`termynal` directive.
Additionally, each [termynal] window **needs** to be tagged with an id
prefixed with `termynal:`, e.g., `termynal:example` for the
{ref}`terminal box above <termynal:example>`.

## Terminal content structure ##

The content of the `termynal` directive is a **yml-formatted list** of lines
to be displayed by the terminal (i.e., the terminal transcript).
Each element of this list can either be:
- an **empty** element -- indicating a plain, empty line;
- a **string** -- specifying a plain line of terminal *output* text; or
- a **dictionary** -- defining more complex line style.

Each line defined as a *dictionary* supports the following **optional** keys:
- `value` (default *empty string*) -- the content of the termynal
  line given as a string;
- `type` (default *none*) -- the line type where:
  * `input` indicates that the termynal line is an input,
  * `progress` creates a progress bar (`value` is not required), and
  * *empty string* (`''`) or *undefined* to get a plain *output* line --
    the default behaviour;
- `prompt` (default `$`) -- a string specifying the prompt style;
- `progressPercent` (default `100`) -- the maximum percent of the
  `progress` bar;
- `progressChar` (default `█`) -- the character used to build the
  `progress` bar (*see below for more details*);
- `typeDelay` (default `90`) -- the delay between each typed
  character given in milliseconds (*see below for more details*); and
- `cursor` (default `▋`) -- the character used as the cursor
  (*see below for more details*).

For more information about customising termynal lines refer to the official
documentation of [termynal lines][termynal-line].

## Configuring terminal window ##

The `termynal` directive takes a number of **optional** parameters outlined in
the table below.
(See the official documentation of [termynal boxes][termynal-conf] for more
information.)

| Parameter        | Default | Description                                    |
| ---------------- | ------- | ---------------------------------------------- |
| `prefix`         | `ty`    | The prefix used for data attributes.           |
| `startDelay`     | `600`   | The delay before animation, given in milliseconds. |
| `typeDelay`      | `90`    | The delay between displaying each typed character, given in milliseconds. |
| `lineDelay`      | `1500`  | The delay between displaying each line, given in milliseconds. |
| `progressLength` | `40`    | The number of characters used when displaying a progress bar. |
| `progressChar`   | `█`     | The character used for building progress bars. |
| `cursor`         | `▋`     | The character used for displaying the cursor. |
| `noInit`         | `false` | Whether to initialise the animation when the termynal window is loaded. When set to `true`, the termynal window can be initialised by explicitly calling `Termynal.init()`. |
| `lineData`       | `null`  | The sequence used to dynamically load termynal lines at instantiation. |

## Loading terminal window from file ##

Alternatively, the [termynal] box can load its content from a file.
To this end, the [`sphinx_term_termynal_dir`] [Sphinx] configuration parameter
must point to a directory holding a collection of terminal content files.
These files must have `.yml` extension -- see [this directory] for an example.
Then, a `.yml` file is loaded into a [termynal] window with a specially
formatted tag: the base name of the file prepended with the `termynal:` prefix
and without the `.yml` extension.
For example, for the [`example2.yml`] file, the corresponding [termynal] box
is created like so:

:::{tabbed} Outcome
```{termynal} termynal:example2
---
typeDelay: 40
lineDelay: 700
---
```
:::
:::{tabbed} Syntax
````text
```{termynal} termynal:example2
---
typeDelay: 40
lineDelay: 700
---
```
````
:::

:::{note}
You can restart the animation by clicking the button below.
If the termynal window is reset while it is still being rendered,
the animation will break.

<button type="button"
        class="btn btn-primary"
        onclick="new Termynal('#termynal-example2')">Restart animation</button>
:::

Note that if both the terminal file exists and the terminal content is provided
directly within the `termynal` directive, the latter takes precedence.
For example, for the [`example3.yml`] file, the content of the terminal box
tagged with `termynal:example3` will display the explicitly listed code
instead of loading its content from the [`example3.yml`] file like so:

:::{tabbed} Outcome
```{termynal} termynal:example3
---
typeDelay: 40
lineDelay: 700
---
- value: npm uninstall react
  type: input
  prompt: ▲
- Are you sure you want to uninstall 'react'?
- value: y
  type: input
  prompt: (y/n)
  typeDelay: 1000
- type: progress
  progressChar: '·'
- Uninstalled 'react'
- value: node
  type: input
  prompt: ▲
- value: Array(5).fill('🌈')
  type: input
  prompt: '>'
- "['🌈', '🌈', '🌈', '🌈', '🌈']"
- value: cd ~/repos
  type: input
  prompt: ▲
- value: git checkout branch master
  type: input
  prompt: ▲ ~/repos
- value: git commit -m "Fix things"
  type: input
  prompt: ▲ ~/repos (master)
```
:::
:::{tabbed} Syntax
````text
```{termynal} termynal:example3
---
typeDelay: 40
lineDelay: 700
---
- value: npm uninstall react
  type: input
  prompt: ▲
- Are you sure you want to uninstall 'react'?
- value: y
  type: input
  prompt: (y/n)
  typeDelay: 1000
- type: progress
  progressChar: '·'
- Uninstalled 'react'
- value: node
  type: input
  prompt: ▲
- value: Array(5).fill('🌈')
  type: input
  prompt: '>'
- "['🌈', '🌈', '🌈', '🌈', '🌈']"
- value: cd ~/repos
  type: input
  prompt: ▲
- value: git checkout branch master
  type: input
  prompt: ▲ ~/repos
- value: git commit -m "Fix things"
  type: input
  prompt: ▲ ~/repos (master)
```
````
:::

:::{note}
You can restart the animation by clicking the button below.
If the termynal window is reset while it is still being rendered,
the animation will break.

<button type="button"
        class="btn btn-primary"
        onclick="new Termynal('#termynal-example3')">Restart animation</button>
:::

## Referencing terminal window ##

Finally, each terminal window can be hyper-linked using the MyST Markdown
[`ref` role].
To reference a [termynal] terminal box with the standard "*terminal box*"
hyper-link use the `` {ref}`termynal:tag` `` syntax, where `termynal:tag` is
the tag of the destination terminal window.

:::{panels}
E.g., see this {ref}`termynal:example`.

---

```md
E.g., see this {ref}`termynal:example`.
```
:::

The hyper-link text can also be personalised with the
`` {ref}`custom hyper-link text <termynal:tag>` `` syntax.

:::{panels}
E.g., see this {ref}`awesome termynal log <termynal:example>`.

---

```md
E.g., see this {ref}`awesome termynal log <termynal:example>`.
```
:::

[termynal]: https://github.com/ines/termynal
[sphinx]: https://www.sphinx-doc.org/
[jupyter book]: https://jupyterbook.org/
[readme]: https://github.com/So-Cool/sphinx-term#readme
[so-cool/sphinx-term]: https://github.com/So-Cool/sphinx-term
[termynal-conf]: https://github.com/ines/termynal#customising-termynal
[termynal-line]: https://github.com/ines/termynal#prompts-and-animations
[this directory]: https://github.com/So-Cool/sphinx-term/tree/master/docs/src/termynal_files
[`sphinx_term_termynal_dir`]: https://github.com/So-Cool/sphinx-term/blob/master/docs/_config.yml#L57
[`example2.yml`]: https://github.com/So-Cool/sphinx-term/blob/master/docs/src/termynal_files/example2.yml
[`ref` role]: https://myst-parser.readthedocs.io/en/latest/syntax/syntax.html#targets-and-cross-referencing
[`example3.yml`]: https://github.com/So-Cool/sphinx-term/blob/master/docs/src/termynal_files/example3.yml

repository: So-Cool/sphinx-term

repo_name: So-Cool/sphinx-term


text:
# Using Page Inspector in Visual Studio 2012 #
---

## Overview ##

In this Hands-on Lab, you will discover a new tool to find and fix web page issues in Visual Studio - the Page Inspector.

Page Inspector is a new tool that brings browser diagnostics tools to Visual Studio and provides an integrated experience among the browser, ASP.NET, and source code. It renders a web page (HTML, Web Forms, ASP.NET MVC, or Web Pages) directly within the Visual Studio IDE and lets you examine both the source code and the resulting output. Page Inspector enables you to easily decompose a website, rapidly build pages from the ground up, and quickly diagnose issues.

Nowadays we have a number of Web frameworks that create flexible and scalable websites in a timely manner, such as ASP.NET MVC and WebForms. On the other hand, it gets harder to find issues on the pages because the IDE does not support the designer view in template-based pages and dynamic content. Therefore, these websites have to be opened in a browser to see how they appear to a user.

Web developers use external tools to find issues that regularly run in the browser. Then, they return to the IDE and start fixing. This back and forth activity among the IDE, the browser and the profiling tools can be inefficient, and sometimes requires a fresh deployment and cache cleaning each time you want to reproduce an issue.

Page Inspector bridges a gap in Web development between the client (browser tools) and the server (ASP.NET and source code) by bringing together the best of both worlds using a combined set of features.

Using Page Inspector, you can see which elements in the source files (including server-side code) have produced the HTML markup to be rendered in the browser. Page Inspector also lets you modify CSS properties and DOM element attributes to see the changes reflected immediately in the browser.

This hands-on lab will walk you through the Page Inspector features and show you how you can use them to fix issues in Web applications. **This lab contains two exercises using similar flows but targeting different technologies. If you are an ASP.NET MVC Developer, follow exercise one; if you are a WebForms developer follow exercise two**.

### Objectives ###

In this hands-on lab, you will learn how to:

- Decompose a Web Site using Page Inspector

- Inspect and preview CSS styles changes with Page Inspector

- Detect and fix issues in your web pages using Page Inspector

### Prerequisites ###

You must have the following items to complete this lab:

- [Microsoft Visual Studio Express 2012 for Web](http://www.microsoft.com/visualstudio/eng/products/visual-studio-express-for-web) or superior (read [Appendix A](#AppendixA) for instructions on how to install it).

- Internet Explorer 9 or higher

---

## Exercises ##

This hands-on lab includes the following exercises:

1. [Exercise 1: Using Page Inspector in ASP.NET MVC Projects](#Exercise1)

1. [Exercise 2: Using Page Inspector in WebForms Projects](#Exercise2)

> **Note:** Each exercise is accompanied by a starting solution, located in the Begin folder of the exercise, that allows you to follow each exercise independently of the others. Inside the source code for an exercise, you will also find an End folder containing a Visual Studio solution with the code that results from completing the steps in the corresponding exercise. You can use these solutions as guidance if you need additional help as you work through this hands-on lab.

Estimated time to complete this lab: **30 minutes**.

### Exercise 1: Using Page Inspector in ASP.NET MVC Projects ###

In this exercise, you will learn how to preview and debug an **ASP.NET MVC 4** solution using **Page Inspector**. First, you will perform a brief lap around the tool to learn the features that facilitate the Web debugging process. Then, you will work in a web page that contains styling issues. You will learn how to use Page Inspector to find the source code that generates the issue and fix it.

#### Task 1 - Exploring Page Inspector ####

In this task, you will learn how to use the Page Inspector in the context of an ASP.NET MVC 4 project that shows a photo gallery.

1. Open the **Begin** solution located at **Source/Ex1-MVC4/Begin/** folder.

	1. You will need to download some missing NuGet packages before continue. To do this, click the **Project** menu and select **Manage NuGet Packages**.

	1. In the **Manage NuGet Packages** dialog, click **Restore** in order to download missing packages.

	1. Finally, build the solution by clicking **Build** | **Build Solution**.

	>**Note:** One of the advantages of using NuGet is that you don't have to ship all the libraries in your project, reducing the project size. With NuGet Power Tools, by specifying the package versions in the Packages.config file, you will be able to download all the required libraries the first time you run the project. This is why you will have to run these steps after you open an existing solution from this lab.

1. In the Solution Explorer, locate **Index.cshtml** view under the **/Views/Home** project folder, right-click it and select **View in Page Inspector**.

 	![Selecting a file to preview in Page Inspector](./images/Selecting-a-file-to-preview-in-Page-Inspector.png?raw=true "Selecting a file to preview in Page Inspector")

	_Selecting a file to preview in Page Inspector_

1. The Page Inspector window will show the _/Home/Index_ URL mapped to the source View you selected.

	![ThefirstcontactwithPageInspector](images/ThefirstcontactwithPageInspector.png?raw=true)

	_The first contact with Page Inspector_

  	The Page Inspector tool is integrated in your Visual Studio environment. The inspector contains an embedded browser, together with a powerful HTML profiler. Notice that you do not have to run the solution to see how your pages look.

	>**Note:** When the width of Page Inspector browser is less than the width of the opened page, you will not see the page properly. If that happens, adjust the width of the Page Inspector.

1. Click the **Files** tab in Page Inspector.

	You will see all the source files that are composing the Index page. This feature helps to identify all the elements at a glance, especially when you are working with partial views and templates. Notice that you can also open each of the files if you click the links.

	![The-Files-tab](images/The-Files-tab1.png?raw=true)

	_The Files tab_

1. Click the **Toggle Inspection Mode** button, located at the left of the tabs.

	This tool will let you select any element of the page and see its HTML and Razor code.

	![Toggle-Inspection-Mode-button](images/Toggle-Inspection-Mode-button1.png?raw=true)

	_Toggle Inspection Mode button_

1. In the Page Inspector browser, move the mouse pointer over the page elements. While you move the mouse pointer over any part of the rendered page, the element type is displayed and the corresponding source markup or code is highlighted in the Visual Studio editor.

 	![Inspectionmodeinaction](images/Inspectionmodeinaction.png?raw=true)

	_Inspection mode in action_

	> **Note:** Do not maximize the Page Inspector window or you will not be able to see the preview tab showing the source code. If you click the element in Page Inspector when it is maximized, the source code of the selection will appear but it will hide the Page Inspector window.

	If you pay attention to the **Index.cshtml** file, you will notice that the portion of source code that generates the selected element is highlighted. This feature facilitates the editing of long source files, providing a direct and fast way to access the code.

 	![Inspectingelements](images/Inspectingelements.png?raw=true)

	_Inspecting elements_

1. Click the **Toggle Inspection Mode** button (![Select the HTML tab to display the HTML code rendered in the Page Inspector browser.](./images/Select-the-HTML-tab-to-display-the-HTML-code-rendered-in-the-Page-Inspector-browser..png?raw=true "Select the HTML tab to display the HTML code rendered in the Page Inspector browser.")) to disable the cursor.

1. Select the **HTML** tab to display the HTML code rendered in the Page Inspector browser.

1. In the HTML markup, locate the list item with the Koala link and select it.

	Notice that when you select the code, the corresponding output is automatically highlighted in the browser. This feature is useful to see how an HTML block is rendered on the page.

 	![Selecting HTML element in the page](./images/Selecting-HTML-element-in-the-page.png?raw=true "Selecting HTML element in the page")

	_Selecting HTML element in the page_

1. Click the **Toggle Inspection Mode** button to enable _Inspection Mode_ and click the navigation bar. On the right of the HTML code, in the Styles pane, you will see a list with the CSS styles applied to the selected element.

	> **Note:** Since the header is a part of the site layout, Page Inspector will also open _Layout.cshtml file and highlight the segment of code affected.

	![Discoveringstyles](images/Discoveringstyles.png?raw=true)

	_Discovering styles and source files of a selected element_

1. With the toggle inspection pointer enabled, move the mouse pointer below the blue featured bar and click the half circle.

 	![Selecting an element](./images/Selecting-an-element.png?raw=true "Selecting an element")

	_Selecting an element_

1. In the Styles pane, locate the **background-image** item under the **.main-content** group. **Uncheck** the **background-image** and see what happens. You will notice that the browser will reflect the changes immediately and the circle is hidden.

	>**Note:** The changes you apply on the Page Inspector Styles tab do not affect the original stylesheet. You can uncheck styles or change their values as many times as you want, but they will be restored after refreshing the page.

 	![Enabling and disabling CSS styles](./images/Enabling-and-disabling-CSS-styles.png?raw=true "Enabling and disabling CSS styles")

	_Enabling and disabling CSS styles_

1. Now, click the '**your logo here**' text on the header using the inspection mode.

1. In the **Styles** tab, locate the **font-size** CSS attribute under the **.site-title** group. Double-click the attribute value and replace the 2.3 em value with **3 em**, and then press **ENTER**. Notice that the title looks bigger.

 	![Changing CSS values in the Page Inspector](./images/Changing-CSS-values-in-the-Page-Inspector.png?raw=true "Changing CSS values in the Page Inspector")

	_Changing CSS values in the Page Inspector_

1. Click the **Trace Styles** tab, located in the right pane of Page Inspector. This is an alternative way to see all the styles applied to the selection, ordered by attribute name.

	![CSSstylestracing](images/CSSstylestracing.png?raw=true)

	_CSS styles tracing of the selected element_

1. Another feature of Page Inspector is the Layout pane. Using the inspection mode, select the navigation bar and then click the **Layout** tab on the right pane. You will see the exact size of the selected element, as well as its offset, margin, padding and border size. Notice that you can also modify the values from this view.

 	![Element layout in Page Inspector](./images/Element-layout-in-Page-Inspector.png?raw=true "Element layout in Page Inspector")

 	_Element layout in Page Inspector_

#### Task 2 - Finding and Fixing Style Issues in the Photo Gallery ####

How would you diagnose Web pages issues with previous versions of Visual Studio? You are likely familiar with web debugging tools that run outside the Visual Studio IDE, like Internet Explorer Developer Tools or Firebug. Browsers only understand HTML, scripting and styles, while an underlying framework generates the HTML that will be rendered. For that reason, you often need to deploy the whole site to see how web pages look like.

You had probably followed these steps when you wanted to detect and fix an issue in your web site:

1. Run the Solution from Visual Studio, or deploy the page on the web server.

1. In the browser, open the developer tools you use, or simply open the source code and the styles and try to match the issue.
To find the files involved, you would have used the "Search" or "Search in files" features with the name of the style classes.

1. Once the error is detected, stop the Web browser and the server.

1. Clear the browser cache.

1. Return to Visual Studio to apply a fix. Repeat all the steps to test.

As there is no real WYSIWYG in ASP.NET MVC 4, most of the style issues are detected on a later stage, after running or deploying the web application. Now, with Page Inspector, it is possible to preview any page without running the solution.

In this task, you will use the Page inspector and fix some issues the Photo Gallery application.

1. Using Page Inspector, locate the **Register** and the **Log in** links at the left side of the header.

	Notice that the links are not displayed at the expected place on the right, and they are shown like a bulleted list. You will now align the links to the right and restyle them accordingly.

 	![Locating the Register and Log in links](./images/Locating-the-Register-and-Log-on-links.png?raw=true "Locating the Register and Log in links")

	_Locating the Register and Log in links_

1. With Toggle Inspection Mode selected, click close to, but not on, the Register link to open its code.

	Notice that the source code of the links is located in the **_LoginPartial.cshtml** file, not the Index.cshtml nor the _Layout.cshtml, which are the places you might look in first place. You have been placed directly in the correct source file.

1. In the **Styles** tab, locate and click the **
 #login** item, which is the HTML container for these links.

	Notice that the **#login** style is automatically located in **Site.css** after you click. Moreover, the code is now highlighted.

 	![Selecting the CSS styles](./images/Selecting-the-CSS-styles.png?raw=true "Selecting the CSS styles")

	_Selecting the CSS styles_

1. Uncomment the **text-align** attribute in the highlighted code by removing the opening and closing characters and save the **Site.css** file.

	Page Inspector is aware of all the different files that compose the current page, and it can detect when any of these files change. It alerts you whenever the current page in browser is not in sync with the source files.

1. In the Page Inspector browser, click the bar located below the address bar to reload the page.

	![Reloading the page](images/Reloading the page.png?raw=true)

	_Reloading the page_

	The links are now at the right, but they still look like a bulleted list. Now, you will remove the bullets and align the links horizontally.

	![Updated page](images/reloading-the-page3.png?raw=true)

	_Updated page_

1. Using the inspection mode, select any of the **\
** items that contain the “Register” and “Log in” links. Then, click the **\
 #login** item to access **Styles.css** code.

 	![Finding the style](./images/Finding-the-style.png?raw=true "Finding the style")

	_Finding the style_

1. In **Style.css**, uncomment the code for **#login li** items. The style you are adding will hide the bullet and display the items horizontally.

 	![Restyling the login links](./images/Restyling-the-login-links.png?raw=true "Restyling the login links")

	_Restyling the login links_

1. Save **Style.css** file and click once on the bar located below the address to reload the page. Notice that the links appear correctly.

 	![Links aligned to the right side](./images/Links-aligned-to-the-right-side.png?raw=true "Links aligned to the right side")

	_Links aligned to the right side_

1. Finally, you will change the header title. Use the inspection mode to click **your logo here** text and get to the source code that generates it.

1. Now you are in **_Layout.cshtml**, replace '**your logo here**' text with '**Photo Gallery**'. Save and update the Page Inspector browser.

 	![Assigning a new title](./images/Assigning-a-new-title.png?raw=true "Assigning a new title")

	_Assigning a new title_

 	![PhotoGallerypage](images/PhotoGallerypage.png?raw=true)

	_Photo Gallery page updated_

1. Finally, selet the **PhotoGallery** project and press **F5** to run the app. Check out all the changes work as expected.

---

### Exercise 2: Using Page Inspector in WebForms Projects ###

In this exercise, you will learn how to preview and debug a WebForms solution using Page Inspector. You will first perform a brief lap around the tool to learn the Page Inspector features that facilitate the Web debugging process. Then, you will work in a web page that contains styling issues. You will learn how to use Page Inspector to find the source code that generates the issue and fix it.

#### Task 1 - Exploring Page Inspector ####

In this task, you will learn how to use the Page Inspector features in the context of a WebForms project that shows a photo gallery.

1. Open the **Begin** solution located at **Source/Ex2-WebForms/Begin/** folder.

	1. You will need to download some missing NuGet packages before continue. To do this, click the **Project** menu and select **Manage NuGet Packages**.

	1. In the **Manage NuGet Packages** dialog, click **Restore** in order to download missing packages.

	1. Finally, build the solution by clicking **Build** | **Build Solution**.

	>**Note:** One of the advantages of using NuGet is that you don't have to ship all the libraries in your project, reducing the project size. With NuGet Power Tools, by specifying the package versions in the Packages.config file, you will be able to download all the required libraries the first time you run the project. This is why you will have to run these steps after you open an existing solution from this lab.

1. In the Solution Explorer, locate **Default.aspx** page, right-click it and select **View in Page Inspector**.

 	![Opening Default.aspx with Page Inspector](./images/Opening-Default.aspx-with-Page-Inspector.png?raw=true "Opening Default.aspx with Page Inspector")

	_Opening Default.aspx with Page Inspector_

1. The Page Inspector window will show Default.aspx.

 	![Viewing Default.aspx in Page Inspector](./images/Viewing-Default.aspx-in-Page-Inspector.png?raw=true "Viewing Default.aspx in Page Inspector")

	_Viewing Default.aspx in Page Inspector_

	The Page Inspector tool is integrated in your Visual Studio environment. The inspector contains an embedded browser, together with a powerful HTML profiler that will show the selected code. Notice that you do not have to run the solution to see how your pages look.

	>**Note:** When the width of Page Inspector browser is less than the width of the opened page, you will not see the page properly. If that happens, adjust the width of the Page Inspector.

1. Click the **Files** tab in Page Inspector.

	You will see all the source files that are composing the rendered Default page. This is a useful feature to identify all the elements at a glance, especially when you are working with User Controls and Master Pages. Notice that you can also navigate to each of the files.

 	![The Files tab](./images/The-Files-tab2.png?raw=true "The Files tab")

	_The Files tab_

1. Click the **Toggle Inspection Mode** button, located at the left of the tabs.

	This tool will let you select any element of the page and see its HTML code and .aspx source.

 	![Toggle Inspection Mode button](./images/Toggle-Inspection-Mode-button.png?raw=true "Toggle Inspection Mode button")

	_Toggle Inspection Mode button_

1. In the Page Inspector browser, move the mouse over the page elements. While you move the mouse pointer over any part of the rendered page, the element type is displayed and the corresponding source markup or code is highlighted in the Visual Studio editor.

 	![Inspection mode in action](./images/Inspection-mode-in-action.png?raw=true "Inspection mode in action")

	_Inspection mode in action_

	> **Note:** Do not maximize the Page Inspector window or you will not be able to see the preview tab showing the source code. If you click the element in Page Inspector when it is maximized, the source code of the selection will appear but it will hide the Page Inspector window.

	If you pay attention to **Default.aspx** file, you will notice that the portion of source code that generates the selected element is highlighted. This feature facilitates the edition of long source files, providing a direct and fast way to access the code.

 	![Inspecting elements](./images/Inspecting-elements.png?raw=true "Inspecting elements")

	_Inspecting elements_

1. Click the **Toggle Inspection Mode** button (![Select-the-HTML-tab-to-display-the-HTML-code-rendered-in-the-Page-Inspector-browser.](./images/Select-the-HTML-tab-to-display-the-HTML-code-rendered-in-the-Page-Inspector-browser..png?raw=true "Select-the-HTML-tab-to-display-the-HTML-code-rendered-in-the-Page-Inspector-browser.")), located in Page Inspector tabs, to disable the cursor.

1.  Select the **HTML** tab to display the HTML code rendered in the Page Inspector browser.

1. In the HTML code, locate the list item with the Koala link and select it.

	Notice that when you select the code, the corresponding output is automatically highlighted browser. This feature is useful to see how an HTML block is rendered on the page.

 	![Selecting an HTML element in the page](./images/Selecting-an-HTML-element-in-the-page.png?raw=true "Selecting an HTML element in the page")

	_Selecting an HTML element in the page_

1. Click the **Toggle Inspection Mode** button to enable _Inspection Mode_ and click the navigation bar. On the right of the HTML code, in the Styles pane, you will see a list with the CSS styles applied to the selected element.

	> **Note:** since the header is a part of the site layout, Page Inspector will also open Site.Master file and highlight the segment of code affected.

 	![DiscoveringstylesWebForms](./images/DiscoveringstylesWebForms.png?raw=true "Discovering styles and source files of a selected element")

	_Discovering styles and source files of a selected element_

1. With the toggle inspection pointer enabled, move the mouse pointer below the menu bar and click the blank half circle.

 	![Selecting an element](./images/Selecting-an-element-WebForms.png?raw=true "Selecting an element")

	_Selecting an element_

1. In the Styles pane, locate the **background-image** item under the **.main-content** group. **Uncheck** the **background-image** and see what happens. You will notice that the browser will reflect the changes immediately and the circle is hidden.

	>**Note:** The changes you apply on the Page Inspector Styles tab do not affect the original stylesheet. You can uncheck styles or change their values as many times as you want, but they will be restored after refreshing the page.

	![Enabling and disabling CSS styles2](./images/Enabling-and-disabling-CSS-styles2.png?raw=true "Enabling and disabling CSS styles")

	_Enabling and disabling CSS styles_

1. Now, click the '**your** **logo here'** text on the header using the inspection mode.

1. In the **Styles** tab, locate the **font-size** CSS attribute under the **.site-title** group. Double-click the attribute once to edit its value. Replace the 2.3em value with **3em**, and then press ENTER. Notice that the title looks bigger.

 	![Changing CSS values in the Page Inspector2](./images/Changing-CSS-values-in-the-Page-Inspector.png?raw=true "Changing CSS values in the Page Inspector")

	_Changing CSS values in the Page Inspector_

1. Click the **Trace Styles** tab, located in the right pane of Page Inspector. This is an alternative way to see all the styles applied to the selection, ordered by attribute name.

 	![CSS styles tracing of the selected element](./images/CSS-styles-tracing-of-the-selected-element.png?raw=true "CSS styles tracing of the selected element")

	_CSS styles tracing of the selected element_

1. Another feature of Page Inspector is the Layout pane. Using the inspection mode, select the navigation bar and then click the **Layout** tab on the right pane. You will see the exact size of the selected element, as well as its offset, margin, padding and border size. Notice that you can also modify the values from this view.

 	![Element layout in Page Inspector](./images/Element-layout-in-Page-Inspector.png?raw=true "Element layout in Page Inspector")

 	_Element layout in Page Inspector_

#### Task 2 - Finding and Fixing Style Issues in the Photo Gallery ####

How would you diagnose Web pages issues with previous versions of Visual Studio? You are likely familiar with web debugging tools that run outside the Visual Studio IDE, like Internet Explorer Developer Tools or Firebug. Browsers only understand HTML, scripting and styles, while an underlying framework generates the HTML that will be rendered. For that reason, you often need to deploy the whole site to see how web pages look like.

You had probably followed these steps when you wanted to detect and fix an issue in your web site:

1. Run the Solution from Visual Studio, or deploy the page on the web server.

1. In the browser, open the developer tools you use, or simply open the source code and the styles and try to match the issue.
To find the files involved, you'd have used the "Search" or "Search in files" features with the name of the style classes.

1. Once the error is detected, stop the Web browser and the server.

1. Clear the browser cache.

1. Return to Visual Studio to apply a fix. Repeat all the steps to test.

As there is no real WYSIWYG in ASP.NET WebForms, some style issues are detected on a later stage, after running or deploying. Now, with Page Inspector, it is possible to preview any page without running the solution.

In this task, you will use the Page inspector for fixing some issues of the Photo Gallery application. In the following steps, you will detect and quickly fix some simple styling issue in the header.

1. Using Page Inspection, locate the **Register** and the **Log In** links at the left side of the header.

	Notice that the link is not displayed at the expected place on the right. You will now align the link to the right and restyle it accordingly.

 	![Log in link positioned on the left](./images/Locating-the-Register-and-Log-on-links.png?raw=true "Log in link positioned on the left")

	_Log In link positioned on the left_

1. With Toggle Inspection Mode selected, select the Log In link to open its code.

	Notice that the link source code is located in the **Site.Master** file, not in the Default.aspx page which is the place you might look in first place; you have been placed directly in the correct source file.

1. In the **Styles** tab, locate and click the **\
 #login** item, which is the HTML container for these links.

	Notice that the **#login** style is automatically located in **Site.css** after you click. Moreover, the code is now highlighted.

 	![Selecting the CSS styles](./images/Selecting-the-CSS-styles.png?raw=true "Selecting the CSS styles")

	_Selecting the CSS styles_

1. Uncomment the **text-align** attribute in the highlighted code by removing the opening and closing characters and save the **Site.css** file.

	Page Inspector is aware of all the different files that compose the current page, and it can detect when any of these files change. It alerts you whenever the current page in browser is not in sync with the source files.

1. In the Page Inspector browser, click the bar located below the address bar to save the changes and reload the page.

	![Reloadingthepage](images/Reloadingthepage.png?raw=true)

	_Reloading the page_

	The links are now at the right, but they still look like a bulleted list. Now, you will remove the bullets and align the links horizontally.

	![Updated page](images/reloading-the-page3.png?raw=true)

	_Updated page_

1. Using the inspection mode, select any of the **\
** items that contain the “Register” and “Log in” links. Then, click the **\
 #login** item to access **Styles.css** code.

 	![Finding the style](./images/Finding-the-style.png?raw=true "Finding the style")

	_Finding the style_

1. In **Style.css**, uncomment the code for **#login li** items. The style you are adding will hide the bullet and display the items horizontally.

 	![Restyling the login links](./images/Restyling-the-login-links.png?raw=true "Restyling the login links")

	_Restyling the login links_

1. Save **Style.css** file and click once on the bar located below the address to reload the page. Notice that the links appear correctly.

 	![Links aligned to the right side](./images/Links-aligned-to-the-right-side.png?raw=true "Links aligned to the right side")

	_Links aligned to the right side_

1. Finally, you will change the header title. Instead of searching for the '**your logo here'** text in all the files, use the inspection mode to click the text and get to source code that generates it.

 	![Finding the site title](./images/Finding-the-site-title.png?raw=true "Finding the site title")

	_Finding the site title_

1. Now you are in **Site.Master**, replace the '**your logo here**' text with '**Photo Gallery**'. Save and update the Page Inspector browser.

 	![Photo Gallery page updated](./images/PhotoGallerypage.png?raw=true "Photo Gallery page updated")

	_Photo Gallery page updated_

1. Finally press **F5** to run the app the check out all the changes work as expected.

>**Note:** Additionally, you can deploy this application to Windows Azure Web Sites following [Appendix B: Publishing an ASP.NET MVC 4 Application using Web Deploy](#AppendixB).

---

## Summary ##

By completing this Hands-On Lab, you have learnt how to use Page Inspector to preview your Web application without having to rebuild and run the Web site in a browser. In addition, you have learnt how to quickly find and fix bugs by accessing directly from the rendered output to the source code.

## Appendix A: Installing Visual Studio Express 2012 for Web ##

You can install **Microsoft Visual Studio Express 2012 for Web** or another "Express" version using the **[Microsoft Web Platform Installer](http://www.microsoft.com/web/downloads/platform.aspx)**. The following instructions guide you through the steps required to install _Visual studio Express 2012 for Web_ using _Microsoft Web Platform Installer_.

1. Go to [http://go.microsoft.com/?linkid=9810169](http://go.microsoft.com/?linkid=9810169). Alternatively, if you already have installed Web Platform Installer, you can open it and search for the product "_Visual Studio Express 2012 for Web with Windows Azure SDK_".

1. Click on **Install Now**. If you do not have **Web Platform Installer** you will be redirected to download and install it first.

1. Once **Web Platform Installer** is open, click **Install** to start the setup.

	![Install Visual Studio Express](images/install-visual-studio-express.png?raw=true "Install Visual Studio Express")

 	_Install Visual Studio Express_

1. Read all the products' licenses and terms and click **I Accept** to continue.

	![Accepting the license terms](images/accepting-the-license-terms.png?raw=true)

	_Accepting the license terms_

1. Wait until the downloading and installation process completes.

	![Installation progress](images/installation-progress.png?raw=true)

	_Installation progress_

1. When the installation completes, click **Finish**.

	![Installation completed](images/installation-completed.png?raw=true)

	_Installation completed_

1. Click **Exit** to close Web Platform Installer.

1. To open Visual Studio Express for Web, go to the **Start** screen and start writing "**VS Express**", then click on the **VS Express for Web** tile.

	![VS Express for Web tile](images/vs-express-for-web-tile.png?raw=true)

	_VS Express for Web tile_

## Appendix B: Publishing an ASP.NET MVC 4 Application using Web Deploy ##

This appendix will show you how to create a new web site from the Windows Azure Management Portal and publish the application you obtained by following the lab, taking advantage of the Web Deploy publishing feature provided by Windows Azure.

#### Task 1 – Creating a New Web Site from the Windows Azure Portal ####

1. Go to the [Windows Azure Management Portal](https://manage.windowsazure.com/) and sign in using the Microsoft credentials associated with your subscription.

	> **Note:** With Windows Azure you can host 10 ASP.NET Web Sites for free and then scale as your traffic grows. You can sign up [here](http://aka.ms/aspnet-hol-azure).

	![Log on to Windows Azure portal](images/login.png?raw=true "Log on to Windows Azure portal")

	_Log on to Windows Azure Management Portal_

1. Click **New** on the command bar.

	![Creating a new Web Site](images/new-website.png?raw=true "Creating a new Web Site")

	_Creating a new Web Site_

1. Click **Compute** | **Web Site**. Then select **Quick Create** option. Provide an available URL for the new web site and click **Create Web Site**.

	> **Note:** A Windows Azure Web Site is the host for a web application running in the cloud that you can control and manage. The Quick Create option allows you to deploy a completed web application to the Windows Azure Web Site from outside the portal. It does not include steps for setting up a database.

	![Creating a new Web Site using Quick Create](images/quick-create.png?raw=true "Creating a new Web Site using Quick Create")

	_Creating a new Web Site using Quick Create_

1. Wait until the new **Web Site** is created.

1. Once the Web Site is created click the link under the **URL** column. Check that the new Web Site is working.

	![Browsing to the new web site](images/navigate-website.png?raw=true "Browsing to the new web site")

	_Browsing to the new web site_

	![Web site running](images/website-working.png?raw=true "Web site running")

	_Web site running_

1. Go back to the portal and click the name of the web site under the **Name** column to display the management pages.

	![Opening the web site management pages](images/go-to-the-dashboard.png?raw=true "Opening the web site management pages")

	_Opening the Web Site management pages_

1. In the **Dashboard** page, under the **quick glance** section, click the **Download publish profile** link.

	> **Note:** The _publish profile_ contains all of the information required to publish a web application to a Windows Azure website for each enabled publication method. The publish profile contains the URLs, user credentials and database strings required to connect to and authenticate against each of the endpoints for which a publication method is enabled. **Microsoft WebMatrix 2**, **Microsoft Visual Studio Express for Web** and **Microsoft Visual Studio 2012** support reading publish profiles to automate configuration of these programs for publishing web applications to Windows Azure websites.

	![Downloading the web site publish profile](images/download-publish-profile.png?raw=true "Downloading the web site publish profile")

	_Downloading the Web Site publish profile_

1. Download the publish profile file to a known location. Further in this exercise you will see how to use this file to publish a web application to a Windows Azure Web Sites from Visual Studio.

	![Saving the publish profile file](images/save-link.png?raw=true "Saving the publish profile")

	_Saving the publish profile file_

#### Task 2 – Configuring the Database Server ####

If your application makes use of SQL Server databases you will need to create a SQL Database server. If you want to deploy a simple application that does not use SQL Server you might skip this task.

1. You will need a SQL Database server for storing the application database. You can view the SQL Database servers from your subscription in the Windows Azure Management portal at **Sql Databases** | **Servers** | **Server's Dashboard**. If you do not have a server created, you can create one using the **Add** button on the command bar. Take note of the **server name and URL, administrator login name and password**, as you will use them in the next tasks. Do not create the database yet, as it will be created in a later stage.

	![SQL Database Server Dashboard](images/sql-database-server-dashboard.png?raw=true "SQL Database Server Dashboard")

	_SQL Database Server Dashboard_

1. In the next task you will test the database connection from Visual Studio, for that reason you need to include your local IP address in the server's list of **Allowed IP Addresses**. To do that, click **Configure**, select the IP address from **Current Client IP Address** and paste it on the **Start IP Address** and **End IP Address** text boxes and click the ![add-client-ip-address-ok-button](images/add-client-ip-address-ok-button.png?raw=true) button.

	![Adding Client IP Address](images/add-client-ip-address.png?raw=true)

	_Adding Client IP Address_

1. Once the **Client IP Address** is added to the allowed IP addresses list, click on **Save** to confirm the changes.

	![Confirm Changes](images/add-client-ip-address-confirm.png?raw=true)

	_Confirm Changes_

#### Task 3 – Publishing an ASP.NET MVC 4 Application using Web Deploy ####

1. Go back to the ASP.NET MVC 4 solution. In the **Solution Explorer**,  right-click the web site project and select **Publish**.

	![Publishing the Application](images/publishing-the-application.png?raw=true "Publishing the Application")

	_Publishing the web site_

1. Import the publish profile you saved in the first task.

	![Importing the publish profile](images/importing-the-publish-profile.png?raw=true "Importing the publish profile")

	_Importing publish profile_

1. Click **Validate Connection**. Once Validation is complete click **Next**.

	> **Note:** Validation is complete once you see a green checkmark appear next to the Validate Connection button.

	![Validating connection](images/validating-connection.png?raw=true "Validating connection")

	_Validating connection_

1. In the **Settings** page, under the **Databases** section, click the button next to your database connection's textbox (i.e. **DefaultConnection**).

	![Web deploy configuration](images/web-deploy-configuration.png?raw=true "Web deploy configuration")

	_Web deploy configuration_

1. Configure the database connection as follows:
	* In the **Server name** type your SQL Database server URL using the _tcp:_ prefix.
	* In **User name** type your server administrator login name.
	* In **Password** type your server administrator login password.
	* Type a new database name.

	![Configuring destination connection string](images/configuring-destination-connection-string.png?raw=true "Configuring destination connection string")

	_Configuring destination connection string_

1. Then click **OK**. When prompted to create the database click **Yes**.

	![Creating the database](images/creating-the-database.png?raw=true "Creating the database string")

	_Creating the database_

1. The connection string you will use to connect to SQL Database in Windows Azure is shown within Default Connection textbox. Then click **Next**.

	![Connection string pointing to SQL Database](images/sql-database-connection-string.png?raw=true "Connection string pointing to SQL Database")

	_Connection string pointing to SQL Database_

1. In the **Preview** page, click **Publish**.

	![Publishing the web application](images/publishing-the-web-application.png?raw=true "Publishing the web application")

	_Publishing the web application_

1. Once the publishing process finishes, your default browser will open the published web site.

repository: Microsoft-Web/HOL-PageInspector

repo_name: Microsoft-Web/HOL-PageInspector


text:
# Deleting the Application and Virtual Machine
We can delete our application once we no longer need it.

## Command Line Interface
First, we need to connect to the virtual machine, stop the Genie application and Nginx, and then unmount the persistent storage volume.

```bash
sudo umount /dev/vdb
```

Then, let's disconnect from the virtual machine.  Removing the persistent storage will destroy the database and logs.

```bash
openstack volume delete $VOLUME_NAME
```

Now, we have deleted the application and virtual machine.


text:
# ThermoSlider

Thermo slider is a Custom UIControl based slider component that can be used easliy in any project by just importing a few classes.

**Screenshot**

repository: siddharth-paneri/ThermoSlider

repo_name: siddharth-paneri/ThermoSlider


text:
---
title: "AWS Modernization with Armory Enterprise"
chapter: true
weight: 1
---

# AWS Modernization Workshop with Armory Enterprise
[![Armory Logo](../images/armory-horizontal-logo.png "Armory Logo")](https://www.armory.io/)
### Welcome
Welcome to the AWS Modernization Workshop with Armory Enterprise! In this workshop, you will gain hands-on experience using Armory's QuickStart to deploy an EKS Cluster into your AWS account, while also configuring for different deployment types and how to scale and rollback your deployments.

branch_name: refs/heads/main


text:
# HTTP server implementation in Rust
The purpose of this project was to develop a toy implementation of a HTTP server to learn Rust features. It is partially inspired by the tutorial written in [The Rust Book](https://doc.rust-lang.org/book/ch20-00-final-project-a-web-server.html). However, some additional features were developped (MIME type handler, etc). The server handles GET request, reads html files as well as png or jpg.

## Example

### Running the server on http://<IP_ADDRESS>:5666

Move to `example` folder and run the server:

```
cd example
cargo run --package http-server --bin http-server <IP_ADDRESS>:5666
```

Then in a web browser, type the following URL: http://<IP_ADDRESS>:5666/hello.html. A simple HTML page should be displayed.

## Authors

* **Romain Desarzens** - *Initial work* - [rdesarz](https://github.com/rdesarz)

## License

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

repository: rdesarz/rust-http-server

branch_name: refs/heads/develop

gha_language: Rust

repo_name: rdesarz/rust-http-server


text:
# ZenPacks.daviswr.HostResources
ZenPack to monitor memory, swap, and processor utilization using HOST-RESOURCES-MIB, including CPU core components modeled by zenoss.snmp.CpuMap.

UCD-SNMP-MIB is likely a better source for memory and CPU utilization, but Windows and many Linux-based appliances lack support for it, so information in HOST-RESOURCES-MIB is a viable way to monitor basic health on those systems.

## Requirements
 * `snmpwalk` to be installed on the Zenoss collector and in the zenoss user's $PATH

## Limitations
 * Device-level datasources probably won't work on Zenoss 5+
 * SNMPv3 isn't currently supported for the device-level datasources
 * SNMPv1 or v2c usage for said datasources is currently determined by `defversion` in `snmp.conf` on the collector
 * These limitations will probably be resolved when the collection shell scripts are rewritten as PythonCollector datasources.

## Usage
I'm not going to make any assumptions about your device class organization, so it's up to you to apply the `zenoss.snmp.CpuMap` modeler and bind the `Host Resources CPU` & `Host Resources Memory` templates to the appropriate class or device.


text:
# Yet Another CLi Spinner (for Go)
[![License](https://img.shields.io/github/license/theckman/yacspin.svg)](https://github.com/theckman/yacspin/blob/master/LICENSE)
[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/theckman/yacspin)
[![Latest Git Tag](https://img.shields.io/github/tag/theckman/yacspin.svg)](https://github.com/theckman/yacspin/releases)
[![Travis master Build Status](https://img.shields.io/travis/theckman/yacspin/master.svg?label=TravisCI)](https://travis-ci.org/theckman/yacspin/branches)
[![Go Report Card](https://goreportcard.com/badge/github.com/theckman/yacspin)](https://goreportcard.com/report/github.com/theckman/yacspin)
[![Codecov](https://img.shields.io/codecov/c/github/theckman/yacspin)](https://codecov.io/gh/theckman/yacspin)

Package `yacspin` provides yet another CLi spinner for Go, taking inspiration
(and some utility code) from the https://github.com/briandowns/spinner project.
Specifically `yacspin` borrows the default character sets, and color mappings to
github.com/fatih/color colors, from that project.

## License
Because this package adopts the spinner character sets from https://github.com/briandowns/spinner,
this package is released under the Apache 2.0 License.

## Yet Another CLi Spinner?
The other Go spinner ties the ability to show updated information to the
spinner's animation, meaning you can't always show all the information you want
to the end user without changing the animation speed. In addition there were
also some API design choices that have made it unsafe for concurrent use (while
it's running), which presents challenges when trying to update the text in the
spinner while it's animating in the first place

There was also an interest in the spinner being able to represent a task, and to
indicate whether it failed or was successful. This would have further compounded
the API issues mentioned above.

This project takes inspiration from that other project, and takes a new approach
to address the challenges above.

## Features
#### Provided Spinners
There are over 70 spinners available in the `CharSets` package variable. They
were borrowed from [github.com/briandowns/spinner](https://github.com/briandowns/spinner).
There is a table with all of the spinners [at the bottom of this README](#Spinners).

#### Dynamic Width of Animation
Because of how some spinners are animated, they may have different widths are
different times in the animation. The spinner calculates the maximum width, and
pads the animation to ensure the text's position on the screen doesn't change.
This results in a smoother looking animation.

##### yacspin
![yacspin animation with dynamic width](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/features/width_good.gif)

##### other spinners
![other spinners' animation with dynamic width](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/features/width_bad.gif)

#### Success and Failure Results
The spinner has both a `Stop()` and `StopFail()` method, which allows the
spinner to result in a success message or a failure message. The messages,
colors, and even the character used to denote success or failure are
customizable in either the initial config or via the methods.

By doing this you can use the spinner to display the status of a list of tasks
being executed serially.

##### Stop
![Animation with Success](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/features/stop.gif)

##### StopFail
![Animation with Failure](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/features/stop_fail.gif)

#### Concurrency
The spinner is safe for concurrent use, so you can update any of its settings
via methods whether the spinner is stopped or is currently running.

#### Live Updates
Most spinners tie the ability to show new messages with the animation of the
spinner. So if the spinner animates every 200ms, you can only show updated
information every 200ms. If you wanted more frequent updates, you'd need to
tradeoff the asthetics of the animation to display more data.

This spinner updates the printed information of the spinner immediately on
change, without the animation updating. This allows you to use an animation
speed that looks astheticaly pleasing, while also knowing the data presented to
the user will be updated live.

You can see this in action in the following gif, where the filenames being
uploaded are rendered independent of the spinner being animated:

![Animation with Success](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/features/stop.gif)

#### Pausing for Updates
Sometimes you want to change a few settings, and don't want the spinner to
render your partially applied configuration. If your spinner is running, and you
want to change a few configuration items via method calls, you can `Pause()` the
spinner first. After making the changes you can call `Unpause()`, and it will
continue rendering like normal with the newly applied configuration.

## Usage
```
go get github.com/theckman/yacspin
```

Within the `yacspin` package there are some default spinners stored in the
`yacspin.CharSets` variable, and you can also provide your own. There is also a
list of known colors in the `yacspin.ValidColors` variable.

```Go
cfg := yacspin.Config{
	Frequency:       100 * time.Millisecond,
	CharSet:         yacspin.CharSets[59],
	Suffix:          " backing up database to S3",
	SuffixAutoColon: true,
	Message:         "exporting data",
	StopCharacter:   "✓",
	StopColors:      []string{"fgGreen"},
}

spinner, err := yacspin.New(cfg)
// handle the error

spinner.Start()

// doing some work
time.Sleep(2 * time.Second)

spinner.Message("uploading data")

// upload...
time.Sleep(2 * time.Second)

spinner.Stop()
```

## Spinners
yacspin.CharSets index | sample gif (Frequency: 200ms)
-----------------------|------------------------------
0 | ![0 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/0.gif)
1 | ![1 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/1.gif)
2 | ![2 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/2.gif)
3 | ![3 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/3.gif)
4 | ![4 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/4.gif)
5 | ![5 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/5.gif)
6 | ![6 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/6.gif)
7 | ![7 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/7.gif)
8 | ![8 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/8.gif)
9 | ![9 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/9.gif)
10 | ![10 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/10.gif)
11 | ![11 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/11.gif)
12 | ![12 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/12.gif)
13 | ![13 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/13.gif)
14 | ![14 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/14.gif)
15 | ![15 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/15.gif)
16 | ![16 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/16.gif)
17 | ![17 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/17.gif)
18 | ![18 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/18.gif)
19 | ![19 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/19.gif)
20 | ![20 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/20.gif)
21 | ![21 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/21.gif)
22 | ![22 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/22.gif)
23 | ![23 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/23.gif)
24 | ![24 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/24.gif)
25 | ![25 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/25.gif)
26 | ![26 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/26.gif)
27 | ![27 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/27.gif)
28 | ![28 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/28.gif)
29 | ![29 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/29.gif)
30 | ![30 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/30.gif)
31 | ![31 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/31.gif)
32 | ![32 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/32.gif)
33 | ![33 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/33.gif)
34 | ![34 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/34.gif)
35 | ![35 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/35.gif)
36 | ![36 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/36.gif)
37 | ![37 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/37.gif)
38 | ![38 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/38.gif)
39 | ![39 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/39.gif)
40 | ![40 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/40.gif)
41 | ![41 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/41.gif)
42 | ![42 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/42.gif)
43 | ![43 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/43.gif)
44 | ![44 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/44.gif)
45 | ![45 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/45.gif)
46 | ![46 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/46.gif)
47 | ![47 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/47.gif)
48 | ![48 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/48.gif)
49 | ![49 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/49.gif)
50 | ![50 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/50.gif)
51 | ![51 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/51.gif)
52 | ![52 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/52.gif)
53 | ![53 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/53.gif)
54 | ![54 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/54.gif)
55 | ![55 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/55.gif)
56 | ![56 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/56.gif)
57 | ![57 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/57.gif)
58 | ![58 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/58.gif)
59 | ![59 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/59.gif)
60 | ![60 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/60.gif)
61 | ![61 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/61.gif)
62 | ![62 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/62.gif)
63 | ![63 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/63.gif)
64 | ![64 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/64.gif)
65 | ![65 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/65.gif)
66 | ![66 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/66.gif)
67 | ![67 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/67.gif)
68 | ![68 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/68.gif)
69 | ![69 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/69.gif)
70 | ![70 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/70.gif)
71 | ![71 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/71.gif)
72 | ![72 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/72.gif)
73 | ![73 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/73.gif)
74 | ![74 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/74.gif)
75 | ![75 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/75.gif)
76 | ![76 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/76.gif)
77 | ![77 gif](https://raw.githubusercontent.com/theckman/yacspin-gifs/master/spinners/77.gif)

repository: OtisOat/yacspin

repo_name: OtisOat/yacspin


text:
# Github Search
A vanilla JavaScript application to find github users by providing their username

The application uses fetch API to fetch data from the github API.

The application fetches the users ten most recent repositories.

It displays the users profile

The project dispalys the public gists, public repositories, the followers and the people a given user follows.

The project displays the repositories watchers stars and forks for each repository

repository: petershivachi/github-search

gha_language: JavaScript

repo_name: petershivachi/github-search


text:
# Get Domain Expiration Date

Application to get the expiration date of any domain name (if publicly available) using only the socket library in Python.

To try out:
1. Import get-domain-expiration.py
2. Run the function: `get_expiration_date(domain)`


text:
# Documentation

## Overview

Epiphany at its core is a full automation of Kubernetes and Docker plus additional builtin services/components like:

- Kafka or RabbitMQ for high speed messaging/events
- Prometheus and Alertmanager for monitoring with Graphana for visualization
- Elasticsearch and Kibana for centralized logging
- HAProxy for loadbalancing
- Postgress for storage
- KeyCloak for authentication

Epiphany can run on as few as one node (laptop, desktop, server) but the real value comes from running 3 or more nodes for scale and HA. Nodes can be added or removed at will depending on data in the manifest. Everything is data driven so simply changing the manifest data and running the automation will modify the environment.

We currently use Terraform and Ansible for our automation orchestration. All automation is idempotent so you can run it as many times as you wish and it will maintain the same state unless you change the data. If someone makes a "snow flake" change to the environment (you should never do this) then simply running the automation again will put the environment back to the desired state.

## Note about legacy Epiphany

Epicli 0.4.0 adds support for Azure deployments so using legacy Epiphany is no longer needed. We advice new projects to start straight with Epicli and older projects which still use legacy Epiphany to move over to Epicli 0.4.0. A tool to migrate legacy data files to the new format is in the works and will be released shortly.

The Epicli 0.5.0 release later this year will drop the inclusion of the legacy path entirely.

## Note about documentation

- The documentation is a moving target. Always check the latest documentation on the develop branch. There is a big chance that whatever you are looking for is already added/updated or improved there.
- We are currently in the process of documenting all features of Epicli and phasing out legacy Epiphany documentation. When documentation is specific for `Epicli` or `Legacy` it will be marked under a header with the these names. If its not under any of these headers then it applies to both.

## Quickstart

### Epicli

Use the following command to see a full run-down of all commands and flags:

```shell
epicli --help
```

Generate a new minimum cluster definition:

```shell
epicli init -p aws -n demo
```

This minimum file definition is fine to start with, if you need more control over the infrastructure created you can also create a full definition:

```shell
epicli init -p aws -n demo --full
```

You will need to modify a few values (like your AWS secrets, directory path for SSH keys). Once you are done with `demo.yaml` you can start cluster deployment by executing:

```shell
epicli apply -f demo.yaml
```
You will be asked for a password that will be used for encryption of some of build artifacts. More information [here](docs/home/howto/SECURITY.md#how-to-run-epicli-with-password)

Find more information using table of contents below - especially the [How-to guides](docs/home/HOWTO.md).

### Legacy

Fork the `epiphany` repository and modify the yaml's under `core/data/` directory. For example in `data/azure/infrastructure/epiphany-playground/basic-data.yaml` file you will need to modify a few values (like you Azure subscription name, directory path for ssh keys). Once you are done done with `basic-data.yaml` you can execute Epiphany with the command:

```shell
./epiphany -a -b -i -f infrastructure/epiphany-playground -t infrastructure/epiphany-template
```

This setup works on a simplified file that is fine to start with, if you need more control over the infrastructure created you should look at `data/azure/infrastructure/epiphany-bld-apps/data.yaml`.
Execution of this full profile would look like:

```shell
./epiphany -a -b -i -f infrastructure/epiphany-bld-apps
```

Find more information using table of contents below - especially the [How-to guides](docs/home/HOWTO.md).

## Documentation

<!-- TOC -->

- Platform
  - [Resources](docs/home/RESOURCES.md)
  - [How-to guides](docs/home/HOWTO.md)
  - [Components](docs/home/COMPONENTS.md)
  - [Security](docs/home/SECURITY.md)
  - [Troubleshooting](docs/home/TROUBLESHOOTING.md)
  - [Changelog](CHANGELOG.md)
- Architecture
  - [Logical View](docs/architecture/logical-view.md)
  - [Process View](docs/architecture/process-view.md)
  - [Physical View](docs/architecture/physical-view.md)
- Contributing
  - [Governance model](docs/home/GOVERNANCE.md)
  - [Development environment](docs/home/DEVELOPMENT.md)
  - [GIT Workflow](docs/home/GITWORKFLOW.md)

<!-- TOC -->

repository: erzetpe/epiphany

gha_language: Python

repo_name: erzetpe/epiphany