text:
# dashing-contrib

[![Build Status](https://travis-ci.org/QubitProducts/dashing-contrib.svg?branch=master)](https://travis-ci.org/QubitProducts/dashing-contrib)

This project is an extension to Shopify's Dashing. Including this rubygem you will be able to:

 * Use all the built-in widgets
 * Extend `DashingContrib::RunnableJob` module to define, test jobs
 * Built-in jobs are only a couple of lines implementation, no repetitive copy and paste
 * Existing secret parameters is automatically loaded from `.env` file
 * All jobs have a final state (ok, warning, critical)
 * Rest API to get overall state summary
 * Rest API to trigger save history

Read each individual widget documentation to use dashing-contrib built-in widgets after the installation steps.

## Installation
Requires Ruby >= 1.9.3. Add this line to your Dashing's dashboard Gemfile:

    gem 'dashing-contrib', '~> 0.1.7'

Update dependencies:

    $ bundle

Add the following on top of the `config.ru`

    $: << File.expand_path('./lib', File.dirname(__FILE__))
    require 'dashing-contrib'
    require 'dashing'
    DashingContrib.configure

Include built-in CoffeeScript to `assets/javascripts/application.coffee`

    #=require dashing-contrib/assets/widgets

Include built-in SCSS to `assets/stylesheets/application.scss`

    //=require dashing-contrib/assets/widgets

Now you will be able to use the following widgets, click to see individual documentation:

 * [Rickshawgraph](https://github.com/QubitProducts/dashing-contrib/wiki/Widget:-Rickshawgraph)
 * [Sidekiq](https://github.com/QubitProducts/dashing-contrib/wiki/Widget:-Sidekiq)
 * [Pingdom Uptime](https://github.com/QubitProducts/dashing-contrib/wiki/Widget:-Pingdom-Uptime)
 * [Kue Status](https://github.com/QubitProducts/dashing-contrib/wiki/Widget:-Kue-Status)
 * [Nagios List](https://github.com/QubitProducts/dashing-contrib/wiki/Widget:-Nagios-List)
 * [Switcher](https://github.com/QubitProducts/dashing-contrib/wiki/Widget:-Switcher)
 * Dashing State (global alert if any widget is under critical state)

## dotenv

Shared job parameters are managed by `dotenv` gem. Add a `.env` file in your dashing project root. dashing-contrib will load your configuration from `.env` file automatically. An example `.env` file:

```ruby
NAGIOS_ENDPOINT: http://example.com/nagios3/cgi-bin
NAGIOS_USERNAME: dasher
NAGIOS_PASSWORD: readonly

PINGDOM_USERNAME: ping
PINGDOM_PASSWORD: pong
PINGDOM_API_KEY: pingpongpingpong
```

These values can be accessed in jobs `ENV['NAGIOS_ENDPOINT']`

## Job Definition

dashing-contrib gem provides a standard job definition wrapper. This replaces the 'SCHEDULE.every' call:

 * defines common data processing and testable/reusable modules
 * in addition to dashing's default 'updatedAt', introduced an optional `state` information used across all widgets

A custom job declaration example:

```ruby
module MyCustomJob
  # provides some dashing hooks
  extend DashingContrib::RunnableJob

  # Overrides to extract some data for display
  # generated hash will be available for widget to access
  def self.metrics(options)
    { metrics: { failed: 500, ok: 123013 } }
  end

  # By default this always returns OK state
  # You can customize the state return value by lookup generated metrics and user provided options
  def self.validate_state(metrics, options = {})
    # `metrics` parameter is the value return by `metrics` method
    failed_value = metrics[:metrics][:failed]

    return DashingContrib::RunnableJob::OK if failed_value == 0
    return DashingContrib::RunnableJob::WARNING if failed_value <= 100
    DashingContrib::RunnableJob::CRITICAL
  end
end
```

When using job:
```ruby
# make sure MyCustomJob module is required
# default interval is every 30s and job is executed once at start
MyCustomJob.run(event: 'custom-job-event', every: '20s')

# Custom job also has a block syntax if you are setting up some global settings
MyCustomJob.run(event: 'custom-job-event') do
  # setup redis client etc
end

# metrics and validate_state method will be able to use `my_custom_param` and `custom_threshold`
# to make configurable metrics fetch and state validation
MyCustomJob.run(event: 'custom-job-event', my_custom_param: 123, custom_threshold: 3)

# Override rufus-scheduler configuraiton using scheduler hash settings
MyCustomJob.run(event: 'custom-job-event', my_custom_param: 123, custom_threshold: 3, scheduler: { first_in: 10 })
```

Take a look some build-in jobs as example:

 * [dashing-contrib/jobs/sidekiq.rb](https://github.com/QubitProducts/dashing-contrib/blob/master/lib/dashing-contrib/jobs/sidekiq.rb)
 * [dashing-contrib/jobs/kue.rb](https://github.com/QubitProducts/dashing-contrib/blob/master/lib/dashing-contrib/jobs/kue.rb)
 * [dashing-contrib/jobs/nagios_list.rb](https://github.com/QubitProducts/dashing-contrib/blob/master/lib/dashing-contrib/jobs/nagios_list.rb)
 * [dashing-contrib/jobs/pingdom_uptime.rb](https://github.com/QubitProducts/dashing-contrib/blob/master/lib/dashing-contrib/jobs/pingdom_uptime.rb)
 * [dashing-contrib/jobs/dashing-state.rb](https://github.com/QubitProducts/dashing-contrib/blob/master/lib/dashing-contrib/jobs/dashing-state.rb)

This is nice that backend data fetching can be now unit tested and reused. Dashing widget view layer can reuse the same job processor and present data in multiple forms.

# Widget State

All built-in jobs managed by 'DashingContrib::Runnable' assumes each widget instance has a 'state' under ok, warning or critical. We suggest your custom widget should also follow this convension.

This gem creates an additional REST API, as well as a widget to show a global healthness of the system. This is awesome if you would like to build some physical alert system around it.

`GET http://{dashing_endpoint}/api/states`

```json
{
    "ok": 2,
    "warning": 0,
    "critical": 0,
    "detailed_status": {
      "dashboard": {
        "state": "ok",
        "title": "Dashboard",
        "updated_at":<PHONE_NUMBER>
      },
      "nagios-list": {
        "state": "ok",
        "title": "Nagios Checks",
        "updated_at":<PHONE_NUMBER>
      }
    }
}
```

# Persistent History

A new REST endpoint allows to force keep a snapshot of current events data and update the history.yml yaml file.

`Post http://{dashing_endpoint}/api/history/save`

## How to contribute

There are a couple of ways to contribute. Brining those widgets scattered in github, in multiple format into this repository. They usually falling into the following categories:

 * Widgets, common widgets should be generic solution to a common requirements. e.g. line graph, better clock with common functionalities. Documentation should be written as a README.md file under widget's own directory, include a preview.png file in the widget folder.
 * Jobs utils, common Job data processing for graphing purpose
 * Fix and add test
 * Improve documentation

repository: cusi-dev/SupportDashboard

repo_name: cusi-dev/SupportDashboard


text:
# Gibbera alpina (Petr.) Arx, 1954 SPECIES

#### Status
SYNONYM

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

#### Published in
Acta bot. neerl. 3: 85 (1954)

#### Original name
Xenomeris alpina Petr., 1947

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Dothideomycetes/Capnodiales/Xenomeris/Xenomeris alpina/ Syn. Gibbera alpina/README.md

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: mdoering/backbone


text:
---
published: true
layout: post
title: "Chapter 51 - Impure Soul's Power."
category: heaven-awakening
previous_chapter: 50
next_chapter: 52
date: 2016-07-02 19:56:00 +0200
has_credits: true
has_note: false
note: "I was originally intending to post two chapters today. But, there is a huge cliff at the end of the next chapter. So, instead, I will try to post two chapters tomorrow, though, it might be hard, because I have an exam on monday."
translator: toomuchnoob
#proofreader: appelemac
is_preview: false
---
From the beginning, Wen Yan had always been interested in the grey-clothed youngster. She never expected that the final strike, that knocked her down, would be delivered by the most useless individual among the four intruders, the two point-youngster, who, in order to escape, had to be carried by the grey-clothed youngster throughout the entire way.

The strike containing the perfectly controlled third Heavenly Layer Strength's soul followed by the sixth Heavenly Layer Essence's Soul had struck on Wen Yan’s nervous system. She was down; consciousness, but not in control of her body
<!--more-->

"Restrain her!" Xi Fan was not complacent just because of this. He was able to create this opportunity only because Lu Ping's consideration and the opponent's complete disregard for him. Otherwise, going by her lightning fast fists and kicks, he would have been beaten black and blue by her long ago. Xi Fan was completely uncertain on the extent of the damage his strike had caused to the opponent, after all, he was absolutely unable to discern Wen Yan's realm. The only thing he knew was that she was a Linked One; the strength of the students of this institute was truly too frightening.

Upon hearing Xi Fan's words, Lu Ping stepped forward. Wen Yan's injury was evidently much higher than what Xi Fan expected, thus, Lu Ping restrained her in a relaxed manner. Subsequently, Lu Ping looked up. That head was still hanging down. At first, it was all smiles, however, at this moment, it was completely stunned. It suddenly shivered and disappeared inside as it saw Lu Ping looking in its direction.

"Senior Sister Wen Yan, I will call reinforcements!"

Along with the sound of these words, a figure suddenly streaked down the crystal window in front of Lu Ping and Xi Fan. That guy had actually directly jumped from the observation deck!

"Don't tell me….." Astonished Lu Ping and Xi Fan immediately rushed forward to take a look. Jumping down straight from a hundred meter tower, what extraordinary ability did this guy have?

"You don't need to look, he isn't some amazing guy." Wen Yan said while still being restrained by Lu Ping.

Leaning forward, Xi Fan and Lu Ping were also able to see that the guy didn't have some extraordinary flying ability. He was only climbing down in circles on the tower's circular surface. Of course, this kind of feat was absolutely impossible for an ordinary individual. However, for a cultivator possessing courage and sufficient Strength's Soul, this kind of feat was no big deal. Going by this guy's skill, he would be able to many such trips in the time one would have to take by using the staircase.

After seeing that this wasn't something extraordinary, Xi Fan and Lu Ping turned their head back inside the Transmission Room. Xi Fan glanced around and saw a soft whip hanging down from a hook on the wall.

"Try that one." Xi Fan said pointing towards the soft whip. Wen Yan's strength was extremely formidable. Although his attack on her nervous system using Essence's Soul seemed successful, he didn't know how long would it last. Relying on Lu Ping to restrain her all the time didn't seem a good idea. However, from their perspectives as cultivators, a common rope would not be of much use; they had to use special tools. Xi Fan and Lu Ping obviously didn't have any such tools, but, luckily, they were able to find this soft whip. Since it seemed created by cultivators, it would be at least better than an ordinary rope.

"What good luck." Wen Yan mumbled. Lu Ping placed Xi Fan on the chair and fetched the soft whip. He sampled it and nodded towards Xi Fan, before saying:

"Very sturdy."

"Of course, this is made up of Tian Luo vine." Wen Yan said.

"Our luck is truly too good." Xi Fan said. Tian Luo vine is an extremely rare plant. It was soft and flexible, yet, extremely tough.  Be it bow strings, soft whip, or any other thing, just by relying on the fact that a thing was made up of Tian Luo vine, it could be easily ranked as third level tool.

Lu Ping refrained from commenting and swiftly return back, before tieing up Wen Yan's hands and legs. While Lu Ping was busy tying her, Xi Fan was persuading her:

"Don't be anxious, we do not have any evil intentions."

Wen Yan smiled. She was evidently clear that they were tying her because they were apprehensive of her, and not because they had wicked thoughts.

"It goes like this. We are from Zhai Feng institute of Xia Feng region. We came in Tian Zhao institute to look for a person named Chu Min. Perhaps she is a teacher or once was. Do you know her?"

"I don't." Wen Yan replied.

"All right.....in that case, can you explain our side to the institute?" Xi Fan.

"That won't do." Wen Yan shook her head.

"Why?" Xi Fan was somewhat flabbergasted.

"Because that would be just boring." Wen Yan smiled.

"You...are you confident because of your backing?" Xi Fan said.

"Right. What can you guys do to me?" Wen Yan said while twisting her body as if trying to look for a comfortable position. She didn't seem anxious due to being tied up at all.

Xi Fan and Lu Ping looked at each other's faces. What Wen Yan said was correct. They truly didn't have any means to deal with her. Who asked them to say that they didn't have any malice and were only trying to look for a person?

"How is this toy used?" Without any better options, Lu Ping and Xi Fan began to explore the Transmission Room on their own and soon discovered the microphone that Wen Yan used previously.

"Hello! Hello!" Lu Ping picked up the microphone and tested it. His voice was only heard by Xi Fan and Wen Yan.

"Hehe..." Wen Yan laughed.

"It's definitely not that simple." Xi Fan had been reading the expressions of Wen Yan all along. However, she was only smiling. When Lu Ping picked up the microphone, she only laughed and didn't mind it at all.

"If one has to take help of an equipment even after using abilities, then, Sound's soul would certainly be required to initialize this microphone, right?" Xi Fan said while carefully paying attention to Wen Yan's expression.

"True." In return, he didn't have to decipher anything because Wen Yan very delightedly admitted this fact.

"Of course, it's the Sound's soul." Xi Fan said.

"Of course!" Wen Yan smile became more cheerful. Xi Fan knew why was she so happy. She knew that his Sound's soul was insufficient, and Lu Ping? Ordinary people don't possess Soul's Power!

But this time, Xi Fan also cheerfully smiled.

"Hey! Sound's soul!" He said to Lu Ping.

"Huh?" Wen Yan astonished looked towards Lu Ping. Although Lu Ping's strength was very strange, he didn't have any Soul's Power; this had been extremely clear.

However, Lu Ping, in an extremely confidently manner, had already placed the microphone in front of his mouth.

"Hello!"

Hello!

Suddenly, this word echoed everywhere above the Tian Zhao institute. It was extremely loud and extremely clear, however, subsequently....

Peng Peng Peng Peng....

Such noises began echoing inside the entire Transmission Room in an unbroken succession, from the microphone in Lu Ping's hand to many other components inside the Transmission Room. The entire room turned absolutely chaotic. Parts of the components exploded and flew all around, causing the three individuals inside the room to lower their heads and cover them with their hands.

After a short while, Transmission Room gradually returned to normal. The three individuals blankly stared all around. The Transmission Room had turned into an absolute mess. The microphone was just a part of the room's Sound Transmitting Equipment, however, at this moment, not only the microphone in the hand of Lu Ping, but the whole Transmission Room seemed as if it had suffered a devastating strike.

Wen Yan was stunned, and remained as such for a long time. However, eventually, she burst out in laughter. She was laughing so much that she began gasping for breath.

"You...." She looked towards Lu Ping.

"What is happening?" Xi Fan was completely blanked. Lu Ping also had no idea.

"Sound's Soul! This is a special material used for Sound Transmission. It can only transmit the Sound's Soul. What the are you trying to do?" Wen Yan said.

"Only Sound's soul?" Lu Ping scratched his head.

"That's right!"

"What are you doing?" Xi Fan looked towards Lu Ping.

"Uh....My Sound's soul is probably not pure enough." Lu Ping said.

It wasn't that Lu Ping didn't want to have a pure Soul's power. However, under the restrictions of the Intense Lock Soul, just the fact that he could sneak out Soul's Power, and, moreover, even sustain it long enough to employ, was already a miracle. Under such circumstances, if one wished to even achieve purity, that was just too difficult. The current Lu Ping was absolutely unable to accomplish such a feat. Therefore, even if he wanted to employ Sound's soul,  a part of other souls would unavoidably be mixed with the Sound's soul during the process of stealing the Soul's Power under the Intense Soul Lock. As a result, this equipment made of special material to transmit the Sound's soul had to immediately suffer a devastating blow.

"This time, I wouldn't be able to help you guys even if I wanted to." Wen Yan's smile became much more delighted. Previously, just because Wen Yan had struck the microphone once, that third-grade student had seemed as if his heart was aching. However, at this moment, the entire Transmission Room had been wrecked, and Wen Yan didn't seem concerned at all. For her, this all was just extremely interesting.

"What to do now?" Lu Ping and Xi Fan looked at each other in dismay. Originally, they'd expected that coming to the Transmission Room and explaining the purpose of their visit in Tian Zhao institute was an extremely simple matter. However, who could have imagined that running into this girl would be so unfitting for them, that, at this moment, their entire plan and hopes were completely destroyed.

The two were looking out the window blankly, however, at this moment, Lu Ping's expression suddenly changed.

Being tied up, Wen Yan was unable to move her hands or legs, thus, she arrived beside the window with the help of bounces. Evidently her nervous system had already been recovered, and being tied didn't cause her any trouble in using her abilities.

"Huh!" employ 'Distant Vision'. She could look much clearer than Xi Fan who was only at third Heavenly Layer of Infusion's soul.

"Oh, the straw hat youngster is already captured. Who captured him? Show me your face...." Wen Yan kept on talking.

"Oh, that girl is also more or less done!" Wen Yan said after looking in another direction.

"Actually, I admire her very much. Extremely brave and fierce. However, being like this would cause more sufferings as well, ah!"

As she was talking, along with a whoosh sound, she suddenly saw a figure sliding down outside the window.

"What demon!" Wen Yan jumped in fright. She quickly leaned forward and looked all around in the downward region. What she saw was that, Lu Ping's figure, following the example of that third-grade youngster, was quickly climbing down the Tower. She turned her head, sure enough, only Xi Fan was left behind in the Transmission Room.

"What is that girl to him?" Wen Yan asked Xi Fan.

"Perhaps a person he had to protect even if he died!" Xi Fan said.

"Oh...then that's, even more, interesting." Wen Yan again looked outside, full of zest while incessantly muttering 'hurry up...hurry up!'.

"Being slow is not bad either...!" At this moment, a voice came from the end of the staircase. Wen Yan turned her head and saw Shen Chi approaching in very slow steps.

"How come you are tied up like this?" Shen Chi smiled upon looking at Wen Yan's appearance.

"None of your business!" Wen Yan ignored him and continued to look outside.

Shen Chi moved his vision and immediately spotted Xi Fan.

"How come it's you again...." Xi Fan forced out a smile.

"Yes. It's me again." Shen Chi excitedly asked:

"Where is the other guy?"

"Just left." Xi Fan answered.

"Oh." Shen Chi let out a sigh of relief. Next moment, he turned even more excited.

"That's why I just said: being slow is not bad either !"

"Two points... have been recovered." She Chi declared his victory.

"Grow up!"

license: MIT

gha_language: HTML


text:
---
uid: crmscript_ref_NSDashboardAgent_SetTile
title: NSDashboard SetTile(Integer dashboardId, Integer tileId, Integer position)
intellisense: NSDashboardAgent.SetTile
keywords: NSDashboardAgent, SetTile
so.topic: reference
---

# NSDashboard SetTile(Integer dashboardId, Integer tileId, Integer position)

Sets tile in the given dashboard position

**Parameters:**
 - **dashboardId** Dashboard Id
 - **tileId** Tile Id
 - **position** Tile position in the dashboard

**Returns:** The new dashboard is returned after the tile change

```crmscript
NSDashboardAgent agent;
Integer dashboardId;
Integer tileId;
Integer position;
NSDashboard res = agent.SetTile(dashboardId, tileId, position);
```

repository: stianol/crmscript

branch_name: refs/heads/main

gha_license_id: MIT

repo_name: stianol/crmscript


text:
# Flugel Terraform/Github Actions task

This repository contains:

- a terraform module to build:
	-	a S3 bucket with two files, test1.txt and test2.txt. The content of these files must be the timestamp when the Terraform code is executed. (DONE)
	-	two ec2 instances behind an ALB to serve the content from the S3 using traefik (1). (DONE)
	- Security Rules to avoid any external access to the bucket content and only permits access from the ec2 instances behind ALB (DONE)

The idea is to access via http the content of S3 buckets created, only by the ALB

## Requirements

- Terraform 1.0 (can work with Terraform 0.15, but is not guaranteed)
- go 1.15 (for tests)
- AWS IAM Account with permissions to manage fully the S3, EC2, ALB and VPC permissions in programatic way, we will need the Access Key ID and Secret Access Key credentials associated with the account (2)

## Setup

- Define the Environment vars:
    AWS_ACCESS_KEY_ID - with the IAM User AWS Access Key ID
	  AWS_SECRET_ACCESS_KEY - with the IAM User Secret Access Key
	  AWS_DEFAULT_REGION - with the AWS Region where the S3 bucket will be created

- in the shell console execute the commands:
	  terraform init --upgrade=true
	  terraform plan -out run.plan
	  terraform apply "run.plan"
	  terraform output

 - the last command will show the s3 bucket url and the alb url too, you can use it to access the content from the S3 and from the ALB url and check that any access outside the ALB is avoided. You can check the functionality executing the next command:
    wget \`terraform output -raw alb-url\`/test1.txt
	  wget \`terraform output -raw alb-url\`/test2.txt

 - you can try to access directly the S3 from another console without AWS access (without the ENV vars defined previously) and check that the access to the bucket's content is disabled by default.

## Test

For test we use a terratest go script to create the bucket, the bucket objects, checked the correct filenames and after this destroy the content created.

- cd test
-	go mod init "github.com/ysolis/flugel_s3"
-	go get -v -t -d
-	go mod tidy
-	go test -v

## Github Action

We have defined a github action workflow to automatically check the code with the terratest go script. To use it you will need to define three repository secrets:
-	AWS_ACCESS_KEY_ID
-	AWS_SECRET_ACCESS_KEY
-	AWS_DEFAULT_REGION

with the same values that we see in **Setup**

NOTES:
	- The indication email says:
		- Create a cluster of 2 EC2 instances behind an ALB running Traefik, to serve the files in the S3 bucket.
		- The cluster must be deployed in a new VPC. This VPC must have only one public subnet. Do not use default VPC.

  this creates a conflicts because the ALB needs to be defined with at least two public subnets in differents availability zones, inclusive if we use only one instance in a private subnet. The reason is because ALB needs to be provisioned just in case one AZ get out and continue to work with the other/others. The decision was taken to build a public and private subnet per AZ in the AWS Region (3)(4).

(1) we are using docker and docker-compose to run traefik as a container in the EC2 instance
(2) https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html#Using_CreateAccessKey
(3) https://stackoverflow.com/questions/50242734/why-does-an-aws-application-load-balancer-require-two-subnets#52839518
(4) https://forums.aws.amazon.com/thread.jspa?threadID=239401

gha_language: HCL


text:
[![Build Status](https://travis-ci.com/chapman-phys220-2019f/final-jonahrubin7.svg?token=CjcxcxfhoPrYocqFhfkC&branch=master)](https://travis-ci.com/chapman-phys220-2019f/final-jonahrubin7)

# PHYS220/MATH220 Final Project

**Author:**
Jonah Rubin

## Specification

1. You have three weeks to complete your final project. Work alone.
1. Follow the instructions in [the project specification](PHYS220_MATH220__Fall_2019_Final.pdf).

## Self-Assessment

CHANGEME

## Honor Pledge

I pledge that all the work in this repository is my own with only the following exceptions:

* Content of starter files supplied by the instructor;
* Code borrowed from another source, documented with correct attribution in the code and summarized here.

Signed,

Jonah Rubin


text:
# CS61B
Self-study for UC Berkeley CS 61B Data Structures

[CS61B 2018 spring](https://sp18.datastructur.es/)

[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)

## Table of Contents

- [Background](#background)
- [Install](#install)
- [Usage](#usage)
- [Maintainers](#maintainers)
- [License](#license)

## Background

I just want to learn Java,OOP, data structures and algorithm form CS61B so that I can do leetcode much more easier.

## Install

I learn CS61B with Java and IntelliJ(an IDE).

[Java Download](https://www.java.com/ES/download/)

[IntelliJ IDEA Download](https://www.jetbrains.com/idea/download/#section=windows)

You may also need to do some customized modifications.

## Usage

You can check all answers for CS61B 18spring in this repo.(Although all of them are just clumsy solutions D:)

## Maintainers

[@Yunxiang-Li](https://github.com/Yunxiang-Li).

## License

[MIT license](https://github.com/Yunxiang-Li/CS61B/blob/master/LICENSE)


text:
# tmux_session

A light and portable session manager for `tmux(1)`.

# Synopsis

    tmux_session [-d] [name]

Attach to the named `tmux(1)` session,
or `default` if no name is given.

# Installation

Run `make install` or simply copy the script into a location on your path.

## Dependencies

`tmux_session` only depends on pure `sh(1)` and,
of course,
`tmux(1)`.

# Configuration

`tmux_session(1)` can be configured by a shellscript at `$HOME/.tmux_sessionrc`,
which is sourced upon invocation of the utility.
Its location might be overwritten by the environment variable
`$TMUX_SESSION_HOME`.

Named sessions might have default configurations,
which are shell-scripts that are sourced by the main script.
The default location is `$HOME/.tmux_session.d`,
but it might be overwritten by the environment variable `$TMUX_SESSIONRC`.

The script must match the name of the session and end with `.sh`.

It should provide a function named `newsession`,
which is called to setup a new `tmux(1)` session,
otherwise a default session with a single window is created.

license: ISC


text:
---
prev: false
---

# Setup

## Code

### Prerequisites

1. Install Node.js version 14
   1. If you have Node.js already installed check your version with `node --version`
   2. Project may not work with other versions of Node.js, please report any [issues here](https://github.com/vuesion/vuesion/issues/new?assignees=&labels=&template=bug_report.md)
   3. To easily change the Node version we recommend to use the [n package](https://www.npmjs.com/package/n)
      1. Run `npm i -g n`
      2. Run `sudo n v14`
      3. Check your Node version with `node --version`
2. Get an IDE, we recommend [Webstorm](https://www.jetbrains.com/webstorm/) or [Visual Studio Code](https://code.visualstudio.com/) with the [Volar plugin](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar)
3. Configure your Code Editor for [Prettier](https://prettier.io/docs/en/editors.html) to automatically get code-formatting
4. Style your IDE (Optional)
   1. [Webstorm](https://plugins.jetbrains.com/plugin/12226-vuesion-theme)
   2. [Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=vuesion.vuesion-theme)

### Installation

::: warning Running npx globally on Windows
If you have any trouble with installing vuesion on Windows. This might help trouble-shooting: [https://github.com/zkat/npx/issues/146](https://github.com/zkat/npx/issues/146#issuecomment-384016791)
:::

1. Run `npx @vuesion/create [project-name]`, for example `npx @vuesion/create my-app`
2. Change directory `cd [project-name]`, for example `cd my-app`
3. Install dependencies `npm install`

## Figma
Figma is a web-based graphics editing and user interface design app.
You can use it to do all kinds of graphic design work from wireframing websites,
designing mobile app interfaces, prototyping designs and everything in between.

### Prerequisites

1. Get a [free Figma account](https://www.figma.com/signup)
2. Log in to your [Figma account](https://www.figma.com/)

### Installation

1. Got to the [Vuesion Core Community File](https://www.figma.com/community/file/1080868611324978249)
2. Click on `Duplicate` in the upper right corner

repository: vuesion/docs

gha_language: JavaScript

repo_name: vuesion/docs


text:
---
layout: page
image: images/Project_RadioWyrd.png
---
# Radio Wyrd

Radio Wyrd is an internet radio variety show that centers on music and interesting conversations. The show is hosted and produced by my good friend Sawyer Vanderwerff. It has a distinctive visual style, not entirely unlike watching a VHS tape that has been repeated smashed with a baseball bat. I make guest appearances on a segment of the show called "Delta Waves" which pairs light science with irreverent conversation.

Episode 2 - FEAR

Episode 1 - Brain Science

gha_language: CSS


text:
mongoose-3x-types - Useful types and type plugins for Mongoose
=================

This library is a fork of [mongoose-types](http://github.com/bnoguchi/mongoose-types), updated to work both with [mongoose](http://mongoosejs.com) 2.x and 3.x.

It is meant to be used as an interim solution while waiting for the upstream version to be updated.

### Types include:

- Email
- Url

### Plugins include:

- useTimestamps
  Adds `createdAt` and `updatedAt` date attributes that get auto-assigned to the most recent create/update timestamp.

### Installation
    npm install mongoose-3x-types

### Setup

To include all of the defined types:

    var mongoose = require("mongoose");
    var db = mongoose.createConnection("mongodb://localhost/sampledb");
    var mongooseTypes = require("mongoose-3x-types");
    mongooseTypes.loadTypes(mongoose);

You can also specify that you only want to load and use a limited subset of the types provided:

    var mongoose = require("mongoose");
    var db = mongoose.createConnection("mongodb://localhost/sampledb");
    var mongooseTypes = require("mongoose-3x-types");
    // Only load the email type
    mongooseTypes.loadTypes(mongoose, "email");

### Using the types

Once you are setup, you can begin to use the new types.

#### Mongoose 2.x and 3.x

When on mongoose 3.x use `mongoose.Schema.Types`, otherwise if you're on mongoose 2.x use `mongoose.SchemaTypes`.

Keep this in mind when reading the following examples.

#### Email

    var Email = mongoose.Schema.Types.Email;
    var UserSchema = new Schema({
      email: {
          work: Email
        , home: Email
      }
    });

#### Url

    var Url = mongoose.Schema.Types.Url;
    var VisitSchema = new Schema({
        url: Url
      , referer: Url
    });

### Using the plugins

#### The `useTimestamps` plugin

    var mongoose = require("mongoose");
    var db = mongoose.createConnection("mongodb://localhost/sampledb");
    var mongooseTypes = require("mongoose-3x-types")
      , useTimestamps = mongooseTypes.useTimestamps;
    var UserSchema = new Schema({
        username: String
    });
    UserSchema.plugin(useTimestamps);
    mongoose.model('User', UserSchema);
    var User = db.model('User', UserSchema);

    var user = new User({username: 'Prince'});
    user.save(function (err) {
      console.log(user.createdAt); // Should be approximately now
      console.log(user.createdAt === user.updatedAt); // true

      // Wait 1 second and then update the user
      setTimeout( function () {
        user.username = 'Symbol';
        user.save( function (err) {
          console.log(user.updatedAt); // Should be approximately createdAt + 1 second
          console.log(user.createdAt < user.updatedAt); // true
        });
      }, 1000);
    });

## Tests

To run tests:

    make test

### Contributors

- [Brian Noguchi](https://github.com/bnoguchi)
- [Marco Pantaleoni](https://github.com/panta)

### License

MIT License

---
### Author

Brian Noguchi

repository: panta/mongoose-types

repo_name: panta/mongoose-types


text:
# Leptosphaeria ammophila (Lasch) Rehm SPECIES

#### Status
SYNONYM

#### According to
Index Fungorum

#### Published in
Asc. no. 691 (1882)

#### Original name
Sphaeria ammophilae Lasch, 1850

### Remarks
null

path: /life/Fungi/Ascomycota/Dothideomycetes/Pleosporales/Amarenomyces/Amarenomyces ammophilae/ Syn. Leptosphaeria ammophila/README.md


text:
---
layout: topic
title:  Frequently asked questions
author: Willy McAllister
comments: true
---

I get a questions about electrical engineering that are interesting but don't have a natural place to live. So they camp out here for now.

----

[![]({% link i/article.svg %}) What's the difference between impedance and resistance?]({% link _articles/difference-between-Z-and-R.md %})

[![]({% link i/article.svg %}) Inductor - how it works]({% link _articles/inductor-how-it-works.md %})

[![]({% link i/article.svg %}) 6 ways to generate electricity]({% link _articles/six-ways-to-generate-electricity.md %})


text:
# String Decoder

> Stability: 2 - Stable

To use this module, do `require('string_decoder')`. StringDecoder decodes a
buffer to a string. It is a simple interface to `buffer.toString()` but provides
additional support for utf8.

```js
const StringDecoder = require('string_decoder').StringDecoder;
const decoder = new StringDecoder('utf8');

const cent = new Buffer([0xC2, 0xA2]);
console.log(decoder.write(cent));

const euro = new Buffer([0xE2, 0x82, 0xAC]);
console.log(decoder.write(euro));
```

## Class: StringDecoder
<!-- YAML
added: v0.1.99
-->

Accepts a single argument, `encoding` which defaults to `'utf8'`.

### decoder.end()
<!-- YAML
added: v0.9.3
-->

Returns any trailing bytes that were left in the buffer.

### decoder.write(buffer)
<!-- YAML
added: v0.1.99
-->

Returns a decoded string.


text:
# notifications-java-user-research-app
Small JAVA app to use in user testing of the developer process around GOV.UK Notify.

Based on [https://spring.io/guides/gs/serving-web-content/](https://spring.io/guides/gs/serving-web-content/)

Uses [http://freemarker.org/](http://freemarker.org/) for templating.

## To start the application
```
./gradlew bootRun
```

## Create idea project files
```
./gradlew idea
```

## Create eclipse project files
```
./gradlew eclipse
```

Then go to http://localhost:8080/


text:
---
hrs_structure:
  division: '2'
  volume: '8'
  title: '23'
  chapter: '425'
  section: 425-162
type: hrs_section
tags:
  - Business
menu:
  hrs:
    identifier: HRS_0425-0162
    parent: HRS0425
    name: >-
      425-162 Foreign limited liability partnerships; activities not
      constituting the transaction of business
weight: 46420
title: >-
  Foreign limited liability partnerships; activities not constituting the
  transaction of business
full_title: >-
  425-162 Foreign limited liability partnerships; activities not constituting
  the transaction of business
---
**§425-162 Foreign limited liability partnerships; activities not constituting the transaction of business.** (a) Activities of a foreign limited liability partnership that do not constitute the transaction of business include:

(1) Maintaining, defending, or settling an action or proceeding;

(2) Holding meetings of its partners or carrying on any other activity concerning its affairs;

(3) Maintaining bank accounts;

(4) Maintaining offices or agencies for the transfer, exchange, and registration of the partnership's own securities, or maintaining trustees or depositories with respect to those securities;

(5) Selling through independent contractors;

(6) Soliciting or obtaining orders, whether by mail or through employees, agents, or otherwise, if the orders require acceptance outside this State before they become contracts;

(7) Creating or acquiring indebtedness, with or without a mortgage, or other security interest in property;

(8) Collecting debts or foreclosing mortgages or other security interests in property securing the debts, and holding, protecting, and maintaining property so acquired;

(9) Conducting an isolated transaction that is completed within thirty days and is not one in the course of similar transactions; and

(10) Transacting business in interstate commerce.

(b) The ownership in this State of income-producing real property or income-producing tangible personal property, other than property excluded under subsection (a), constitutes the transaction of business in this State.

(c) This section shall not apply to a determination of contracts or activities that may subject a foreign limited liability partnership to service of process, taxation, or regulation under any other law of this State. [L 2000, c 218, pt of §1; am L 2002, c 130, §90]

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
This handbook is dedicated to those looking to embark on the journey of living off the grid. It is organized to give you the absolute basics to keep your gadgets and appliances powered with a starting point of minimal knowledge of electrical systems.

## Where to start?

Great question: Figure out what you need and what you don’t. - If you’re moving into a van and intend to only have a cell phone and a tablet, go get a decent cigarette adapter from your favorite store and plug it in to your car. Make sure your starter battery is in good condition and maybe don’t charge your devices unless the vehicle is running.

Here’s a few options:

[links to 12v USB chargers]

For anything more, or if you’re not living in a vehicle, you’ll want to isolate your house electrical from your vehicle’s electrical system and there’s many ways to do this, but first the basics.

## Sizing your system

Before we do this a little basics of how power is calculated. Power is usually represented in watts… if you look at many devices, somewhere you’ll see a power rating though many times this is represented in volts and amps. There’s a lot of info I could give you about this but the basics are:

Volts * Amps = Watts

Keep this in mind and start looking at the devices and appliances you plan on using in your off-grid home. Many times the volts and amps rating is on the power supply aka power brick or wall wort, but this is generally a maximum power draw. Keep in mind though, this is only when you are charging. [expand on this]

For example a common USB phone charger will draw 2.1a at 5v:

5 * 2.1 = 10.5 watts

This is how much your phone charger is drawing at its peak at any given time and we can then convert that to say a common 12v system by reversing the operation

10.5 / 12 = 0.875 amps @ 12v

I highly suggest you research this more if you want to get a better idea of how this works, but the basic math is all you need to get started and the following example will help you follow through the rest of this handbook.

Example Home

This is an example of the common devices I run in my home and the variances I like to calculate for specific items.

iPad 15w

Fridge 50w

Phone 15w

Heater 30w

Fan 15w

Laptop 60w

TV 15w

Power Source

repository: vdbxio/vankit

repo_name: vdbxio/vankit


text:
# MKR

MKR is the testing server powering Niche, an iot service for tracking your inventories.
It is built in Flask in TDD fashion, following the MVC architecture pattern.

### Installation

MKR requires python 3.6 to run.

After cloning this repository, install the dependencies and start the server.

```sh
$ cd MKR
$ virtualenv env --python=python3.6
$ source env/bin/activate
$ pip install -r requirements.txt
$ python app.py
```

### Development

Want to contribute? Great!

MKR uses nose2 for testing. Before you start, try running nose2 to confirm all tests pass.

#### Setup
Here are the commands for the initial setup.
```sh
$ cd MKR
$ source env/bin/activate
$ nose2
```

#### Getting Started

There's documentation in the `views` and `models` folders which will be helpful. If you don't know what views, controllers, or models are, it is strongly suggested that you learn about MVC patterns prior to contribution. Here's an article to get you started.

https://developer.chrome.com/apps/app_frameworks

Try starting by grabbing issues with `easy` tags. If you are stuck, feel free to contact one of the contributors for help.

### Contributor

***Mark Jung***
email<EMAIL_ADDRESS>github: https://github.com/Mark-Jung

License
----

MIT

****

repository: Mark-Jung/MKR

repo_name: Mark-Jung/MKR


text:
# Genetic Algorithm (Python)

This algorithm attempts to find the minimum value of a the following 2-variable function:

![function](https://github.com/marcelovca90/codigos-inatel/raw/master/C210/ga-python/resources/function.gif)

3D plot:

![3d_plot](https://github.com/marcelovca90/codigos-inatel/raw/master/C210/ga-python/resources/3d_plot.gif)

Contour plot:

![contour_plot](https://github.com/marcelovca90/codigos-inatel/raw/master/C210/ga-python/resources/contour_plot.gif)

Code output:

![fitness_plot](https://github.com/marcelovca90/codigos-inatel/raw/master/C210/ga-python/resources/fitness_plot.png)

```
Best individual: G = [0000 0000], F = [0, 0], Score = inf
```

Code was based on [henriqueblang](https://github.com/henriqueblang/optimization-ga)'s and [marcelovca90](https://github.com/marcelovca90/codigos-inatel/tree/master/C210/ga-java)'s implementations. Function plots were generated using [WolframAlpha](https://www.wolframalpha.com/input/?i=plot+f%28x%2Cy%29%3Dx%5E2%2By%5E2%2C+x%3D-10+to+10%2C+y%3D-10+to+10). Additional reference: ["Functions of Two/Three Variables"](https://faculty.atu.edu/mfinan/2934/cal111.pdf), by Dr. Marcel B Finan (Arkansas Tech University).

repository: RafaelaFernandes/codigos-inatel

repo_name: RafaelaFernandes/codigos-inatel


text:
stm32f042-hal
=============

_stm32f042-hal_ contains a hardware abstraction on top of the peripheral access
API for the STMicro stm32f042 series microcontroller.

Please do **not** use this crate anymore since it has been moved into and superseded
by the [stm32f0xx-hal][] crate.

[stm32f0xx-hal]: https://github.com/stm32-rs/stm32f0xx-hal

License
-------

[0-clause BSD license](LICENSE-0BSD.txt).

gha_language: Rust

gha_license_id: NOASSERTION


text:
---
layout: 	post
title: 	"ruby语法笔记"
subtitle:	 "一个电影目录小程序"
author: 	"Fernando"
header-img:	 "img/"
header-mask:	 0.3
catalog: true
tags:
  - ruby
---

# Ruby小练习

```ruby

movies={"huoyingrenzhe"=>3.2,
 "sisheng"=>3.5,
 "haizeiwang"=>3.9
}
puts "what do you want to do?"
puts "Type 'add' to add a movie"
puts "Type 'update' to update all the movies"
puts "Type 'display' to display all the movie"
puts "Type 'delete' to delete a movie"

choice=gets.chomp.downcase
case choice
when "add"
    puts "please input the movie title you like?"
    title=gets.chomp
    if movies[title.to_sym].nil?
        puts "please input the rating of the movie you added"
        rating=gets.chomp
        movies[title]=rating
        puts "the movie was added successfully"
    else
        puts "the movie alread exist!"
end
when "update"
    puts "the movie you want to update is?"
    title=gets.chomp
    if movies[title].nil?
        puts "the movie is not exist!"
    else
        puts "please input the new rating of that movie"
        movies[title]=gets.chomp.to_i
        puts "the #{title}'s rating is #{movies[title]}"
end
when 'display'
    movies.each do |movie,rating|
        puts "#{movie}:#{rating}"
end
when "delete"
    puts "Deleted"
else
    puts "Error!"
end
```

# Ruby 写出switch 语句

```ruby
#!/usr/bin/ruby
# -*- coding: UTF-8 -*-

x = [1,5,9]
puts x
case x
when 1..5
  puts "It's between 1 and 5"
when 6
  puts "It's 6"
when "foo", "bar"
  puts "It's either foo or bar"
when String
  puts "You passed a string"
else
  puts "You gave me #{x} -- I have no idea what to do with that."

end
```


text:
# Phyllachora juruensis var. minima F. Stevens, 1927 VARIETY

#### Status
SYNONYM

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

#### Published in
Illinois Biol. Monogr. (Urbana) 11(2): 187 (1927)

#### Original name
Phyllachora juruensis var. minima F. Stevens, 1927

### Remarks
null

path: /life/Fungi/Ascomycota/Sordariomycetes/Phyllachorales/Phyllachoraceae/Phyllachora/Phyllachora copeyensis/ Syn. Phyllachora juruensis minima/README.md


text:
# KalisGallery
A collection of Artelys Kalis examples with Jupyter Notebook

Artelys Kalis is the constraint programming solver developed by Artelys : https://www.artelys.com/kalis

This project supports a collection of Artelys models examples in Python developed with Jupyter Notebook.

***

Model Examples
* [The JobShop Problem](http://nbviewer.ipython.org/urls/raw.github.com/Artelys/KalisGallery/master/jobshop/jobshop.ipynb)

***

To obtain an Artelys Kalis license in order to run a model example or create your own notebook, go to : https://www.artelys.com/en/optimization-tools/kalis#downloads-tab

The Artelys Kalis Gallery is available under the MIT License.

repository: Artelys/KalisGallery

repo_name: Artelys/KalisGallery


text:
##Challenges class 5

## Singly Linked List
<!-- Short summary or background information -->
sequence of Nodes that are connected/linked to each other.

## Challenge
<!-- Description of the challenge -->
Create a Node class that has properties for the value stored in the Node, and a pointer to the next Node.

## Approach & Efficiency
<!-- What approach did you take? Why? What is the Big O space/time for this approach? -->
1.create node class.
2.create a methods:insert,includes,toString.
3.make tests for all methods

# class 06 ---------------------------------->

# Challenge Summary
<!-- Description of the challenge -->
methods for the Linked List class
- .insertBefore(value, newVal) which add a new node with the given newValue immediately before the first value node
- .insertAfter(value, newVal) which add a new node with the given newValue immediately after the first value node

## Whiteboard Process
<!-- Embedded whiteboard image -->
![img](../img/ch6.jpeg)

# class 07 ---------------------------------->

# Challenge Summary
<!-- Description of the challenge -->
method for the Linked List class which takes a number, k, as a parameter. Return the node’s value that is k from the end of the linked list.

## Whiteboard Process
<!-- Embedded whiteboard image -->
![img](../img/ch7.jpeg)

# class 08 ---------------------------------->

# Challenge Summary
<!-- Description of the challenge -->
function called zipLists which takes two linked lists as arguments. Zip the two linked lists together into one so that the nodes alternate between the two lists and return a reference to the head of the zipped list.

## Whiteboard Process
<!-- Embedded whiteboard image -->
![img](../img/ch8.jpeg)


text:
# MockApiHub

[![Go Report Card](https://goreportcard.com/badge/github.com/wcsanders1/MockApiHub)](https://goreportcard.com/report/github.com/wcsanders1/MockApiHub) [![BuildStatus](https://travis-ci.org/wcsanders1/MockApiHub.svg?branch=master)](https://travis-ci.org/wcsanders1/MockApiHub) [![codecov](https://codecov.io/gh/wcsanders1/MockApiHub/branch/master/graph/badge.svg)](https://codecov.io/gh/wcsanders1/MockApiHub) [![License](https://img.shields.io/badge/license-mit-blue.svg)](https:/githubusercontent.com/wcsanders1/MOckApiHub/master/LICENSE) [![GoDoc](https://img.shields.io/badge/go-documentation-darkblue.svg)](https://godoc.org/github.com/wcsanders1/MockApiHub) ![Version](https://img.shields.io/badge/version-0.4.0-darkred.svg)

## Overview

This application allows you to create a collection of mock APIs. The APIs are easily configurable and you can reconfigure them--i.e., change their URLs, HTTP methods, or return data--without restarting the hub server. This application is useful when you need to test a service that makes HTTP requests and you want to control the data being returned from those requests.

## Configuring the Hub

Download the appropriate binary from [here](https://github.com/wcsanders1/MockApiHub/releases).

Before starting the application, you must configure the hub server in a file named `app_config.toml`, which must be in the same directory level as the executable. The file must be in `toml` format. You must provide the port on which you want the hub server to listen. If you want the server to use TLS, you must enable TLS and provide the paths for the certificate and key files. In addition, you can configure logging in this file. (Note that logging configuration for the mock APIs is separate, discussed below.) Here is an example of a valid `app_config.toml`:

```toml
[http]
port = 5000
useTLS = false
certFile = ""
keyFile = ""

[log]
loggingEnabled = true
fileName = "testLogs/mockApiHub/default.log"
maxFileDaysAge = 3
formatAsJSON = true
prettyJSON = true
```

## Creating Mock APIs

After configuring the hub server, you need to configure your mock APIs and provide files containing the data you want them to return. The API configuration files and data files must be placed in a directory called `mockApis`, whose root must be the directory of the executable. Each mock API must have its own directory as a subdirectory of `mockApis`, each of which must end in the letters `Api`. Each mock API must have its own configuration file, which must end in the letters `Api` and must be in `toml` format. See examples in the `mockApis` directory in this repository, or read further.

This application does not limit the amount of mock APIs that can run at once; however, each mock API must listen on a distinct port, and none of them can listen on the same port as the hub server.

Here is an example of a valid mock API configuration file, named `customersApi.toml`, which has two endpoints:

```toml
baseUrl = "customersApi"

[log]
loggingEnabled = true
fileName = "testLogs/customersApi/default.log"
maxFileDaysAge = 3
formatAsJSON = true
prettyJSON = true

[http]
port = 5001
useTLS = false
certFile = ""
keyFile = ""

[endpoints]

    [endpoints.getAllAccounts]
    path = "accounts"
    file = "accounts.json"
    method = "GET"
    allowCORS = true

    [endpoints.getCustomerBalances]
    path = "customers/:id/balances"
    file = "customers.json"
    method = "GET"
    allowCORS = true

    [endpoints.createCustomer]
    path = "customers"
    method = "POST"
    HTTPStatusCode = 201
```

As shown above, logging for a mock API is configured the same way as for the hub server. If you want a mock API to use TLS and the hub server is also using TLS, you can leave the certificate and key file entries in the mock API configuration empty, in which case the certificate and key of the hub server will be used. Files containing the data that a mock API returns need to be placed in the same directory as the mock API's configuration file.

A mock API can have a `baseURL`, which applies to all of its endpoints. Each endpoint of a mock API must have an entry in the `endpoints` section of the configuration file. Files containing the data that a mock API returns need to be placed in the same directory as the mock API's configuration file. In the example above (assuming the hub server is running on `localhost`) the following `GET` request will return whatever is in the `accounts.json` file: `http://localhost:5001/customersapi/accounts`. If you want to enforce valid JSON for a particular endpoint, you can add `enforceValidJSON = true` to that endpoint's configuration. Note that a mock endpoint does not need to return anything on the response body for the request to be successful. Setting `allowCORS = true` allows all origins, headers, and methods. If you do not specify an `HTTPStatusCode` or if you provide an invalid value for that property, status code `200` will apply.

If you want to have an argument as part of a mock API's URL, just put a colon in front of the route fragment. Also, a query string can be added to any HTTP request to a mock API and its values and keys will be logged. For example, the `getCustomerBalances` endpoint in the configuration above can be hit with the following URL, `http://localhost:5001/customersapi/customers/12345/balances?page=2&size=50`, which will return whatever is in `customers.json`. If logging is enabled, the request will be logged like this (note the logging of the `id` variable in `params`, as well as the keys and values in the query string):

```json
{
  "baseURL": "customersApi",
  "certFile": "",
  "func": "github.com/wcsanders1/MockApiHub/api.(*API).ServeHTTP",
  "keyFile": "",
  "level": "debug",
  "msg": "handler exists for this path",
  "params": {
    "id": "12345"
  },
  "path": "customersapi/customers/:id/balances",
  "pkg": "api",
  "port": 5001,
  "query": {
    "page": ["2"],
    "size": ["50"]
  },
  "time": "2018-11-03 20:40:36",
  "useTLS": false
}
```

To have a mocked endpoint put headers on responses, add configuration such as the following:

```toml
[endpoints]

    [endpoints.getAllAccounts]
    path = "accounts"
    file = "accounts.json"
    method = "GET"

      [[endpoints.getAllAccounts.headers]]
      key = "content-type"
      value = "application/json; charset=utf-8"

      [[endpoints.getAllAccounts.headers]]
      key = "Access-Control-Allow-Origin"
      value = "*"
```

This application does not cache the contents of the files that the mock APIs serve, so if you want to change the content of the files, you can do so without restarting or reloading anything.

## The Hub API

If you make a change to a mock API's configuration file, simply save the changes and send a `POST` request to the hub server with the path `refresh-all-mock-apis`; e.g., `http://localhost:5000/refresh-all-mock-apis`, which will apply any changes you made to the mock APIs.

A `GET` request to the hub server with the path `show-all-registered-mock-apis` will return all of the registered mock APIs with their configurations; e.g., `http://localhost:5000/show-all-registered-mock-apis`.

## License

[MIT](https://github.com/wcsanders1/MOckApiHub/master/LICENSE)


text:
## splitwm

Window manager able to "split" screen into two virtual screens (it can emulate dual screen setup on one physical screen).

## Video

Click [here](https://vimeo.com/58112758).

## Screenshots

![demo](https://raw.github.com/examon/splitwm/master/img/demo.png)

## Dependences

In order to run `splitwm`, you will need:

- xlib

I also recommend to install the following software:

- rxvt-unicode
- dmenu

`rxvt-unicode` (`urxvt`) is the default terminal emulator for the `splitwm` (this can be changed in the `config.h`). Note, if you do not want to use `urxvt` just change the following line in the `config.h`:

    static const char *spawn_terminal[] = { "urxvt", NULL };

and replace "urxvt" with your favourite terminal emulator.

`dmenu` is for launching software within the `splitwm`.

## Installation

Execute the following commands within the `splitwm` folder to compile and install the project:

    cd src
    make
    sudo make install

## Run

Create the following file within your home directory (`$HOME`):

    #!/bin/sh
    exec splitwm

and save it as `.xinitrc`.

Disable any other window manager or desktop environment (e.g. GNOME, KDE, XFCE, etc.) and boot right into the console.

When in console, type:

    startx

 this will start the X server following by the `splitwm` itself.

## First steps

First off, try to tun the terminal emulator by pressing the following keyboard shortcut:

    Alt + Return

This should spawn the terminal emulator on the screen. If you do want to resize any window, hold `Alt` and use the `right mouse button`. For moving the window around the screen, hold `Alt`, press the `left mouse button` and drag the cursor.

Try to press:

    Alt + p

to launch `dmenu`.

To change the virtual desktop (for the left view) use:

    Windows key (Win) + 1-9

or (for the right view):

    Alt + 1-9

To send the client from one virtual desktop to another use:

    Alt/Win + 1-9

To switch between layouts:

    Alt + Shift + g
        Grid tile layout

    Alt + Shift + m
        Master-slave tile layout

    Alt + Shift + f
        Floating layout

If you want to send the client from one view to another press:

    Win + Shift + j

Please check out other keyboard shortcuts and functions in the configuration file `config.h`.

repository: examon/splitwm

gha_language: C

repo_name: examon/splitwm


text:
# LDK-TETRIS-ATTACK
[![sologamedev](https://image.ibb.co/hypK48/Captura_de_Tela_2018_07_08_a_s_11_46_13.png)](https://sologamedevblog.wordpress.com/)

A remake of the Super Nintendo (SNES) version of the game Tetris Attack, powered by the opensource LDK game engine (https://github.com/marciovmf/ldk). https://sologamedevblog.wordpress.com/

## Releases
- This repository is currently under development. You can see the development board [here](https://trello.com/b/lcfnc3Ij/ldk-tetris-attack).

repository: andreimesquita/LDK-TETRIS-ATTACK

repo_name: andreimesquita/LDK-TETRIS-ATTACK


text:
# app-arch/bzip2

### split-usr
If the flag is enabled some of the produced libraries will be installed into the `/lib` directory, instead of the `/usr/lib` directory, so that they are available during the early boot when the `/usr` partition is not yet mounted.

This flag is necessary to boot the system that has separated `/usr` partition, but otherwise can be safely disabled.

### static
Pass the `-static` option to the `make` command. Build and install statically linked binaries, e.g. a `bzip2`, a `bunzip2`, a `bzcat`, etc.

This flag should normally be disabled unless there is a need for static binaries.

### static-libs
Build and install a statically linked version of the `libbz2.a` library.

This flag should be disabled unless there is a need for static library.

### verify-sig
Perform signature verification of the upstream source code archive before extracting it and building the package.

It is safe to disable this flag.

license: Unlicense

repository: filakhtov/gentoo-use-docs

repo_name: filakhtov/gentoo-use-docs


text:
# Watchr — better file system watching for Node.js

[![Build Status](https://img.shields.io/travis/bevry/watchr/master.svg)](http://travis-ci.org/bevry/watchr "Check this project's build status on TravisCI")
[![NPM version](https://img.shields.io/npm/v/watchr.svg)](https://npmjs.org/package/watchr "View this project on NPM")
[![NPM downloads](https://img.shields.io/npm/dm/watchr.svg)](https://npmjs.org/package/watchr "View this project on NPM")
[![Dependency Status](https://img.shields.io/david/bevry/watchr.svg)](https://david-dm.org/bevry/watchr)
[![Dev Dependency Status](https://img.shields.io/david/dev/bevry/watchr.svg)](https://david-dm.org/bevry/watchr#info=devDependencies)

[![Gratipay donate button](https://img.shields.io/gratipay/bevry.svg)](https://www.gratipay.com/bevry/ "Donate weekly to this project using Gratipay")
[![Flattr donate button](https://img.shields.io/badge/flattr-donate-yellow.svg)](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
[![PayPayl donate button](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal")
[![BitCoin donate button](https://img.shields.io/badge/bitcoin-donate-yellow.svg)](https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a "Donate once-off to this project using BitCoin")
[![Wishlist browse button](https://img.shields.io/badge/wishlist-donate-yellow.svg)](http://amzn.com/w/2F8TXKSNAFG4V "Buy an item on our wishlist for us")

Watchr provides a normalised API the file watching APIs of different node versions, nested/recursive file and directory watching, and accurate detailed events for file/directory creations, updates, and deletions.

Watchr is made to be a module that other tools include. If you are looking for a command line tool to perform actions when files are changed, check out [Watchy](https://github.com/caseywebdev/watchy).

You install it via `npm install watchr` and use it via `require('watchr').watch(config)`. Available configuration options are:

- `path` a single path to watch
- `paths` an array of paths to watch
- `listener` a single change listener to fire when a change occurs
- `listeners` an array of listeners to fire when a change occurs, overloaded to accept the following values:
	- `changeListener` a single change listener
	- `[changeListener]` an array of change listeners
	- `{eventName:eventListener}` an object keyed with the event names and valued with a single event listener
	- `{eventName:[eventListener]}` an object keyed with the event names and valued with an array of event listeners
- `next` (optional, defaults to `null`) a completion callback to fire once the watchers have been setup, arguments are:
	- when using the `path` configuration option: `err, watcherInstance`
	- when using the `paths` configuration option: `err, [watcherInstance,...]`
- `stat` (optional, defaults to `null`) a file stat object to use for the path, instead of fetching a new one
- `interval` (optional, defaults to `5007`) for systems that poll to detect file changes, how often should it poll in millseconds
- `persistent` (optional, defaults to `true`) whether or not we should keep the node process alive for as long as files are still being watched
- `catchupDelay` (optional, defaults to `2000`) because swap files delete the original file, then rename a temporary file over-top of the original file, to ensure the change is reported correctly we must have a delay in place that waits until all change events for that file have finished, before starting the detection of what changed
- `preferredMethods` (optional, defaults to `['watch','watchFile']`) which order should we prefer our watching methods to be tried?
- `followLinks` (optional, defaults to `true`) follow symlinks, i.e. use stat rather than lstat
- `ignorePaths` (optional, defaults to `false`) an array of full paths to ignore
- `ignoreHiddenFiles` (optional, defaults to `false`) whether or not to ignored files which filename starts with a `.`
- `ignoreCommonPatterns` (optional, defaults to `true`) whether or not to ignore common undesirable file patterns (e.g. `.svn`, `.git`, `.DS_Store`, `thumbs.db`, etc)
- `ignoreCustomPatterns` (optional, defaults to `null`) any custom ignore patterns that you would also like to ignore along with the common patterns

The following events are available to your via the listeners:

- `log` for debugging, receives the arguments `logLevel ,args...`
- `error` for gracefully listening to error events, receives the arguments `err`
	- you should always have an error listener, otherwise node.js's behavior is to throw the error and possibly crash your application, see [#40](https://github.com/bevry/watchr/issues/40)
- `watching` for when watching of the path has completed, receives the arguments `err, isWatching`
- `change` for listening to change events, receives the arguments `changeType, fullPath, currentStat, previousStat`, received arguments will be:
	- for updated files: `'update', fullPath, currentStat, previousStat`
	- for created files: `'create', fullPath, currentStat, null`
	- for deleted files: `'delete', fullPath, null, previousStat`

To wrap it all together, it would look like this:

``` javascript
// Require
var watchr = require('watchr');

// Watch a directory or file
console.log('Watch our paths');
watchr.watch({
	paths: ['path1','path2','path3'],
	listeners: {
		log: function(logLevel){
			console.log('a log message occured:', arguments);
		},
		error: function(err){
			console.log('an error occured:', err);
		},
		watching: function(err,watcherInstance,isWatching){
			if (err) {
				console.log("watching the path " + watcherInstance.path + " failed with error", err);
			} else {
				console.log("watching the path " + watcherInstance.path + " completed");
			}
		},
		change: function(changeType,filePath,fileCurrentStat,filePreviousStat){
			console.log('a change event occured:',arguments);
		}
	},
	next: function(err,watchers){
		if (err) {
			return console.log("watching everything failed with error", err);
		} else {
			console.log('watching everything completed', watchers);
		}

		// Close watchers after 60 seconds
		setTimeout(function(){
			var i;
			console.log('Stop watching our paths');
			for ( i=0;  i<watchers.length; i++ ) {
				watchers[i].close();
			}
		},60*1000);
	}
});
```

You can test the above code snippet by running the following:

```
npm install -g watchr
watchr
```

## History
[Discover the change history by heading on over to the `HISTORY.md` file.](https://github.com/bevry/watchr/blob/master/HISTORY.md#files)

## Contribute

[Discover how you can contribute by heading on over to the `CONTRIBUTING.md` file.](https://github.com/bevry/watchr/blob/master/CONTRIBUTING.md#files)

## Backers

### Maintainers

These amazing people are maintaining this project:

- Benjamin Lupton<EMAIL_ADDRESS>(http://balupton.com)

### Sponsors

No sponsors yet! Will you be the first?

[![Gratipay donate button](https://img.shields.io/gratipay/bevry.svg)](https://www.gratipay.com/bevry/ "Donate weekly to this project using Gratipay")
[![Flattr donate button](https://img.shields.io/badge/flattr-donate-yellow.svg)](http://flattr.com/thing/344188/balupton-on-Flattr "Donate monthly to this project using Flattr")
[![PayPayl donate button](https://img.shields.io/badge/paypal-donate-yellow.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QB8GQPZAH84N6 "Donate once-off to this project using Paypal")
[![BitCoin donate button](https://img.shields.io/badge/bitcoin-donate-yellow.svg)](https://coinbase.com/checkouts/9ef59f5479eec1d97d63382c9ebcb93a "Donate once-off to this project using BitCoin")
[![Wishlist browse button](https://img.shields.io/badge/wishlist-donate-yellow.svg)](http://amzn.com/w/2F8TXKSNAFG4V "Buy an item on our wishlist for us")

### Contributors

These amazing people have contributed code to this project:

- [AaronO](https://github.com/AaronO) — [view contributions](https://github.com/bevry/watchr/commits?author=AaronO)
- [adamsanderson](https://github.com/adamsanderson) — [view contributions](https://github.com/bevry/watchr/commits?author=adamsanderson)
- [balupton](https://github.com/balupton) — [view contributions](https://github.com/bevry/watchr/commits?author=balupton)
- [Casey Foster](https://github.com/caseywebdev) — [view contributions](https://github.com/bevry/watchr/commits?author=caseywebdev)
- [FredrikNoren](https://github.com/FredrikNoren) — [view contributions](https://github.com/bevry/watchr/commits?author=FredrikNoren)
- [Robson Roberto Souza Peixoto](https://github.com/robsonpeixoto<EMAIL_ADDRESS>— [view contributions](https://github.com/bevry/watchr/commits?author=robsonpeixoto)
- [Stuk](https://github.com/Stuk) — [view contributions](https://github.com/bevry/watchr/commits?author=Stuk)
- [thebyrd](https://github.com/thebyrd) — [view contributions](https://github.com/bevry/watchr/commits?author=thebyrd)

[Become a contributor!](https://github.com/bevry/watchr/blob/master/CONTRIBUTING.md#files)

## License

Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT license](http://creativecommons.org/licenses/MIT/)

Copyright © 2012+ Bevry Pty Ltd<EMAIL_ADDRESS>(http://bevry.me)

Copyright © 2011 Benjamin Lupton<EMAIL_ADDRESS>(http://balupton.com)

repository: liangwenzhong/spider-sequelize-oracle

repo_name: liangwenzhong/spider-sequelize-oracle


text:
---
title: Imaginary Audience
tags: #obsidian
toc: true
season: winter
---
# Imaginary Audience
#建中

Imaginary audience is a term which explains how teenagers normally overreact to other people’s opinion.

When I was in eighth grade, I had a classmate who was very conscious of his appearance. Any imperfection on his face was magnified a hundred times by himself. He spent a lot of time trying to impact us. However, he had not only failed many quizzes and exams but also became our class’s laughingstock for overdressing. He didn't get a good grade during the CAP exam, either. What I feel about him is that we shouldn't care about others’ comments too much to have a more flexible life.

####<PHONE_NUMBER>17

path: /_notes/Imaginary Audience.md

filename: Imaginary Audience.md


text:
* Lint : Minor Typo fix
 * Ask for rebase, to fix travis issues, then pull in
* [WIP] Tables: Table styling
 * Away on vacation last week
* Images : Basic styling
 * Pull in, good base for variables
* Grunt: 'grunt watch' runs all tasks at beginning
 * Pulled In
* Grunt: grunt-watch now detects variable changes
 * Squash into one commit, then sfrisk will pull it in
* Initial files and initial demo styles added (input styling)
 * Needs styling for other inputs, text area
 * Include labels in demo
* Testing: Added Pure for sass unit testing #35
 * Wait on having some more sass to figure out how best to use this
* Typography: Added basic styles for paragraphs and lists
 * sfrisk added some comments
* Accessibility testing
 * Good to pull in, but needs some master merging help


text:
# DistributedFFT.jl
Work in progress generalization of a distributed 3D BFFT I wrote for another project.

Currently only implements `brfft` but others are planned when I can find time.

Also only supports out of place, but inplace variants are planned once I can find time.

Package can be installed with

```julia
pkg> add https://github.com/JosephTomlinson/DistributedFFT.jl.git
```

Example usage
```julia
using Distributed
addprocs(4)
@everywhere begin
  using DistributedFFT
  using DistributedArrays
end
pids = workers()
np = length(pids)
D = drand(Complex{Float64}, (51, 100, 100), pids, [np,1,1])
C = brfft(D,100)
```


text:
# goa v2 Security Plugin Example

This example illustrates how to secure microservice endpoints using the goa v2
security plugin. It consists of two services `calc` and `adder`, the `calc`
service is a client of the `adder`. The example thus illustrates how to
implement both a secure service and a secure client.

The `calc` service exposes an `add` endpoint to public clients. It uses JWT
tokens to perform auth. The tokens are created using the `login` endpoint which
accepts a username and password using basic authentication.

The `adder` service exposes an `add` endpoint to private clients. It requires an
API key to validate that that requests come from authorized clients. the `calc`
service uses the `adder` service for the implementation of its `add` endpoint.

The flow of requests starting with login is thus:

```
client --- [ username/password ] --> calc.login
       <--     [ JWT token ]     ---

client --- [ JWT token ] --> calc.add --- [ API key ] --> adder
```

## Design

The key design sections for the `calc` service define the `login` and `add`
security requirements:

```go
// BasicAuth defines a security scheme that uses basic authentication.
var BasicAuth = BasicAuth("basic", func() {
	Description("Secures the login endpoint.")
})

// JWTAuth defines a security scheme that uses JWT tokens.
var JWTAuth = JWTSecurity("jwt", func() {
	Description(`Secures endpoint by requiring a valid JWT token retrieved via the login endpoint. Supports scope "calc:add".`)
	Scope("calc:add", "Allows performing additions")
})

var _ = Service("calc", func() {
    Description("The calc service exposes public endpoints that require valid authorization credentials.")

	Method("login", func() {
		Description("Creates a valid JWT")

		// The signin endpoint is secured via basic auth
		Security(BasicAuth)
...

	Method("add", func() {
		Description("Add adds up the two integer parameters and returns the results. This action is secured with the jwt scheme")

		// Use JWT to auth requests to this endpoint.
		Security(JWTAuth, func() {
			Scope("calc:add") // Enforce presence of "calc:read" in the JWT "scope" claim.
		})
...
```
The design first defines both the `BasicAuth` and `JWTAuth` security schemes
then uses these definitions in the `login` and `add` methods respectively.

The `adder` service only makes use of a API key scheme to secure requests made
to the `add` endpoint:

```go
// APIKeyAuth defines a security scheme that uses API keys.
var APIKeyAuth = APIKeySecurity("api_key", func() {
	Description("Secures endpoint by requiring an API key.")
})

var _ = Service("adder", func() {
	Description("The adder service exposes an add method secured via API keys.")
	Method("add", func() {
		Description("This action returns the sum of two integers and is secured with the API key scheme")
		Security(APIKeyAuth) // Use API keys to auth requests to this endpoint.
		Payload(func() {
			APIKey("api_key", "key", String, func() {
				Description("API key")
				Example("abcdef12345")
			})
			...
```

The payloads for all secure endpoints list the fields holding credentials using
specific DSL that identifies the corresponding security attributes e.g.
`Username`, `Password` or `APIKey`. The service method implementations may use
the fields to perform validations while clients use it to set the credentials.

repository: douglaswth/plugins

repo_name: douglaswth/plugins


text:
## Title
# News API Application
This is an application that uses an API to gather data and display it on the webpage.

## Author
# By Paulyne Wambui

## Description
This web application is built using Python framework known as Flask. The app displays information about news from most popular sources, top headlines in the World, categorical
and also a user can search for any topic.

## Setup/Installation Requirements
First clone the repo $ git clone https://github.com/pwambui2020/News-api.git

After cloning, navigate to the project: $ cd news-flask

Then install all the requirements through pip: $ pip install -r requirements.txt

Make the file executable: $ chmod +x start.sh

Run the application: $ ./start.sh

Now navigate to your browser at: localhost://<IP_ADDRESS>00/

## Screenshot

![news2](https://user-images.githubusercontent.com/69419673/96966445-7b7a2b80-1516-11eb-96cd-410480962ce0.png)

![news1](https://user-images.githubusercontent.com/69419673/96966503-95b40980-1516-11eb-8611-fcb91fc14697.png)

Technologies Used
# *Python
# *Flask
# *HTML
# *Bootstrap

Support and contact details
Incase of any issues please make a pull request and or raise an issue and I will take care of it.

License
MIT LICENSE Copyright (c) 2020 PAULYNE WAMBUI


text:
# v1-hygiene-service
Service interface for V1 hygiene queries

Requires node.js 8.x and a current version of Docker if you want to create/run the container.

Good data is important if you want to make data-backed decisions.
This service helps identify, based on queries you create to meet your needs, V1 work items that need attention. There is a related, simple UI for displaying the results and changing some of the query parameters. See [Vue.js UI for V1 Hygiene](https://github.com/millarde/v1-hygiene-vue-ui "V1 Work Item Hygiene Dashboard")

This node.js based service
provides a REST-like interface
for calling pre-made queries
that retrieve VersionOne work item data.
Each query spec (in /queries) uses the V1 query.v1 API to retrieve work items that match the specified criteria.
[Read more about how to use V1 query API](https://medium.com/@millard3/getting-into-the-versionone-query-api-f4408f3767b9)

The "contract" for a query is that
it will return a message that desribes the items returned
along with a collection of {name, link} for each item.
Use an existing query to start a new one, carefully replacing the data needed.
Read [Working with the VersionOne API](https://medium.com/@millard3/working-with-the-versionone-api-70c5391057ab) for a useful way to create and test new queries. I used [http://convertjson.com/yaml-to-json.htm](this YAML-to-JSON converter) before dropping the JSON into the query code.

# V1 API Key REQUIRED!
The service requires a valid VersionOne API key for your target system in order to work. The service will look for this in an environment variable named V1APIKEY. In the current version, it requires the full Authorization section with the key value, e.g., export V1APIKEY="Bearer 1.As...Nm4=". The _Working with VersionOne API_ article linked above describes how to get a valid key.

# Running the service
You'll also need your own _Server Base URI_ that points to your running VersionOne instance. See [config.js](./config/config.js).

With an exported API key and your <Server Base URI> configured, you can start the service and try out the existing endpoints.

Use `npm start` to start the service. It will listen on port 3000 unless you configure a different port via your environment.

You can use the /healthcheck endpoint to verify that the service is running: http://localhost:3000/healthcheck

The other endpoints require that you provide necessary queryParams that include data identifying a Scope and Team that exist in your V1 config. For example, http://localhost:3000/featurenostatus?scopeName=MyScope&teamName=MyTeam

Aside: There are /data helper "queries" in the repo. These are intended to provide select values to support a UI. You can certainly call these as well though you should not modify them (unless you are prepared to fixup the UI to deal with any changes).

# Containering the service

In the [docker-cmds.txt](./docker-cmds.txt) file are the commands you'll need to create and run the container (depending on your Docker workflow, you may want to adjust, for example, providing a proper name). The export line in the file doesn't work, it's just a reminder that you need to have a V1APIKEY environment variable in order for the service to work. The port mapping makes it possible to have your local copy running at port 3000 and the container version running at port 8088.

To run the /healthcheck against the container version, use http://localhost:8088/healthcheck

# Making new queries
This is getting a bit long. Adding a query to the service is described [here](./ADDQUERY.MD).

# Need help? Have suggestions (or complaints)?
Feel free to contact me. Create an issue or pull request as appropriate.


text:
# Template Method Pattern

The Template Method Pattern allows you to define the skeleton of an algorithm in an operation, deferring some steps to the subclasses. Template Method lets subclasses redefine certain steps of an algorithm without changing the algorithms structure. (Gang of Four).

In this example, we define the abstract class `Sandwich` which details steps into making a sandwich in the method `Make`. Each step of the sandwich making process such as `AddSpread` or `AddMeat` can be redefined or ignored by the subclasses, allowing steps to be modified without changing the structure of the making process. `BaconSandwich` ignores the `AddCheese` step. `CheeseSandwich` ignores the `AddMeat` step.

The delicious sandwich can then be eaten using `sandwich.Eat();`

## UML Diagram of the example.
![](TemplateMethodPattern.png)

repository: Lewis-Allen/Design-Patterns

gha_language: C#

repo_name: Lewis-Allen/Design-Patterns


text:
# Algolia Search Offline API Client for Swift

This is the reference documentation for the **Algolia Search Offline API Client for Swift**. You can always browse the latest version online at [Algolia Community](https://community.algolia.com/algoliasearch-client-swift/offline/).

**Note:** The Offline API Client is an offline-enabled version, and a superset, of the regular [API Client](../index.html).

**Note:** This documentation is automatically generated from sources. For an overview of how Algolia works, detailed setup and usage instructions, please refer to our [Documentation](https://www.algolia.com/doc), in particular to the [Swift API Client](https://www.algolia.com/doc/api-client/swift/) documentation.

repository: VoodooTeam/algoliasearch-client-swift

repo_name: VoodooTeam/algoliasearch-client-swift


text:
# Book Search App
### Author
 Peter Consagra

[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Live Deployment on Heroku -- does not work on Safari: (https://afternoon-escarpment-84967.herokuapp.com)

---

# Table of Contents
1. [Description](#description)
2. [languages](#languages)
3. [Installation](#installation)
4. [Usage](#usage)
5. [Contributing](#contributing)
6. [Testing](#tests)
7. [License](#license)
8. [Contact](#contact)
9. [CodeSnippets](#code)

---

## Description
This app allows you to create an account, and then add and delete books from your library.

## Languages
- React
- JavaScript
- HTML
- CSS

## Installation
This app available on my github linked below, as well as the live deployed link linked above.

## Usage
Simply create an account and start searching for books! Add ones you like and remove them later!

## Contributing
At this point the application is complete.

## Tests
There are no test avaible for this application at the moment.

## License
This application is using the MIT license.


text:
# nocand

This repository contains the source code for `nocand` the NoCAN server.

For more information see http://omzlo.com/the-nocan-platform

This code is licensed under the MIT license as described in LICENSE.

## Building nocand

The `nocand` tool is written in [GO](https://golang.org/). You will need to download and install GO if you want to build `nocand` yourself instead of using the official binaries.

Downloading all the source code and all dependencies is as simple as:

```
git clone https://github.com/omzlo/nocand.git
cd nocand
go get ./...
```

Building the executable:

```
go build cmd/nocand.go
```


text:
# Contributing
First, and most importantly, thanks!

## Running locally
1. Install the requirements
   - Java 11
   - SBT
   - Docker
You will also require `Deploy Tools - Developer` permissions from Janus in order to run locally.

2. Create configuration
Create a configuration file at `~/.gu/riff-raff.conf`.  From the root of the repository, run:

   ```sh
   ./script/start
   ```

   Add `--debug` to attach a remote debugger on port 9999.
4. Visit http://localhost:9000/
5. Details of how to configure Riff-Raff can then be found at http://localhost:9000/docs/riffraff/administration/properties

## Raising a PR
It's worth reading the [Pull Request recommendations](https://github.com/guardian/recommendations/blob/main/pull-requests.md) first.

Adding tests, particularly if you're modifying existing code, is preferable.

Tests can be run locally via:

```sh
./script/test
```

## A note about CI
Unfortunately, there is a long standing bug where CI will randomly fail with a message similar to:

```log
scala.reflect.internal.Symbols$CyclicReference: illegal cyclic reference involving class GetParameterResponse
```

We've not managed to fully resolve this. If you can, that'd be amazing!

The problem usually resolves itself if you re-run the build.
If you're still seeing the error, it's worth compiling and running the tests locally to be sure it's not a genuine issue with your branch.

repository: guardian/riff-raff

gha_language: Scala

repo_name: guardian/riff-raff


text:
---
layout: layouts/post.njk
title: Wait for an amount of time
category: Misc
---

**JavaScript version**

```js
const wait = async (milliseconds) => new Promise((resolve) => setTimeout(resolve, milliseconds));
```

**TypeScript version**

```js
const wait = async (milliseconds: number) => new Promise((resolve) => setTimeout(resolve, milliseconds));
```


text:
# Docker Sabnzbd

This is a Dockerfile to set up Sabnzbd from the jcfp PPA. Change port if
necessary to accommodate SSL. You can use this with Docker data volumes if you
desire for storing configuration and downloads.

## Build

The default UID in the container is 1000. If your user has a different uid, pass
`--build-arg=uid=$(id -u)` so the uid of your user matches the uid of the
sabnzbd user in the container. If you would prefer to not have a matching uid,
make sure to set g+w on your /data directory.

    docker build --build-arg=uid=$(id -u) -t sabnzbd .

If using data-only volumes for config and data:

    docker create -v /config --name sabnzbd_config myscratch true
    docker run --volumes-from sabnzbd_config --user root sabnzbd chown -R sabnzbd:users /config

    docker run -v /data --name media_data myscratch true
    docker run --volumes-from media_data --user root sabnzbd chown -R sabnzbd:users /data

## Run

For regular filesystem storage::

    docker run -d -v <path/to/config-file>:/config -v <path/to/downloads>:/data -p 8080:8080 sabnzbd

For data-only volume storage::

    docker run -d --volumes-from sabnzbd_config --volumes-from media_data -p 8080:8080 --name sabnzbd_run sabnzbd

If you enable SSL, make sure to change your port numbers when running the
container (9090 typically). Systemd service file is available.

## Manage

To manage downloaded media if stored in a data-only volume:

    docker run -it --rm --volumes-from media_data ubuntu bash


text:
## Evaluation

### 1. Obtain results in Excel file (*.xlsx*)
> Example for **ZnO**
* Run: `ZnO_Main_frontend_gui.m`
* Output: Excel file (*.xlsx*) containing "Accuracy", "Mean number of simulations", and "Standard Deviation of the mean".

### 2. Plot performance graph
* Re-format Excel file:
    * Add 3 additional columns: A (Population count), B (Generation count), C (Mutation rate).
    * Transfer "Accuracy", "Mean number of simulation", and "Standard Deviation" to columns E, F, and G.
    * The first data should be from row 3.
    * **Note**: This has already been done in the provided Excel files.
* Run: `evaluation/roulette_graphing_code.m`
    * `primary_path`: variable with the path of Excel file
    * `filename`: variable with the name of the Excel file


text:
# Terraform Tests

There are two types of tests in this folder.

1. A set of tests with `@google-cloud/storage`, which is a Node.js idiomatic client for Cloud Storage.

1. A set of tests with `Terratest`, which is a Go library that provides patterns and helper functions for testing infrastructure.

- Make sure that you have installed the required tools defined in `.tool-versions` in root directory via [`asdf`](https://asdf-vm.com/#/core-manage-asdf-vm)

## Nodejs Tests

This is a Nodejs Express example that connects to GCP (Google Cloud Platform) tests for the basic use-cases.

### Test Cases

within the privileged bucket, the service account can:

1. upload a file to the bucket
1. download a file from the bucket
1. delete the empty bucket (privileged one)

and the service account cannot:

1. upload a file to another bucket
1. create a new bucket within the project
1. delete the nonempty bucket (privileged one)

### Steps

1. `make setup`: It creates two new buckets with each scoped service account.
1. `make test-node`: It runs Nodejs test files.
1. `make destroy`: It removes the two buckets with service accounts created for testing.
   - It is recommanded to run this after testing to avoid conflicts in case of local test `Terraform` state is deleted.

## Terratest

Terratest is a Go library that makes it easier to write automated tests for your infrastructure code.

### Test Cases

1. It should upload a file to my bucket.
1. It should fail to upload a file to another bucket.

### Steps

1. `make setup`: It creates two new buckets with each scoped service account.
1. `make dep`: It adds dependencies required for test files.
1. `make terratest`: It runs Terratest test files.
1. `make destroy`: It removes the two buckets with service accounts created for testing.
   - It is recommanded to run this after testing to avoid conflicts in case of local test `Terraform` state is deleted.

repository: thebuttonclan/cas-shelf

repo_name: thebuttonclan/cas-shelf


text:
[![Travis Build Status][build-badge]][build]
[![Coverage Status][coverage-badge]][coverage]
[![Github Releases][release-badge]][release]

[![Make a pull request][prs-badge]][prs]
[![License](http://img.shields.io/badge/Licence-MIT-brightgreen.svg)](LICENSE.md)

# Standup Picker

A desktop application which can be used in Scrum teams to initiate the daily Scrum meeting.

This project was bootstrapped with [angular-electron](https://github.com/maximegris/angular-electron).

Design by [Angular Material](https://material.angular.io).

[![Standup Picker](./youtube_video_thumbnail.png)](https://youtu.be/7MHk09N5APM "Standup Picker - Click to Watch!")

# Features

* Randomly select a team member. You can click on team member images to "ignore" them if they are not attending at the standup.
* Play standup music at a given time.
* Inform about ending standup time by a sound.

# Releases

All releases are available [here](https://github.com/Mokkapps/scrum-daily-standup-picker/releases).

If you want to use the deprecated Angular standalone version without Electron you can use [Release 0.1.0](https://github.com/Mokkapps/scrum-daily-standup-picker/releases/tag/v0.1.0).

# Getting Started

## To build for development

* Clone this repository locally :

```bash
git clone https://github.com/Mokkapps/scrum-daily-standup-picker.git
```

* Install dependencies with npm:

```bash
npm install
```

There is an issue with `yarn` and `node_modules` that are only used in electron on the backend when the application is built by the packager. Please use `npm` as dependencies manager.

* Build for development

```bash
npm start
```

Voila! You can use the Standup Picker app in a local development environment with hot reload!

## Included Commands

|Command|Description|
|--|--|
|`npm run ng:serve:web`| Execute the app in the browser |
|`npm run build`| Build the app. Your built files are in the /dist folder. |
|`npm run build:prod`| Build the app with Angular aot. Your built files are in the /dist folder. |
|`npm run electron:local`| Builds your application and start electron
|`npm run electron:linux`| Builds your application and creates an app consumable on linux system |
|`npm run electron:windows`| On a Windows OS, builds your application and creates an app consumable in windows 32/64 bit systems |
|`npm run electron:mac`|  On a MAC OS, builds your application and generates a `.app` file of your application that can be run on Mac |

## Browser mode

Maybe you want to execute the application in the browser with hot reload ? You can do it with `npm run ng:serve:web`.
Note that you can't use Electron or NodeJS native libraries in this case. Please check `providers/electron.service.ts` to watch how conditional import of electron/Native libraries is done.

# Used assets

* Wallpaper: http://www.wallpapersbrowse.com/wallpaper/17862
* Success sound: http://freesound.org/people/grunz/sounds/109662/
* Tick tock sound: http://freesound.org/people/FoolBoyMedia/sounds/264498/

[build-badge]: https://travis-ci.org/Mokkapps/scrum-daily-standup-picker.svg?branch=master
[build]: https://travis-ci.org/Mokkapps/scrum-daily-standup-picker.svg?branch=master
[release-badge]: https://img.shields.io/github/downloads/Mokkapps/scrum-daily-standup-picker/latest/total.svg
[release]: https://github.com/Mokkapps/scrum-daily-standup-picker
[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
[prs]: http://makeapullrequest.com
[coverage-badge]: https://coveralls.io/repos/github/Mokkapps/scrum-daily-standup-picker/badge.svg?branch=master
[coverage]: https://coveralls.io/github/Mokkapps/scrum-daily-standup-picker?branch=master

repository: elychr/scrum-daily-standup-picker

repo_name: elychr/scrum-daily-standup-picker


text:
Unexpected svgEditor.ready doesn't exist when load svg-editor from parent using iframe

Situation: You have a web page where you use an iframe to load svg-edit. Since the jQuery ready function does not wait for all JavaScript to load, you may get some unexpected behavior, such as svgEditor.ready not existing. You may thus need to catch this exception and wait a little longer to try again:

svg_frame is the id for the svg-editor iframe

``` $('#svg_frame').ready(function() {

var ifrm = $('#svg_frame')[0];

// waiting for real load
(function(){
            try {
                ifrm.contentWindow.svgEditor.ready(function() { editor_ready();});
            }
            catch (Ex){
                setTimeout(arguments.callee, 1000);
            }
        })();

}) ```

repository: SVG-Edit/svgedit

repo_name: SVG-Edit/svgedit


text:
4.0.0 / 2017-07-12
------------------

- **BREAKING:** Remove global `spaces` option.
- **BREAKING:** Drop support for Node 0.10, 0.12, and io.js.
- Remove undocumented `passParsingErrors` option.
- Added `EOL` override option to `writeFile` when using `spaces`. [#89]

3.0.1 / 2017-07-05
------------------

- Fixed bug in `writeFile` when there was a serialization error & no callback was passed. In previous versions, an empty file would be written; now no file is written.

3.0.0 / 2017-04-25
------------------

- Changed behavior of `throws` option for `readFileSync`; now does not throw filesystem errors when `throws` is `false`

2.4.0 / 2016-09-15
------------------
### Changed
- added optional support for `graceful-fs` [#62]

2.3.1 / 2016-05-13
------------------
- fix to support BOM. [#45][#45]

2.3.0 / 2016-04-16
------------------
- add `throws` to `readFile()`. See [#39][#39]
- add support for any arbitrary `fs` module. Useful with [mock-fs](https://www.npmjs.com/package/mock-fs)

2.2.3 / 2015-10-14
------------------
- include file name in parse error. See: https://github.com/jprichardson/node-jsonfile/pull/34

2.2.2 / 2015-09-16
------------------
- split out tests into separate files
- fixed `throws` when set to `true` in `readFileSync()`. See: https://github.com/jprichardson/node-jsonfile/pull/33

2.2.1 / 2015-06-25
------------------
- fixed regression when passing in string as encoding for options in `writeFile()` and `writeFileSync()`. See: https://github.com/jprichardson/node-jsonfile/issues/28

2.2.0 / 2015-06-25
------------------
- added `options.spaces` to `writeFile()` and `writeFileSync()`

2.1.2 / 2015-06-22
------------------
- fixed if passed `readFileSync(file, 'utf8')`. See: https://github.com/jprichardson/node-jsonfile/issues/25

2.1.1 / 2015-06-19
------------------
- fixed regressions if `null` is passed for options. See: https://github.com/jprichardson/node-jsonfile/issues/24

2.1.0 / 2015-06-19
------------------
- cleanup: JavaScript Standard Style, rename files, dropped terst for assert
- methods now support JSON revivers/replacers

2.0.1 / 2015-05-24
------------------
- update license attribute https://github.com/jprichardson/node-jsonfile/pull/21

2.0.0 / 2014-07-28
------------------
* added `\n` to end of file on write. [#14](https://github.com/jprichardson/node-jsonfile/pull/14)
* added `options.throws` to `readFileSync()`
* dropped support for Node v0.8

1.2.0 / 2014-06-29
------------------
* removed semicolons
* bugfix: passed `options` to `fs.readFile` and `fs.readFileSync`. This technically changes behavior, but
changes it according to docs. [#12][#12]

1.1.1 / 2013-11-11
------------------
* fixed catching of callback bug (ffissore / #5)

1.1.0 / 2013-10-11
------------------
* added `options` param to methods, (seanodell / #4)

1.0.1 / 2013-09-05
------------------
* removed `homepage` field from package.json to remove NPM warning

1.0.0 / 2013-06-28
------------------
* added `.npmignore`, #1
* changed spacing default from `4` to `2` to follow Node conventions

0.0.1 / 2012-09-10
------------------
* Initial release.

[#89]: https://github.com/jprichardson/node-jsonfile/pull/89
[#45]: https://github.com/jprichardson/node-jsonfile/issues/45    "Reading of UTF8-encoded (w/ BOM) files fails"
[#44]: https://github.com/jprichardson/node-jsonfile/issues/44    "Extra characters in written file"
[#43]: https://github.com/jprichardson/node-jsonfile/issues/43    "Prettyfy json when written to file"
[#42]: https://github.com/jprichardson/node-jsonfile/pull/42      "Moved fs.readFileSy