text:
---
title: "Getting Started with AMP"
date: 2018-05-31T07:11:59+07:00
draft: false
type: "post"
tags: ["AMP", "theme"]
---

# Getting started with AMP
Implement these key steps to get up and running with AMP:

- Create your AMP pages
- Validate your AMP pages
- Make your content discoverable

## Using AMP day-to-day
Keep your AMP momentum going with all the resources AMP has to offer.

## Create your AMP pages
See the relevant sections below for: using a CMS, starting from scratch, or converting existing content


text:
# Frequently Asked Questions

## Where did the `dist` folder go?

Starting with version 1.9.0, a minified browser bundle can be obtained from npm CDNs such as [unpkg](https://unpkg.com/) or [jsDelivr](https://www.jsdelivr.com/). The link can be found in the [README.md](README.md).

In prior versions, the browser bundles were made available in the `dist` directory. In order to access those, look in the `dist` folder on the version's GitHub tag, e.g. https://github.com/algorand/js-algorand-sdk/tree/v1.8.1/dist.

## Can I host the browser bundle myself?

Yes! If you would instead prefer to host the package yourself, a minified browser bundle can be found in the `dist/browser/` folder of the published npm package starting with version 1.9.0.

## It says `Error: Can't resolve....` in the sdk

This kind of errors is usually seen in Webpack 5 or Vite projects. You will need to install additional polyfill packages.

#### Webpack 5 projects

Typically, with Webpack 5 you would see:

```
Module not found: Error: Can't resolve 'crypto'
ERROR in ./node_modules/algosdk/dist/browser/algosdk.min.js 7471:55-72
```

Webpack 5 no longer auto-polyfills some of the node modules used by this sdk. You will have to polyfill them to fix any errors regarding missing modules.

#### Vite projects

With Vite, you would see:

```
Uncaught ReferenceError: Buffer is not defined
```

You will have to install `buffer` as dependency.

In `index.html`, add the following:

```html
<script type="module">
  import { Buffer } from 'buffer';
  window.Buffer = Buffer;
</script>
```

To utilize the Buffer polyfill in production builds, in `vite.config.js`, add:

```js
import inject from '@rollup/plugin-inject';

export default defineConfig({
  ...,
  build: {
    rollupOptions: {
      plugins: [inject({ Buffer: ['buffer', 'Buffer'] })],
    },
  },
  ...
});
```

## How do I generate the SRI hash of `algosdk.min.js`?

The SRI hash of `algosdk.min.js` is the base64 string after `sha384-` in the `integrity` attribute of the `<script>` tag used to import `algosdk.min.js`.
See the [instructions to import algosdk in browser](./README.md#Browser).
It can be computed as follows after [building the project](./README.md#building):

```bash
cat dist/browser/algosdk.min.js | openssl dgst -sha384 -binary | openssl base64 -A
```

license: MIT

repository: Livaa/js-algorand-sdk

branch_name: refs/heads/develop

extension: md

gha_license_id: MIT

license_type: permissive

repo_name: Livaa/js-algorand-sdk


text:
title: PHP's docs.
slug: phps-docs
date: 2007-09-16 09:20:28+00:00

At the time of writing, a google search for:

Warning: file_get_contents() expects parameter 2 to be boolean, resource given

..doesn't get any hits.

I encountered this problem following the docs.

Does this imply nobody reads the docs? Do they just steal^Wborrow code from other people? Is everyone using a framework that wraps this for them (haha)?

Hint: It's a docs problem, the correct prototype is:

string file_get_contents(string filename [, bool use_include_path [, resource context [, long offset [, long maxlen]]]])

Thanks to the lovely people in ##php on freenode. :)

repository: FauxFaux/blog

branch_name: refs/heads/master

repo_name: FauxFaux/blog


text:
---
layout: post
title: September 28, 2007 - Jesus Every Day
categories: [Verse of the Day]
alias: [/VerseOfTheDay/2007/09/28/]
---

_Psalm 42:8
Yet the LORD will command his lovingkindness in the daytime, and in
the night his song shall be with me, and my prayer unto the God of my
life._

The Psalmist expected his deliverance to come from God's loving
kindness. Things are bad, but they shall not always be so. God is
good all the time as indicated by the "daytime" and "night" mentioned
in the verse.

extension: markdown

gha_language: JavaScript


text:
---
layout: post
year: 2015
title: "Inner Melodies"
description: "What happens when you sing a single note"
image: ""
category: "blog"
location: [India]
topic: [harmonics, sound]
tags: [sufi, sound, India, meditation]
---
When I first start to sing in the morning, often my voice is croaky, unresponsive, and I shrink at the thought of others in their beds overhearing these first notes clamber out of my throat (today it was 7am on a Sunday after all).

I read in a Sufi book Music and Mysticism, by Hazrat Inayat Khan that a wise man will learn more with dwelling on a single note than he will with a thousand.

Sufi practice includes singing a single note for five to six hours a day.

There is a looped tanpura playing from my laptop, the same tone every day, G#. Something about it is not sitting today. Normally of course there would be a tanpura in my hands, and I would tune it to the surroundings, to myself, to whatever I feel like that day.
 It takes me a while to find one that seems to fit. When I do, I don't feel like leaving it, I feel like playing with it, enjoying it.

The more I sit on it, the more I like it, the more it grows.
First there is my voice, weak at the beginning, now getting stronger and firmer all the time, rich, projecting. I practice sounds, vowels, patterns that I have picked up from somewhere, possibly originally from some sacred practice I guess: Hum-A, Hung-A, Ung-Ee.

With each repetition, I feel myself opening. I feel powerful, as if my voice is my force, and it is filling the air, one with the birds and the wind.

Then there is the music. As I hum, with power, eyes closed, I start to hear melodies. Beautiful melodies that sound like nothing I have ever written or heard. They are harmonics from my tongue. With no effort, my tongue is producing them. Eyes closed, that are delicious, addictive. If I try consciously to reproduce them, they go away, or seem forced.

Only when I am truly relaxed, they come back and start to sing again.  And how they sing!

A broad smile fills my mind, and I feel sringara, excitement and peace at the same time.

I will practice sitting on one note again tomorrow.


text:
# Title Entries Field plugin for Craft CMS 3.x

Craft plugin that provides a new field type that works like an Entries field type but offers users an easy way to set a different title for the relation than the related page title.

This is particularly useful if you are linking to other content but want to use shorter or different titles in the lists e.g. in menus, submenus or related lists.

## Installation

To install the Title Entries Field type, follow these steps:

1. Install with Composer via `composer require dolphiq/titleentriesfield` from your project folder
2. Install plugin in the Craft Control Panel under Settings > Plugins
3. The `Title Entries Field` type will be available when adding a new field - Settings > Fields > Add new field

Title Entries Field plugin works on Craft 3.x.

### Example of the Title Entries Field in action
![Screenshot](resources/screenshots/screenshot1.png)

## Using the Title Entries Field

You can use the field as a normal Entries field type but give the end user the possibility to change te label for each relation/link.

### Usage sample in Twig templates
```
{% for entry in entry.myLinks %}
  {{ entry.title }} - {{ entry.linkTitle }} <br>
{% endfor %}
```

### Usage sample to display the Title Entries Field if the field is set or use the title field as backup (entry.Title)
```
<ul>
{% for entry in entry.menuLinks %}
  <li><a href="{{ entry.url }}" rel="{{ entry.title }}">
    {{ entry.Title }}
  </a>
{% endfor %}
</ul>
```

### Contributors & Developers
Johan Zandstra -<EMAIL_ADDRESS>Brought to you by [Dolphiq](https://dolphiq.nl)

gha_language: PHP


text:
# My ESP8266 + Plantower AQ Sensor Project Firmware

This is the firmware for the project.  I wrote an Arduino sketch.  I'd rather
have written it in C, but writing an Arduino sketch seemed like the fastest way
to get the project done, and I'd rather be finished than happy (this is a joke,
I am perfectly happy even though it isn't C).

## Prerequisites

Make sure you have Arduino IDE installed.  I like to use the command line tools,
so I made a `Makefile` that will setup most of the stuff.

You'll also need a programmer for the ESP8266.  [This
one](https://www.amazon.com/gp/product/B07KF119YB/) works well for me.

If you're on macOS, the Python path seems broken, so you might have to do this:

```
$ cd ~/Library/Arduino15/packages/esp8266/tools/python3/3.7.2-post1
$ rm python3
$ ln -s /usr/bin/python3
```

## Command Line

If you're using the command line, just do:

1. `make setup` to install libraries
2. `make compile` to compile stuff
3. `make flash` to flash the ESP8266

If you've already assembled the PCB, this should be it.  By default the ESP8266
will create an ad-hoc network.  Connect to that network and configure the chip
with your wifi credentials.  After it connects to your network it will start
broadcasting sensor information.

You may need to adjust `PORT` inside the `Makefile` in case your programmer is
in a different location.

See [`client.rb`](../client.rb) in the main director for a Ruby client that listens for sensor data.

license: Unlicense

gha_license_id: Unlicense


text:
---
title: HPE Discover 2022
dateStart: 2022-06-27T22:00:02.294Z
dateEnd: 2022-06-30T21:59:02.320Z
category: Virtual Event
image: /img/hpe-discover-2022-event.png
link: https://www.hpe.com/us/en/discover.html
width: large
tags:
  - Discover
---
## HPE Discover 2022
### Join the HPE Developer Community team in the Hack Shack

Las Vegas, June 28-30

From the latest insights in secure connectivity, hybrid cloud, AI and unified data analytics, HPE Discover 2022 is the best place to stay ahead of the trends and technologies that will move your business forward, faster. Join HPE experts, leading companies, and industry luminaries and learn how to accelerate your data-first modernization across edge to cloud. You don’t want to miss this opportunity to once again gather with HPE Developer Community members in the Hack Shack!

repository: hpe-dev-incubator/hpe-dev-portal

gha_language: HTML

repo_name: hpe-dev-incubator/hpe-dev-portal


text:
wb-github

workerB package for Github

## Demo

## How to install

-   Create account on [workerb](https://workerb.io/).
-   Install [workerb extension](https://chrome.google.com/webstore/detail/jdbakbjkiklbibfccegfejjdlcgpnnpe).
-   Add Github package.
-   Setup Github package.
-   To open action bar press `Ctrl + k`
-   🚀🚀

## Development

-   To install project dependencies, run `yarn install`.
-   To build the project, run `yarn build` (_production build_).
-   To continuously build the project, run `yarn watch` (_but this will not build new files and folders that you create while developing the project_).
-   Run `yarn build` or `yarn watch` in terminal
-   Log into https://workerb.app.
-   Press `Ctrl + k` to open workerB action bar.
-   Run `dev on` in the workerB action bar.
    ![dev on](assets/dev_on.PNG)
-   Hit Enter to stat the dev mode (_notification will come on top right corner indicating dev mode is on_)
-   Run `loadDir <path>` in the workerB action bar. `path` is the path of the dist folder generated by yarn.
-   For path of your dist folder append `file:///` in the start _in case of windows_
    ![Load Dir](assets/loadDir.PNG)
-   Make sure that you turned `Allow access to file URLs` option for workerB extension.
-   To do that, navigate to `chrome://extension` in your chrome browser and click the `Details` button for workerB extension.

    ![Details button](assets/detailsButton.PNG)

-   Then turn the `Allow access to file URLs` option on
    ![Allow Access To File URL](assets/allowAccessToFileUrls.PNG)
-   After successfully loading your dist location scripts you can start using workerB
    ![dist start](assets/dist_start.PNG)
-   To remove the dist folder and script use `removeDir` command (_notification will come on top right corner indicating taht script is removed_)
    ![removeDir](assets/removeDir.PNG)
-   Hit enter to remove the dist scripts
-   To re index whole scripts again (_used in case of loading new content from APIs or see the logs_) type `reIndex` in workerB action bar.
    ![reIndex](assets/reIndex.PNG)
-   Hit Enter to re index.

## Support

-   [support<EMAIL_ADDRESS>

repository: workerb-io/wb-github

gha_language: TypeScript

repo_name: workerb-io/wb-github


text:
---
rule:
  aip: 192
  name: [core, '0192', has-comments]
  summary: Everything in a proto file must be commented.
permalink: /192/has-comments
redirect_from:
  - /0192/has-comments
---

# Omnipresent comments

This rule enforces that every descriptor in every proto file has a _public_
leading comment, as mandated in [AIP-192][].

## Details

This rule looks at each descriptor in each proto file (exempting oneofs and the
file itself) and complains if no public comment is found _above_ the
descriptor.

## Examples

**Incorrect** code for this rule:

```proto
// Incorrect.
// A representation of a book.
message Book {
  string name = 1;  // No leading comment.
}
```

**Correct** code for this rule:

```proto
// Correct.
// A representation of a book.
message Book {
  // The resource name of the book.
  string name = 1;
}
```

## Disabling

If you need to violate this rule, use a leading comment above the descriptor
(and revel in the irony). Remember to also include an [aip.dev/not-precedent][]
comment explaining why.

```proto
// A representation of a book.
message Book {
  // (-- api-linter: core::0192::has-comments=disabled
  //     aip.dev/not-precedent: We need to do this because reasons. --)
  string name = 1;
}
```

[aip-192]: https://aip.dev/192
[aip.dev/not-precedent]: https://aip.dev/not-precedent

repository: RocketDonkey/api-linter

branch_name: refs/heads/main

repo_name: RocketDonkey/api-linter


text:
---
title: Battlesnake Developer Update - November 2021
authors:
- Aurora
---

November has seen the completion of some larger projects the dev team has been working on, and we are all really pleased to finally be able to share them with you.

## That's a wrap on Fall League 2021!

A huge congratulations out to all the participants of the 2021 Fall League, I hope you had just as much fun as we did. There were so many great Battlesnake games to showcase, we had to split the tournament games over two days to get them all in there! You can still catch the videos from the event at [battlesnake.tv](battlesnake.tv)
[

Fall League 2021 Tournament - Day 2 - The Finals! - battlesnakeofficial on Twitch

battlesnakeofficial went live on Twitch. Catch up on their Science & Technology VOD now.

![](https://static.twitchcdn.net/assets/favicon-32-e29e246c157142c94346.png)Twitch

![](https://static-cdn.jtvnw.net/cf_vods/d2nvs31859zcd8/7da8d1b010c9b8996d0a_battlesnakeofficial_44188755579_1813198995/thumb/custom-1f48b6e9-234b-472e-9187-32000e6d1afd-640x360.png)
](https://www.twitch.tv/videos/1212904047)
And if you haven't filled out the [Fall League Experience Survey](https://forms.gle/QdqFwjuZqnxJL7r99) yet, please do so! As a modest thank-you from the Battlesnake team, you will receive an unlock code for a Battlesnake head and tail.
![](./img/WinterLeagueGraphicTitle475x356.png)Winter Classic Invitational
The Winter Classic invitational will be wrapping up our 2021 season. Invites are being sent out now to the many fine champions we've seen this past year, allowing them to enter their Battlesnake into this exclusive tournament. We will also be unveiling a special food icon created for this event, as designed by our [Fall League Caster Crown winner](https://play.battlesnake.com/league/fall-league-2021/#caster-crown), Aileen.

For those of us not on the invite list this year, I hope you'll join me in curling up all cozy on [Dec 11th and Dec 18th](https://play.battlesnake.com/schedule/) to see the finest Battlesnake competitors of the 2021 season duke it out. We'd love to celebrate the end of the season with you, so come hang out in Twitch Chat and cheer with us!

## Engine Regions

Rob has been incredibly hard at work building Engine Regions for the Battlesnake community, and this November that hard work finally paid off. Engine Regions help level the playing field, by removing the latency penalty that geographically distant servers introduce. We've seen the struggle that our non-North American Battlesnakers have experienced when interacting with the main Battlesnake server located in AWS's Oregon region, and that was a pain point we very much wanted to relieve.

An [earlier announcement](__GHOST_URL__/announcing-engine-regions/) outlines the details of this feature, and we'd be delighted if you would try it out and let us know what you think.

## Putting a pin in Teams

A lot has changed over the years, and one of our older features, Teams, isn't quite achieving what we want it to achieve on the Battlesnake platform. Any existing Battlesnake Teams are still active and functional, but for now we've disabled the ability to create any new Team.

We are going to be revisiting and re-imagining this concept in the future, so don't worry! But for the short term, this functionality has been disabled.

## Beta-Testing for Running your own Competition
![](./img/Screen-Shot-2021-11-25-at-10.51.45-AM.png)Secret Screenshot of the 'Create Competition' beta form!
I think the most common request we receive is from folks wanting to run their own Battlesnake competition. We know that many determined people have managed to work something out by manually running games, which sounds like a huge amount of work and shows an incredible amount of dedication. While this warms my heart, we think we can do better for you.

For quite a while now, we've been cooking up a way for folks to run their own Battlesnake tournaments, and at last we are ready to launch a beta and start getting community feedback. Huge thanks to [md-hexdrive](https://play.battlesnake.com/u/md-hexdrive/) and [chaelcodes](https://play.battlesnake.com/u/chaelcodes/) for volunteering to take this new feature for a spin.

---

That's all for now. If you have any questions, reach out to us on the [Battlesnake Discord](https://discord.battlesnake.com/) server.

repository: BattlesnakeOfficial/docs

repo_name: BattlesnakeOfficial/docs


text:
# Figma Inter Letter Spacing

![](/cover.png)

This Figma plugin will set the letter spacing of selected text layers according to the [Inter Dynamic Metrics](https://rsms.me/inter/dynmetrics/).

## Usage

1. [Install the plugin from here](https://www.figma.com/community/plugin/795733302011238428/Inter-Letter-Spacing).
2. Select one or more text layers.
3. Run `Inter Letter Spacing` from the Plugins menu.

_Any layers that don't use the **Inter** font will be left unchanged._


text:
# codebase-segmentation-pytorch

*If you have any suggestions or questions, please start an issue or contact [me](https://github.com/VincentXWD) directly.*

[![Build Status](https://travis-ci.org/VincentXWD/codebase-segmentation-pytorch.svg?branch=master)](https://travis-ci.org/VincentXWD/codebase-segmentation-pytorch)

A codebase for segmentation tasks in pytorch. Goals:
- To provide an easy-in-use framework for image semantic segmentation researchers.
- To build a fast parallel computing framework utilizing features of newest version of PyTorch. Support not only single-node-multi-gpus but also multi-nodes-multi-gpus.
- To provide fine tuned & strong performance models as baseline for researchers.

## News
- [11/11/2019] Update pre-trained models: ResNet101-PSPNet on Cityscapes, Dilated ResNet50-PSPNet on Cityscapes. Click [HERE](#Performance).

- [05/11/2019] Support distributed training & evaluating.

## Pretrained model
We provide fine-tuned Networks with different backbone. We strongly recommend you to load the model by [eval.py](./eval.py). Also you can load it manually. Please note that the checkpoint has not only the model but also the optimizer information. You should load it use the key `checkpoint['state_dict']`.

The pretrained models are still updating.

## Requirements
- **python>=3.6**
- **opencv-python==<IP_ADDRESS>**
- torch>=1.0.10(better >= 1.3.0)
- imageio
- pandas
- medpy
- scipy
- pyyaml

## How to install

**There are two ways to install this framework:**
- According to the [requirements.txt](./requirements.txt).

  You can install all requirements according to the requirements.txt by the command below:
  ```
  pip install -r requirements.txt --user
  ```
- Using conda [yml](./environment.yml) configure.

  If you are a conda user, you can create yet another a new python environment by this command:
  ```
  conda env create -f environment.yml
  ```

- Please note that if you're using an old version of CUDA. Please modify the pytorch and torchvision version in requirements.txt but make sure the version of pytorch supports parallel computing.

## Quickstart

- To define a network:
```python
from models import PSPNet

net = PSPNet(
    encoder_name='resnet101',
    encoder_weights='imagenet',
    classes=19,
    auxiliary_loss=Your_Auxiliary_Loss,
    auxloss_weight=Your_Auxloss_Weight,
    criterion=Your_Criterion)
```

## Experiment results

### Cityscapes-19
Please note that all backbones are ResNet-101.
SS stands for Single-Scale and MS stands for Multi-Scale which has scales including [0.5, 0.75, 1.0, 1.25, 1.5, 1.75].
During training phase, UNet used batch size of 8 and sync BN.

|Model|meanIU(SS)|meanIU(MS)|
|----|----|----|
|UNet|68.403%|69.785%|

## Time consuming evaluation

### Training phase on Cityscapes-19
This codebase implements multiprocessing for training manually. The implementation document will be updated later.

We use 4 Nvidia GEFORCE GTX 1080 Tis to do this experiment. Setting batch_size=8, training 200 epochs on cityscapes-19 dataset. Experiment results will be updated soon.

|Model|Training time|
|----|----|
|Naive|≈27 hours|
|**Ours**|7 hours 44 minutes|

### Evaluating phase on Cityscapes-19

We also implement concurrent evaluating method.

We use 4 Nvidia GEFORCE GTX 1080 Tis to do this experiment. Here's comparison with naive implementation in evaluating phase.

|Model|meanIU(SS)|Time consuming(SS)|meanIU(MS)|Time consuming(MS)|
|----|----|----|----|----|
|Naive|68.403%|≈22 minutes|69.785%|≈4 hours|
|**Ours**|68.403%|≈7 minutes|69.785%|≈50 minutes|

### Performance

This section accumulated all models' performance implemented by this framework.

All models are trained in 200 epochs and with batch size equals 8. More details please refer the config files.

|Method|Backbone|Dataset|meanIU(SS)|meanIU(MS)|Pretrained Model|
|---|---|---|---|----|----|
|UNet|ResNet101|Cityscapes-19|70.221%|72.500%|None|
|PSPNet|ResNet101|Cityscapes-19|72.681%|74.863%|[Google Drive](https://drive.google.com/file/d/1yJD3SZvcPHXvfqjuYh2Bv_gthmN-WVEK/view?usp=sharing)|
|PSPNet|Dilated-ResNet50|Cityscapes-19|75.782%|76.579%|[Google Drive](https://drive.google.com/file/d/1Gph-t4zuJowP9cNYFmCuT1oKsg0onAQv/view?usp=sharing)|
|PSPNet|Dilated-ResNet101|Cityscapes-19|77.452%|78.585%|[Google Drive](https://drive.google.com/file/d/1Hee-hu0n686W_-Ck0NbFcfvTKkwLLReS/view?usp=sharing)|

## TODO(xwd): Finish documents & annotations.

gha_language: Python


text:
cornerstone-grunt
============

Contains common grunt configuration

Usage
-----

Require cornerstone-grunt in your Gruntfile.js and pass the grunt object to it.  The module will initialize
common grunt configuration in your project.

```javascript
var cornerstone = require('cornerstone-grunt');

module.exports = function(grunt){
  cornerstone(grunt);
};
```

You may override any of the default configuration by passing another object as the second parameter to
cornerstone-grunt.

```javascript
var config = {
  module: "module/app",
  mainCss: [
    "<%= module %>/css<%= sassOut %>base.css",
    "<%= module %>/css<%= sassOut %>theme.css"
  ]
};

cornerstone(grunt, config);
```

You may then attach any new tasks to the grunt object.  Include any configuration for the new tasks in the
config override.

```javascript
grunt.loadNpmTasks('grunt-browserify-bower');
```

## Variables

You may override any of these variables to customize how grunt behaves.

- **yeoman.dist**: the distribution directory
- **yeoman.app**: the top level where your javascript and sass are contained, assumed to be in styles/ and scripts/ folders respectively
- **bowerCssFiles**: an array of bower css to combine and minify into vendor.css
- **bowerJsFiles**: an array of bower js files to combine and uglify into vendor.js
- **testSetupTasks**: an array of tasks that will be run concurrently before the unit tests,
add any setup you need for unit tests here.
If some of your tasks cannot be concurrent, provide a task that runs your sequential tasks
  ```javascript
  grunt.registerTask('myTask', ['taskOne', 'taskTwo'])
  testSetupTasks: ['myTask']
  ```
  It cannot be an empty array.

## Grunt Tasks

The following tasks are set up by cornerstone-grunt

###Main Tasks

- `grunt`
  - `dev`
- `grunt prod` default action, minifies and runs unit tests
  - `jshint`
  - `coffeelint`
  - `concurrent:test`
  - `test:unit`
  - `build`
- `grunt build` main build action
  - `clean:dist`
  - `i18n`
  - `concurrent:dist`
  - `concat`
  - `ngAnnotate`
  - `copy:dist`
  - `cssmin`
  - `uglify`
- `grunt build-dev`
  - `clean:dist`
  - `i18n`
  - `concurrent:server`
  - `concat`
  - `copy:dist`
-  `grunt dev` kicks off dev tasks
  - `newer:jshint`
  - `newer:coffeelint`
  - `concurrent:test`
  - `test:unit`
  - `build-dev`
  - `watch`
- `grunt watch`  monitors for changes
- `grunt test` runs test suite
- `grunt test:unit` runs unit tests
- `grunt debug-karma` runs karma in Chrome for debugging
- `grunt custom-karma` runs karma without any overrides
- `grunt docs` generates test plan documentation from automated tests
- `grunt poedit-basepath` updates the base path for POEdit files to your local path
- `grunt compile-coffee` coffeelint, compile, concat js
- `grunt compile-test` coffeelint, karma:unit
- `grunt compile-sass` compass, concat css, copy sprites
- `grunt copy-assets` alias for copy:dist, moves assets not imagemin-ed

###Subtasks

- `jshint`  Validate files with JSHint
- `uglify`  Minify files with UglifyJS
- `concat`  Concatenate files
- `cssmin`  Minify CSS
- `imagemin`  Minify PNG and JPEG images
- `copy`  Copy files
- `clean`  Clean files and folders
- `compass`  Compile Sass to CSS using Compass
- `coffee`  Compile CoffeeScript files into JavaScript
- `connect`  Start a connect web server
- `newer`  Run a task with only those source files that have been modified
- `newer-clean`  Remove cached timestamps
- `ngAnnotate`  Annotate AngularJS scripts for minification
- `karma`  run karm
- `shell`  Run shell commands

###Custom Tasks

####docs

Generates test plan documentation from automated tests.  It will look through the configured folder
(the default folder is ./test), for the subfolders "phpunit" and "casperjs".  If these folders exist it will traverse
 all of the tests in these folders and generate an md file that lists all of the test descriptions.  For casperjs
 these are GIVEN, THEN, WHEN statements.

######Options

 - `casperEnabled` if false, casperjs tests will not be added to the output even if the casperjs folder exists, defaults to `true`
 - `phpEnabled` if false, PHPUnit tests will not be added to the output even if the phpunit folder exists, defaults to `true`
 - `dir` the directory where tests are kept, defaults to `./test/`
 - `target` the output file, defaults to `./doc/TestPlan.md`

To override the default configuration, you would need to add something similar to the following to Grunt's configuration:

```javascript
{
  docs: {
    dir: "./test/",
    target: "./doc/TestPlan.md"
  }
}
```

## Release History

 * 2014-11-24    1.1.1    Fix call to grunt.config in i18n task
 * 2014-11-20    1.1.0    Prune unused tasks, speed up watch on vagrant
 * 2014-09-11    1.0.0    First Release

License
------------------

Copyright:: 2014 web-masons Contributors

Licensed under the Apache License, Version 2.0 (the 'License');
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an 'AS IS' BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Contributing
------------

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

repository: web-masons/cornerstone-grunt

repo_name: web-masons/cornerstone-grunt


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

### Description

Planet eStream before <IP_ADDRESS> allows unauthenticated upload of arbitrary files: Choose a Video / Related Media or Upload Document. Upload2.ashx can be used, or Ajax.asmx/ProcessUpload2. This leads to remote code execution.

### POC

#### Reference
- https://sec-consult.com/vulnerability-lab/advisory/multiple-critical-vulnerabilities-in-planet-enterprises-ltd-planet-estream/-

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

repository: trickest/cve

repo_name: trickest/cve


text:
# Ivory Prop disposes of its 45% stake in Penang property development firm for RM56m

Published at: **2019-11-01T13:12:48+00:00**

Author: **Chester Tay**

Original: [The Edge Markets](https://www.theedgemarkets.com/article/ivory-prop-disposes-its-45-stake-penang-property-development-firm-rm56m)

KUALA LUMPUR (Nov 1): Ivory Properties Group Bhd is disposing of its 45% interest in a Penang-based property development company for RM56.09 million.
The buyer is Hemat Tuah Sdn Bhd, which currently owns the other 55% stake in the company, Tropicana Ivory Sdn Bhd (TISB).
In a filing with Bursa Malaysia, Ivory said the disposal of the stake will enable it to realise gains from its investment in TISB and focus on other project developments.
Ivory's wholly-owned subsidiary, Ivory Utilities Sdn Bhd, signed the shares sales agreement with Hemat Tuah today.
According to Ivory’s earlier bourse filing dated Nov 11, 2011, TISB was involved in the development of 102.56 acres of land in Penang, with a gross development value of RM10 billion back then.
TISB was originally a JV between Ivory and Tropicana Corp Bhd. Tropicana had on Oct 26 last year sold its 55% stake to Hemat Tuah.
Ivory's share price closed unchanged at 18.5 sen today, giving the group a market capitalisation of RM90.67 million.

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
---
layout: default
published: true
permalink: /v3_1/en/expression/AUS/
lang: en
---
When asked to provide more context about who was especially vulnerable to restrictions on their rights to opinion and expression by the government or its agents in 2019, our respondents mentioned all of the following:

- Journalists, particularly those reporting on human rights, immigration, or whistle blowers; who can have homes and offices raided
- Media networks who also report on the issues, such as the Australian Broadcasting Corporation, who had their headquarters raided
- People with certain political beliefs or associations, including those critical of the government
- People of certain races or ethnicities, particularly ethnic minorities, who are encouraged to self-censor
- Excessive police presence at certain protests, like the Extinction rebellion, tempered the right to free opinion and expression


text:
---
layout: article
title: "Program Lead: Mr. Ishmael Makitla"
excerpt: "Program Lead: Mr. Ishmael Makitla"
image:
  feature:
  teaser:
  thumb:
share: false
ads: false
---

![Ishmael Makitla](/images/ishmael-makitla.gif)

**Role at the CSIR:**  Senior Technologist/ Engineer

**Role within the DSIDE Program:** Technical lead and Mentor

**Current projects:** Currently working on development and continuous improvement of Data Synchronisation Engine for the HPRS System using NodeJS and Socketio. Ishmael is also working on a journal paper to meet requirements for a PhD in Computer Science. He is involved in the setting up and configuring configuration of the Health Interoperability Laboratory at the Meraka Institute.

gha_language: CSS


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

### Description

The load_segment_descriptor implementation in arch/x86/kvm/emulate.c in the Linux kernel before 4.9.5 improperly emulates a "MOV SS, NULL selector" instruction, which allows guest OS users to cause a denial of service (guest OS crash) or gain guest OS privileges via a crafted application.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/ARPSyndicate/cvemon


text:
# terraform-provider-kafka

## Steps to test
- From the application root run `go build -o terraform-provider-kafka`. This will create a binary under project root.
- If the build fails because of certail dependencies, you need to pull them manually.
- Set kafka topic configurations in mail.tf
- Run these commands in sequence `terraform init`, `terraform plan`, `terraform apply`
- To see the logs and messages set environment variable `TF_LOG=TRACE`

## Requirements
- Install Go and set it to PATH
- Download terraform and set it to PATH

## Configurations
- Broker configurations are hardcoded


text:
# My first webpage

#### My very first webpage, 5/27/2020_

#### By Kyle Hubbard & Sean D.

## Description

_This website was created to be used for git experiments, to learn basic HTML_

## Setup/Installation Requirements

* Clone this repository
* Open in a web browser

## Known Bugs

_No known bugs_

## Support and contact details

_Kyle Hubbard<EMAIL_ADDRESS>
## Technologies Used

* HTML
* Gita

### License

#### MIT - License


text:
# Convolutional Kernel Networks for Graph-Structured Data

```
@inproceedings{gckn_icml20,
title = {Convolutional Kernel Networks for Graph-Structured Data},
author = {Chen, Dexiong and Jacob, Laurent and Mairal, Julien},
booktitle = {Proceedings of the 37th International Conference on Machine Learning (ICML)},
pages = {1576--1586},
year = {2020}
}
```

links
- [pmlr](http://proceedings.mlr.press/v119/chen20h.html)
- [arXiv](https://arxiv.org/abs/2003.05189)
- [video](https://slideslive.com/38927759)
- [code](https://github.com/claying/GCKN)

gha_language: Jupyter Notebook


text:
# App

The `App` class is your main entrypoint to any application that builds on top of X.
It provides a simple API for routing HTTP requests as commonly used in RESTful applications.

```php title="public/index.php"
<?php

require __DIR__ . '/../vendor/autoload.php';

$app = new FrameworkX\App();

// Register routes here, see routing…

$app->run();
```

## Routing

The `App` class offers a number of API methods that allow you to route incoming
HTTP requests to controller functions. In its most simple form, you can add
multiple routes using inline closures like this:

```php title="public/index.php"
<?php

// …

$app->get('/user', function () {
    return React\Http\Message\Response::plaintext("Hello everybody!\n");
});

$app->get('/user/{id}', function (Psr\Http\Message\ServerRequestInterface $request) {
    $id = $request->getAttribute('id');
    return React\Http\Message\Response::plaintext("Hello $id!\n");
});
```

For example, an HTTP `GET` request for `/user` would call the first controller
function.
An HTTP `GET` request for `/user/alice` would call the second controller function
which also highlights how you can use [request attributes](request.md#attributes)
to access values from URI templates.

An HTTP `GET` request for `/foo` would automatically reject the HTTP request with
a `404 Not Found` error response unless this route is registered.
Likewise, an HTTP `POST` request for `/user` would reject with a `405 Method Not
Allowed` error response unless a route for this method is also registered.

You can route any number of incoming HTTP requests to controller functions by
using the matching API methods like this:

```php title="public/index.php"
<?php

// …

$app->get('/user/{id}', $controller);
$app->head('/user/{id}', $controller);
$app->post('/user/{id}', $controller);
$app->put('/user/{id}', $controller);
$app->patch('/user/{id}', $controller);
$app->delete('/user/{id}', $controller);
$app->options('/user/{id}', $controller);
```

If you want to map multiple HTTP request methods to a single controller, you can
use this shortcut instead of listing each method explicitly like above:

```php title="public/index.php"
<?php

// …

$app->map(['GET', 'POST'], '/user/{id}', $controller);
```

If you want to map each and every HTTP request method to a single controller,
you can use this additional shortcut:

```php title="public/index.php"
<?php

// …

$app->any('/user/{id}', $controller);
```

Any registered `GET` routes will also match HTTP `HEAD` requests by default,
unless a more explicit `HEAD` route can also be matched. Responses to HTTP `HEAD`
requests can never have a response body, so X will automatically discard any
HTTP response body in this case.

## Redirects

The `App` also offers a convenient helper method to redirect a matching route to
a new URL like this:

```php title="public/index.php"
<?php

// …

$app->redirect('/promo/reactphp', 'https://reactphp.org/');
```

Browsers and search engine crawlers will automatically follow the redirect with
the `302 Found` status code by default. You can optionally pass a custom redirect
status code in the `3xx` range to use. If this is a permanent redirect, you may
want to use the `301 Moved Permanently` status code to instruct search engine
crawlers to update their index like this:

```php title="public/index.php"
<?php

// …

$app->redirect('/blog.html', '/blog', React\Http\Message\Response::STATUS_MOVED_PERMANENTLY);
```

See [response status codes](response.md#status-codes) and [HTTP redirects](response.md#http-redirects)
for more details.

## Controllers

The above examples use inline closures as controller functions to make these
examples more concise:

```php title="public/index.php"
<?php

// …

$app->get('/', function () {
    return React\Http\Message\Response::plaintext(
        "Hello wörld!\n"
    );
});
```

While easy to get started, it's easy to see how this would become a mess once
you keep adding more controllers to a single application.
For this reason, we recommend using [controller classes](../best-practices/controllers.md)
for production use-cases like this:

=== "Using controller instances"

    ```php title="public/index.php"
    <?php

    // …

    $app->get('/', new Acme\Todo\HelloController());
    ```

=== "Using controller names"

    ```php title="public/index.php"
    <?php

    // …

    $app->get('/', Acme\Todo\HelloController::class);
    ```

<!-- -->

```php title="src/HelloController.php"
<?php

namespace Acme\Todo;

use React\Http\Message\Response;

class HelloController
{
    public function __invoke()
    {
        return Response::plaintext(
            "Hello wörld!\n"
        );
    }
}
```

See [controller classes](../best-practices/controllers.md) for more details.

## Middleware

One of the main features of the `App` is middleware support.
Middleware allows you to extract common functionality such as HTTP login, session handling or logging into reusable components.
These middleware components can be added to both individual routes or globally to all registered routes.
See [middleware documentation](middleware.md) for more details.

## Error handling

Each controller function needs to return a response object in order to send
an HTTP response message. If the controller function throws an `Exception` (or
`Throwable`) or returns any invalid type, the HTTP request will automatically be
rejected with a `500 Internal Server Error` HTTP error response:

```php
<?php

// …

$app->get('/user', function () {
    throw new BadMethodCallException();
});
```

You can try out this example by sending an HTTP request like this:

```bash hl_lines="2"
$ curl -I http://localhost:8080/user
HTTP/1.1 500 Internal Server Error
…
```

Internally, the `App` will automatically add a default error handler by adding
the [`ErrorHandler`](middleware.md#errorhandler) to the list of middleware used.
You may also explicitly pass an [`ErrorHandler`](middleware.md#errorhandler)
middleware to the `App` like this:

=== "Using middleware instances"

    ```php title="public/index.php"
    <?php

    require __DIR__ . '/../vendor/autoload.php';

    $app = new FrameworkX\App(
        new FrameworkX\ErrorHandler()
    );

    // …
    ```

=== "Using middleware names"

    ```php title="public/index.php"
    <?php

    require __DIR__ . '/../vendor/autoload.php';

    $app = new FrameworkX\App(
        FrameworkX\ErrorHandler::class
    );

    // …
    ```

If you do not explicitly pass an [`ErrorHandler`](middleware.md#errorhandler) or
if you pass another middleware before an [`ErrorHandler`](middleware.md#errorhandler)
to the `App`, a default error handler will be added as a first handler automatically.
You may use the [DI container configuration](../best-practices/controllers.md#container-configuration)
to configure the default error handler like this:

```php title="public/index.php"
<?php

require __DIR__ . '/../vendor/autoload.php';

$container = new FrameworkX\Container([
    FrameworkX\ErrorHandler::class => fn () => new FrameworkX\ErrorHandler()
]);

$app = new FrameworkX\App($container);

// …
```

By default, this error message contains only few details to the client to avoid
leaking too much internal information.
If you want to implement custom error handling, you're recommended to either
catch any exceptions your own or use a custom [middleware handler](middleware.md)
to catch any exceptions in your application.

## Access log

If you're using X with its [built-in web server](../best-practices/deployment.md#built-in-web-server),
it will log all requests and responses to console output (`STDOUT`) by default.

```bash
$ php public/index.php
2023-07-21 17:30:03.617 Listening on http://<IP_ADDRESS>:8080
2023-07-21 17:30:03.725 <IP_ADDRESS> "GET / HTTP/1.1" 200 13 0.000
2023-07-21 17:30:03.742 <IP_ADDRESS> "GET /unknown HTTP/1.1" 404 956 0.000
```

> ℹ **Framework X runs anywhere**
>
> This example uses the efficient built-in web server written in pure PHP.
> We also support running behind traditional web server setups like Apache,
> nginx, and more. If you're using X behind a traditional web server, X will not
> write an access log itself, but your web server of choice can be configured to
> write an access log instead.
> See [production deployment](../best-practices/deployment.md) for more details.

Internally, the `App` will automatically add a default access log handler by
adding the [`AccessLogHandler`](middleware.md#accessloghandler) to the list of
middleware used. You may also explicitly pass an [`AccessLogHandler`](middleware.md#accessloghandler)
middleware to the `App` like this:

=== "Using middleware instances"

    ```php title="public/index.php"
    <?php

    require __DIR__ . '/../vendor/autoload.php';

    $app = new FrameworkX\App(
        new FrameworkX\AccessLogHandler(),
        new FrameworkX\ErrorHandler()
    );

    // …
    ```

=== "Using middleware names"

    ```php title="public/index.php"
    <?php

    require __DIR__ . '/../vendor/autoload.php';

    $app = new FrameworkX\App(
        FrameworkX\AccessLogHandler::class,
        FrameworkX\ErrorHandler::class
    );

    // …
    ```

> ⚠ **Feature preview**
>
> Note that the [`AccessLogHandler`](middleware.md#accessloghandler) may
> currently only be passed as a global middleware to the `App` and may not be
> used for individual routes.

If you pass an [`AccessLogHandler`](middleware.md#accessloghandler) to the `App`,
it must be followed by an [`ErrorHandler`](middleware.md#errorhandler) like in
the previous example. See also [error handling](#error-handling) for more
details.

If you do not explicitly pass an [`AccessLogHandler`](middleware.md#accessloghandler)
to the `App`, a default access log handler will be added as a first handler automatically.
You may use the [DI container configuration](../best-practices/controllers.md#container-configuration)
to configure the default access log handler like this:

```php title="public/index.php"
<?php

require __DIR__ . '/../vendor/autoload.php';

$container = new FrameworkX\Container([
    FrameworkX\AccessLogHandler::class => fn () => new FrameworkX\AccessLogHandler()
]);

$app = new FrameworkX\App($container);

// …
```

X supports running behind reverse proxies just fine. However, by default it will
see the IP address of the last proxy server as the client IP address (this will
often be `<IP_ADDRESS>`). You can get the original client IP address if you configure
your proxy server to forward the original client IP address in the `X-Forwarded-For`
(XFF) or `Forwarded` HTTP request header. If you want to use these trusted headers,
you may use a custom middleware to read the IP from this header before passing
it to the [`AccessLogHandler`](middleware.md#accessloghandler) like this:

=== "Using middleware instances"

    ```php title="public/index.php"
    <?php

    use Acme\Todo\TrustedProxyMiddleware;

    require __DIR__ . '/../vendor/autoload.php';

    $app = new FrameworkX\App(
        new TrustedProxyMiddleware(),
        new FrameworkX\AccessLogHandler(),
        new FrameworkX\ErrorHandler()
    );

    $app = new FrameworkX\App($container);

    // …
    ```

=== "Using middleware names"

    ```php title="public/index.php"
    <?php

    use Acme\Todo\TrustedProxyMiddleware;

    require __DIR__ . '/../vendor/autoload.php';

    $app = new FrameworkX\App(
        TrustedProxyMiddleware::class,
        FrameworkX\AccessLogHandler::class,
        FrameworkX\ErrorHandler::class
    );

    $app = new FrameworkX\App($container);

    // …
    ```

```php title="src/TrustedProxyMiddleware.php"
<?php

namespace Acme\Todo;

use Psr\Http\Message\ServerRequestInterface;

class TrustedProxyMiddleware
{
    public function __invoke(ServerRequestInterface $request, callable $next)
    {
        // use <IP_ADDRESS> as trusted proxy to read from X-Forwarded-For (XFF)
        $remote_addr = $request->getAttribute('remote_addr') ?? $request->getServerParams()['REMOTE_ADDR'] ?? null;
        if ($remote_addr === '<IP_ADDRESS>' && $request->hasHeader('X-Forwarded-For')) {
            $remote_addr = preg_replace('/,.*/', '', $request->getHeaderLine('X-Forwarded-For'));
            $request = $request->withAttribute('remote_addr', $remote_addr);
        }

        return $next($request);
    }
}
```

See also [middleware handling](middleware.md) for more details.

repository: clue/framework-x

repo_name: clue/framework-x


text:
---
title: Code Prettier
date: '2019-04-15'
spoiler: How to format codes.
---

There are many steps that every front-end developers and maintainers should know, they are:
 - [How to format codes](https://overafaik.com/formatting-codes)
 - [How to report on patterns found in ECMAScript/JavaScript code](https://overafaik.com/linting-codes)
 - [How to check object types](https://overafaik.com/flow-type-check)
 - [How to test everything](https://overafaik.com/jest)
 - [How to build the project](https://overafaik.com/build-project)
 - [How to use CI](https://overafaik.com/continous-integration)
 - How forced contributors to staying on contributing guidelines?

## No need to discuss style in code review
Sometimes you want to format your code with press save but there are many IDE and code formatters with many options such as `Wrap Line Length` and maybe all contributors don't want to use the same value of them.

so, What should we do?

There is an opinionated code formatter that support many languages and we can use it as a task in script command line.It is [Prettier](https://prettier.io/) with few options.

It can be used global.
```
yarn global add prettier
```

but I recommend to use it locally and run it without any arguments. Although, Prettier ships with a handful of customizable format options, usable in both the CLI and API. I'd like to use general options because it helps me to keep the same format. To do this we need to create a file as `.prettierrc.js`.
```
module.exports = {
  bracketSpacing: false,
  singleQuote: true,
  jsxBracketSameLine: true,
  trailingComma: 'es5',
  printWidth: 80,
  parser: 'babylon',

  overrides: [
    {
      files: [
        // Internal forwarding modules
        'packages/*/*.js',
        // Source files
        'packages/*/src/**/*.js',
      ],
      options: {
        trailingComma: 'all',
      },
    },
  ],
};

```
You can see all options in https://prettier.io/docs/en/options.html

Now, maybe you think your project will have so many js files and this task takes too long. Don't worry!

In this situation there is a interesting way. Prettier is a `NPM` package and we can import and use it in our way. please see below example:

```javascript
//index.js
const execFileSync = require('child_process').execFileSync;
const chalk = require('chalk');
const glob = require('glob');
const prettier = require('prettier');
const fs = require('fs');
const prettierConfigPath = require.resolve('./.prettierrc');

const exec = (command, args) => {
  console.log('> ' + [command].concat(args).join(' '));
  const options = {
    cwd: process.cwd(),
    env: process.env,
    stdio: 'pipe',
    encoding: 'utf-8',
  };
  return execFileSync(command, args, options);
};

const execGitCmd = args =>
  exec('git', args)
    .trim()
    .toString()
    .split('\n');

const listChangedFiles = () => {
  const mergeBase = execGitCmd(['merge-base', 'HEAD', 'master']);
  return new Set([
    ...execGitCmd(['diff', '--name-only', '--diff-filter=ACMRTUB', mergeBase]),
    ...execGitCmd(['ls-files', '--others', '--exclude-standard']),
  ]);
};

const mode = process.argv[2] || 'check';
const shouldWrite = mode === 'write' || mode === 'write-changed';
const onlyChanged = mode === 'check-changed' || mode === 'write-changed';

const changedFiles = onlyChanged ? listChangedFiles() : null;
let didWarn = false;
let didError = false;

const files = glob
  .sync('**/*.js', {ignore: '**/node_modules/**'})
  .filter(f => !onlyChanged || changedFiles.has(f));

if (!files.length) {
  return;
}

files.forEach(file => {
  const options = prettier.resolveConfig.sync(file, {
    config: prettierConfigPath,
  });
  try {
    const input = fs.readFileSync(file, 'utf8');
    if (shouldWrite) {
      const output = prettier.format(input, options);
      if (output !== input) {
        fs.writeFileSync(file, output, 'utf8');
      }
    } else {
      if (!prettier.check(input, options)) {
        if (!didWarn) {
          console.log(
            '\n' +
              chalk.red(
                `  This project uses prettier to format all JavaScript code.\n`
              ) +
              chalk.dim(`    Please run `) +
              chalk.reset('yarn prettier-all') +
              chalk.dim(
                ` and add changes to files listed below to your commit:`
              ) +
              `\n\n`
          );
          didWarn = true;
        }
        console.log(file);
      }
    }
  } catch (error) {
    didError = true;
    console.log('\n\n' + error.message);
    console.log(file);
  }
});

if (didWarn || didError) {
  process.exit(1);
}
```

What happened? Let me explain:

In this example, as the beginning, I need to get changes. To do this I used `git` commands I mean *diff* with 'merge-base', 'HEAD', 'master' and *ls-files*. Then, checked out with `prettier.check` method and `.prettierrc.js` options.

Finlly, Requires two commands in `package.json` as bellow:

```json
  "scripts":{
    "prettier": "node ./scripts/prettier/index.js write-changed",
    "prettier-all": "node ./scripts/prettier/index.js write"
  }
```


text:
# JavaScript library: `OverOps-AlgoliaSearch_ZendeskHC cloned from algoliasearchZendeskHC`

This JavaScript library was modified and all source were copied from algoliasearchZendeskHC library

## Documentation
The original algoliaSearch implementatin only allowed to index and search zendesk articles.
We modified this version to include Community Posts as well as Documenation articles from another domain.

## License

This project is under the [MIT License](../LICENSE).

repository: pullbox/OverOps-AlgoliaSearch-ZendeskHC

repo_name: pullbox/OverOps-AlgoliaSearch-ZendeskHC


text:
# _Destinations_

#### _List of Destinations Traveled_

#### Authors:
_**Jo Miller, Jer Miller, Maxwell Meyer**_

## Technologies Used

* _HTML_
* _CSS_
* _JavaScript_

## Description

_Enter information about the places that you have traveled to to see them all populated in a list._

## Setup/Installation Requirements

* _Clone this repository to your desktop_
* _Navigate to top level of the directory_
* _Open index.html in your browser_

## Known Bugs

* _Still under construction, does not have full functionality yet._

## Specifications
```
Describe: Destination

* Test: Create a constructer with location, date visited and landmarks and to see if the user input updates a new object with constructor specs.

  Expect : UserInput.CreateNew
    let newOrleans = new Destination("New Orleans", "Super Dome", "10/16").toEqual(NewObjectWithConstructerLayout)

* Test: User inputs at form for Location and for the input to become assigned variable.

    Expect: Userinput.location to.Become(Var inputLocation)

* Test: takes all user input information and transforms it into an object using the constructor.

  Expect:

```

## License

[MIT](LICENSE.txt)

## Contact Information

_Jo Miller<EMAIL_ADDRESS>

_Jer Miller<EMAIL_ADDRESS>

_Maxwell Meyer<EMAIL_ADDRESS>

repository: joanna-miller/destinations

repo_name: joanna-miller/destinations


text:
v.0.4.2
====

Fix includes

v0.3.1 (2017-11-28)
===
* `~` sdk version header format fixed.

v0.3.0 (2017-11-11)
===
* `~` use codecov as coverage service
* `+` `golint` is added to the CI process
* `~` `dep` is updated to the latest version
* `x` `vendor` folder is not under version control
* `~` `makefile` simplifications
* `+` testing and linting is now handled by scripts under `tools` folder
* `~` cosmetic changes in codebase to make linter happy

v0.2.0 (2017-04-12)
===
* Godoc style examples
* [Added] Query.go tests
* [Added] Locale resource tests
* [Added] ContentType tests
* [Added] Missing space resource tests
* [Added] User-Agent for api requests

v0.1.1 (2017-03-31)
===

* [Added] Rate-limited api requests
* [Fix] Locale model
* [Added] Content type field unmarshaling

v0.1.0 (2017-03-26)
===

### Introducing resource services
Every entity resource now has its own service definition for handling api communication. With this release, we don't store `contentful client` and `space` objects inside entities anymore. Resource services now get `spaceID` as a string parameter when it is neccessary.

With the old versions, in order to create a new `ContentType`, for example, you first need to observe `Space` object. That is no longer required. The problem with the old method was that you had to make an extra api request to observe the `Space` in order to interact with rest of the resources. The following example demonstras the difference between old and new version.

```go
// prior to v0.1.0
space, err := cma.GetSpace("space-id") // this call was making an extra api call
contentTypes, err := space.ContentTypes()

// after v0.1.0
contentType := &contentful.ContentType{ ... }
spaceID := "space-id"
cma.ContentTypes.Upsert(spaceID, contentType) // now we are passing spaceID as string
```

You can access available resources as follows:

```go
cma := contentful.NewCMA("token")
cma.Spaces
cma.APIKeys
cma.Assets
cma.ContentTypes
cma.Entries
cma.Locales
cma.Webhooks
```

Every resource service exposes the following interface:

`List(spaceID string) *Collection`

`Get(spaceID, contentTypeID string)(*ContentType, error)`

`Upsert(spaceID string, ct *ContentType) error`

`Delete(spaceID string, ct *ContentType) error`

### Create resource instancas directly from their model definitions

All `New{ResourceName}`, such as `NewContentType`, `NewSpace`, functions are removed from the SDK. It turned out that it wasn't a good practice in golang. Instead, you can directly initiate resource entities directly from their models, such as:

```go
contentType := &contentful.ContentType{
    Name: "name",
    ... other fields
}
```

v0.0.3 (2017-03-22)
===
* [Added] PredefinedValues validation
* [Added] Range validation greater/less than equal to support.
* [Added] Size validation for content type field.
* [Added] Packages are vendored with `godep`.
* [Added] `version.go`.
* [Added] `entity/content_type`: regex validation for content type field.
* [Added] Validation data structures added: `MinMax`, `Regex`
* [Added] `LinkType` support for `Field` struct
* [Added] New validations: `MimeType`, `Dimension`, `FileSize`

v0.0.2 (2017-03-21)
===
* `entity/webhook`: add tests for webhook entity.
* `entity/space`: add tests for space entity.
* `errors`: add tests for error handler.
* `entity/content_type`: add test for content type entity.
* `entity/content_type`: Field validations added for link type
* `entity/content_type`: field validations added: Range, PredefinedValues, Unique

v0.0.1 (2017-03-20)
===
* `sdk`: first implementation.
* `collection`: first implementation.
* `entity/content_type`: first implementation.
* `entity/entry`: first implementation.
* `entity/query`: first implementation.
* `entity/asset`: first implementation.
* `entity/locale`: first implementation.
* `entity/space`: first implementation.
* `entity/webhook`: first implementation.
* `entity/api_key`: first implementation.
* `sdk`: basic documentation.
* `examples`: some examples for entities

repository: foomo/contentful

gha_language: Go

repo_name: foomo/contentful


text:
# TensorFlow 2.0 Hackathon

⚡ #PoweredByTF 2.0 Challenge! [ Devpost ]

            live demo

  MoboView

## Story
A lot of countries have started segregating garbage into recyclable and non recyclable. But many times, a lot of people won't be familiar with the items that can be recycled or not. It is beneficial to remember such information but not everyone can do that. To help that, we present a web application which tells you if an object is recyclable or not. But what is special about this? You don't have to put in name of things and search for items.

## Development
The front end is made is javascript. This then calls a flask app running in the backend which does preprocessing. The flask app then calls the served model. The architecture used is VGG16. Although it's very outdated but it gives a nice beginning to people who are new to Tensorflow-2.0.

PS: Do checkout our video and website. Star us on GitHub and let us know if you have questions/ideas to share!

### How to run

#### Model
See the model/ dir for the README

#### App
Run the app using
```python3 app.py```
Make sure to set the correct ports and IP addresses for the tensorflow served model and flask app

#### Web
This can be run directly. In app.js make sure the api calls the flask app IP address


text:
# RFC <issue#> - <YYYY-MM-DD> - <title>

One paragraph description of the change.

## Motivation

Context that helps readers understand the motivation behind this change.

## Prior Art

List prior art, the good and bad. Why can't we simply use them?

## Guide-level Proposal

Describe your proposal in the form of a guide, as if it were being presented
to a Vector user.

1. Be succint and to the point!
2. Use code examples instead of long conceptual explanations!
3. Run your guide through grammarly or a similar tool.

## Sales Pitch

Sell this change.

* How will this change make Vector superior?
* Will this change unlock future possibilities?
* What other benefits will this change offer?

## Drawbacks

What are the downsides of doing this?

## Alternatives

What some alternatives to this approach?

## Outstanding Questions

List any outstanding questions that we can discuss and resolve.

## Plan of attack

Incremental steps that execute this change. Generally this is in the form of:

* [ ] Submit a PR with spike-level code _roughly_ demonstrating the change.
* [ ] Incremental change #1
* [ ] Incremental change #2
* [ ] ...

Note: This can be filled out during the review process.

repository: leshow/vector

gha_language: Rust

repo_name: leshow/vector


text:
---
year: start
title: Useful Links
pinned: true
---

- **Admin**
  - **Instant login**: [euclid](https://www.star.euclid.ed.ac.uk/urd/sits.urd/run/siw_sso.token), [learn](https://www.learn.ed.ac.uk/auth-saml/saml/login?apId=_175_1), [email](https://www.office365.ed.ac.uk/)
  - **Timetables and courses**: [Semester dates](https://www.ed.ac.uk/semester-dates), [path](https://path.is.ed.ac.uk/), [Degree Programme Tables (DPT)](http://www.drps.ed.ac.uk/20-21/dpt/drpsindex.htm)
  - **Library**:
    -  The library service in the upcoming year is likely to be restricted – check [Library Services Update](https://www.ed.ac.uk/information-services/library-museum-gallery/library-services-update-2020-21) for more details
    - Library resources online: [DiscoverEd](https://discovered.ed.ac.uk/)
- [Past papers](https://exampapers.ed.ac.uk/discover?filtertype=author&filter_relational_operator=equals&filter=Mathematics%2C+School+of)
- **Reps**:
  - School:
  - Year 1:
  - Year 2:
  - Year 3:
  - Year 4/5:
- [School of Mathematics Document Sharing](https://uoe.sharepoint.com/sites/schoolofmaths/students/SitePages/Home.aspx)

gha_license_id: NOASSERTION


text:
# Hack Reactor Alumni Network

###### A social media platform for building/maintaining relationships within the Reactor Core network.
***

HRAN provides a platform for leveraging your Hack Reactor/Reactor Core peer network to accelerate your growth as a software engineer.  Build your own profile and link up with your fellow alumns to keep each other up to date on your job search status, current projects, and learning experiences.  Contribute to the networks value by posting self-authored articles on industry experiences and technical discoveries.  Consider this our own private LinkedIn, our *fulcrum* (if you will) to ease the burden of navigating our new journey.

## Team

  - __Product Owner__: Anthony Pecchillo
  - __Scrum Master__: Jordan Medina
  - __Development Team Members__: Maurice Okumu, Patrick Shen

## Table of Contents

1. [Usage](#Usage)
1. [Requirements](#requirements)
1. [Development](#development)
    1. [Installing Dependencies](#installing-dependencies)
    1. [Tasks](#tasks)
1. [Team](#team)
1. [Contributing](#contributing)

## Usage

Using HRAN is simple!  To get started:

#### Sign Up ####

From the HRAN landing page:

1. Click the sign up button to navigate to our registration page.

2. Provide your pertinent information in the registration form.
    - Upon submitting the form, you will be automatically logged in and redirected to the Main Feed.

#### Set Up Your Profile ####

3. Click settings to edit your profile.
    - Add a Bio
    - Add your Picture
    - Add links to your LinkedIn, GitHub, Twitter, etc.

4. Click Profile to see your updated profile.

#### Check Out the Feed ####

5. Click Feed to read the most recent posts from the Alumni Network.

6. Submit your first post!

## Requirements

- Node v6.1.0
- Yarn v0.19.1
- Nodemon v1.11.0
- MySQL v5.7.17
    - To install MySQL, it is recommended that you use Homebrew.

*NOTE:*  We use Yarn instead of NPM.  A very useful NPM-to-Yarn cheatsheet can be found [here](https://shift.infinite.red/npm-vs-yarn-cheat-sheet-8755b092e5cc#.o5oqiaubp).

## Development

### Installing Dependencies

All required dependencies are stored in the yarn.lock file in the root directory.  At the command line from within the root directory, enter:

```sh
yarn
```
### Transpiling React Codebase

Run the following at the command line once initially, and then again after making any changes to your front-end React code:

```sh
yarn build:dev
```

This is for builds *during development*.  In order to build *for production*, simply run:

```sh
yarn build
```

### Starting the Server

To start the server using Nodemon and continuously watch for any file changes, run the following at the command line:

```sh
yarn start
```

### Begin Development

View the current project at `localhost:3000`.  At this point, you're ready to start development!

### Roadmap

View the project roadmap [here](https://github.com/bracegirdles/bracegirdles/issues).

## Contributing

See [CONTRIBUTING.md](https://github.com/bracegirdles/bracegirdles/blob/master/_CONTRIBUTING.md) for contribution guidelines.

repository: bracegirdles/bracegirdles

repo_name: bracegirdles/bracegirdles


text:
photo-screen-saver
==================

![icon.png](img/icon.png)

Windows screen saver that displays a photo slideshow, based on the Electron framework.

Why?
----

Since modern LCD displays aren't subject to burn-in, screen savers are a thing of the past... right?

Not if you have your HTPC hooked up to a plasma TV -- plasma still has a big problem with burn-in.
Finding myself in that situation, I needed a screen saver that would protect the screen while a movie is paused.
I also wanted it to look great (it's in my living room, after all) but every screen saver I tried looked
like it was written decades ago. (Most of them were.)

Modern web technologies make it incredibly easy to create engaging animations. All I needed was a way
to marry the web tools we know and love to a native Windows program, in this case a screen saver. That's where
Electron comes in.

**Please note:** This is currently a Windows-specific project. You can run the code in Electron
on other platforms, but you won't get the screen saver integration with the OS.

How to Build
------------

**Prerequisites:** This project requires Node.js -- if you've read this far, you probably already have it. The build uses Grunt, so if you've never installed grunt-cli, run:

    npm install -g grunt-cli

To build, go to the project folder and run the following commands:

    npm install
    grunt

Once the build is complete, you have a couple of options. If you want to quickly fire it up and see what it does, run:

    npm start

If you want to install it as a screen saver, look in the `package\photo-screen-saver-win32-x64` subfolder and find the file `photo-screen-saver.scr`. Right-click the file and choose `Install`. When you go to the Windows screen saver settings, you'll see that `photo-screen-saver` is now your selected screen saver.

Behind the Scenes
-----------------

It's a lot easier than I thought to create a screen saver for Windows -- it's just a normal executable
with a .scr extension. The program just needs to display a topmost full-screen window and
exit on mouse or keyboard activity. These requirements are really easy to meet in Electron!

(Note that this is the bare minimum and won't give you the mini-preview or
Settings features. The mini-preview is a pain to implement and IMHO unnecessary. To support Settings you just
need to handle the /S command line argument and display an appropriate UI.)

This screen saver displays a photo slideshow with a simple "Ken Burns" effect. It supports two photo sources:
The Bing Homepage Gallery or a local folder on your computer.
Since I didn't feel like implementing a Settings window, I hard-coded the two options. If you take a look in `src/index.ts`, you'll find this snippet of code:

    let useBing = true;

    if(useBing)
        loadImagesFromBingGallery(startSlideshow);
    else
        loadImagesFromFolder("C:/ScreenSaver/", startSlideshow);

If you want to use your local photo library, just set `useBing` to false, put the right path in the call to `loadImagesFromFolder`, and rebuild.
Or be my guest and implement a Settings window!

Possibilities
-------------

This project is actually a pretty good (if minimal) framework for any screen saver you might want to create. If photos aren't
your cup of tea, try Googling WebGL demo or three.js demo, pick the coolest animation you can find, and incorporate it into `index.ts` and `index.css`. (Just be sure to check that the license allows this!)

License
-------

The MIT License

Copyright (c) 2016 Rand Scullard

repository: rodrigonh/photo-screen-saver

repo_name: rodrigonh/photo-screen-saver


text:
# Toster

> This repo is in progress, so if you feel like something is missing fire an issue, can be in polish :)

This repo contains source code for project called "Robot Toster".
It is recommended to write in English, but everything else then code itself can be written in polish if you prefer so (it's just simpler for me to code and write in the same language).
Feel free to contribute as much as you wish.

Link to docs explaining how this project works and how to hack on it is [here](docs/docs.md).

repository: WojciechWnek/Toster

repo_name: WojciechWnek/Toster


text:
---
layout: page
permalink: /presentations/
title: presentations
description:
nav: true
---
10. **Schlichting, D.** & Hetland, R. (2023). Numerical mixing in idealized simulations of submesoscale baroclinic instabilities over a shelf. Gordon Research Seminar/Conference on Coastal Ocean Dynamics, June 17-23. Poster.  Download PDF

9. **Schlichting, D.**, Qu, L., Hetland, R., and Kobashi, D. (2022). Quantification of physical and numerical mixing using tracer variance dissipation in a coastal ocean model. Gordon Research Seminar/Conference on Ocean Mixing, June 4-10. Poster.  Download PDF

8. Hetland, R., Qu, L., and **Schlichting, D.** (2022). Tracer variance mixing in simple box models. Ocean Sciences Meeting, February 24-March 4. Talk.

7. **Schlichting, D.**, Qu, L., Hetland, R., and Kobashi, D. (2022). Using salinity variance budgets to quantify numerical mixing in a coastal ocean model. Ocean Sciences Meeting, February 24-March 4. Talk.

6. **Schlichting, D.**, Hetland, R., Qu, L., and Kobashi, D. (2021). Using tracer variance budgets to quantify numerical mixing offline in a coastal ocean model. Warnemunde Turbulence Days, December 6-9. Talk.

5. **Schlichting**, D., Lieberthal, B., and Huguenard, K. (2019). An assessment into vegetation farms as a solution to coastal erosion in southern Maine. Northeast Aquaculture Conference, Boston MA. January 9-11. Poster.  Download PDF

4. **Schlichting**, D.and Hetland, R. (2018). Using salinity variance and total exchange flow to analyze salinity structure in an unsteady estuary. Physics of Estuaries and Coastal Seas Conference, Galveston TX. October 14-18. Poster.  Download PDF

3. **Schlichting**, D.and Hetland, R. (2018). Mechanisms controlling salinity structure structure in a broad, shallow, unsteady estuary. Sustainable Ecological Aquaculture Network Undergraduate Research Symposium, Walpole ME. August 7. Poster.  Download PDF

2. **Schlichting**, D.and Hetland, R. (2018). Salinity structure in Copano Bay. Texas A&M University Observing the Ocean REU Student Symposium, College Station, TX. August 2.Talk.

1. **Schlichting**, D., Lieberthal, B., and Huguenard, K. (2017). Vegetation farms as a solution to coastal erosion for Saco, Maine. Sustainable Ecological Aquaculture Network Undergraduate Research Symposium, Walpole ME. August 16. Poster.  Download PDF
{: reversed="reversed"}


text:
### About

`inro` is primarily a library of HOCs to compose enhanced react components that
are flexible and easy to use for responsive designs.

#### What is an "inro"?

> "An _inrō_ is a traditional Japanese case for holding small objects, suspended
> from the _obi_ (sash) worn around the waist. They are often highly decorated,
> in a variety of materials and techniques, in particular often using lacquer."
>  — [Wikipedia][1]
>
> "Consisting of a stack of tiny, nested boxes, _inrō_ were most commonly used
> to carry identity seals and medicine." — [Wikipedia][1]

[1]: https://en.wikipedia.org/wiki/Inr%C5%8D

#### Why make this when library "X" already exists?

[Bootstrap](https://github.com/twbs/bootstrap) is probably the defining layout
system used by most of the web, so I wanted something that out of the box
mimicked the look and feel that its grid system has. Beyond that, writing CSS
for specific screen sizes is a pain to do in a maintainable way. I wanted
something that one could, with little setup, easily add styles to defined
breakpoints.

#### Is this performant?

Probably not, but it is easy to use and works well enough.

repository: dfrankland/inro

repo_name: dfrankland/inro


text:
# Fable.React

Fable bindings and helpers for React projects

## Documents

* [Server-Side Rendering tutorial](docs/server-side-rendering.md): A **Pure F#** solution for SSR, **No NodeJS Required!**
* [Using third party React components](docs/using-third-party-react-components.md): How to create binding so that third party Javascript React components can be used like stock React components in Fable code.
* [React error boundaries](docs/react-error-boundaries.md): Example on how to use react error boundaries in fable.

## Why does this repository include bindings for React JS libraries?

Fable bindings for JS libraries maintained by the Fable team are in [fable-import](https://github.com/fable-compiler/fable-import). However, that repository only contains _pure bindings_ (which only have metadata and thus can be distributed just in `.dll` form), while libraries like `Fable.ReactLeaflet` contain actual code that must be compiled to JS, so they need to include also the sources in the distribution.

Keeping the bindings for React JS libraries in this repository makes it easier to maintain them, even if each of the libraries has its own Nuget package.

repository: markpattison/fable-react

repo_name: markpattison/fable-react


text:
# Sudoku Solver

**Question:**

Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character `'.'`.

A sudoku solution must satisfy **all of the following rules**:

1. Each of the digits `1-9` must occur exactly once in each row.
2. Each of the digits `1-9` must occur exactly once in each column.
3. Each of the the digits `1-9` must occur exactly once in each of the 9 `3x3` sub-boxes of the grid.

**Example:**

```
Input:
[
  ["5","3",".",".","7",".",".",".","."],
  ["6",".",".","1","9","5",".",".","."],
  [".","9","8",".",".",".",".","6","."],
  ["8",".",".",".","6",".",".",".","3"],
  ["4",".",".","8",".","3",".",".","1"],
  ["7",".",".",".","2",".",".",".","6"],
  [".","6",".",".",".",".","2","8","."],
  [".",".",".","4","1","9",".",".","5"],
  [".",".",".",".","8",".",".","7","9"]
]
Output:
[
    [5, 3, 4, 6, 7, 8, 9, 1, 2],
    [6, 7, 2, 1, 9, 5, 3, 4, 8],
    [1, 9, 8, 3, 4, 2, 5, 6, 7],
    [8, 5, 9, 7, 6, 1, 4, 2, 3],
    [4, 2, 6, 8, 5, 3, 7, 9, 1],
    [7, 1, 3, 9, 2, 4, 8, 5, 6],
    [9, 6, 1, 5, 3, 7, 2, 8, 4],
    [2, 8, 7, 4, 1, 9, 6, 3, 5],
    [3, 4, 5, 2, 8, 6, 1, 7, 9]
]
```

**Solution:** [[demo code](https://github.com/AlfredYan/Algorithms_Practice/blob/master/code/SodukuSolver.java)]

```java
	public void sudokuSolver(char[][] board) {
		if(board == null) return;
		helper(board);
	}

	public boolean helper(char[][] board) {
		int rows = board.length, cols = board[0].length;
		// go through every element and fill it with a number
		for(int i=0; i<rows; i++) {
			for(int j=0; j<cols; j++) {
				if(board[i][j] == '.') {
					// try every number from 1 to 9
					for(char c='1'; c<='9'; c++) {
						// when this number is valid for the soduku
						if(isValid(board, i, j, c)) {
							board[i][j] = c;
							// go to fill next element
							if(helper(board)) {
								return true;
							}
							else {
								/*
								 *  if we can not solve the sudoku with this number,
								 *  set current element back to '.' and try next number
								 */
								board[i][j] = '.'; // Backtracking
							}
						}
					}
					return false;
				}
			}
		}
		return true;
	}

	public boolean isValid(char[][] board, int row, int col, char val) {
		for(int i=0; i<9; i++) {
			if(board[row][i] == val) return false;
			if(board[i][col] == val) return false;
			/*
			 *  The row and column divide by 3 then multiple by 3
			 *  to go to first row and column of the block
			 */
			if(board[3*(row/3) + i/3][3*(col/3) + i%3] == val) return false;
		}
		return true;
	}
```

Time Complexity: ***O*(81n2)**

Space Complexity: ***O*(1)**

*Note:*

- Backtracking:  A general algorithm for finding all (or some) solutions to some computational problems, notably constraint satisfaction problems, that incrementally builds candidates to the solutions, and abandons a candidate ("backtracks") as soon as it determines that the candidate cannot possibly be completed to a valid solution.

path: /parctice/Sudoku Solver.md

filename: Sudoku Solver.md


text:
# tailwindcss-boilerplate

A quick opionated setup to get you up and running without doing any configuration. This is useful for prototype.

## Installation

To get started:

1. Clone the repository:

`git clone https://github.com/peoray/tailwind-boilerplate.git`
`cd tailwind-boilerplate`

2. Install the dependencies:
    ```
    # npm
    npm install

    # yarn
    yarn install
    ```

3. Start up development server
    ```
    # npm
    npm run start

    # yarn
    yarn run start
    ```

#### To build for production

The production code is optimized using [cssnano](https://cssnano.co/).

To run

```
    # npm
    npm run prod

    # Yarn
    yarn run prod
   ```
This will create a minify css file in `dist/css/main.css`.

#### Tailwind Config

You can find an example of a tailwind config file [here](https://gist.github.com/peoray/43d0695faf1f52b1a4c087ef99c74686)

## License

MIT

repository: peoray/tailwind-boilerplate

repo_name: peoray/tailwind-boilerplate


text:
# Serum

**Serum** is a simple static website generator written in [Elixir](http://elixir-lang.org).

Like some of other static website generators, Serum focuses on blogging. And if you know how to write markdown documents and how to handle EEx templates, you can easily build your own website.

Check out the [sample project](https://github.com/Dalgona/serum-sample) and the [website](http://include.iostream.kr/serum-sample)!

Or take a look at [the developer's personal website](https://dalgona.github.io), which is built with Serum!

## Getting Started

### Requirement

* Elixir 1.2 or newer (1.3.3 or newer is required when running [Dialyxir](https://github.com/jeremyjh/dialyxir))

    Visit the [Elixir website](http://elixir-lang.org) for installation instructions.

### Initializing and Building the Project

1. Use `git` to clone this repository.

    ```sh
    % git clone https://github.com/Dalgona/Serum.git
    ```

2. Build and install Serum by typing `make && sudo make install`. The program will be copied to `/usr/local/bin` directory.

3. Execute `serum init [directory]` to create a new Serum project at current or specified directory.

    > *It is NOT recommended to initialize a new project to where Serum repository is located.*

    ```sh
    % serum init /path/to/project
    ```

4. Type `serum build [directory]` to build the generated project.

    ```sh
    % serum build /path/to/project
    ```

    When the build completes, the root of your website will be created under `/path/to/project/site` directory. Copy the contents of this directory to your own www directory, or upload them to the external web hosting service.

5. Alternatively, you can run the development server to check your website before publishing.

    ```sh
    # The default port is 8080.
    % serum server /path/to/project --port <port>
    ```

    > For right now, you need to type `build` command in the development server prompt to manually rebuild your project after making some changes. The automatic rebuild function will be added soon.

### Configuration

When you initialize a new project, Serum will create directory/file structure described below:

```text
/path/to/project/
|-- serum.json
|-- posts
|-- pages
|   |-- pages.json
|   +-- index.md
|-- templates
|   |-- base.html.eex
|   |-- list.html.eex
|   |-- post.html.eex
|   +-- nav.html.eex
|-- assets
|   |-- css
|   |-- js
|   +-- images
+-- media
```

`serum.json` holds information about the current project, which looks like:

```json
{
  "site_name": "New Website",
  "site_description": "Welcome to my website!",
  "author": "Dalgona.",
  "author_email"<EMAIL_ADDRESS>  "base_url": "/site/",
  "date_format": "{WDfull}, {D} {Mshort} {YYYY}"
}
```

* `site_name` — The title of your website.
* `site_description` — The description of your website. Can be used as a subtitle.
* `author_name` — The name of author of blog posts.
* `author_email` — The email address of the author.
* `base_url` — The base path of your web site. I recommend you to put a trailing `/`.
* `date_format` — The format string for the date of blog posts. See [this documentation](https://hexdocs.pm/timex/Timex.Format.DateTime.Formatters.Default.html) for formatting instructions.

> These attributes can be referenced by using template tags like `<%= @site_name %>`.

### Adding Pages to Your Website

Inside `pages/` directory you can put source codes for pages other than blog posts. Serum accepts both markdown files(names should end with `.md`) and HTML files(names should end with `.html`), and those files will be applied by `templates/page.html.eex` template, and then combined with `templates/base.html.eex` template and will produce output files into the root directory of website(`site/`).

To display your pages properly, you also need to configure `pages.json` inside `pages/` directory. This file contains titles and other attributes of each page, which look like:

```js
[
  // ...,
  {
    "name": "index",
    "type": "html",
    "title": "Welcome",
    "menu": false,
    "menu_text": "About",
    "menu_icon": "assets/images/menu_index.png"
  },
  // ...
]
```

* `name` — The filename of page source file.
* `type` — The extension of page source file. Only "html" and "md" are accepted.
* `title` — The text that appears on the titlebar of your web browser.
* `menu` — Sets whether the link of specified page appears in the navigation area. Ignored by some templates.
* `menu_text` — The link text that appears on the navigation area.
* `menu_icon` — The path of image file that appears on the navigation area. Ignored by some templates.

> If you do not define properties for a page in `pages.json`, that page WILL NOT included in the website when building the project, even if the source code for that page exists under `pages/` directory.

### Writing a New Post

`posts/` directory holds markdown of your blog posts. All markdown files under this directory must follow the naming rule of `yyyy-MM-dd-hhmm-title-slug.md`, and the very first line of each markdown file must start with `#` character, followed by a space(`'\x20'`) and title of the post, and the second line must start with `#` character, followed by a space and a list of tags delimited by a comma(`,`). Serum parses the first two lines of each file and generates post metadata.

Below is an example of valid markdown file:

`2016-08-01-1946-my-new-post.md:`

```markdown
# Hello! This is My First Post
# sample, hello

Lorem ipsum dolor sit amet, consectetur adipiscing ...
```

If you don't want to specify tags for a post, just put a `#` character on the second line.

```markdown
# Hello! This is My First Post
#

Lorem ipsum dolor sit amet, consectetur adipiscing ...
```

When building the website, all markdown files under the `posts/` directory are converted into HTML, applied by `templates/post.html.eex` template, and then combined with `templates/base.html.eex` template to produce the output file under `site/posts/` directory. Also, Serum generates `site/posts/index.html`, which is a list of all blog posts.

### Templates

Serum generates web pages by applying four templates: `base.html.eex`, `list.html.eex`, `post.html.eex` and `nav.html.eex`. When the new project is created, the minimally implemented templates are also created under `templates/` directory, which still have all template variables provided by Serum. So you can create your own templates base on those files. The role of each templates are described below:

* `base.html.eex` — Defines the overall structure and design of your website. The HTML root tag is located inside this template.
* `list.html.eex` — Template for the list of all registered blog posts.
* `post.html.eex` — Template for blog posts.
* `page.html.eex` — Template for pages other than blog posts.
* `nav.html.eex` — Template for the navigation area of the website.

### Assets and Media

You can put all resources such as stylesheets, scripts and images under `assets/` directory. Serum also creates `css`, `js` `images` directory under `assets/` for the convenience, but it does not matter even if you modify the directory structure as needed. When the site is being built, `assets/` directory itself is copied into `site/assets/` directory, so you can reference the resources like this: `href="<%= @base_url %>assets/css/style.css"`.

All pictures referenced by blog posts should be saved under `media/` directory. Then you can point to that media in the markdown by using `%media:` syntax. For example, the code `![Image](%media:foo.jpg)` will be expanded into `<img src="/base/url/media/foo.jpg" alt="Image">`.

> **NOTE**: Due to the limitations caused by the implementation, using `"` character in the source URL of the image may result in unexpected behavior.

## Changelog

* 0.9.0 (2016/08/30)

    Initial beta release

## Contact the Developer

* Email<EMAIL_ADDRESS>* Twitter: [@d57pub_](https://twitter.com/d57pub_)

repository: marocchino/Serum

repo_name: marocchino/Serum


text:
+++
author = "enrico_spinielli"
comments = true
date = "2014-08-29"
modified_time = "2014-08-29T18:11:41.740+02:00"
tags = ["cv", "interview", "recruitment", "selection"]
title = "Failing to be recruited..."
url = "/2014/08/29/impressions-about-selection-process-of/"

+++

This post title to be frank should have been "*Impressions about the selection process of a big Internet company (and my failure to go to the next steps after initial engagement)*," but that is obviously too long.

So I only kept the *failure* part with the aim to bring home some lessons from it ! :smirk:

### Chronology, more or less
It all started with an email at the end of July 2014 from the company's recruiter, let's call her Alice.

My first reaction was: SPAM!!!! :scream:

Well, no. It was a genuine ping with too many realistic references about me (not that difficult given my CV is public on LinkedIn) and about her...but I could only reply when back home from my first slot of holidays: the family still at the beach, I am home alone, with tons of projects accumulated throughout the year (yes, year) since last summer...and this email!

Now, I am not at all looking for changing job: I know for sure my current employment conditions and benefits are extremely difficult to match. Even by big Internet companies.

But I am definitely piqued by the technical side of it! (Good job Alice!)

So we exchange few email with various links to job/site descriptions/videos from Alice and few replies from me with links (web presence/open source/tinkering around) and attachments to describe myself.

I am delighted when Alice tells me the position she is selecting for is about managing a team but it involves coding ("Good" I think, "I love that"...and say I do it too, even if just in my limited free time -- 4hr per weekend; hey I have 4 kids! --). Once she mentioned people in the position spend 30 plus % of time coding, then later she mentioned few times 20%...anyway much much better than 0% I am currently stuck with at work.

Then we come to fix a video conf with the following *declaration of intents*:

>    Our chat will be more of an open discussion than a formal interview - we will discuss your current situation, the roles at XYZZY and if at that point there is a mutual interest, we can proceed to a technical chat.

To prepare for it I am handed a self evaluation form with scales from **0** (unfamiliar with the subject area) to **10** (Wrote the book in the subject area or similar expertise.) and subject areas from TCP/IP to People and Project Management going through C/Java/Go/SQL.

Good, I can fill a form and, as suggested, keep modest: for sure [I know I know nothing](https://en.wikipedia.org/wiki/I_know_that_I_know_nothing") but there are good [search engines](https://giyf.com/) around and lots of [people to ask and collaborate with](https://stackoverflow.com/) ;-)

A week later we set for the video conf and start the business chat, things like whether I had to recruit or fire people, team size, sort of *chit-chatting* ;-)

And then the technical questions starts: and frankly it has been a *disaster*!

Even on questions (Unix file system and inode [4.14 of [Advance Programming in the UNIX Environment](https://www.kohala.com/start/apue.html) {yes, I still have the 1992 edition!}]) I used to ask to people I was recruiting some 12 years ago!

### Lessons learnt for when I am recruiting

* Make sure the context of the interview is clear: subject, what is expected, timing, steps, process.
  I usually do this but we all tend to forget. This is a reminder for myself.

### Lessons learnt (for when I want to be recruited ;-)

* I should have clearly asked to separate the chat on current/future position from the technical chat as in the *declaration of intents* above.
  Maybe I assumed it would have been in 2 separate sessions but I was taken off balance by it happening in the same video conf.
  ![Never ASS U ME](https://imgs.xkcd.com/comics/when_you_assume.png)
* I should have asked more about the technical interview, i.e. examples of questions
* I should have asked more time to prepare if I felt I was too rusty on the subjects

### Observations about the specific recruiting techniques

* I was positively impressed by the fact I follow similar steps as in big Internet companies: we have a phone interview to assess the minimum level of technical competencies before we proceed with deeper *hands-on* assessments.
*  The post and place descriptions and the videos were good.
   We should prepare more material (web based and videos) to describe the consultants positions we look for.
   But here we are limited by our IT infrastructure, the framework contract we have for recruiting...
* I liked the video conf ([Skype](https://www.skype.com/en/) and [the likes](https://www.google.com/+/learnmore/hangouts/)): I have used it only when interviewing a Canadian (and even then he had the support from his university to use their video conference) but we should do it more...if only our IT infrastructure/policies would permit it (we have [WebEx](https://www.webex.com/) but I have never seen it used for recruiting...can we?)
* I really disliked the narrowness of some of the questions I have been asked, things like the signature of certain Unix sys calls. This, I hope, was probably suited for the very specific needs of the job at hand, but in general IMHO they do not show anything about the capabilities of the person you are selecting. *When I select people I prefer to watch/discuss about their journey to the destination/solution: the destination itself doesn't tell me anything about how they do reason/think*. (That is why I am usually happy with -- and I also ask about -- a book they would pick up to find some inspiration or the kind of web search they would use to start tackling a problem...)

### Feedback from friends ###
Few friends working at the same big Internet company (both in USA and Europe) told me that they were not surprised of the outcome because, even if they think I could have made it, the whole selection process is skewed towards the negative: it only takes one *no* from the interview panel to get a negative feedback.

Well, I am sure I got more than one *no*!


text:
* [ASP.NET Core](http://www.dot.net/)
* [Entity Framework Core](https://docs.efproject.net/en/latest/)
    * Both Sql Server and Sql lite databases are supported (Check installation instrcutions for more details)
* [Angular](https://angular.io/)
* [Angular CLI](https://cli.angular.io/) (Only code scaffolding for now)
* [Webpack 2](https://webpack.github.io/)
* [Bootstrap 4](http://v4-alpha.getbootstrap.com/)
* [ng-bootstrap](https://ng-bootstrap.github.io/)
* [@ngx-translate](http://www.ngx-translate.com/)
* [Typescript 2](http://www.typescriptlang.org/)
* [SASS](http://sass-lang.com/) support
* [Best practices](https://angular.io/docs/ts/latest/guide/style-guide.html) in file and application organization for Angular.
* Testing Angular code with [Jasmine](http://jasmine.github.io/) and [Karma](https://karma-runner.github.io/0.13/index.html).
* End-to-end Angular code using [Protractor](http://www.protractortest.org).
* [Istanbul](https://github.com/gotwarlost/istanbul) for test coverage
  * with [Remap Istanbul](https://github.com/SitePen/remap-istanbul) for remapping Javascript to TypeScript coverage
* [HMR](https://webpack.github.io/docs/hot-module-replacement.html) (Hot Module Replacement) with Webpack
* Webpack DLL support for fast rebuilds (~ < 0.5 second), depends upon machine performance.
* [Compodoc](https://compodoc.github.io/compodoc/) for Angular documentation
* [Server](https://github.com/aspnet/dotnet-watch) and [client](https://webpack.github.io/docs/hot-module-replacement.html) watches
* Login and Registration functionality using [Asp.Net Identity & JWT](https://docs.asp.net/en/latest/security/authentication/identity.html)
* Token based authentication using [Openiddict](https://github.com/openiddict/openiddict-core)
     * Get public key acess using: http://localhost:5000/.well-known/jwks
* Extensible User/Role identity implementation
* Various social login support, Follow [this](https://github.com/asadsahi/AspNetCoreSpa/wiki/Social-Login-Setup) wiki page to see how it will work.
* Lazy loading with pre loading all modules for fast navigation.
* [Angular dynamic forms](https://angular.io/docs/ts/latest/cookbook/dynamic-form.html) for reusability and to keep html code DRY.
* [Serilog](https://serilog.net/) with [Seq](https://getseq.net/) support to manage structured logging.
* [Swagger](http://swagger.io/) as Api explorer (Visit url **http://localhost:5000/swagger** after running the application). More [details](https://github.com/domaindrivendev/Swashbuckle.AspNetCore)

## Modified from Original Repo

* Updated all dependencies to the latest
* Added PostgreSQL support - Is the default now
    * Update your connection string at `appsettings.json`
    * To use SQL Server just uncomment `//options.UseSqlServer{...}`  at `[ProjectFolder]Server\Extensions\ServiceCollectionExtensions.cs (line 150)`
    * To use SQLLite set `useSqLite` to `true` at `appsettings.json`

repository: leonibr/AspNetCoreSpa

repo_name: leonibr/AspNetCoreSpa