text:
# Blade Icons

A package to easily make use of SVG icons in your Laravel Blade views. Originally "Blade SVG" by [Adam Wathan](https://twitter.com/adamwathan).

Turn...

```html
<!-- camera.svg -->
<svg fill="none" viewBox="0 0 24 24" stroke="currentColor" class="w-6 h-6">
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 9a2 2 0 012-2h.93a2 2 0 001.664-.89l.812-1.22A2 2 0 0110.07 4h3.86a2 2 0 011.664.89l.812 1.22A2 2 0 0018.07 7H19a2 2 0 012 2v9a2 2 0 01-2 2H5a2 2 0 01-2-2V9z"/>
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 13a3 3 0 11-6 0 3 3 0 016 0z"/>
</svg>
```

Into...

```blade
<x-icon-camera class="w-6 h-6" />
```

Or into...

```blade
@svg('camera', 'w-6 h-6')
```

Looking for a specific icon? Try our icon search: https://blade-ui-kit.com/blade-icons#search

Any sponsorship to [help fund development](https://github.com/sponsors/driesvints) is greatly appreciated ❤

## Icon Packages

Blade Icons is a base package to make it easy for you to use SVG icons in your app. In addition, there's also quite some third party icon set packages. Thanks to the community for contributing these!

We're not accepting requests to build new icon packages ourselves but you can [start building your own](#building-packages).

- [Blade Academicons](https://github.com/codeat3/blade-academicons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Akar Icons](https://github.com/codeat3/blade-akar-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Ant Design Icons](https://github.com/codeat3/blade-ant-design-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Bootstrap Icons](https://github.com/davidhsianturi/blade-bootstrap-icons) by [David H. Sianturi](https://github.com/davidhsianturi)
- [Blade Boxicons](https://github.com/mallardduck/blade-boxicons) by [Dan Pock](https://github.com/mallardduck)
- [Blade Bytesize Icons](https://github.com/codeat3/blade-bytesize-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Carbon Icons](https://github.com/codeat3/blade-carbon-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Clarity Icons](https://github.com/codeat3/blade-clarity-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Coolicons](https://github.com/codeat3/blade-coolicons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade CoreUI Icons](https://github.com/ublabs/blade-coreui-icons) by [Adrián UB](https://github.com/adrian-ub)
- [Blade Country Flags](https://github.com/stijnvanouplines/blade-country-flags) by [Stijn Vanouplines](https://github.com/stijnvanouplines)
- [Blade Cryptocurrency Icons](https://github.com/codeat3/blade-cryptocurrency-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade CSS Icons](https://github.com/khatabwedaa/blade-css-icons) by [khatabWedaa](https://github.com/khatabwedaa)
- [Blade Dev Icons](https://github.com/codeat3/blade-devicons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Elusive Icons](https://github.com/codeat3/blade-elusive-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Emblemicons](https://github.com/codeat3/blade-emblemicons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Entypo](https://github.com/owenvoke/blade-entypo) by [Owen Voke](https://github.com/owenvoke)
- [Blade EOS Icons](https://github.com/codeat3/blade-eos-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Eva Icons](https://github.com/Hasnayeen/blade-eva-icons) by [Nehal Hasnayeen](https://github.com/Hasnayeen)
- [Blade Evil Icons](https://github.com/codeat3/blade-evil-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Feather Icons](https://github.com/brunocfalcao/blade-feather-icons) by [Bruno Falcão](https://github.com/brunocfalcao)
- [Blade File Icons](https://github.com/codeat3/blade-file-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade File Type Icons](https://github.com/log1x/blade-filetype-icons) by [Brandon Nifong](https://github.com/log1x)
- [Blade FluentUi System Icons](https://github.com/codeat3/blade-fluentui-system-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Font Audio](https://github.com/codeat3/blade-fontaudio) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Font Awesome](https://github.com/owenvoke/blade-fontawesome) by [Owen Voke](https://github.com/owenvoke)
- [Blade Fontisto Icons](https://github.com/codeat3/blade-fontisto-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Fork Awesome](https://github.com/codeat3/blade-forkawesome) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Github Octicons](https://github.com/Activisme-be/Blade-github-octicons) by [Tim Joosten](https://github.com/Tjoosten)
- [Blade Google Material Design Icons](https://github.com/codeat3/blade-google-material-design-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Gov Icons](https://github.com/codeat3/blade-govicons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Grommet Icons](https://github.com/codeat3/blade-grommet-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Health Icons](https://github.com/troccoli/blade-health-icons) by [Giulio Troccoli-Allard](https://github.com/troccoli)
- [Blade Heroicons](https://github.com/blade-ui-kit/blade-heroicons) by [Dries Vints](https://github.com/driesvints)
- [Blade IcoMoon Icons](https://github.com/nerdroid23/blade-icomoon) by [Joe Sylnice](https://github.com/nerdroid23)
- [Blade Icon Park Icons](https://github.com/codeat3/blade-iconpark) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Iconic Icons](https://github.com/ItsMalikJones/blade-iconic) by [Malik Alleyne-Jones](https://github.com/ItsMalikJones)
- [Blade Iconoir](https://github.com/andreiio/blade-iconoir) by [Andrei Ioniță](https://github.com/andreiio)
- [Blade Iconsax](https://github.com/saade/blade-iconsax) by [Saade](https://github.com/saade)
- [Blade Ikonate Icons](https://github.com/codeat3/blade-ikonate) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Ionicons](https://github.com/Faisal50x/blade-ionicons) by [Faisal Ahmed](https://github.com/Faisal50x)
- [Blade Jam Icons](https://github.com/codeat3/blade-jam-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Line Awesome Icons](https://github.com/codeat3/blade-line-awesome-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Lineicons](https://github.com/datlechin/blade-lineicons) by [Ngô Quốc Đạt](https://github.com/datlechin)
- [Blade Lucide Icons](https://github.com/mallardduck/blade-lucide-icons) by [Dan Pock](https://github.com/mallardduck)
- [Blade Majestic Icons](https://github.com/codeat3/blade-majestic-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Maki Icons](https://github.com/codeat3/blade-maki-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Material Design Icons](https://github.com/postare/blade-mdi) by [Postare](https://github.com/postare)
- [Blade Microns](https://github.com/codeat3/blade-microns) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Mono Icons](https://github.com/codeat3/blade-mono-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Pepicons](https://github.com/codeat3/blade-pepicons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Phosphor icons](https://github.com/codeat3/blade-phosphor-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Pixelarticons](https://github.com/codeat3/blade-pixelarticons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Polaris Icons](https://github.com/Eduard9969/blade-polaris-icons) by [Samoilenko Eduard](https://github.com/Eduard9969)
- [Blade Prime Icons](https://github.com/codeat3/blade-prime-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Radix Icons](https://github.com/codeat3/blade-radix-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Remix Icon](https://github.com/andreiio/blade-remix-icon) by [Andrei Ioniță](https://github.com/andreiio)
- [Blade RPG Awesome Icons](https://github.com/codeat3/blade-rpg-awesome-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Simple Icons](https://github.com/ublabs/blade-simple-icons) by [Adrián UB](https://github.com/adrian-ub)
- [Blade Simple Line Icons](https://github.com/codeat3/blade-simple-line-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade System UIcons](https://github.com/codeat3/blade-system-uicons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Tabler Icons](https://github.com/ryangjchandler/blade-tabler-icons) by [Ryan Chandler](https://github.com/ryangjchandler)
- [Blade Teeny Icons](https://github.com/codeat3/blade-teeny-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Typicons](https://github.com/codeat3/blade-typicons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Uiw Icons](https://github.com/codeat3/blade-uiw-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Unicons](https://github.com/codeat3/blade-unicons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade UntitledIU Icons](https://github.com/mckenziearts/blade-untitledui-icons) by [Arthur Monney](https://github.com/mckenziearts)
- [Blade Vaadin Icons](https://github.com/codeat3/blade-vaadin-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade VSCode Codicons](https://github.com/codeat3/blade-codicons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Weather Icons](https://github.com/codeat3/blade-weather-icons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)
- [Blade Zondicons](https://github.com/blade-ui-kit/blade-zondicons) by [Swapnil Sarwe](https://github.com/swapnilsarwe)

## Requirements

- PHP 7.4 or higher
- Laravel 8.0 or higher

## Installation

Install the package with composer:

```bash
composer require blade-ui-kit/blade-icons
```

Then, publish the configuration and **uncomment** the `default` icon set:

```bash
php artisan vendor:publish --tag=blade-icons
```

Make sure that the path defined for this icon set exists. By default it's `resources/svg`. Your SVG icons will need to be placed in this directory.

## Upgrading

Please refer to [`the upgrade guide`](UPGRADE.md) when upgrading the library.

## Caching

When working with Blade Icons, and third party icon sets in particularly, you'll often be working with large icon sets. This can slow down your app tremendously, especially when making use of [Blade components](#components). To solve this issue, Blade Icons ships with caching support. To enable icon caching you can run the following command:

```blade
php artisan icons:cache
```

This will create a `blade-icons.php` file in `bootstrap/cache` similar to the `packages.php` cached file. It'll contain a manifest of all known sets and icons with their path locations.

Caching icons means you won't be able to add extra icons, change paths for icon sets or install/remove icon packages. To do so make sure you first clear the icons cache and cache after you've made these changes:

```bash
php artisan icons:clear
```

It's a good idea to add the `icons:cache` command as part of your deployment pipeline and always cache icons in production.

Alternatively, you may choose to [disable Blade components](#disabling-components) entirely.

Also, when adding new icons, renaming directories in your icon paths, it's always a good idea to clear your views before refreshing the page:

```bash
php artisan view:clear
```

## Configuration

### Defining Sets

Blade Icons support multiple sets. You can define these by passing a key/value combination in the `blade-icons.php` config file's `sets` setting:

```php
<?php

return [
    'sets' => [
        'default' => [
            'path' => 'resources/svg',
        ],
    ],
];
```

Feel free to add as many sets as you wish. Blade Icons ships with a `default` set for your app which you may adjust to your liking.

### Icon Paths

If you wanted to add icons from a different directory in your app, say `resources/images/svg`, you can set it like this:

```php
<?php

return [
    'sets' => [
        'default' => [
            'path' => 'resources/images/svg',
        ],
    ],
];
```

> **Warning**
> Always make sure you're pointing to existing directories.

#### Multiple Paths

In addition to a single path, you may define multiple paths for a single set with the `paths` option instead:

```php
<?php

return [
    'sets' => [
        'default' => [
            'paths' => [
                'resources/images/icon-set',
                'resources/images/other-icon-set',
            ],
        ],
    ],
];
```

This gives you the benefit from grouping icons from different paths under a single set where you can define the same prefix and default classes.

> **Warning**
> When using multiple paths instead of one, Blade Icons will return the first icon it finds when an icon name is present in more than one path. Please ensure you use unique icon names when registering multiple paths if you want to retrieve the correct icon.

### Filesystem Disk

If you host your icons on an external filesystem storage you can set the `disk` option for an icon set to a disk defined in your `filesystems.php` config file. For example, you might store your icons on an AWS S3 bucket which is set in your `filesystems.php` config file with a disk key of `s3-icons`:

```php
<?php

return [
    'sets' => [
        'default' => [
            'path' => '/',
            'disk' => 's3-icons',
        ],
    ],
];
```

And from now on our default set will pull the icons from the S3 bucket. Also notice we've adjusted the path to `/` because we store our icons in the root directory of this S3 bucket. If you have several icon sets uploaded to the same disk you can set your paths accordingly:

```php
<?php

return [
    'sets' => [
        'heroicons' => [
            'path' => 'heroicons',
            'disk' => 's3-icons',
            'prefix' => 'heroicon',
        ],
        'zondicons' => [
            'path' => 'zondicons',
            'disk' => 's3-icons',
            'prefix' => 'zondicon',
        ],
    ],
];
```

### Fallback Icons

If you want to provide a fallback icon when an icon cannot be found, you may define the `fallback` option on a specific set:

```php
<?php

return [
    'sets' => [
        'default' => [
            'fallback' => 'cake',
        ],
    ],
];
```

Now when you try to resolve a non-existing icon for the default icon set, it'll return the rendered "cake" icon instead.

You can also provide a global fallback icon instead. This icon will be used when an icon cannot be found and the set doesn't have its own fallback icon defined. It can reference any icon from any registered icon set.

```php
<?php

return [
    'fallback' => 'heroicon-cake',
];
```

> **Note**
> There's one caveat when using fallback icons and that is that they don't work when using [Blade Components](#components). In this case, Laravel will throw an exception that the component cannot be found. If you want to make use of fallback icons please consider one of the other usages.

### Prefixing Icons

In the default icon set the `icon` prefix will be applied to every icon, but you're free to adjust this in the `blade-icons.php` config file:

```php
<?php

return [
    'sets' => [
        'default' => [
            'prefix' => 'icon',
        ],
    ],
];
```

Defining a prefix for every set is required and every prefix should be unique.

When referencing icons with the [Blade directive](#directive) or [helper](#helper) you can omit the prefix to reference icons from the `default` set. When referencing icons from other sets, using the prefix is required.

When an icon in the default set has a name which collides with a prefix from a set then the icon from the default set is retrieved first.

Please note that it's best practice that your icons themselves do not have the prefix in their name. So if you have a prefix in your set called `icon` and your icons are named `icon-example.svg` you should rename them to `example.svg`. Otherwise you can run into unexpected name resolving issues.

It's also important to note that icon prefixes cannot contain dashes (`-`) as this is the delimiter which we use to split it from the rest of the icon name.

### Default Classes

You can optionally define classes which will be applied to every icon by filling in the `class` setting in your `blade-icons.php` config file:

```php
<?php

return [
    'class' => 'icon icon-default',
];
```

If you don't want any classes to be applied by default then leave this as an empty string. Additionally, the same option is available in sets so you can set default classes on every set.

The sequence in which classes get applied is `<global classes> <set classes> <explicit classes>`. You can always override this by passing an explicit class with your attributes. Component classes cannot be overridden.

### Default Attributes

You can also optionally define some attributes which will be added to every icon in the `attributes` setting of your `blade-icons.php` config file:

```php
<?php

return [
    'attributes' => [
        'width' => 50,
        'height' => 50,
    ],
];
```

This always needs to be an associative array.  Additionally, the same option is available in sets so you can set default attributes on every set.

The sequence in which classes get applied is `default attributes / set attributes / explicit attributes` where the latter overwrites the former. It is not possible to overwrite existing attributes on SVG icons. If you already have attributes defined on icons which you want to override, remove them first.

## Usage

There are several ways of inserting icons into your Blade templates. We personally recommend using Blade components, but you can also make use of a Blade directive if you wish.

### Components

The easiest way to get started with using icons from sets are Blade components:

```blade
<x-icon-camera/>
```

Icons in subdirectories can be referenced using dot notation:

```blade
<x-icon-solid.camera/>
```

You can also pass classes to your icon components (default classes will be applied as well):

```blade
<x-icon-camera class="icon-lg"/>
```

Or any other attributes for that matter:

```blade
<x-icon-camera class="icon-lg" id="settings-icon" style="color: #555" data-baz/>
```

> **Note**
> With Blade components, using a prefix is always required, even when referencing icons from the default set.

#### Deferring icons

When you're using the same icon in lots of places on the page the DOM element count may explode upwards.
To remedy this you can add the defer attribute to the components:

```blade
<x-icon-camera defer />
```

This will push the icons to the stack "bladeicons", you should load this stack at the bottom of your page

```blade
   ...
    <svg hidden class="hidden">
        @stack('bladeicons')
    </svg>
</body>
</html>
```

##### Using deferred icons in JavaScript

You can re-use your icons from blade in your JavaScript rendered views by providing a custom defer value that will be used
as an identifier:

```blade
<x-icon-camera defer="my-custom-hash" />
```

Then, in your JavaScript, create an `svg` element with `use` and `href="#icon-{your-hash}"` attribute.

```javascript
function icon() {
    return <svg><use href="#icon-my-custom-hash"></use></svg>
}
```

#### Default Component

If you don't want to use the component syntax from above you can also make use of the default `Icon` component that ships with Blade Icons. Simply pass the icon name through the `$name` attribute:

```blade
<x-icon name="camera"/>
```

If you want to use a different name for this component instead you can customize the `components.default` option in your `blade-icons.php` config file:

```php
<?php

return [
    'components' => [
        'default' => 'svg',
    ],
];
```

Then reference the default icon as follow:

```blade
<x-svg name="camera"/>
```

You can also completely disable this default component if you want by setting its name to `null`:

```php
<?php

return [
    'components' => [
        'default' => null,
    ],
];
```

#### Disabling Components

Although they're enabled by default, if you don't wish to use components at all you may choose to disable them completely by setting the `components.disabled` setting in your `blade-icons.php` config file to `true`:

```php
<?php

return [
    'components' => [
        'disabled' => true,
    ],
];
```

Doing this makes sense when you're only using [the directive](#directive) or [the helper](#helper) and can improve overall performance.

### Directive

If components aren't really your thing you can make use of the Blade directive instead. If you defined a default `icon` class in your config and want to render a `camera` icon with an `icon-lg` class you can do that like so:

```blade
@svg('camera', 'icon-lg')
```

Any additionally attributes can be passed as a third array argument, and they'll be rendered on the `svg` element:

```blade
@svg('camera', 'icon-lg', ['id' => 'settings-icon'])
```

If you don't have a class to be defined you can also pass these attributes as the second parameter:

```blade
@svg('camera', ['id' => 'settings-icon'])
```

If you want to override the default classes, pass in the class as an attribute:

```blade
@svg('camera', ['class' => 'icon-lg'])
```

Attributes without a key, are supported too:

```blade
@svg('camera', ['data-foo'])
```

### Helper

If you'd like, you can use the `svg` helper to expose a fluent syntax for setting SVG attributes:

```blade
{{ svg('camera')->id('settings-icon')->dataFoo('bar')->dataBaz() }}
```

## Building Packages

If you're interested in building your own third party package to integrate an icon set, it's pretty easy to do so. We've created [a template repo for you to get started with](https://github.com/blade-ui-kit/blade-icons-template). You can find the getting started instructions in its readme.

If you want to learn how to create packages we can recommend these two excellent courses:

- [PHP Package Development](https://phppackagedevelopment.com) by [Marcel Pociot](https://twitter.com/marcelpociot)
- [Laravel Package Training](https://laravelpackage.training) by [Freek Van der Herten](https://twitter.com/freekmurze)

Make sure to load your SVGs from the `register` method of your package's service provider. Provide the path to your SVGs and provide your own unique set name and component prefix:

```php
use BladeUI\Icons\Factory;

public function register(): void
{
    $this->callAfterResolving(Factory::class, function (Factory $factory) {
        $factory->add('heroicons', [
            'path' => __DIR__.'/../resources/svg',
            'prefix' => 'heroicon',
        ]);
    });
}
```

Now your icons can be referenced using a component, directive or helper:

```blade
<x-heroicon-o-bell/>

@svg('heroicon-o-bell')

{{ svg('heroicon-o-bell') }}
```

Don't forget to make `blade-ui-kit/blade-icons` a requirement of your package's `composer.json`.

### Generating Icons

Blade Icons also offers an easy way to generate icons for your packages. By defining a config file with predefined source and destination paths, you can make updating your icons a breeze.

First, start off by creating a `generation.php` config file in the `config` directory of your icon package. Next, you can define an array per icon set that you want to generate. Below is a full version of this file with explanation for every option. Only the `source` and `destination` options are required.

```php
<?php

use Symfony\Component\Finder\SplFileInfo;

return [
    [
        // Define a source directory for the sets like a node_modules/ or vendor/ directory...
        'source' => __DIR__.'/../node_modules/heroicons/outline',

        // Define a destination directory for your icons. The below is a good default...
        'destination' => __DIR__.'/../resources/svg',

        // Strip an optional prefix from each source icon name...
        'input-prefix' => 'o-',

        // Set an optional prefix to applied to each destination icon name...
        'output-prefix' => 'o-',

        // Strip an optional suffix from each source icon name...
        'input-suffix' => '-o',

        // Set an optional suffix to applied to each destination icon name...
        'output-suffix' => '-o',

        // Enable "safe" mode which will prevent deletion of old icons...
        'safe' => true,

        // Call an optional callback to manipulate the icon with the pathname of the icon,
        // the settings from above and the original icon file instance...
        'after' => static function (string $icon, array $config, SplFileInfo $file) {
            // ...
        },
    ],

    // More icon sets...
];
```

See [an example `config/generation.php` file](https://github.com/blade-ui-kit/blade-heroicons/blob/main/config/generation.php) for the Heroicons package.

After setting up your config file you can use the icon generation as follow from the root of your icon package directory:

```zsh
vendor/bin/blade-icons-generate
```

## Changelog

Check out the [CHANGELOG](CHANGELOG.md) in this repository for all the recent changes.

## Maintainers

Blade Icons is developed and maintained by [Dries Vints](https://driesvints.com).

## License

Blade Icons is open-sourced software licensed under [the MIT license](LICENSE.md).

repository: blade-ui-kit/blade-icons

repo_name: blade-ui-kit/blade-icons


text:
# Zadymka [![Build Status](https://travis-ci.org/jkbz64/Zadymka.svg?branch=master)](https://travis-ci.org/jkbz64/Zadymka)
**Work in progress**

Zadymka is a simple 2D graphics (and Input) module. It also has built-in ImGui support.

| Language    | C++14  |
|-----------	|-------------	|

***Technology Chart***

|           |               |
|-----------	|-------------	|
| Window / Context / Input |  GLFW 3    |
| Rendering 	| OpenGL 3.3  	|
| OpenGL extensions | GLAD    |
| Math        | glm           |
| Lua Binding 	| sol2       |
| Font loading | Freetype2 |
| Image loading | stb_image |
| Other |ImGui |

##  Building
Before building install GLFW3 / Freetype2 / any lua version( 5.2 and 5.3 were the only one I tested so far though) libraries. Header libraries will be cloned recursively, so you don't have to ship them yourself.
```
git clone --recursive https://github.com/jkbz64/Zadymka.git
cd Zadymka
mkdir build && cd build
cmake .. //-DEXAMPLES=ON to copy examples to build directory
make -j4
```

## Usage
1. Copy `Zadymka.dll or .so` along with other `.dll's(freetype.dll and glfw3.dll(maybe?))` to the project directory
2. `local Zadymka = require('Zadymka')` in your code
3. `Zadymka.init()` or `Zadymka.Graphics.init()` to init graphics module (may be done automagically in the future)
4. You are ready to go :)

Check out examples directory to see Zadymka usage.

## Quickstart

```lua
local Graphics = require('Zadymka.Graphics')
Graphics.init()
local window = Graphics.Window:new()
window:create(800, 600, 'title', window.Style.Windowed)
window.title = 'some title'

local font = Graphics.Font:new()
font:loadFromFile('arial.ttf')

local text = Graphics.Text:new()
text:setString('test')
text:setPosition(100, 100)

while window.isOpen do
    window:clear(125, 125, 125, 255) -- Clear window
    window:draw(text)
    window:drawRect(0, 0, 100, 100, 255, 0, 0, 255)
    window:display()
end

Graphics.deinit()
```

## Docs?
.. Not now? I guess?
If you want to know usertypes/bindings check out src/(module name).cpp's.

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
+++
draft = false
title = "Seeing Clearly"
date = "2016-11-06T22:02:33Z"
tags = ["software development"]
+++

Before I dive into the missteps and mishaps of +F, I'd like to start with one very important thing I did right,
in the very early stages.

The original idea for +F came from the tail end of an IM conversation with an old school friend, reminiscing
about the computer games we used to play when we were young. A particular favourite of ours was Match Day II
(for those of you too young to remember, it was sort of like the best bits of FIFA and PES combined in a single game,
only about a hundred times better than that) and we were at the time convinced we would be world champions at it,
if such a competition had existed. (Sadly, eSports wasn't to come into being until a good 10 years after we were past
our gaming peak, and the world had mistakenly moved on from Match Day II by then anyway.)

I can't remember who, but one or the other of us signed off by saying *I'm sure I could still hammer you*, and
it put me to thinking ... which one of us would actually win? The simple way to solve it would be to get together
in front of a computer, fire up an emulator (FUSE, for example) and sort it out. Sadly, at the time, we were
on almost exactly opposite sides of the world, and it would have been a long way for either of us to fly simply
to settle an old childhood rivalry.

Nonetheless, it planted an idea in my mind. Given how easy it is to make high quality video calls to faraway
places, surely there must be no problem in sending Spectrum screenshots in one direction and joystick movements
in another, at least in theory? Depending on the distance and quality of network connection, things might chug
along a little slowly at times, but the Spectrum was never known as a speed machine, was it?

I toyed with the idea for a while before I started any code. My first thought was whether I could bolt some
network play facilities onto an existing open-source emulator, most of which tend to be written in C or some
similar low-level language. I rejected this idea primarily because I thought trying to understand someone
else's C code would be beyond me, but also because I wanted the emulator to be usable across Linux and
Windows, and a language with simpler cross-platform support would be a better option.

So that more or less put me in the position of writing my own emulator from the ground up. It's a challenge I
did relish, but I wasn't in any illusion about the amount of work it would need. Where to start?

More importantly, where to *stop*?

I only wanted to be able to play a couple of games of Match Day II, so there wouldn't be any need to go overboard
with whizzbang features that made no difference to the quality of gameplay. Those thoughts left me with a very clear
vision of what I wanted +F to be:

* An emulator that worked on (at least) Linux and Windows.
* Network play capability, with a fully-fledged emulator at one end and a "dumb" console at the other.
* 48k model only.
* Allows a full game of Match Day II to be played without crashing, even if nothing else works.
* No sound.
* No loading borders.
* No superfluous UI features or twiddles.

And there it was, the minimum viable product for +F. I didn't go as far as setting up a backlog for it or
anything like that, but armed with a clear idea of what I wanted, I was able to decide where to start, what to do
next, and what not to bother with. That's really important, because even in something with a scope that seems
limited, like a Spectrum emulator, there are a lot more things going on than you might expect, and a lot of
places you could choose to put your effort.

Take borders. It's possible to change the colour of the border at specific positions down the screen, and
indeed games like [Aquaplane](http://www.worldofspectrum.org/infoseekid.cgi?id=0000227) use this to create a
"horizon" effect that spans the full width of the screen. However, making the change at the correct position
is intimately linked with the timing of the Spectrum's display hardware. The rules for emulating this correctly
are [very complicated](http://www.worldofspectrum.org/faq/reference/48kreference.htm#ZXSpectrum) and would take
an age to implement and test.

For my purposes, though, because I had already established Match Day II was my priority, and because it
doesn't do anything at all the border (it's black the whole time) it was an easy choice for me not to care
about this at all. This sort of focus that I had because of my clear vision of +F saved me from
disappearing off into the more arcane (but no less technically interesting) aspects of building an emulator.

How does any of this relate to what you and I do in our day jobs? Well, imagine you're maintaining a library
that's going to be used by some other groups - maybe internal, maybe external, maybe a combination of both.
Once your code has been released into the wild for the first time, you're bound to get people coming to you and
asking for new features. Chances are they'll all request different things - this team wants something that
makes it easier to integrate with Spring, that team wants support for a particular metrics framework, and that
team over there wants a version that produces XML rather than JSON.

Reasonable though all these requests may be, if you say *yes* to all of them, you'll end up with a bloated
library, it'll be more involved to maintain and release, client teams will have a tougher time to upgrade,
and in the end every encounter with your library will become a chore rather than a pleasure. You'll also run
the risk of losing focus on the core capabilities of your library, and you'll spend time and effort on things
that only a fraction of your user base will use, rather than using that time to make your code more robust,
correct, efficient or easy to integrate with.

In the end, it comes down to one thing - do you have a clear idea of what the core purpose of your library is?
Sure, you could add some code that will produce an XML form of your output, and the people who asked for it
will doubtless be thankful (today, anyway). But should your library really be getting involved in those sort of
serialisation issues - maybe it should be producing a logical model and leaving it up to the teams who use it
to decide how its output appears instead?

Maybe adding the XML support (or whatever) *is* absolutely the right thing to do, but that's a question only
you (and the rest of your team) can answer. If you're given a requirement and you can't answer the question
*Do we need this?* with a straight *yes* or *no*, it's well worth your time to figure out why you can't.


text:
# MyCUEverything

An API for accessing everything related to CU. A web application that displays all of your CU info - from your GPA, student ID, munch money, campus cash, etc.

Log in with your identikey and password, and your information will be displayed with one click of a button.

**How to Run**

Using the ```pipenv```, run the flask app in the ```front-end``` directory, and set ```$PYTHONPATH```to the root of the repository.

Created by Joshua Franklin, Tiffany Phan, Jessica Sanborn, and Elizabeth Qiu for T9Hacks 2019 Community Track.
Winner of "Best Community Hack"

repository: TiffanyVPhan/MyCUEverything

gha_language: Python

gha_license_id: MIT

repo_name: TiffanyVPhan/MyCUEverything


text:
# sprouthq

Welcome to SproutHQ!

This is my portfolio project for the Flatiron School using Rails with a JQuery front end.
It is a rails app that lets you keep track of your child's stats, medication dosages and growth milestones.

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

To run this app -

Fork and clone sprouthq

Run bundle install inside the sprouthq directory.

In your terminal run Rails s to start a local server

In your browser go to : http://localhost:3000

You are good to go!

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

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/CodeDad70/sprouthq. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the SproutHQ project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

precompiled with uglifier enabled for es6. also fixed css error and installed babel


text:
---
name: "\U0001F41B Bug report"
about: Report something that's broken.
title: ''
labels: bug
assignees: ''

---

<!-- DO NOT THROW THIS AWAY -->
<!-- Fill out the FULL versions with patch versions -->

- GetCandy version: #.#.#
- Laravel Version: #.#.#
- PHP Version: #.#.#
- Database Driver & Version:

### Expected Behaviour:

### Actual Behaviour:

### Steps To Reproduce:

repository: getcandy/getcandy

branch_name: refs/heads/develop

repo_name: getcandy/getcandy


text:
# Contributing
Thank you for taking the time to contribute to this project. Following these guidelines below will help the contribution and merging process.

Feedback for any portion of this project is also highly appreciated.

## Notice
This project is in the process of being built and structured, so I haven't fully fleshed this out yet. Consider forking the repo, making your changes and presenting a pull request with a detailed description of changes made. Ideally this contribution guide will be much more detailed in the near future.

repository: RakhithJK/security-learning-resources

repo_name: RakhithJK/security-learning-resources


text:
# Friday the 13th

Months That Begin on a Sunday will Always have a Friday the 13th

Write a test for the function `isFridayTheThirteen`, it will assure that function returns `true` when passing `sunday` in it.

The function will be provided in `process.argv[2]`.

-----

## Hints

The `console.log()` statement is very useful when we want to know what's going on with our code. So, if a larger application depends on a specific function in many places, a small change in one place could create a hard to find a bug. NodeJS provide us `asserts`. A best way to control and monitoring the behavior of our code.

Let's see how it works...

```js
  var assert = require('assert')
  assert(add(2,1) === 3,'add(2,1) should be 3')
```

Or as alternatively:
```js
  assert.deepEqual(add(2,1), 3, 'add(2,1) should be 3')
```

Here are some functions you can use with assert. For a full list, see the
documentation.
```js
assert.ok(value, message) // tests if value is truthy
assert.equal(actual, expected, message) // ==
assert.notEqual(actual, expected, message) // !=
assert.deepEqual(actual, expected, message) // for comparing objects
assert.notDeepEqual(actual, expected, message)
assert.strictEqual(actual, expected, message) // ===
assert.notStrictEqual(actual, expected, message) // !==
```


text:
---
id: 221
title: 'Yahoo! and Google’s approaches to good deeds'
date: 2006-11-17T09:18:02+00:00
author: David Ascher
layout: post

tags:
  - ""
restapi_import_id:
  - 5780561eab8f6
original_post_id:
  - "221"
categories:
  - General
---
Google has [Google.org](http://google.org/), which has a billion dollars of seed money and little goals like literacy, clean water, eradicating poverty and other small projects.

Yahoo! has (as far as I can tell) “[Yahoo! for good](http://brand.yahoo.com/forgood)“, which is a web site where they can elicit UGC (user-generated content) showing how their users are doing good. Most impressively, Yahoo! for good is on the “brand.yahoo.com” website. Ugh.

(ActiveState has neither, true, but…).


text:
# Product Configurator Completed

A completed version of TechSoft 3D's [Product Configurator tutorial](https://docs.techsoft3d.com/communicator/latest/build/tutorials/product-configurator/01.html) for HOOPS Communicator.

## Prerequisites

Verify you have the latest version of `npm` installed on your machine:

`npm --version`

## Install

1. Clone the project: `git clone https://github.com/techsoft3d/product-configurator.git`
2. Navigate to the project folder: `cd product_configurator_completed`
3. Install dependencies: `npm install`
4. Start the development server: `npm start`
5. View the project at [http://localhost:8080](http://localhost:8080)

license: ISC

repository: RyanPersson/product-configurator

gha_license_id: NOASSERTION

repo_name: RyanPersson/product-configurator


text:
# Python-certificate-
While hosting or conducting an event, writing certificates to delegates is a frustrating job. Well, in my case it’s a pain in the neck.
<br.
So I found a way to automate this task using a simple Python program.

**Requirements:**

Python (better if you have latest)

To install python goto: https://www.python.org/downloads/

Download and install

The latest version of python comes with pip, so no need to download pip.

Python Pillow, Openpyxl & XLRD Library

To install PIL, execute this in terminal/cmd : pip install Pillow

To read the csv or excel file in terminal/cmd : pip install xlrd

To read the csv or excel file in terminal/cmd : pip install openpyxl

A certificate image

Image of said certificate with blank name field [image attribute]

TTF font file

A TrueType font file of the font which we will use to print names,or you can use any downloaded font

**Made with ❤ by Mayank Pathak**

branch_name: refs/heads/main


text:
---
title: "Fetch public todos - subscription"
metaTitle: "Fetch public todos using Subscription | GraphQL Vue 2 Apollo Tutorial"
metaDescription: "You will learn how to make use of GraphQL Subscriptions to get notified whenever a new todo comes in Vue app"
---

import GithubLink from "../../src/GithubLink.js";
import YoutubeEmbed from "../../src/YoutubeEmbed.js";

<YoutubeEmbed link="https://www.youtube.com/embed/ooy-5LzrvxM" />

Let's define the graphql query to be used:

Open `src/components/TodoPublicList.vue` and add the following imports.

<GithubLink link="https://github.com/hasura/learn-graphql/blob/master/tutorials/frontend/vue-apollo/app-final/src/components/TodoPublicList.vue" text="src/components/TodoPublicList.vue" />

```javascript
  <script>
+ import gql from "graphql-tag";
  import TodoItem from "../components/TodoItem";
  import TodoFilters from "../components/TodoFilters";
```

Now let's define the subscription query to get notified about new public todos

```javascript
  <script>
  import gql from "graphql-tag";
  import TodoItem from "../components/TodoItem";
  import TodoFilters from "../components/TodoFilters";
+ const NOTIFY_NEW_PUBLIC_TODOS = gql`
+   subscription notifyNewPublicTodos {
+     todos(
+       where: { is_public: { _eq: true }}
+       order_by: { created_at: desc }
+       limit: 1
+     ) {
+       id
+       title
+       created_at
+     }
+   }
+ `;
```

What does the Subscription do?
------------------------------

The query fetches `todos` with a simple condition; `is_public` must be true and we limit the results to 1. We would just like to get notified whenever a new todo comes in.
We sort the todos by its latest created_at time according to the schema. We specify which fields we need for the todos node.

repository: hasura/learn-graphql

gha_language: JavaScript

repo_name: hasura/learn-graphql


text:
# Stories
## Setup story view
### Step 1 - Add story view to your screen.
#### Xib integration
1 - Create view in xib editor. Change class to 'StoriesView'.
2 - Connect to your viewController.swift.

    @IBOutlet private weak var storiesBackView: StoriesView!

3 - Initialize with SDK and VC StoryView module

    storiesBackView.configure(sdk: SDK, mainVC: self)

#### Code integration
0 - Import Library

    import REES46

1 - Create view in .swift.

    var storiesView = StoriesView(frame: CGRect(x: 0, y: 0, width: 0, height: 0))
    view.addSubview(storiesView)

2 - Initialize with SDK and VC StoryView module

    storiesView.configure(sdk: SDK, mainVC: self)

Enjoy!

gha_language: Swift


text:
# Smart, secure and decentralized

Blockchain technology is the technology of the future and provides a
trust-less platform without the need for a middle man; security through
cryptography and time stamps; and is decentralized which prevents a
single point of failure.

# What is Blockchain

Blockchain, also known as distributed ledger technology allows a network
of users to keep a record of transactions. In layman's terms, a
blockchain is like an “excel sheet” where each column and row (blocks)
have records (words, numbers or whatever you put into an excel sheet)
recorded. However unlike normal excel sheets and databases, this one is
distributed meaning that it runs across multiple nodes (computers) and
for a new block to be added, all the nodes have to agree or come to a
consensus!

# Blockchain Technologies For Business

Graphene is an open source collaborative effort created to advance
cross-industry blockchain technologies. It is a global collaboration,
including leaders in finance, banking, IoT, supply chain, manufacturing
and technology.

# Get started with Graphene

Graphene uses peer-to-peer technology to operate businesses autonomously
with no central authority. Transactions with instructions to the
business logic are carried out collectively by the entire network.
Graphene is open-source; its design is public and everyone can take
part. Through many of its unique properties, Graphene allows exciting
uses of Blockchain Technology that could not exist previously including
such as BitShares, Steem, PeerPlays, Muse and others.

repository: graphene-foundation/marketing-material

repo_name: graphene-foundation/marketing-material


text:
# Git and GitHub for poets

## 1.1 - Introduction
The history and versions of something you are making is important. Git is used for version control. Keeps track of history. Collaboration. Yes you can use dropbox, google drive. But Git has some special features for code.
* Version Control
* Collaboration

Git is the actual version control software.
Github is a web service. Do git things. (social coding)
Repository is a project. Collection of files.

Commit is like a 'save'. Each commit has a message. Each commit also has a hash.

## 1.2 - Branches
You can branch of to make seperate commits to it. You can merge branch into another one. You can then make a pull request and merge it. Push / Pull.

You make a request to pull changes into master.

## 1.3 - Forks and Pull requests
A bit like clone but that's doesn't cover. It makes a new instance (replica) of the repository. It doesn't mess with the original.

You can make a pull request from a fork. Sending out is pushing. Coming in is pulling.

Even if you're pull request doesn't get accepted, it's still a good thing to make one. It shows that you are active.

## 1.4 - GitHub issues
This is not a git concept, only for github websit itself. Only the owner or the person creating the issue can close it. If it's closed it means that it is resolved. All each issues has ID.

If you use the word fixes inside commit with reference to issue it will be closed.  So you can reference hashes or issues alot and GItHub will do alot of the work for you.

## 1.5 - Intro to the Command Line
Work with git offline, without internet using GitHub. You can use GUI but you can also use it through the command line.

Unix commands can be modified with arguments.

## 1.6 - Cloning Repo and Push / Pull
Every command is prefixed with 'git'. If you want to use git commands, you need to be in a git folder.
Cloning it locally to the computer. Get in on your local machine. Github is ann remote.

## 1.7 - Git init and Git add
Any directory on your computer isn't a git repository. Add command is staging. Add a file to the staging area. If you init locally then there are no remotes.

## 1.8 - GitHub Pages
GitHub pages is static file hosting.

## 1.9 - Resolving Merge Conflicts
Merge conflict. You need to resolve conflicts if people are working on the same file, same lines.

## 1.10 - Git Remotes
Look at the code of a pull request (locally) before you merge it. -v verbose
You can have multiple remotes with different repos. Github is way more visual than Git software.

## 1.12 - GitHub pages

repository: dandevri/git-it

repo_name: dandevri/git-it


text:
# Routes

## Versioning

All routes are prefixed by the API version to use, for example `/v1` for API version 1.
Version(s) currently supported : `v1`

## Alerts

### Format
Alerts are described using the following JSON format:
```javascript
{
  "id": uuid
  "name": string,
  "measurement_id": uuid,
  // "activation_timeranges": [{
  //   "id": uuid,
  //   "timeUnit": "day"|"hour"|"minute"|"second",
  //   "start": integer
  //   "end": integer
  // }],
  "activated": boolean, // temporary, while activation_timeranges is not supported
  "actions": [{
    // see actions description
  }],
  "triggers": [{
    // see triggers description
  }]
}
```

### Actions

```javascript
{
  "id": uuid,
  "type": "webhook",
  "webhook": {
    "url": "",
    // oauth2
  },
  "ratelimits": [{
    "timeUnit": "day" | "hour" | "minute" | "second",
    "timeValue": integer,
    "maxTriggers": integer
  }]
}
```

### GET /alerts/:alert_id

Returns alert with the JSON format described above.

*Status codes:*

- 200 OK (resource exists, return the alert in body)
- 500 Internal Server Error (error while getting the entity)
- 410 Gone (resource does not exist, but existed previously)
- 404 Not found (resource never existed)
- 406 Not Acceptable (‘accept’ header not supported)

### GET /alerts

Returns an array of alerts with the JSON format described above.
Query string:

- `measurement_id`: string -> filter alerts on the specified measurement (may be specified multiple times to filter on several measurement ids)
- `tag`: string -> filter alerts on the specified tag
- `tags`: string[] -> filter alerts on the specified tags

*Status codes:*

- 200 OK (get succeeded, return the alerts in body)
- 500 Internal Server Error (error while getting the entities)
- 404 Not found (resource never existed)
- 406 Not Acceptable (‘accept’ header not supported)

### DELETE /alerts/:alert_id
Algo: don’t delete, just set to NULL.
created_at
updated_at
deleted_at => NULL || NOW()

*Status codes:*

- 200 OK (delete succeeded, don't return any body)
- 500 Internal Server Error (error while deleting the entity)
- 410 Gone (ressource does not exists, but excited previously)
- 404 Not found (ressource never existed)

### PUT /alerts/:alert_id

Check schema
if invalid => 401
Do query
an error occured ? -> 500
success ?
resource created ? 201
resource already existed ? 204

*Status codes:*

- 201 Created (once the resource is created)
- 204 No Content (the resource was updated)
- 401 Malformed (schema validation failed)
- // 409 Conflicts (if the alert already exists), http://httpstatus.es/409
- 500 Internal Server Error (could not create resource)

### Triggers

Triggers analyze the data (or the absence of data) recorded by your measurements and determine whether or not to trigger an alert.

#### no_data
A `no_data` trigger is defined using the following JSON structure :
```javascript
{
  "operator": {
    "name": "no_data",
    "rate": {
      "timeUnit": "day" | "hour" | "minute" | "second",
      "timeValue": integer
    }
  },
  "target": "data" | "data.X"
}
```

#### any_data

An `any_data` trigger is defined using the following JSON structure :
```javascript
{
  "operator": {
    "name": "any_data",
    "rate": {
      "timeUnit": "day" | "hour" | "minute" | "second",
      "timeValue": integer
    }
  },
  "target": "data" | "data.X"
}
```

#### anomalous
`anomalous` trigger is defined using the following JSON structure :
```javascript
{
  "operator": {
    "name": "anomalous"
  },
  "target": "data" | "data.X"
}
```

#### value
```javascript
{
  "operator": {
    "name": "threshold_min",
    "duration": {
      "timeUnit": "day" | "hour" | "minute" | "second",
      "timeValue": integer
    }
  },
  "target": "data" | "data.X",
  "value": number
}
```

```javascript
{
  "operator": {
    "name": "equal",
    "duration": {
      "timeUnit": "day" | "hour" | "minute" | "second",
      "timeValue": integer
    },
  },
  "target": "data" | "data.X",
  "value": number
}
```

```javascript
{
  "operator": {
    "name": "threshold_max"
    "duration": {
      "timeUnit": "day" | "hour" | "minute" | "second",
      "timeValue": integer
    },
  },
  "target": "data" | "data.X",
  "value": number,
}
```

#### attribute
`newValue`trigger is defined using the following JSON structure :

```javascript
{
  "operator": {
    "name": "newValue"
  },
  "target": "data"
}
```

### v2

Avoir une route qui liste les operators (et leurs capacités en fonction des triggers) -> modifier schéma de BDD

A chaque fois que l’on envoie un point, il est possible de préciser en plus du data et du metadata un tags:[], ces tags seront automatiquement ajouté au set de tags de measurements.

# Troubleshooting

## - type "citext" does not exist
Connect to the database using the "citext" type, and run "CREATE EXTENSION citext".

repository: statwarn/alerting-api

repo_name: statwarn/alerting-api


text:
---
layout: page
title: Office Hours Schedule
subtitle: Your chance to chat with The Shiny Guy and the creator of Beautiful Jekyll
---

Office hours are held on Zoom and are only accessible to sponsors. If you aren't yet a sponsor, **[become a sponsor](https://github.com/sponsors/daattali/sponsorships?tier_id=39856)** and the password will be sent to you after signing up.

The schedule is subject to change at any time.

gha_language: HTML


text:
# ansible-role-munkitools

Repository to set up the munki admin tools on a Mac that will be used to administer a munki repository.

## What it Does:
- Installs the latest version of Munki and its Admin Tools
- Optionally: Clone an existing Munki Repository onto the admin machine
- Optionally: Set up a new Munki Repository on the admin machine

## Variables:
- munkitools_existing_repo: default no -> creation of new (local) repo
- munkitools_repo_url: default "" (empty)

repository: SorenTech/ansible-role-munki-in-a-box

repo_name: SorenTech/ansible-role-munki-in-a-box


text:
# Clear Project

Just another javascript library for building interfaces.

### Proposal API

**useState**

Function, that returns current state object of a component and callback to change it.
The only argument for `useState` is initial state, that would be used in the first render.

Every state change calls the rerender of a component.
State would be merged with existing one. You could pass only state changes, but not all changed state

```js
const { state: {}, changeState: () => void } = useState(initialState)
```

Examples:

```jsx
import Clear, { useState } from 'clear'

const initialState = { count: 0 }
const { state, changeState } = useState({ count: 0 })
const increaseCount = changeState({ count: state.count + 1 })
const resetCounter = changeState(initialState)

function MyComponent() {
  return () {
    <div>
      <p>The count is {count}</p>
      <button onClick={increaseCount}>Increase count</button>
    </div>
   }
}
```

```jsx
import Clear, { useState } from 'clear'

const { state, changeState } = useState({ name: '', lastname: '' })
const changeName = (e) => {
  changeState({ name: e.target.value }) // no need to pass the whole state, it would be merged internally with the last one
}
const changeLastName = (e) => {
  changeState({ lastname: e.target.value })
}

function MyComponent() {
  return () {
    <form>
      <p>Name: {state.name}</p>
      <p>Lastname: {state.lastname}</p>
      <input type="text" onChange={changeName} value={state.name}/>
      <input type="text" onChange={changeLastName} value={state.lastname}/>
    </form>
   }
}
```

**useCycle**

The custom lifecycle hooks of a component. Function accepts three functions, that will be fired at the appropriate time:
- didMount: hook will be fired just after component was rendered to DOM
- didUpdate: the props or state of component was changed, accepts previous props and state objects
- willUnmount: hook will be fired just before component would be deleted from the DOM

```js
useCycle(didMount: () => void, didUpdate: (prevProps: {}, prevState: {}) => void, willUnmount: () => void)
```

Example:

```jsx
import Clear, { useCycle } from 'clear'

const { state, changeState } = useState({ count: 0 })
const increaseCount = changeState({ count: state.count + 1 })

const didMount = () => { console.log('did mount') }
const didUpdate = (prevProps, prevState) => {
  if (state.count > 5) document.title = ''
}
const willUnmount = () => { console.log('will unmount') }

useCycle(didMount, didUpdate, willUnmount)
// useCucle(didMount)
// useCycle(null, didUpdate)
// useCycle(null, null, willMount

function MyComponent() {
  return () {
    <div>
      <p>The count is {count}</p>
      <button onClick={increaseCount}>Increase count</button>
    </div>
   }
}
```

**useControlledUpdate**

Controls the component update. Accepts array of values, that would be compared for rerender.

The second parameter is for deep comparing.
- true: deep compare. All structure values would be destructed for comparing
- false: shallow compare. All values would be compared by the link

If the first argument is boolean - it used as deep comparing parameter and the second one is omited.

_The shallow compare is set to default!_

```js
useControlledUpdate(values: []any|boolean, false: boolean)
```

```jsx
import Clear, { useControlledUpdate } from 'clear'

const { state, changeState } = useState({ count: 0 })
const increaseCount = changeState({ count: state.count + 1 })

// if props.externalCount changes, component would not be rerendered!
useControlledUpdate([state.count], true)

function MyComponent({ externalCount }) {
  return () {
    <div>
      <p>The count is {count}</p>
      <p>The external count is {count}</p>
      <button onClick={increaseCount}>Increase count</button>
    </div>
   }
}
```

Also it could be used just for setting deep compare.

```js
useControlledUpdate(true) // now all props and state values would be deep compared
```

repository: BabkinAleksandr/clear

repo_name: BabkinAleksandr/clear


text:
# hash-browns

This repository contains:

* A Quick-Start recipe for monitoring an application with Prometheus.
* A tiny web-server for creating SHA256 hashes with a /metrics endpoint

> Read more on the related [blog post](http://blog.alexellis.io/prometheus-monitoring/)

### Notes for Raspberry PI:

Initialize swarm-mode

```
# docker swarm init
```

Build the image:

```
# docker build -t alexellis2/hash-browns:0.3 . -f Dockerfile
```

Or build for ARM:

```
# docker build -t alexellis2/hash-browns:0.2-armhf . -f Dockerfile.armhf
```

Deploy the stack with a separate compose-file:

```
# docker stack deploy tutorial --compose-file=./docker-compose.armhf.yml
```


text:
---
type: rule
title: Do you confirm there is no checked out data?
uri: do-you-confirm-there-is-no-checked-out-data
authors:
  - title: Greg Harris
    url: https://ssw.com.au/people/greg-harris
  - title: Adam Cogan
    url: https://ssw.com.au/people/adam-cogan
  - title: William Yin
    url: https://ssw.com.au/people/william-yin
related: []
redirects: []
created: 2012-05-31T03:08:59.000Z
archivedreason: null
guid: 12122af0-1a73-42e8-aa52-6fcc520c5cc7
---

One of the annoying things with SharePoint document libraries is that users often accidentally leave [checked out files](https://support.microsoft.com/en-us/office/check-out-check-in-or-discard-changes-to-files-in-a-sharepoint-library-7e2c12a9-a874-4393-9511-1378a700f6de), that prevents others from modifying them.

<!--endintro-->

::: greybox
**Suggestion to Microsoft:** send an email to the user to remind them they have outstanding checkouts potentially blocking other users.
:::

![Figure: Here Greg Harris has not checked in a file](sp-docs.jpg)

**Upgrade warning:** The pages that are not checked-in, will not be migrated on a SharePoint upgrade. There is \*no\* warning either.

There are 2 ways to remind users of their "checked out files":

* **Solution A: Manage Content and Structure Report (No Code)**
* **Solution B: Custom application report (Includes some low-code work) E.g. SSW.Dory**

### Solution A. Manage Content and Structure Report (No Code)

1. Create CAML query in site content and structure

    Go to **Site Settings | Manage Content and Structure | Content and Structure Reports**, click "New":

    ![Figure: Create a new report](ContentAndStructureReportsNew.png)

    Fill the "CAML Query":
    ```caml
    <Where>
      <IsNotNull>
        <FieldRef Name="CheckoutUser" LookupId="TRUE"/>
      </IsNotNull>
    </Where>
    ```

    Fill the other fields like below:
    ![Figure: Fill in form](NewReportForm.png)

2. Run Checked Out report

    Run the checkout report from **Site Settings | Manage Content and Structure | View: Checked out documents**:

    ![Figure: Checked Out Documents report link Make sure there are no files checked out, otherwise, go step 3](CheckedOutDocuments.png)

3. Go chase after the users.

### Solution B. Custom application report (Includes some low-code work)

::: todo
**TODO:** Add in link to SSW.Dory website once that is up and running, as well as a screenshot of the website just above the email template.
:::

To make reminding users easier, we have created a [Power Automate](https://powerautomate.microsoft.com/en-au/) flow called SSW.Dory that will find checked out files and send out a notification email to all the naughty people automatically every day.

::: email-template

|          |     |
| -------- | --- |
| To:      | Dave |
| Subject: | SSW.Dory \| 🔷 SharePoint files need your attention |

::: email-content

### Hi Dave,

You currently have the following pages **checked out in SharePoint**:

- {{ LIST OF URLS }}

1. If you are no longer editing these files, **check them in!**
  Note: You should check in at least daily, as per rule [SSW.Rules | Do you confirm there is no checked out data?](/do-you-confirm-there-is-no-checked-out-data).
2. Reply to this email with something like:

  > ‘Done - x files checked in’

**Note:** See all files you have checked out at {{ LINK TO CHECKED OUT LIST }}

*-- Powered by Power Automate, Job: SSW.Dory*

:::
:::

**Figure: An example of the reminder email that all users receive**

gha_language: TSQL


text:
+++
title = "~2018.1.6 Update"
date = "2018-01-05"
description = "A short update from the Tlon team for the week of ~2018.1.6."
aliases = [ "/posts/2018-1-6-update/" ]

[extra]
author = ""
ship = "~rovnys-ricfer"
+++

Short week this week as we recover from the holidays. The biggest news item is that our fork of MyEtherWallet is now
complete!

Feel free to download it and try it out: https://github.com/urbit/etherwallet

Thanks to _Anthony_ `~poldec-tonteg` for building it and to Mark for testing it.

_Mark_ `~palfun-foslup` has diagnosed [a tricky bug](https://github.com/urbit/arvo/issues/533) involving what appeared to
be one-way communication in Gall. More updates on that forthcoming.

_Galen_ `~ravmel-ropdyl` has been working on the Urbit primer that will become the new urbit.org landing page. That's in
review now.

_Curtis_ `~sorreg-namtyv` has been helping out with the primer and has begun work on an HTTP cache in Vere to help with
web performance. That should synergize nicely with upcoming Ford fixes.

_Ted_ `~rovnys-ricfer` has been modernizing his and Anton's work on Ford caching to work with new Hoon and Arvo.

_Keaton_ `~tonlur-sarret` has been helping Ted with Ford. With Mark's help, he also moved Fora onto a standalone ship to
improve the loading times of the rest of urbit.org. All the old links still work, but Fora's true home is now at
[https://fora.urbit.org](https://fora.urbit.org).

_Isaac_ `~davtyr-nimren` has made some [more
progress](https://github.com/ixv/arvo/commit/bc52d9fc494399c2063cfa7817046d180b6f78d5) on the new static webpage serving
(`ren/tree`).

Early 2018 should see a lot of usability improvements. We're looking forward to being able to ship them soon.


text:
# Advesa - FE Assignment

An React App made **Dung Ngo**

## Installation

Install LTS version of [Node JS](https://nodejs.org/en/download/)

```bash
npm install
npm start
npm run build
```

## What I have completed

1. Create an React App.
1. Use [MobX](https://mobx.js.org) for simple state management.
1. Use [Flow](https://flow.org/) for static type checker.
1. Use [Workbox wepack plugins](https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin) to customize Webpack configurations.
1. Customize Service Worker and using *Cache Falling Back to Network* strategy to caching apis: [Users](https://jsonplaceholder.typicode.com/users) & [Posts](https://jsonplaceholder.typicode.com/posts).
1. Completed features:
   1. On page load the user should see a list containing all the posts.
   1. Option to filter the posts using a keyword or filter the posts by the user’s name.
1. Use [Material UI](https://material-ui.com/).
1. Use Flex to solve the problem *all grid items should have same height*.
![Solved problem](/problems.JPG)
1. Deploy a Github page for testing (enabled Service Worker): [Advesa Github page](https://iamduxng.github.io/advesa/).

## License
[MIT](https://choosealicense.com/licenses/mit/)

repository: iamduxng/advesa

repo_name: iamduxng/advesa


text:
REQUIREMENTS
============
* [mondemand library](https://github.com/mondemand/mondemand)
* [lwes library](https://github.com/lwes)

INSTALL
=======

Run `pip install mondemand`

Example Run
===========

Start lwes-event-printing-listener to echo out all data that the lwes
receives from the mondemand client.

```shell
lwes-event-printing-listener -m <IP_ADDRESS> -p 10201
python demo.py
```

Investigate demo.py for more examples.

repository: takeda/mondemand-python

repo_name: takeda/mondemand-python


text:
---
title: Read a location
keywords: foundations, location, nhsnumber, pid, read
tags: [foundations,use_case]
sidebar: foundations_sidebar
permalink: foundations_use_case_read_a_location.html
summary: "Use case for reading a location resource"
---

## Prerequisites ##

### Consumer ###

The consumer system:

- SHALL have previously resolved the organisation's FHIR endpoint Base URL through the [Spine Directory Service](integration_spine_directory_service.html)

## API use case ##

This specification describes a single use cases. For complete details and background please see the [Foundations Capability Bundle](foundations.html).

## Security ##

- GP Connect utilises TLS Mutual Authentication for system level authorization.
- GP Connect utilises a JSON Web Tokens (JWT) to transmit clinical audit & provenance details.

## API usage ##

### Request operation ###

#### FHIR relative request ####

```http
GET /Location/[id]
```

#### FHIR absolute request ####

```http
GET https://[proxy_server]/https://[provider_server]/[fhir_base]/Location/[id]
```

#### Request headers ####

Consumers SHALL include the following additional HTTP request headers:

| Header               | Value |
|----------------------|-------|
| `Ssp-TraceID`        | Consumer's TraceID (i.e. GUID/UUID) |
| `Ssp-From`           | Consumer's ASID |
| `Ssp-To`             | Provider's ASID |
| `Ssp-InteractionID`  | `urn:nhs:names:services:gpconnect:fhir:rest:read:location-1`|

#### Payload request body ####

N/A

#### Error handling ####

Provider systems SHALL return a [GPConnect-OperationOutcome-1](https://fhir.nhs.uk/STU3/StructureDefinition/GPConnect-OperationOutcome-1) resource that provides additional detail when one or more data fields are corrupt or a specific business rule/constraint is breached.

For example, the:

- Logical identifier of the resource is not valid/can't be found on the server.

Refer to [Development - FHIR API Guidance - Error Handling](development_fhir_error_handling_guidance.html) for details of error codes.

### Request response ###

#### Response headers ####

Provider systems are not expected to add any specific headers beyond that described in the HTTP and FHIR® standards.

#### Payload response body ####

Provider systems:

- SHALL return a `200` **OK** HTTP status code on successful execution of the operation.
- SHALL return `Location` resources that conform to the [CareConnect-GPC-Location-1](https://fhir.nhs.uk/STU3/StructureDefinition/CareConnect-GPC-Location-1) profile.

- SHALL populate the following `Location` fields:
  - `meta.profile` with the profile URI
  - `versionId` with the current version of each `Location` resource.
  - `name`
  - `address` where available
  - `telecom` where available
  - `managingOrganization` with a reference to the 'managing' organisation. For Locations that are managed by GP practices, see [Branch surgeries](development_branch_surgeries.html) for more details.

- SHALL meet [General FHIR resource population requirements](development_fhir_resource_guidance.html#general-fhir-resource-population-requirements) populating all fields where data is available, excluding those listed below

- SHALL NOT populate the following fields:
  - `endpoint`

```json
{% include foundations/read_location_response_example.json %}
```

repository: nhsconnect/gpconnect

gha_language: CSS

repo_name: nhsconnect/gpconnect


text:
# Debugging

Even if your kernel executes, it may be computing the wrong values, or even error at run
time. To debug these issues, both CUDA.jl and the CUDA toolkit provide several utilities.
These are generally low-level, since we generally cannot use the full extend of the Julia
programming language and its tools within GPU kernels.

## Adding output statements

The easiest, and often reasonably effective way to debug GPU code is to visualize
intermediary computations using output functions. CUDA.jl provides several macros that
facilitate this style of debugging:

- `@cushow` (like `@show`): to visualize an expression, its result, and return that value.
  This makes it easy to wrap expressions without disturbing their execution.
- `@cuprintln` (like `println`): to print text and values. This macro does support string
  interpolation, but the types it can print are restricted to C primitives.

The `@cuaassert` macro (like `@assert`) can also be useful to find issues and abort execution.

## Stack trace information

If you run into run-time exceptions, stack trace information will by default be very
limited. For example, given the following out-of-bounds access:

```julia
julia> function kernel(a)
         a[threadIdx().x] = 0
         return
       end
kernel (generic function with 1 method)

julia> @cuda threads=2 kernel(CuArray([1]))
```

If we execute this code, we'll get a very short error message:

```
ERROR: a exception was thrown during kernel execution.
Run Julia on debug level 2 for device stack traces.
```

As the message suggests, we can have CUDA.jl emit more rich stack trace information by
setting Julia's debug level to 2 or higher by passing `-g2` to the `julia` invocation:

```
ERROR: a exception was thrown during kernel execution.
Stacktrace:
 [1] throw_boundserror at abstractarray.jl:541
 [2] checkbounds at abstractarray.jl:506
 [3] arrayset at /home/tim/Julia/pkg/CUDA/src/device/array.jl:84
 [4] setindex! at /home/tim/Julia/pkg/CUDA/src/device/array.jl:101
 [5] kernel at REPL[4]:2
```

Note that these messages are embedded in the module (CUDA does not support stack unwinding),
and thus bloat its size. To avoid any overhead, you can disable these messages by setting
the debug level to 0 (passing `-g0` to `julia`). This disabled any device-side message, but
retains the host-side detection:

```
julia> @cuda threads=2 kernel(CuArray([1]))
# no device-side error message!

julia> synchronize()
ERROR: KernelException: exception thrown during kernel execution
```

## Debug info and line-number information

Setting the debug level does not only enrich stack traces, it also changes the debug info
emitted in the CUDA module. On debug level 1, which is the default setting if unspecified,
CUDA.jl emits line number information corresponding to `nvcc -lineinfo`. This information
does not hurt performance, and is used by a variety of tools to improve the debugging
experience.

To emit actual debug info as `nvcc -G` does, you need to start Julia on debug level 2 by
passing the flag `-g2`. Support for emitting PTX-compatible debug info is a recent addition
to the NVPTX LLVM back-end, so it's possible this information is incorrect or otherwise
affects compilation.

!!! warning

    Due to bugs in `ptxas`, you need CUDA 11.5 or higher for debug info support.

To disable all debug info emission, start Julia with the flag `-g0`.

## `compute-sanitizer`

To debug kernel issues like memory errors or race conditions, you can use CUDA's
`compute-sanitizer` tool. Refer to the
[manual](https://docs.nvidia.com/compute-sanitizer/ComputeSanitizer/index.html#using-compute-sanitizer)
for more information.

To facilitate using the compute sanitizer, CUDA.jl ships the tool as part of its artifacts.
You can get the path to the tool using the following function:

```
julia> using CUDA

julia> CUDA.compute_sanitizer()
".julia/artifacts/7b09e1deca842d1e5467b6f7a8ec5a96d47ae0b4/bin/compute-sanitizer"

# including recommended options for use with Julia and CUDA.jl
julia> CUDA.compute_sanitizer_cmd()
`.julia/artifacts/7b09e1deca842d1e5467b6f7a8ec5a96d47ae0b4/bin/compute-sanitizer --tool memcheck --launch-timeout=0 --target-processes=all --report-api-errors=no`
```

To quickly spawn a new Julia session under `compute-sanitizer`, another helper function is
provided:

```
julia> CUDA.run_compute_sanitizer()
Re-starting your active Julia session...

========= COMPUTE-SANITIZER
julia> using CUDA

julia> CuArray([1]) .+ 1
1-element CuArray{Int64, 1, CUDA.Mem.DeviceBuffer}:
 2

julia> exit()
========= ERROR SUMMARY: 0 errors
Process(`.julia/artifacts/7b09e1deca842d1e5467b6f7a8ec5a96d47ae0b4/bin/compute-sanitizer --tool memcheck --launch-timeout=0 --target-processes=all --report-api-errors=no julia -g1`, ProcessExited(0))
```

## `cuda-gdb`

To debug Julia code, you can use the CUDA debugger `cuda-gdb`. When using this tool, it is
recommended to enable Julia debug mode 2 so that debug information is emitted. Do note that
the DWARF info emitted by Julia is currently insufficient to e.g. inspect variables, so the
debug experience will not be pleasant.

If you encounter the `CUDBG_ERROR_UNINITIALIZED` error, ensure all your devices are
supported by `cuda-gdb` (e.g., Kepler-era devices aren't). If some aren't, re-start Julia
with `CUDA_VISIBLE_DEVICES` set to ignore that device.

gha_language: Julia


text:
# cardano-wallet-api-setup

This project provides instructions on how to run a cardano wallet API server process that points at a testnet

### Why is this useful?

### Key Details
- The private testnet consists of three block-producing node processes.
- The `cardano-db-sync` process syncs blockchain data to a highly normalized database schema. This enables blockchain data to be queried with SQL.

### Medium article
For an additional overview of this project, please check out this [medium article](https://medium.com/@extramileit/how-to-set-up-a-private-cardano-testnet-5e5afaa22d0b)

## Usage Instructions

1. **Building cardano-wallet and running**

    * Install the following executables: `cardano-node`, `cardano-cli`, `cardano-db-sync`, `cardano-db-sync-extended`
    * Please refer to the [Build and run guide](1-BUILD_RUN.md) for instructions.

2. **Using the API

## Contributors

This project is provided free of charge to the Cardano community. The author of this project is a fan of Cardano, as well as a Cardano stake pool operator.
I am not affiliated with IOHK in any official capacity.

If you want to support the continued development of this project, you can delegate or recommend my staking pool:

- [**WOOF Cardano Staking Pool**](https://woofpool.github.io/)

## Contributing

If you'd like to help maintain this project, please feel free to submit a pull request. Please ensure that any script changes have been tested and verified.

## License

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

repository: woofpool/cardano-wallet-api-setup

repo_name: woofpool/cardano-wallet-api-setup


text:
---
type: rule
title: Do you regularly review your automated tests?
uri: review-automated-tests
authors:
  - title: Lee Hawkins
    url: https://www.ssw.com.au/people/lee-hawkins
related:
  - automated-test-code-first-class-citizen
created: 2022-12-01T01:09:23.840Z
guid: d823e149-327c-48dd-9049-12165573afd6
---
Reliable suites of automated tests can provide a lot of value to your development effort, giving fast feedback and alerting you to unexpected problems introduced by recent code changes.

The more automated the process of building, testing, deploying and delivering software is (and that's the direction a lot of teams are going in), the higher the responsibility of our tests is. Increasingly often, our tests are the only safety net (change detector) between code being written on a developer machine and that code ending up in a production environment. Therefore, it's probably a good idea to make sure that our tests detect the changes we want them to detect.

Automated test code ages just like any other code, though, and it's common to see teams adding more and more automated tests to their suites, without ever going back to review the existing tests to see if they're still relevant and adding value. This process of adding further tests over time often results in bloated test suites that take **longer to run** and require **more human effort** to diagnose failures.

Your automated tests require periodic attention and review — or else they're like smoke detectors, scattered throughout enormous buildings, whose batteries and states of repair are uncertain. As Jerry Weinberg said:

> Most of the time, a non-functioning smoke alarm is behaviorally indistinguishable from one that works. Sadly, the most common reminder to replace the batteries is a fire."
 So review each of your tests regularly with the following questions in mind.

::: greybox
**Don't be afraid to delete tests!** - Aim for stability over (perceived) coverage and optimize your automated test suites for the value of the information they provide. It really is a case of quality over quantity, so regularly thinning out old, irrelevant, overly costly and flaky tests is a worthwhile exercise.
:::

### Is the test still relevant?

As the product changes over time, older tests can easily still run and pass but are checking for conditions that are no longer relevant.

It may even be the case that tests can no longer fail as the product has evolved, so there is simply no point in running them any more.

### Is the test adding value?

A test only adds value if it tells you something useful when it passes and when it fails.

### Does the test justify its cost?

The total cost of a test is significant, when you take into account:

* The time spent to design, code and maintain it
* The infrastructure costs involved in running it (potentially many thousands of times over its life)
* The effort involved in diagnosing its failures
* The effort involved in regularly reviewing it

So, the value of a test really needs to justify its cost. If a test is not mitigating enough risk or providing enough valuable information compared to its cost, then consider deleting (or at least simplifying) it.

## Don't be fooled by "green" tests!

Teams can become very focused on achieving "green builds" where all of their automated tests pass during their build pipelines.

::: greybox
**Tip:** "All green" doesn't necessarily mean "all good"!

False negatives are the silent killers, the tests that show a pass but let a change slip by undetected.
:::

In his blog post on [flaky testing](https://developsense.com/blog/2021/02/flaky-testing), Michael  Bolton makes an important point about your "green" tests:

> Suppose you and your team have a suite of 100,000 automated checks that you proudly run on every build. Suppose that, of these, 100 run red. So you troubleshoot. It turns out that your product has problems indicated by 90 of the checks, but ten of the red results represent errors in the check code. No problem. You can fix those, now that you’re aware of the problems in them.

>Thanks to the scrutiny that red checks receive, you have become aware that 10% of the outcomes you're examining are falsely signalling failure when they are in reality successes. That’s only 10 "flaky" checks out of 100,000. Hurrah! But remember: there are 99,900 checks that you haven't scrutinized. And you probably haven't looked at them for a while.

>Suppose you're on a team of 10 people, responsible for 100,000 checks. To review those annually requires each person working solo to review 10,000 checks a year. That's 50 per person (or 100 per pair) every working day of the year. Does your working day include that?

>Here’s a question worth asking, then: if 10% of 100 red checks are misleadingly signalling a problem, what percentage of 99,900 green checks are misleadingly signalling “no problem”? They're running green, so no one looks at them. They’re probably okay. But even if your unreviewed green checks are ten times more reliable than the red checks that got your attention (because they’re red), that's 1%. That’s 999 misleadingly green checks.

This is where regular review can help us, as Michael notes in his blog post, [On green](https://developsense.com/blog/2015/07/on-green):

> When the check runs green, it's easy to remain relaxed. The alarm doesn’t sound; the emergency lighting doesn't come on; the dog doesn't bark. If we're insufficiently attentive and skeptical, every green check helps to confirm that everything is okay.
When we have unjustified trust in our checks, we have the opposite problem that we have with the smoke detector: we're unlikely to notice that the alarm doesn’t go off when it should.

> We can choose to hold on to the possibility that something might be wrong with our checks, and to identify the absence of red checks as meta-information; a suspicious silence, instead of a comforting one. The responsible homeowner checks the batteries on the smoke alarm."


text:
# LAIG Projects

**2019/2020** - 3rd Year, 1st Semester

**Course:** *Laboratório de Aplicações com Interface Gráfica* ([LAIG](https://sigarra.up.pt/feup/en/UCURR_GERAL.FICHA_UC_VIEW?pv_ocorrencia_id=436446)) | Graphical Applications Laboratory

**Authors:** David Silva ([daviddias99](https://github.com/daviddias99)), Bernardo Santos ([bernas670](https://github.com/bernas670))

---

**Project 1**

**Description:** Much similar to the projects done in the [CGRA course](https://github.com/daviddias99/computer-graphics-feup-cgra), this project had the goal of creating a scene composed of complex objects created from more primitive objects. For this project we also created a Triangle, Sphere, Bottomless cylinder and a Torus. We also created a file type, similar to LXS, which was used to describe the scene graph. We had also to deal with the concepts of lighting, textures, shadows, user I/O and materials. More info on the assignment `1st_Project/docs/proj1_specification.pdf`.

**Technologies:** WebGL, Javascript, GLSL Shaders

**Skills:** lighting, textures, shadows, user I/O and materials, 3D modelling

**Grade:** 19.8/20

---
**Project 2**

**Description:** The second project built upon the first one and introduced new concepts such as keyframe animations, render to texture using GLSL shaders and 3D surfaces using NURBS. More info on the assignment `2nd_Project/docs/proj2_specification.pdf`.

**Technologies:** WebGL, Javascript, GLSL Shaders

**Skills:** Render to texture, keyframe animations, GLSL Shaders.

**Grade:** 20/20

---
**Project 3**

**Description:** For the last project we had the task of using the developped primitives and classes to create a 3D graphical interface for a board game developed in the PLOG course. We then built an interface for the game Squex. We had a scoreboard aswell as a timer, we also included a undo feature, and a game-movie feature which allowed the user to see all the plays done until that point. It was possible to play PvP or Player v Computer, with different levels of difficulty. We had to build the board and pieces of the game as well as animate the camera do follow the right players perspective (in case of PvP). More info on the assignment `3rd_Project/docs/proj3_specification.pdf`.

**Technologies:** WebGL, Javascript, GLSL Shaders, PROLOG

**Skills:** Cross language programming, game development, animations, 3D Modelling, surfaces.

**Grade:** 19.4/20

---


text:
# strongpass
A strong password generator written in Go.

I needed a password generator that I could trust and ended up writing this. I decided to share this with the world, if it would turn out valuable to someone out there. But don't expect this to grow and expand into something more.

## Requirements
- [Git](https://git-scm.com/downloads)
- [Go 1.12+](https://golang.org/dl/)

## Installation
```
git clone https://github.com/Whinarn/strongpass.git
cd strongpass
./install.sh
```

## Usage
Type ```strongpass --help``` for more information after installation.

repository: Whinarn/strongpass

repo_name: Whinarn/strongpass


text:
# Weather App

## Description
This is a weather app built from Stephen Grider's Modern React with Redux Course. It involves combining React and Redux, while implementing middleware to handle Redux Promises. External libraries include React Sparklines for charts and the Google Maps API.

repository: matthewhtc/weather-app

repo_name: matthewhtc/weather-app


text:
# [![Exception Handler](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/title.png "Exception Handler Logo")](http://frontlineutilities.co.uk/ruby-on-rails/exception-handler)

[![Gem Version](https://badge.fury.io/rb/exception_handler.svg)](http://badge.fury.io/rb/exception_handler)
[![Code Climate](https://codeclimate.com/github/richpeck/exception_handler.png)](https://codeclimate.com/github/richpeck/exception_handler)
[![Dependency Status](https://gemnasium.com/richpeck/exception_handler.svg)](https://gemnasium.com/richpeck/exception_handler)
[![Coverage Status](https://coveralls.io/repos/richpeck/exception_handler/badge.png)](https://coveralls.io/r/richpeck/exception_handler)
[![Build Status](https://travis-ci.org/richpeck/exception_handler.svg?branch=master)](https://travis-ci.org/richpeck/exception_handler)

[**ExceptionHandler** Rails Gem](https://rubygems.org/gems/exception_handler) (adapted from [this tutorial](https://gist.github.com/wojtha/8433843) & [this tutorial](http://www.sharagoz.com/posts/1-rolling-your-own-exception-handler-in-rails-3))

Works with the [`config.exceptions_app`](http://guides.rubyonrails.org/configuring.html#rails-general-configuration) hook in Rails' middleware stack:

    config.exceptions_app sets the exceptions application invoked by the ShowExceptionmiddleware
    when an exception happens. Defaults to ActionDispatch::PublicExceptions.new(Rails.public_path).

-----------

####Custom Error Pages

`ExceptionHandler` deploys *custom error pages*. These allow you to serve your own design error pages in production; showing both the error, and the problem. This is a big step forward from the standard Rails error reporting facility

There are two types of error page:

	- 404 errors
	- 500 errors (+ other)

The custom **`404`** error uses your own `layout`. The **`500 & other errors`** are `server` issues, and so we have included an `errors` layout (`/views/layouts/errors.html.erb`).

The `errors` layout in important. If you try and load your "standard" layout with an internal server error, all your
"supporting" functionality is called too. Problem? You're likely going to cause even more errors.

**Custom error pages** are included by default.
You can change them by using the **`rails generate exception_handler:views`**:

 **500 Errors** | **404 Errors**
--- | ---
![500 Server Error Pages](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/500.png "500 Server Error Page") | ![404 Server Error Pages](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/404.png "404 Server Error Page")
Uses **errors** layout | Uses **standard** layout

-----------

####Saving Errors To DB

Adapted & refactored from [this tutorial](http://www.sharagoz.com/posts/1-rolling-your-own-exception-handler-in-rails-3)

Sometimes, you want to save your errors to your database (admin areas, multi-tenant apps, etc). We've included some middleware which captures the exceptions & saves them to the db:

	- Model (class) Name
	- Error Message
	- Stack trace
	- Target URL
	- Referrer URL
	- Params
	- User Agent (Browser Details)

This db allows you to track, read & repair errors in your application on the fly. We deploy this in our admin areas, to help us
appreciate any issues on our client apps.

![Errors Table](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/db.png "Errors Table")

This functionality is **`disabled`** by default

To enable, you need to do the following:

	- rails generate exception_handler:install #-> will install config initializer
	- rails generate exception_handler:migration #-> will create migration (for `errors` table)
	- rake db:migrate #-> creates `errors` table

	- config/initializers/exception_handler.rb
	- ExceptionHandler.setup do |config|
	-    config.db = true
	- end

---------

## Installation

###Step1

You need to reference the [`exception_handler`](http://rubygems.org/gems/exception_handler) gem. Once you have downloaded the gem, you'll be able to deploy it in your application.

Add this line to your application's Gemfile:

	gem 'exception_handler'

And then execute:

    $ bundle

**Or** install it yourself as:

    $ gem install exception_handler

![gem install](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/gem_install.png "gem install")

--

###Step2

Run:

	rails generate exception_handler:install

![Installation](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/install.png "Installation")

This will create `config/initializers/exception_handler.rb`. Whilst not vital, it will give you
access to the configuration options which can change the gem's behavior:

![Config File](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/config.png "Configuration")

--

###Database

If you want to set up the database, you will need to use the `migration installer`:

	$ rails generate exception_handler:migration

This creates:

	$ rake db:migrate

This will migrate the datatable for you. Now you need to change `config.db = true`

![DB Config](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/config_db.png "Config DB")

---------

###Configuration

[Exception handler](https://rubygems.org/gems/exception_handler) comes with 3 installers

**You only need to use `rails generate exception_handler:install`**. The others allow you to include files on your system, or create the `errors` table.

	# General
	$ rails generate exception_handler:install #-> installs "config" file (initializer)

![Install](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/install.png "Standard Install")

	# Migration
	$ rails generate exception_handler:migration #-> generates migration for "errors" table

![Migration Install](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/install_migration.png "Migration Install")

	# Files
	$ rails generate exception_handler:views #-> controller, models, views & assets
	$ rails generate exception_handler:views -v views controllers models assets #-> remove as appropriate to install individual assets

![Views Install](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/install_views.png "Views Install")

---------

## Usage

###Development Environment

**[`config.exceptions_app`](http://guides.rubyonrails.org/configuring.html#rails-general-configuration)** is only used in Rails' production environment. Therefore, if you wish to **test the gem in dev**,
you'll need to make your app process requests as `production` for now. This is a temporary step, and will be
resolved in a new version:

	#config/environments/development.rb
	config.consider_all_requests_local = false # true

![Development Testing](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/development.png "Development Testing")

You should change this setting if you wish to test your styling in development mode. Please note **it should be temporary**

--

###Production Environment

    No action required

---------

###Demo

**404 Error** | **500 Error**
:---: | :---:
[![404 Error Page](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/404_demo.png "404 Error Page Demo")](http://firststopcosmeticshop.co.uk/sdfsdf/sdf/sdfsdf) | [![500 Error Page](https://raw.githubusercontent.com/richpeck/exception_handler/master/readme/500_demo.png "500 Error Page Demo")](http://firststopcosmeticshop.co.uk/search/fasdfasdfasdfasdfasdf)
[Link](http://firststopcosmeticshop.co.uk/sdfsdf/sdf/sdfsdf) | [Link](http://firststopcosmeticshop.co.uk/search/fasdfasdfasdfasdfasdf)

--------

## Support

If you need help, you may consider:

1. Watching this [**video tutorial**](http://www.youtube.com/watch?v=Zo2vav3dYnY):

   [![ExceptionHandler Update](http://img.youtube.com/vi/Zo2vav3dYnY/0.jpg)](http://www.youtube.com/watch?v=Zo2vav3dYnY)
2. Read [**our tutorial**](http://google.com)
3. Ask on [**StackOverflow**](http://stackoverflow.com)
4. Go on the [**gem support page**](http://frontlineutilities.co.uk)

---------

## Contributing

1. Fork it ( https://github.com/richpeck/exception_handler/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request


text:
# Operators

Operators are made available to different types and structures via certain traits (`Add`, `Sub`, `Rem`, etc).
However, these traits (and therefore operators) have different implementations depending on the type.
These implementations may have general norms and exceptions depending on the type and the operation.
This section will help you determine if you can use a regular operator for an operation or if you should use an overflow-specific method.

https://github.com/rust-lang/rfcs/pull/560

repository: mattjperez/numbers-in-rust

repo_name: mattjperez/numbers-in-rust


text:
# Dataset of Words sorted by Their Frequencies
The `words-by-frequency.txt` is quick-and-dirty 125k-word dictionary from a small subset of Wikipedia.
The dictionary/dataset is used to perform infer_spaces function in order to split words that cannot be found in GloVe dictionary (especially hashtag), into N number of words. Example: *happylifeatschool* -> *happy life at school*.

Credits:
* http://stackoverflow.com/users/1515832/generic-human
* https://stackoverflow.com/questions/8870261/how-to-split-text-without-spaces-into-list-of-words/11642687#11642687


text:
# vue-i18n-performance-comparison-example

> vue-i18n performance comparison example

## Performance measurement prepare

```sh
# setup performance comparison examples
$ npm run setup

# build performance comparison examples
$ npm run build
```

## Performance measurement

```sh
# serve perform comparison examples
$ npm run serve

# measure performance !!
$ npm run perform
```

## Performance measurement targets
- Plain: Render TODO items only (No translation)
- Method: Render TODO items with `$t` method
- Directive: Render TODO items with `v-t` custom directive
- Compile: Render TODO items with compiler module

## Measurement enviroments
- Vue.config.performance = true
- Builded Vue CLI v3
- Development build (Disable Production build)
- Headless chrome (pappeteer)

## An approach to measurement
Render 1000 TODO items, after that remove 10 TODO items.

## Measurement items
- Re-render user timing pass time, when remove TODO item.


text:
# Alm's Soup Kitchen
A static HTML website for a local charity soup kitchen. Uses Bulma for CSS framework. Icons are from Font Awesome.

# Sample
~~![Alm's Soup Kitchen](http://almssoupkitchen.org/public/images/demo.png "Logo Title Text 1")~~

# Demo
~~[Click here for a live demo](http://almssoupkitchen.org).~~

license: Unlicense