text:
[![endorse](https://api.coderwall.com/jaymc/endorsecount.png)](https://coderwall.com/jaymc)
# Intro
This package adds simple chat features.
- create a chatroom
- select a chatroom
- send a message in a chat room
- view users in room
- message typing status

# Installation

meteor add jaymc:chat

# Usage
Use the follow templates

List all chatrooms
```
{{> rooms}}
```

Display the currently selected chatroom with messages and send message dialog
```
{{> room}}
```

Create a new chatroom
```
{{> newRoom}}
```

Management tasks
```
{{> chatManagement}}
```

# Options
```
chat = {
	css: {	//defaulted for Bootstrap 3.0 but you can set your own classes here
		msgs: 'well chatMsgBox msgs',
		joinedList: 'well joined-users',

		btn: 'btn btn-default',
		btnPrimary: 'btn btn-primary',
		btnDanger: 'btn btn-danger',
		btnDropdown: 'btn btn-info',

		input: 'form-control',
		inputGroup: 'input-group',
		btnGroup: 'input-group-btn',

		eachRoomName: '',

		eachMessage: '',
		eachMessageDate: 'msg-date',
		eachMessageUsername: 'msg-name',
		eachMessageAnonUsername: 'msg-name',
		eachMessageli: 'msg-li',
		eachMember: 'member-li'
	},
	options: {
		startingRoom_id: '', //default starting chatroom, this can be handy if you only want a single chatroom and not use the newRoom template
		allowAnon: true //first it tries to get the logged in user, if that fails they can either send as anonymous or be denied
		chatContainer_id: 'chatMsgBox' //where you messages are displayed in a scrollable chat window. Used for auto scrolling down after a message is sent.
		changeNamePastMessages: true, //if a user changes her username, update username for all past messages sent by this user
		debounceDelay: 400 //adjust the debonuce on new message typing. Lower value will be more responsive to key presses but with the down side of query the database more frequently.
		statuses: ['typing','deleting', 'na', 'away', 'online', 'offline'] //valid user status that are allowed to be displayed
	}
}
```

# User accounts
If you're not using Meteors accounts package. All users will be treated as anonymous by receiving a random username and id which is not persistant after they revist.
If Meteors accounts package is used. The users id and username will be respected and used for all actions.

To get going with Meteors accounts package make sure you utilise username:
```
meteor add accounts-ui accounts-password

Accounts.ui.config({
  passwordSignupFields: "USERNAME_ONLY"
});
```

# Additional info
- A session holds the currently select chatroom. Only one chatroom at a time can be selected.
- Will use Meteor accounts if added, sending a chat message will check for userId and failing that if anonymous users can send messages.
- Uses reactive-var between template.helpers and events.
- Two Collections are utilised: chatRooms and chatMessages.

# TODO
- message text colours
- emojis?
- notify sound
- somesort of moderating
- bad word filter?


text:
# [\#Liberator12k Manual](index.html)
## [Liberator12k.com](https://Liberator12k.com)

[About the Project](About.html)

[Developers / Advanced Users](Developers.html)

## Configurations
 * [Top Break](Receiver/Forend/TopBreak.html)
   * [CAFE12](Receiver/Forend/TopBreak_CAFE12.html)
   * [FP37](Receiver/Forend/TopBreak_FP37.html)
 * [Revolver](Receiver/Forend/Revolver.html)
   * [ZZR 6x12](Receiver/Forend/Revolver_ZZR612.html)
 * Built with AR15 Parts
   * [BARBB](Receiver/BARBB/BARBB.html)

### Common Components
 * [Receiver](Receiver/Receiver.html)
 * [Frame](Receiver/Frame.html) (A bigger receiver)
 * [Lower](Receiver/Lower/Lower.html)
 * [LowerMount](Receiver/Lower/LowerMount.html)
 * [Trigger](Receiver/Lower/Trigger.html)
 * [Stock](Receiver/Stock.html)
 * [Fire Control Group](Receiver/FCG.html)

## Tooling

## Safety
DANGER - AT YOUR OWN RISK

Safety precautions and procedures *are not fully documented here*. Before you shoot any DIY gun from your hands **test it first**.

* Use a secure test rig to hold the gun pointed in a **safe direction**.
* Stand behind a bulletproof barrier, such as several feet of dirt, concrete blocks, or very large tree.
* Ensure there is no direct path from the gun to anyone or anything of value.
* A string long enough to pull the trigger from behind cover.
* Test with at least 5 of the highest pressure cartridges you can find.

## Unlicense
This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.

In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.

IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

For more information, please refer to [unlicense.org](http://unlicense.org/)

license: Unlicense

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
## Description

Verify image attestations with the given predicateType and attestors. The image has multiple signatures for different predicateTypes.

## Expected Behavior

Given the defined predicateType, the matching attestor entries must greater than or equal to the count specified in the rule. This test has one valid attestor so the pod creation should be allowed.

## Reference Issue(s)

https://github.com/kyverno/kyverno/issues/4847

repository: kyverno/kyverno

branch_name: refs/heads/main

gha_language: Go

repo_name: kyverno/kyverno


text:
# rpure

> a simple prompt inspired by [pure](https://github.com/sindresorhus/pure)

![rpure.png](https://github.com/kascote/rpure/raw/master/screenshot.png)

`rpure` is based on code from ![pista](https://github.com/nerdypepper/pista).
Why? Started as a Rust learning project.

### features

 - shortened current working directory
 - git info (branch/commit, ahead/behind status, repo status)
 - superuser indicator
 - fully configurable

### Readline

The symbol (●) at the beginning of the 2nd line is the Readline vim state.
To setup it, need to put this lines on the file `.inputrc` on the home directory:

```
set show-mode-in-prompt on
set vi-cmd-mode-string "⊙"
set vi-ins-mode-string "●"
```

for more information check the [Readline init file syntax](https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html#Readline-Init-File-Syntax)

license: MIT

repository: kascote/rpure

repo_name: kascote/rpure


text:
# Chunk visualizer

This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app)
and it basically connects to a [hasura](http://hasura.io) graphql api to visualize [hypertable chunks](https://tsdb.co/hasuracon-hypertables-docs) of a [TimescaleDB](https://timescale.com) instance. If you don't have an instance, you can get a free one [here](https://tsdb.co/hasuracon-signup).

[Hypertables](https://tsdb.co/hasuracon-hypertables-docs) are an abstract table representation that empowers timeseries storage for postgresql databases. The yellow circles represents the compressed data and the dark represents the uncompressed.

The idea here is collect this metadata from the "chunks" that are like subtables of the hypertables.

Here is a simple view with the chunks information aggregating data from different sources:

```sql
CREATE OR REPLACE VIEW chunks_with_compression AS
SELECT DISTINCT ch.chunk_name,
                ccs.chunk_schema,
                ch.hypertable_schema,
                ch.hypertable_name,
                ch.range_start,
                ch.range_end,
                COALESCE(ccs.before_compression_total_bytes, NULL, cds.total_bytes) AS before_compression_total_bytes,
                ccs.after_compression_total_bytes
FROM (
 SELECT hypertable_schema,
    hypertable_name,
    chunk_name,
    range_start,
    range_end
 FROM  timescaledb_information.chunks) AS ch
LEFT OUTER JOIN LATERAL chunk_compression_stats(ch.hypertable_name::regclass) ccs
ON              ch.chunk_name = ccs.chunk_name
LEFT OUTER JOIN LATERAL chunks_detailed_size(ch.hypertable_name::regclass) cds
ON              ccs.chunk_schema = cds.chunk_schema
AND             ch.chunk_name = cds.chunk_name;
```

With this query, you can get all details about chunk size and what limits they
cover in the data that is inside the database.

## A minimum hypertable example:

If you don't have a database do test, here is a minimal example to have some
data and test how it goes.

In this example, we're creating a table `conditions` that belongs to some
`device` and output some `temperature` to a given `time`.

```sql
CREATE TABLE conditions (
      time TIMESTAMPTZ NOT NULL,
      device INTEGER NOT NULL,
      temperature FLOAT NOT NULL,
      PRIMARY KEY(time, device)
);
SELECT * FROM create_hypertable('conditions', 'time', 'device', 3);

INSERT INTO conditions
SELECT time, (random()*30)::int, random()*80 - 40
FROM generate_series(TIMESTAMP '2020-01-01 00:00:00',
                 TIMESTAMP '2020-01-01 00:00:00' + INTERVAL '1 month',
             INTERVAL '1 min') AS time;
```

By default, we're inserting a month for testing purposes, but you can get deep
adding more data in the sequence.

You can try the following query to append 6 months of data right one week after the
previous data was added.

```sql
INSERT INTO conditions WITH latest AS ( SELECT time FROM conditions ORDER BY time DESC LIMIT 1 )
SELECT generate_series(latest.time + INTERVAL '1 week', latest.time + INTERVAL '6 month', INTERVAL '1 min') AS time,
(random()*30)::int as device, random()*80 - 40 AS temperature from latest;
```

The insert will append new data with one week interval to guarantee we don't
touch any previous chunk but creates new ones. It keeps inserting around 40k records
per month.

### Testing the compression

Now it comes the cool part, let's add a compression policy to automatically use
the `device` column as our main segment.

```sql
ALTER TABLE conditions SET (
  timescaledb.compress,
  timescaledb.compress_segmentby = 'device'
);
```

And then we can also set how many days after the record is inserted we want to
automatically compress:

```sql
SELECT add_compression_policy('conditions', INTERVAL '7 days');
```

So, it means that 7 days after the `time` of the insertion, it will compress the
data.

Checking old chunks that are good candidates to compress:

```sql
SELECT show_chunks('conditions', older_than => INTERVAL '3 days');
```

You can decompress manually a chunk with the following command:

```sql
SELECT decompress_chunk_named(chunk_name::varchar)
FROM timescaledb_information.chunks WHERE is_compressed limit 1;
```

# GraphQL Mutations

On GraphQL, the convention for operations that is writing data is use mutations.

We need to map those mutations for compress and decompress a chunk. To
accomplish that, we need to take a look on how hasura types works.

## Hasura types

Hasura can use some custom types that comes from table structures.

I couldn't find a simple way to wrap this without using a table, so, I'll easily
get the structure of the table calling the function with limit 0:

## Compress chunk mutation

```sql
CREATE TABLE compressed_chunk AS
SELECT compress_chunk((c.chunk_schema ||'.' ||c.chunk_name)::regclass)
FROM   timescaledb_information.chunks c
WHERE  NOT c.is_compressed limit 0;
```

Hasura needs some function to be tracked as mutation. In this case, let's create the function to just rewrap the default `compress_chunk` from timescale extension.

Now, we can return the "compressed_chunk" in our function that will compress the chunk:

```sql
CREATE OR REPLACE FUNCTION compress_chunk_named(varchar) returns setof compressed_chunk AS $$
  SELECT compress_chunk((c.chunk_schema ||'.' ||$1)::regclass)
  FROM   timescaledb_information.chunks c
  WHERE  NOT c.is_compressed
  AND    c.chunk_name = $1 limit 1
$$ LANGUAGE SQL VOLATILE;
```

> Note that the function add an extra where clause to not compress what is already compressed.

## Decompress chunk mutation

We'll need a similar function for the decompression:

```sql
CREATE OR replace FUNCTION decompress_chunk_named(varchar) returns setof compressed_chunk AS $$
  SELECT decompress_chunk((c.chunk_schema ||'.' ||$1)::regclass)
  FROM   timescaledb_information.chunks c
  WHERE  c.is_compressed
  AND    c.chunk_name = $1 limit 1
$$ LANGUAGE SQL VOLATILE;
```

Now, the next step is jump into hasura cloud and connect the database as a new
data source.

In the data panel, after setting up the postgresql URI of you database, you can
easily track each function as a query or mutation. Here is an example of `compress_chunk_named` function:

In our case, the subscription goes to the `chunks_with_compression` and here is what it looks like:

You should also track `decompress_chunk_named` and `compress_chunk_named` as GQL mutations with a single argument.

## Setup application

Create a `.env` file with your hasura key:

```bash
HASURA_ADMIN_SECRET=...
HASURA_URI=wss://<your-project>.hasura.app/v1/graphql
```

Install all dependencies before run the project:

```bash
yarn install
```

## Exploring the React Components

This app was built with `create-react-app` and this is the most easy way to
setup the app.

The third party libraries added was only:

1. [Apollo][apollo-react] to get a websocket client.
2. [Timescale Styles][timescale-styles] to get some default styles from Timescale branding.

### Setting up ApolloClient connection

The first step is get the Apollo client up and connecting to the Hasura cloud.

> Note that you should have the `.env` file properly configured to make it work.

```javascript
const createApolloClient = () => {
  return new ApolloClient({
    link: new WebSocketLink({
      uri: process.env.HASURA_URI,
      options: {
        reconnect: true,
        connectionParams: {
          headers: {
            'x-hasura-admin-secret':
              process.env.HASURA_ADMIN_SECRET,
          },
        },
      },
    }),
    cache: new InMemoryCache(),
  });
};
```

In the main `App` we have:

```javascript
function App() {
  const client = createApolloClient();

  return (
    <ApolloProvider client={client} className="App">
      <Subscription />
    </ApolloProvider>
  );
}

export default App;
```

Note that we have a `Subscription` component, that is where we subscribe to our
`chunks_with_compression` view that we mapped as a resource on Hasura Cloud.

```javascript
const Subscription = () => {
  const { data } = useSubscription(
    gql`
      subscription Chunks {
        chunks_with_compression {
          hypertable_name
          chunk_name
          range_start
          range_end
          before_compression_total_bytes
          after_compression_total_bytes
        }
      }
    `
  );
}
```

We need to have some state to control when we receive the chunks. React uses
states to pass information between components and if any data changes, it will
automatically refresh the components through `useEffect` hook.

```javascript
  const [chunks, setChunks] = useState([]);

  useEffect(() => {
    if (data && data.chunks_with_compression) {
      setChunks(data.chunks_with_compression);
    }
  }, [data]);

  return (<svg id="chunks" width="90vw" height="75vh" fill="none"
            className="ts-compression__inner__chunks__cards-wrapper"
            xmlns="http://www.w3.org/2000/svg"
          >
            {chunks.length > 0 &&
              chunks
                .filter((chunk) => chunk.hypertable_name === 'conditions')
                .map((chunk, index) => (
                  <Chunk {...chunk} key={index} />
                ))}
          </svg>);
};

export default Subscription;
```

This is the minimal example and we evolved to exchange several states and
enhance with more functionalities.

In the `Chunk`, it's possible to build the logic of the component and think about
the compression visualization and how to explore it.

Here is a small example of what the final component returns:

```javascript
  return (
    <>
      <circle
        r={radioSize}
        cx={circlePosition.cx}
        cy={circlePosition.cy}
        strokeWidth="2"
        id={chunk_name}
        ref={ref}
        onClick={handleClick}
      />
    </>
  );
```

We have two main aspects of the chunk visualization, the position and the size.

Let's start with the size, that is defined by the `radioSize`. It will be a
state that will depend on the sum of all uncompressed data. By default we start
with 24 pixels.

The first think we need to get is some proportions of the screen. We created a
`spreadFactor` that can be defined as the square root of the size of the screen
divided by the total bytes uncompressed. We split this value by the number of
chunks to know the distance between them.

```javascript
  const [spreadFactor, setSpreadFactor] = useState(() => {
    if (typeof window !== undefined){
      const pixelsPerByte = (window.innerWidth * window.innerHeight) / totalBytesUncompressed;
      return Math.sqrt(pixelsPerByte) / totalChunks;
    }
  }
```

With spreadFactor in place, we can now think about how to size every circle. The
first thing is create a new state to set the radioSize.

```javascript
const [radioSize, setRadioSize] = useState(24);
```

The next step is create a new hook to resize it based in the total bytes.
When the `after_compression_total_bytes` is available, it will use this
as the size factor otherwise it gets from the compressed size.

```javascript
useEffect(() => {
  const calcRadioSize =
    setRadioSize(() => {
      if (after_compression_total_bytes)
        return after_compression_total_bytes * spreadFactor;
      return before_compression_total_bytes * spreadFactor;
    });
}, [isCompressed, biggestChunk]);
```

The objective is that the entire area represents the full area of the
uncompressed data. So, here is how we break down the formula for choosing the
proper position for X and Y and spread the circles in the screen.

We start our thought with getting the sense of a squared space. With squared
elements. So, given the total amount of chunks, we can square root it to get the
size of or circles matrix:

```javascript
const squaredTotalChunks = Math.sqrt(totalChunks);
```

The `svg` element has an `id` named `chunks` and we can use such info to get the
properties of the element in the screen and better distribute the circles.
We'll use independent factors for width and height.

Let's start with the simple one that is width:

```javascript
const circlePosition = document.getElementById('chunks').getBoundingClientRect();
const widthRatio = circlePosition.width / squaredTotalChunks;
```
As the height is smaller than the width, we need to compensate it to keep the
"square" proportion.

```javascript
const compensationRatio =  circlePosition.width / circlePosition.height;
const heightRatio = compensationRatio * (circlePosition.height / squaredTotalChunks);
```

The index refers to what chunk is iterating over loop, so, it will be used as a
step to get into a fair distribution of the space.

```javascript
const cx = (widthRatio * ((index+1) % squaredTotalChunks));
const cy = (heightRatio * ((index+1) / squaredTotalChunks));

setCirclePosition({ cx, cy});
```

Now, that you got an understanding of all steps to build the calculate the size,
let's wrap it into a function that can be used in the `useEffect` hook.

```javascript
const handleCirclePosition = () => {
  const squaredTotalChunks = Math.sqrt(totalChunks);

  const circlePosition = document.getElementById('chunks').getBoundingClientRect();

  const compensationRatio =  circlePosition.width  / circlePosition.height;
  const widthRatio = circlePosition.width / squaredTotalChunks;
  const heightRatio = compensationRatio * (circlePosition.height / squaredTotalChunks);

  const cx = (widthRatio * ((index+1) % squaredTotalChunks));
  const cy = (heightRatio * ((index+1) / squaredTotalChunks));

  setCirclePosition({ cx, cy});
};
```

Now, it's time to use the sizing function in the `useEffect` hook when it
starts.

```javascript
useEffect(handleCirclePosition, []);
```

When it finds a new biggest chunk or the chunk changes the state, we should also
recalculate it:

```javascript
useEffect(handleCirclePosition, [isCompressed, biggestChunk]);
```

### Chunk events

The next step is to map the events to interact with the chunk. When clicking in the chunk, we want to compress or decompress.
If we mouse over the circle, it should plot some card with the info.

#### Click in the chunk to compress/decompress

Now it’s time to interact with the chunk and check more details of the handleClick function. If the chunk is compressed we can decompress or make the inverse operation case it’s decompressed.

Let’s start by declaring the mutation to compress the chunk:

```javascript
const COMPRESS_CHUNK = gql`
  mutation ($chunk: String!) {
    compress_chunk_named(args: { arg_1: $chunk }) {
      compress_chunk
    }
  }
`;
```
As you can see, the mutation receives an argument that is the `chunk_name` from the context. Now we can create a similar structure to also decompress the chunk:

```javascript
const DECOMPRESS_CHUNK = gql`
  mutation ($chunk: String!) {
    decompress_chunk_named(args: { arg_1: $chunk }) {
      compress_chunk
    }
  }
`;
```

Depending the state of the chunk, we’re going to choose the operation to compress or decompress, so, our mutation will be initialized with the proper GraphQL statement:

```javascript
const [mutation] = useMutation( isCompressed ? DECOMPRESS_CHUNK : COMPRESS_CHUNK);
```

Then, when we handle the click, we just execute the mutation binding the actual chunk name in the context. In this case we’re suppressing the front end details that shows a modal when it’s compressing.

```javascript
const handleClick = () => { mutation( { variables: { chunk: chunk_name } }); };
```

#### Mouse over the chunk to see details

Apart from having the chunk available on the screen and clicking through the circles, we also want to get more information about the sizing if we mouse hover it. So, let’s create a React hook to change the hover state:

```javascript
import useHover from '../hooks/useOnHover';
```

Creating the hook to control the hovering state of each independent chunk.

```javascript
import { useState, useEffect, useRef } from 'react';
const useHover = () => {
  const ref = useRef();
  const [hovered, setHovered] = useState(false);
  const enter = () => setHovered(true);
  const leave = () => setHovered(false);
  useEffect(() => {
    const el = ref.current; // cache external ref value for cleanup use
    if (el) {
      el.addEventListener('mouseenter', enter);
      el.addEventListener('mouseover', enter);
      el.addEventListener('mouseleave', leave);
      return () => {
        el.removeEventListener('mouseenter', enter);
        el.removeEventListener('mouseover', enter);
        el.removeEventListener('mouseleave', leave);
      };
    }
  }, []);
  return [ref, hovered];
};
export default useHover;
```

And now we can just use it as a state for the actual Chunk component:

```javascript
const [ref, hovered] = useHover();
```

Now, the hovered variable changes the we can push a new state to handleCardInfo and useEffect to show the actual chunk information in the informative card:

```javascript
  useEffect(() => {
    if (hovered)
      return handleCardInfo({
        chunk_name,
        before_compression_total_bytes,
        after_compression_total_bytes,
        range_start,
        range_end,
        cardPosition,
      });
    return handleCardInfo({});
  }, [hovered]);
```

Keep in mind that the InformationCard is a simple component that receives the data via state and expose the values closer to the hovered element.

```javascript
const CardInfo = ({
  chunk_name,
  before_compression_total_bytes,
  after_compression_total_bytes,
  cardPosition,
}) => {
  const getCompressionRatio = (before, after) => {
    if (!after) {
      return 0;
    }
    return (before / after).toFixed(2);
  };

  const compressionRatio = getCompressionRatio(
    before_compression_total_bytes,
    after_compression_total_bytes
  );

  const { top, bottom, left, right } = cardPosition || {};

  return (
    <div
      className="ts-compression__inner__info"
      style={{
        position: 'fixed',
        top: `calc(${top}px - 20px)`,
        right: `calc(${right}px + 80px)`,
        left: `calc(${left}px + 80px)`,
        bottom: `calc(${bottom}px - 20px)`,
      }}
    >
      <div className="ts-compression__inner__info--content">
        <h4>{chunk_name}</h4>
        <h4>Before Compression</h4>
        <Count
          suffix=" bytes"
          start={before_compression_total_bytes}
          end={before_compression_total_bytes}
        />
        <h4>After Compression</h4>
        <Count
          suffix=" bytes"
          start={before_compression_total_bytes}
          end={after_compression_total_bytes || 0}
        />
        <Count
          prefix="Compression Ratio: "
          end={compressionRatio}
          decimals={2}
        />
      </div>
    </div>
  );
};

export default CardInfo;
```

Now, we can change the subscription to also include the CardInfo visible when the user is hovering a chunk:

```javascript
<div className={cardInfoClasses}>
   <CardInfo {...cardInfo} />
</div>
```

And the cardInfoClasses can be toggling the CSS class names that controls if the card is showing up or not. If the cardInfo is an empty object it means nobody is hovering over it.

```javascript
const cardInfoClasses = classNames({
  'active':  Object.keys(cardInfo).length > 0,
});
```

## Available Scripts

In the project directory, you can run:

### `yarn start`

Runs the app in the development mode.\
Open [http://localhost:3000](http://localhost:3000) to view it in the browser.

The page will reload if you make edits.\
You will also see any lint errors in the console.

### `yarn test`

Launches the test runner in the interactive watch mode.\
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.

### `yarn build`

Builds the app for production to the `build` folder.\
It correctly bundles React in production mode and optimizes the build for the best performance.

The build is minified and the filenames include the hashes.\
Your app is ready to be deployed!

See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.

## Learn More

You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).

To learn React, check out the [React documentation](https://reactjs.org/).

[apollo-react]: https://www.apollographql.com/docs/react/

repository: timescale/examples

gha_language: JavaScript

repo_name: timescale/examples


text:
---
title: Post 251
date: 1970-01-01
categories:
- seisbiv
tags:
- totewe
- semi
- arani
- larru
- sovot
---

Gu tudwaog butugja vagkergi ugu iroep larki eduugo veno kivbov mupajbek lujbo facuz et wetlew. Nij fepmi itpih ubiwesket wiemiuhi gunihfub pesi rocamahe aroma fugwaure hibo cunit je rudigeah wasig dugmad pumep ku. Bugaz hufo di nipifzep ickekte ugmu ikjot ci ipojo kucasuf nidik noabbi jafofga.

## H2

1. First ordered list item
2. Another item
  * Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
  1. Ordered sub-list
4. And another item.

   You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

   To have a line break without a paragraph, you will need to use two trailing spaces.
   Note that this line is separate, but within the same paragraph.
   (This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)

### H3

[I'm an inline-style link](https://www.google.com)

###### H6

[I'm an inline-style link with title](https://www.google.com "Google's Homepage")

Alt-H1
======

[I'm a reference-style link][Arbitrary case-insensitive reference text]

Alt-H2
------

[I'm a relative reference to a repository file](../blob/master/LICENSE)

#### H4

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned |  |
| col 2 is      | centered      |    |
| zebra stripes | are neat      |     |

# H1

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3

Liktuah refib suavi az kutorac zi gozvogo gi vi kimow sewilooda zetunutak watak tepasut wipte ci miv. Asu wu zunnocepu joub monenav fokda wukco hab odkufor sanzi foj fetrued akbuew soroh cokuk gujtu. Hoheca nege ze tokujoj vu luen in mu joh ijofadfoh aku tac itu dapavebeg medbub rubdu. Bovof ko pu tum kiah eri dizawmaz ib guchowap giwpewa zufof deca agzuas. Adisug ipped tirliz tiwepe ditawul rermuh zoluncag sagiso noruta pijma cadadik panajzu im. Nezahuno ikuzomid pewka bivnehfi veh tigi hilvo jorcili su ros sivfugar towpus ja sa fo tu. Vow himbegos nojvi hediw ifsa ladaco ije jinfoecu navid sit sarpufur lucvob izi wawsisroj ab dahjatrub bonoz hujijiz.

## H2

1. First ordered list item
2. Another item
  * Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
  1. Ordered sub-list
4. And another item.

   You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

   To have a line break without a paragraph, you will need to use two trailing spaces.
   Note that this line is separate, but within the same paragraph.
   (This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)

### H3

[I'm an inline-style link](https://www.google.com)

###### H6

[I'm an inline-style link with title](https://www.google.com "Google's Homepage")

Alt-H1
======

[I'm a reference-style link][Arbitrary case-insensitive reference text]

Alt-H2
------

[I'm a relative reference to a repository file](../blob/master/LICENSE)

#### H4

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned |  |
| col 2 is      | centered      |    |
| zebra stripes | are neat      |     |

# H1

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3

Cotwaffoh orozesik kedudec luas dekuc awujo cik tapmadaz vum tinbelzi begodsu hev tada. Imajidle ufebedti wejlac cemvatah jo zah ugaaza guemo jap led fevif zuzamrow hi. Hewteb nulima facak es gamo ce tavewes luavera ru jawo nowrin utu wermom zolojaj wahufez. Fec oroko segpa agta pu revwefro pajdor bu vunigi asubablug pur jarow ganide. Gowar dojim cuh awijocuz fiti hat denhaf nakrecfa zuekkof ju silku wikdipeb zebdah to koar tig jigfa wi. Fog bacuw vinefgod azo gutfizu tej oherojmel gawkij zappeb hutul hek mesata guvup ow cufi ilelanu hagwonat bevva.

## H2

1. First ordered list item
2. Another item
  * Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
  1. Ordered sub-list
4. And another item.

   You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

   To have a line break without a paragraph, you will need to use two trailing spaces.
   Note that this line is separate, but within the same paragraph.
   (This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)

### H3

[I'm an inline-style link](https://www.google.com)

###### H6

[I'm an inline-style link with title](https://www.google.com "Google's Homepage")

Alt-H1
======

[I'm a reference-style link][Arbitrary case-insensitive reference text]

Alt-H2
------

[I'm a relative reference to a repository file](../blob/master/LICENSE)

#### H4

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned |  |
| col 2 is      | centered      |    |
| zebra stripes | are neat      |     |

# H1

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3

Pouho repfo bisigso ilheteh sekas gozduhdi oweled bedugra guwufeh doar onaru padpil zuh co pefi hu caaba. It osovu pono jel emcejba tibboj va hualo vi fol ocomatdod bib niv cos ruwhofic. Zo lubruup jijpug nulot ibemwoj edoohju penmotfak dejut run bos mijo tolfav nujpeb he izomer lidduwop.

## H2

1. First ordered list item
2. Another item
  * Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
  1. Ordered sub-list
4. And another item.

   You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

   To have a line break without a paragraph, you will need to use two trailing spaces.
   Note that this line is separate, but within the same paragraph.
   (This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)

### H3

[I'm an inline-style link](https://www.google.com)

###### H6

[I'm an inline-style link with title](https://www.google.com "Google's Homepage")

Alt-H1
======

[I'm a reference-style link][Arbitrary case-insensitive reference text]

Alt-H2
------

[I'm a relative reference to a repository file](../blob/master/LICENSE)

#### H4

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned |  |
| col 2 is      | centered      |    |
| zebra stripes | are neat      |     |

# H1

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3

Ri ja ve hupbegceg tofufen eweewa gicjon vomodkuc gaji nodi zu fe vehug lokde. Dodhecod ti he moha fij vaz pemmiz fofkapda duh ar vih vo cim muwsik fizfosi abtumuha. Von ja te dal so hikbevpaz wicen ki ada juhizoze zekful deh nogfotmuv. Pi bosutum ihaum viuzagu momsu tem tujohiv bav ik tat zec savace zeetco ku kumi pohtonka. Cun hojvigruw subla we raw lememut veg ofag howvual has noebeco omibagopu.

## H2

1. First ordered list item
2. Another item
  * Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
  1. Ordered sub-list
4. And another item.

   You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

   To have a line break without a paragraph, you will need to use two trailing spaces.
   Note that this line is separate, but within the same paragraph.
   (This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)

### H3

[I'm an inline-style link](https://www.google.com)

###### H6

[I'm an inline-style link with title](https://www.google.com "Google's Homepage")

Alt-H1
======

[I'm a reference-style link][Arbitrary case-insensitive reference text]

Alt-H2
------

[I'm a relative reference to a repository file](../blob/master/LICENSE)

#### H4

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned |  |
| col 2 is      | centered      |    |
| zebra stripes | are neat      |     |

# H1

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3

Ri wildigat cakpokad ponure sewlil longub natavo fid epa ciwozale ahgead vip cisze uje gasicac uhikez. Vid opa er cidgic kasolo gu fan cer fi nor ocazu gahiwhu jibbusso kinid usiesieb wewsopa. Moila me ci wawel de dap icfahseb padgol pet cub bojin birava dedoc. Rohu nu ac vigbo mafik uzautuib amulapim juwmu ono riejefa res fohrifkis ledi vukejon fikviol torbahuzo zigno.

## H2

1. First ordered list item
2. Another item
  * Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
  1. Ordered sub-list
4. And another item.

   You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

   To have a line break without a paragraph, you will need to use two trailing spaces.
   Note that this line is separate, but within the same paragraph.
   (This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)

### H3

[I'm an inline-style link](https://www.google.com)

###### H6

[I'm an inline-style link with title](https://www.google.com "Google's Homepage")

Alt-H1
======

[I'm a reference-style link][Arbitrary case-insensitive reference text]

Alt-H2
------

[I'm a relative reference to a repository file](../blob/master/LICENSE)

#### H4

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned |  |
| col 2 is      | centered      |    |
| zebra stripes | are neat      |     |

# H1

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3

Jaotul jehzowor fa ticehbuz ki ramov bab zu zoari ru cislar jauz zadgubfid. Asiloj fut ce abi fiirli fotmiz guswutuw bafarci cakbespug cilo sapsezsel mucmuk ba farovdo haru fa re je. Coz cid evoguvaj cut nojcaj rumcebfa ri puhog rek ozsehez doiva niz sabukan ni de eplin moubiwu tok.

## H2

1. First ordered list item
2. Another item
  * Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
  1. Ordered sub-list
4. And another item.

   You can have properly indented paragraphs within list items. Notice the blank line above, and the leading spaces (at least one, but we'll use three here to also align the raw Markdown).

   To have a line break without a paragraph, you will need to use two trailing spaces.
   Note that this line is separate, but within the same paragraph.
   (This is contrary to the typical GFM line break behaviour, where trailing spaces are not required.)

### H3

[I'm an inline-style link](https://www.google.com)

###### H6

[I'm an inline-style link with title](https://www.google.com "Google's Homepage")

Alt-H1
======

[I'm a reference-style link][Arbitrary case-insensitive reference text]

Alt-H2
------

[I'm a relative reference to a repository file](../blob/master/LICENSE)

#### H4

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned |  |
| col 2 is      | centered      |    |
| zebra stripes | are neat      |     |

# H1

Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3

Sa vazaj leumofor gapu enarusos nampiw mavol es if vizow em pidope no ew. Rejupgo uhjedho zadwisud no kesen fu sijhoj adobupef couwotah irini low kualivaz eva uthap ahfegles suguviwo wi guruge. Ve lu gedu cibe pandagcat so fak sa laknufba jajiblah vunug if tin bafji. Isa ma kenva bamora wunloplo iwecawzu jemid reg ga bido loete bicduj latav ta jesuj. Fis azomodbog ludpacpa famwegiw ziwhuj mohjogza labteil faegnup es we zi tife nu fekab zuj. Gol zakmun diapni newhec lavatgeh repkel borilu kamihuj wanodro civjiguv harju ja fiwuzbin fatuwid jopusje vizopdev rippubez. Kuflaba fepgorez vek suwakhiw vun ucvetfis mam hal kabive tocwuir pibiga nepe kiw opna daef.

``` plain
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
```

```rust
#[derive(Debug)]
pub enum State {
    Start,
    Transient,
    Closed,
}

impl From<&'a str> for State {
    fn from(s: &'a str) -> Self {
        match s {
            "start" => State::Start,
            "closed" => State::Closed,
            _ => unreachable!(),
        }
    }
}
```

```json
[
  {
    "title": "apples",
    "count": [12000, 20000],
    "description": {"text": "...", "sensitive": false}
  },
  {
    "title": "oranges",
    "count": [17500, null],
    "description": {"text": "...", "sensitive": false}
  }
]
```

```python
@requires_authorization
def somefunc(param1='', param2=0):
    r'''A docstring'''
    if param1 > param2: # interesting
        print 'Gre'ater'
    return (param2 - param1 + 1 + 0b10l) or None

class SomeClass:
    pass

>>> message = '''interpreter
... prompt'''
```

```html
<!DOCTYPE html>
<title>Title</title>

<style>body {width: 500px;}</style>

<script type="application/javascript">
  function $init() {return true;}
</script>

<body>
  <p checked class="title" id='title'>Title</p>
  <!-- here goes the rest of the page -->
</body>
```

```javascript
function $initHighlight(block, cls) {
  try {
    if (cls.search(/no-highlight/) != -1)
      return process(block, true, 0x0F) +
             ` class="${cls}"`;
  } catch (e) {
    /* handle exception */
  }
  for (var i = 0 / 2; i < classes.length; i++) {
    if (checkCondition(classes[i]) === undefined)
      console.log('undefined');
  }

  return (
    <div>
      <web-component>{block}</web-component>
    </div>
  )
}

export $initHighlight;
```

```cpp
#include <iostream>

int main(int argc, char *argv[]) {

  /* An annoying "Hello World" example */
  for (auto i = 0; i < 0xFFFF; i++)
    cout << "Hello, World!" << endl;

  char c = '
';
  unordered_map <string, vector<string> > m;
  m["key"] = "\\"; // this is an error

  return -2e3 + 12l;
}
```

```sql
CREATE TABLE "topic" (
    "id" serial NOT NULL PRIMARY KEY,
    "forum_id" integer NOT NULL,
    "subject" varchar(255) NOT NULL
);
ALTER TABLE "topic"
ADD CONSTRAINT forum_id FOREIGN KEY ("forum_id")
REFERENCES "forum" ("id");

-- Initials
insert into "topic" ("forum_id", "subject")
values (2, 'D''artagnian');
```

```objectivec
#import <UIKit/UIKit.h>
#import "Dependency.h"

@protocol WorldDataSource
@optional
- (NSString*)worldName;
@required
- (BOOL)allowsToLive;
@end

@property (nonatomic, readonly) NSString *title;
- (IBAction) show;
@end
```

```java
/**
 * @author John Smith<EMAIL_ADDRESS>*/
package l2f.gameserver.model;

public abstract class L2Char extends L2Object {
  public static final Short ERROR = 0x0001;

  public void moveTo(int x, int y, int z) {
    _ai = null;
    log("Should not be called");
    if (1 > 5) { // wtf!?
      return;
    }
  }
}
```

```swift
import Foundation

@objc class Person: Entity {
  var name: String!
  var age:  Int!

  init(name: String, age: Int) {
    /* /* ... */ */
  }

  // Return a descriptive string for this person
  func description(offset: Int = 0) -> String {
    return "(name) is (age + offset) years old"
  }
}
```

```css
@font-face {
  font-family: Chunkfive; src: url('Chunkfive.otf');
}

body, .usertext {
  color: #F0F0F0; background: #600;
  font-family: Chunkfive, sans;
}

@import url(print.css);
@media print {
  a[href^=http]::after {
    content: attr(href)
  }
}
```

```ruby
# The Greeter class
class Greeter
  def initialize(name)
    @name = name.capitalize
  end

  def salute
    puts "Hello #{@name}!"
  end
end

g = Greeter.new("world")
g.salute
```

```makefile
# Makefile

BUILDDIR      = _build
EXTRAS       ?= $(BUILDDIR)/extras

.PHONY: main clean

main:
	@echo "Building main facility..."
	build_main $(BUILDDIR)

clean:
	rm -rf $(BUILDDIR)/*
```

```go
package main

import "fmt"

func main() {
    ch := make(chan float64)
    ch <- 1.0e10    // magic number
    x, ok := <- ch
    defer fmt.Println(`exitting now`)
    go println(len("hello world!"))
    return
}
```

```bash
#!/bin/bash

###### CONFIG
ACCEPTED_HOSTS="/root/.hag_accepted.conf"
BE_VERBOSE=false

if [ "$UID" -ne 0 ]
then
  echo "Superuser rights required"
  exit 2
fi

genApacheConf(){
  echo -e "# Host ${HOME_DIR}$1/$2 :"
}
```

```ini
; boilerplate
[package]
name = "some_name"
authors = ["Author"]
description = "This is a description"

[[lib]]
name = ${NAME}
default = True
auto = no
counter = 1_000
```

repository: dailyrandomphoto/hexo-tests

repo_name: dailyrandomphoto/hexo-tests


text:
---
keywords:
- ISCP
- Smart Contracts
- blockchain
- parallel
- scaling
description: Smart contracts are applications you can trust that run on a distributed network with multiple validators all executing and validating the same code
image: /img/logo/WASP_logo_dark.png
---
# Smart Contracts

## What Are Smart Contracts?

Smart contracts are software applications that run on a distributed network with multiple validators executing and validating the same code. This ensures the application behaves as expected, and that there is no tampering in the execution of the program.

### Applications You Can Trust

As you can be certain that the code being executed is always the same (and will not change), this results in applications you can trust. This allows you to use smart contracts for applications where there was a trust issue. The rules of the smart contract define what the contract can and can not do, making it a decentralized and a predictable decision-maker.

Smart contracts are used for all kinds of purposes. A recurring reason to use a smart contract is to automate certain actions without needing a centralized entity to enforce this specific action. A good example of this is a smart contract that can exchange a certain amount of IOTA tokens for a certain amount of land ownership. The smart contract will accept both the IOTA tokens and the land ownership, and will predictably exchange them between both parties without the risk of one of the parties not delivering on their promise. **With a smart contract, code is law**.

### Scalable Smart Contracts

On a public blockchain, anyone willing to pay the fees for deploying a smart contract can deploy one. Once your smart contract has been deployed to the chain you no longer have the option to change it, and you can be assured that your smart contract application will be there as long as that blockchain exists. Smart contracts can communicate with one another, and you can invoke programmed public functions on a smart contract to trigger actions on a smart contract, or address the state of a smart contract.

Because smart contracts do not run on a single computer, but on many validators, a network of smart contracts can only process so many smart contracts at once, even if the software has been written optimally. This means smart contracts are expensive to execute, and do not scale well on a single blockchain, often resulting in congested networks and expensive fees for executing functions on smart contracts. **By allowing many blockchains executing smart contracts to run in parallel**, and communicate with one another, the **ISCP will solve this scalability problem.**


text:
rivotter - visualizes moar profiles
================================================================================

The [`moar-profiler`][moar-profiler] tool can be used to generate v8 cpu
profiles for Node.js applications, and adds even moar data to the cpu profile
than v8 generates.

The `rivotter` can be used to view those profiles.

![screen capture](docs/images/screen-cap.png)

Currently the view is implemented as a static web application, which can be
deployed anywhere a static web site can be deployed.  It's currently deployed
publicly at https://moar-things.github.io/rivotter/

Help is available within the application.

[moar-profiler]: https://github.com/moar-things/moar-profiler

license
================================================================================

This package is licensed under the MIT license.  See the
[LICENSE.md](LICENSE.md) file for more information.

contributing
================================================================================

Awesome!  We're happy that you want to contribute.

Please read the [CONTRIBUTING.md](CONTRIBUTING.md) file for more information.

repository: moar-things/rivotter

repo_name: moar-things/rivotter


text:
# romanian-holidays
This project is aimed at providing Romanian Holidays calendars for multiple devices.

# Romanian Public Holidays
There are 14 public holidays in 2018 in Romania:
* January, 1st (Monday) & 2nd (Tuesday) – New Year's Days
* January, 24th (Wednesday) – The Day of the Union of Romanian Principalities
* April, 8th (Sunday) & 9th (Monday) – Easter
* May, 1st (Tuesday) – Labor Day
* May, 27th (Sunday) & 28th (Monday) – Whitsuntide
* June, 1st (Friday) – Children's Day
* August, 15th (Wednesday) – Assumption of Mary
* November, 30th (Friday) – Saint Andrew's Day
* December, 1st (Saturday) – Great Union Day
* December, 25th (Tuesday) & 26th (Wednesday) – Christmas

# Calendars

## Romanian Holidays Apple Calendar (iOS, MacOS)
To add a dedicated "Romanian Holidays" calendar to your Apple device simply access the following link on your iOS or MacOS device. As GitHub does not allow link-ing webcal links, please be sure to copy and paste the following link in your browser's URL bar:

```
webcal://p43-calendars.icloud.com/published/2/XwhrNxYos-DmTa64WuGg6DnRtvgXIwTap9xSg68_RI_HCth7VtzwMjA9i42etRZkboLjaAeLT5_gupaxRzEgulEHL9_1jNLaYXncrToRft8
```

repository: gabigutu/romanian-holidays

repo_name: gabigutu/romanian-holidays


text:
# reception
single signon for multiple applications

## Availabililty
[![npm](https://push.rocks/assets/repo-button-npm.svg)](https://www.npmjs.com/package/reception)
[![git](https://push.rocks/assets/repo-button-git.svg)](https://GitLab.com/pushrocks/reception)
[![git](https://push.rocks/assets/repo-button-mirror.svg)](https://github.com/pushrocks/reception)
[![docs](https://push.rocks/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/reception/)

## Status for master
[![build status](https://GitLab.com/pushrocks/reception/badges/master/build.svg)](https://GitLab.com/pushrocks/reception/commits/master)
[![coverage report](https://GitLab.com/pushrocks/reception/badges/master/coverage.svg)](https://GitLab.com/pushrocks/reception/commits/master)
[![npm downloads per month](https://img.shields.io/npm/dm/reception.svg)](https://www.npmjs.com/package/reception)
[![Dependency Status](https://david-dm.org/pushrocks/reception.svg)](https://david-dm.org/pushrocks/reception)
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/reception/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/reception/master/dependencies/npm)
[![bitHound Code](https://www.bithound.io/github/pushrocks/reception/badges/code.svg)](https://www.bithound.io/github/pushrocks/reception)
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)

## What is the usecase for reception?

Wouldn't it be great to have one user database and to allow your users to gradually adopt more and more of your
dependent or independent apps? Then enter the world of reception. It is a service that manages user roles for you.

## Usage
Use TypeScript for best in class instellisense.

```javascript
import * as reception from reception

let myReception = reception.Reception({
    strategyData: {

    }
})

```

> MIT licensed | **©** 2016 - 2017 [Lossless GmbH](https://lossless.gmbh)

[![npm](https://push.rocks/assets/repo-header.svg)](https://push.rocks)

repository: pushrocks/reception

repo_name: pushrocks/reception


text:
# Starboard v2
This is version 2 of the starboard custom command. This package now consists of two custom commands, and a more elaborate setup is required. All features of the first version are also found in here.

## Features
All the starboard v1 features, plus the following:
- posts automatically removed when they fall below set star threshold or when number of anti-stars has been reached
- ability to ignore stars/ant-stars on old posts (server customizable)
- anti-star feature similar to an upvote/downvote system with customizable threshold for 'downvotes' before autodeleting (server customizable)
- ability to react directly on posts in your #starboard channel with either star or anti-star
  - accurate tracking between original post and starboard post
  - users are unable to duplicate stars/anti-stars between channels
 - reactions from the original message poster can be ignored (server customizable)
 - message warnings for attempts to duplicate stars/anti-stars and self stars (server customizable)

 ***NOTE: not all of these features will work on starboard messages created with the original starboard cc***

 ## Installing
 1. Add both custom commands to your server with trigger 'Reaction - Added + Removed reactions'
 2. starboard.go.tmpl **MUST** be set to **IGNORE* your starboard channel
 3. starboardListener.go.tmpl **MUST** be set to work **ONLY** in your starboard channel
 4. **user configured variables MUST be the same between both commands.** If you change something on one be sure to change it on the other
    - don't forget to configure your starboard channel ID and desired emojis for basic functions to work

You should not enable anti-stars if your community cannot be trusted to self moderate starboard posts. It should work great for some servers but could be a total disaster for others. Use your own best judgement regarding your community members.

 ## FAQ
### Why did I make this?
Starboards on Discord hold a special place in my heart and I wanted one with, what I perceive to be, the most important and valuable features. Every bot with a starboard seems to lack one feature or the other, never all of them. This is what I think is a complete starboard.

### Why is there no star leaderboard?
Personally, I don't like it. A starboard should be for funny or out of context comments, self-made memes, or similar. Having a leaderboard seems to encourage members to make low-effort, spammy, attention-seeking, or a combination of those for easy stars. To me, it should be organic, hence no leaderboard.

## **Known Issues**
None that I know of. I've done my best to squash all bugs I could find and fix any inconsistencies. I've tested a wide range of situations but surely not all,
if you have a problem I can be contacted on discord through the official YAG server at DV0RAK#0001.

## Acknowledgements
Thanks to Joe for creating the base code for this custom command which you can see in v1. Satty, as his giveaway command gave inspiration and assistance needed for some chunks in here.
A general thank you for all the people in the custom command help channel for answering some questions as well as the years-long backlog of messages I leeched off of.

repository: mrpenguin-real/yagpdb-cc

path: /fun/starboard v2/readme.md

repo_name: mrpenguin-real/yagpdb-cc


text:
### Consider to use $global:LastExitCode instead of $LastExitCode

Help *about_Automatic_Variables*:

    $LastExitCode
       Contains the exit code of the last Windows-based program that was run.

The typical use case, assuming 0 is for success:

````powershell
    <invoke a program>
    if ($LastExitCode -eq 0) {
        <success>
    }
    else {
        <failure>
    }
````

The above pattern has some vulnerability and may work incorrectly. It turns out
`<invoke a program>` sets the *global* automatic variable. Thus, ideally, exactly
the global variable should be checked, i.e. `$global:LastExitCode`. Otherwise,
if for some reason (mistake) a parent scope sets its own variable,
`$LastExitCode = <something>`, then this `<something>` will be returned
by `$LastExitCode` instead of the actual last exit code.

The script [Test-1.problem.ps1](Test-1.problem.ps1) shows the issue.

***

- [StackOverflow](http://stackoverflow.com/q/10943554/323582)

repository: PrateekKumarSingh/PowerShellTraps

repo_name: PrateekKumarSingh/PowerShellTraps


text:
---
layout: default
---

# 1993-11-30 - Re: Statistics of Low-Order Bits in Images

## Header Data

From<EMAIL_ADDRESS>(Paul Robichaux)

To<EMAIL_ADDRESS>(Jim choate)

Message Hash: 51e859f4221822e3aa95ee4704a2a515d159d593a260961e875bf1b589bb3299

Message ID<EMAIL_ADDRESS>Reply To: \<9311301953.AA26009@wixer\>

UTC Datetime: 1993-11-30 20:42:21 UTC

Raw Date: Tue, 30 Nov 93 12:42:21 PST

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Paul Robichaux)
Date: Tue, 30 Nov 93 12:42:21 PST
To<EMAIL_ADDRESS>(Jim choate)
Subject: Re: Statistics of Low-Order Bits in Images
In-Reply-To: <9311301953.AA26009@wixer>
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

-----BEGIN PGP SIGNED MESSAGE-----

> The real question is how do you generate keys?

You use a known source of material. For example, here's one way you
could easily distribute messages to a wide audience using
off-the-shelf tools.

1. Buy one of the many porno CD-ROMs. Pick one which is fairly
widespread and to which your source will also have access (i.e. if
you're in Denmark, don't choose a child porno CD to communicate with
someone in the US.) Of course, audio or other types of data CDs will
work here too.

2. Make _prearranged_ changes to your source file: convert JPEG->GIF,
or apply a Gaussian blur- whatever suits your fancy.

3. XOR in your message text.

4. Post to Usenet,  indicating the source of the materials (i.e. "This
picture came from `Girls of The Rural South, vol 1'" or "Audio sampled
from Michael Jackson's _Dangerous_")

Step 1 insures that your recipient will have access to the same source
material. Step 2 helps mask your message by introducing _other_
differences between the step 1 source and the transmitted message.
Step 4 gives you an easy, safe, distributed transmission medium.

Repeat as necessary.

- -Paul

- --
Paul Robichaux, KD4JZG      | "Violence on TV? Why can't it be on CSPAN?"
Intergraph Federal Systems  |     - Clayton Cramer<EMAIL_ADDRESS>Not speaking for Intergraph | Be a cryptography user. Ask me how.

-----BEGIN PGP SIGNATURE-----
Version: 2.3a

iQCVAgUBLPuvliA78To+806NAQHinwQAjYCOz85KnpG49G5wat6bUew1TQHVhB9B
YatgH2aBDhxADDNVB2f9V2ozs/t35grX3zkwKbB3yWcxAHjIoJg2vuKP8CrHrqZ9
Q7NJlbRUQczZLGoUi8S3jO35a6cyABDofTydmhsSj/Si6vgBRoit2reDA/Agkt3X
Y1r4Qv7Dbzs=
=8GwG
-----END PGP SIGNATURE-----

{% endraw %}
```

## Thread

+ Return to [November 1993](/archive/1993/11)
+ Return to [December 1993](/archive/1993/12)

+ Return to "[Anthony Garcia <agarcia@sugar.NeoSoft.COM>](/authors/anthony_garcia_agarcia_at_sugar_neosoft_com_)"
+ Return to<EMAIL_ADDRESS>(Eric Hughes)](/authors/hughes_at_ah_com_eric_hughes_)"
+ Return to "[Jim choate <ravage@wixer.bga.com>](/authors/jim_choate_ravage_at_wixer_bga_com_)"
+ Return to<EMAIL_ADDRESS>(Paul Robichaux)](/authors/paul_at_poboy_b17c_ingr_com_paul_robichaux_)"
+ Return to<EMAIL_ADDRESS>(Timothy C. May)](/authors/tcmay_at_netcom_com_timothy_c_may_)"
+ Return to "[Timothy Newsham <newsham@wiliki.eng.hawaii.edu>](/authors/timothy_newsham_newsham_at_wiliki_eng_hawaii_edu_)"

+ 1993-11-30 (Tue, 30 Nov 93 11:17:42 PST) - [Statistics of Low-Order Bits in Images](/archive/1993/11/1d1c25bd2742b4dcc89e485cfa0508842aca9af714b2a4b988704f37e086db18) -<EMAIL_ADDRESS>(Timothy C. May)_
  + 1993-11-30 (Tue, 30 Nov 93 12:07:43 PST) - [Re: Statistics of Low-Order Bits in Images](/archive/1993/11/257fb1d4e3192943c5660ddb96a9145ad58276ece5fa28c5a9a3d1f3ecb5caff) - _Jim choate<EMAIL_ADDRESS>    + 1993-11-30 (Tue, 30 Nov 93 12:37:49 PST) - [Re: Statistics of Low-Order Bits in Images](/archive/1993/11/1907aefb3df919e1e4f4fb26b3e015fc5ecd942f0dd3379349cf244d5d4aece5) -<EMAIL_ADDRESS>(Timothy C. May)_
      + 1993-11-30 (Tue, 30 Nov 93 14:42:17 PST) - [Re: Statistics of Low-Order Bits in Images](/archive/1993/11/bc1fbd7862437d8de1bcf56b4ba71b4421f0e7e218b29b2befbe6a4ef6c47cb9) - _Timothy Newsham<EMAIL_ADDRESS>        + 1993-11-30 (Tue, 30 Nov 93 15:32:51 PST) - [Statistics of Low-Order Bits in Images](/archive/1993/11/972a9a5a01f4c6234edc591cfa42b6c71f81111277a8b7384b3f72969f39144d) -<EMAIL_ADDRESS>(Eric Hughes)_
    + 1993-11-30 (Tue, 30 Nov 93 12:42:21 PST) - Re: Statistics of Low-Order Bits in Images -<EMAIL_ADDRESS>(Paul Robichaux)_
      + 1993-12-08 (Wed, 8 Dec 93 10:00:42 PST) - [Re: Statistics of Low-Order Bits in Images](/archive/1993/12/9e78d1cc4bd9e6bf4e387792cdf3b2100cab2d4e43cf1c9221c8b874d0774440) - _Anthony Garcia<EMAIL_ADDRESS>

gha_license_id: MIT


text:
<EMAIL_ADDRESS># LinuxFoundationX: LFS101x: Introduction to Linux ![Started Mar_23,_2017](https://img.shields.io/badge/Started-Mar_23,_2017-orange.svg)
[![forthebadge](http://forthebadge.com/images/badges/built-with-love.svg)](http://forthebadge.com)
[![forthebadge](http://forthebadge.com/images/badges/makes-people-smile.svg)](http://forthebadge.com)
[![forthebadge](http://forthebadge.com/images/badges/powered-by-responsibility.svg)](http://forthebadge.com)
[![forthebadge](http://forthebadge.com/images/badges/winter-is-coming.svg)](http://forthebadge.com)

![Type mooc](https://img.shields.io/badge/Type-mooc-blue.svg)
![Course Completed](https://img.shields.io/badge/Course-Completed-brightgreen.svg)
![mooc edX](https://img.shields.io/badge/mooc-edX-blue.svg)
![Institution LinuxFoundationX](https://img.shields.io/badge/Institution-LinuxFoundationX-red.svg)
![Level Introductory](https://img.shields.io/badge/Level-Introductory-yellow.svg)
![Subject Computer_Science](https://img.shields.io/badge/Subject-Computer_Science-FF69A4.svg)
![Age 17](https://img.shields.io/badge/Age-17-brightgreen.svg)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://github.com/0x48piraj/LinuxFoundationX-LFS101x-Introduction-to-Linux/blob/master/LICENSE)

> Welcome to LFS101x: Introduction to Linux (4th edition)

**Gist of this Course :**
> The goal of this course is to help you become familiar with the Linux operating system. It is designed to take you well beyond being a casual, personal user of Linux. You will start with the fundamentals and progress to explore the various tools and techniques commonly used by Linux users, programmers, and system administrators to do their day-to-day work.

<EMAIL_ADDRESS>
# A Quick Glance at [Course Syllabus](https://github.com/0x48piraj/LinuxFoundationX-LFS101x-Introduction-to-Linux/blob/master/syllabus.md) :

* **Philosophy and Concepts**
* **Basics**
* **Interface**
* **Applications & Command Line Operations - Processes, File, Text, Editors, Network, Printing, ...**
* **Linux Documentation**
* **Environment**
* **Security Principles**
* **Bash Shell Scripting I, II**
> A detailed :ledger: **Course Structure** can be found [Here!](https://github.com/0x48piraj/LinuxFoundationX-LFS101x-Introduction-to-Linux/blob/master/syllabus.md)

### Course Handouts :
> An "Outline of the Course" was given as a Course Handout.

* [View in Github!](https://github.com/0x48piraj/LinuxFoundationX-LFS101x-Introduction-to-Linux/blob/master/Course%20Handouts/LFS101x_-_Introduction_to_Linux_Outline.pdf)
* [Download!](https://github.com/0x48piraj/LinuxFoundationX-LFS101x-Introduction-to-Linux/raw/master/Course%20Handouts/LFS101x_-_Introduction_to_Linux_Outline.pdf)

# Graded Exams

*TO-DO :: Final Exam Answers*

# My Journey :relaxed:

---
*I will update my story soon !*

---

# Contribute ?
> Want to Contribute ? You're most Welcome! :wink:

*As we can see, it's a coursework.*

**But, You can still contribute :**

* By adding **references** (**books**, **pdf's**, **notes**, **lectures** or **anything** that will enrich the course experience.:blush:)
* **Typos's. Ofcourse.** (Yes!  And, the **Practice Problems** *(Or, I will add them! , **later**:stuck_out_tongue:)*

# < metadata >

`< meta name="author" content="0x48piraj" >`

`< meta name="description" content="Course:: LinuxFoundationX: LFS101x: Introduction to Linux" >`

`< meta name="keywords" content="mooc,edX,CS,Linux,Fun!" >`

`< meta name="Twitter" content="0x48piraj" >`

`< meta name="LinkedIn" content="0x48piraj" >`

[![LinkedIn](https://i.imgur.com/XEu2UHB.png)](https://www.linkedin.com/in/0x48piraj/)
[![Twitter](https://i.imgur.com/PZow4Us.png)](https://twitter.com/0x48piraj)

# License
**[BSD-3 License](https://opensource.org/licenses/BSD-3-Clause)**

# Copyright
**Copyright © 2017. [Piyush Raj](https://github.com/0x48piraj).**


text:
# Taskernet Collector

Collects public reddit posts and comments from the /r/tasker and /r/taskernet subreddits that have links to https://taskernet.com. Search for collected links at https://pghant.github.io/taskernet-collector or use the /u/taskernet-collector Reddit bot.

## Background

This project is in support of the users of the [Tasker application](https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm) for Android and the community at https://reddit.com/r/tasker. Users of Tasker are able to share programs they've built through the app through the first party Taskernet system. Using this project, users can more easily search Taskernet shares that were publicly posted on Reddit.

## Search website

You can search for Taskernet shares at https://pghant.github.io/taskernet-collector. This will give you all the matching results with more information than the Reddit bot which limits you to the top 5.

## How to use Reddit search bot

You can call /u/taskernet-collector in a Reddit comment to search for Taskernet shares as follows:

```
/u/taskernet-collector search "query"
```

The bot will respond to the comment with the top 5 results that match the query if any. The command must be formatted in precisely this way with the query enclosed in double quotes.

Alternatively, you can also private message the bot and it will reply to the PM. Here you would just omit the mention and just include the following in the message:

```
search "query"
```

The subject of the PM does not matter.

**The bot does not respond to Reddit chat messages**

See the [announcement post](https://www.reddit.com/r/tasker/comments/gic906/introducing_utaskernetcollector_a_bot_that_will/) for more information.

## Privacy and Security

Taskernet collector only collects publicly posted Taskernet shares on the /r/tasker and /r/taskernet communities. It does not have access to Taskernet shares that were created and not shared on Reddit. If you do not want your Taskernet share to be collected by the bot for any reason, you can add the text `[no-collect]` anywhere in the share description.

Tasker is a powerful application with a lot of access to private data on your phone. It is important that users of Taskernet Collector **always** check the description of a share before importing, and do not enable anything without understanding what it does. Taskernet collector does not do any verification of shares it collects, and users are responsible for making sure anything they find through this project is safe to use.

## Environment setup

This project uses a search database on [Algolia](https://www.algolia.com). An Algolia account needs to be created before it can be run. The Python scripts rely on environment variables to be set for the Algolia API.

Reddit API methods are through the [PRAW](https://github.com/praw-dev/praw) library. The scripts depend on a [praw.ini](https://praw.readthedocs.io/en/latest/getting_started/configuration/prawini.html) file in order to initialize PRAW.

## Running the bot

The bot has three Python scripts that are always running:

* `posts_bot.py`
* `comments_bot.py`
* `searcher_bot.py`

The first two are responsible for getting every new post and comment on the monitored subreddits and uploading any Taskernet shares to the database. The third gets new messages that the bot recieves through user mentions and private messages and responds to search requests.

repository: synckl/taskernet-collector

repo_name: synckl/taskernet-collector


text:
Mixins and Decorators
=======================

Mixins (or Decorators as we write them) are used to provide common lifecycle based functionality to components. They allow for DRY patterns to be used without care about the purpose of a component's purpose. ReactMixin is a great tool for creating and implementing mixins.

### Common Mixins
- [@connect](./../redux/README.md)
- [ReactMeteorData](./reactivity.md)
- [Paginate](./reactivity.md) // coming soon

## Anatomy of a mixin

Mixins can vary in function but they tend to have a few things in common. First, they are setup / instantiated using `componentWillMount`. They setup actions that can be canceled / garbage collected which are configured to be removed in `componentWillUnmount`. Aside from that, they can specify their own methods, require methods on a component, (like ReactMeteorData), or even require `refs` to be added.

More to come...

repository: alexofob/Apollos

repo_name: alexofob/Apollos


text:
# Bulkit 5.0.0 | Landing pages SaaS Kit

### Note

Changes should be commited to `src/` files only.

### How to use

The template is built with Sass and Gulp build system with these features:

- Handlebars HTML templates with Panini– Panini is a super simple flat file generator for use with Gulp. It compiles a series of HTML pages using a common layout. These pages can also include HTML partials, external Handlebars helpers, or external data as JSON.
- Sass compilation, prefixing with Autoprefixer, and JavaScript concatenation
- Built-in BrowserSync server - Will automatically reload your page when files are changed. It also live-injects CSS changes when you save a Sass file. This task runs continuously. Defaults to localhost.
- For production builds - CSS compression, JavaScript compression, Image compression and more..

### Requirements

To use this template, your computer needs:

- Node.js is used to run the build processes. https://nodejs.org/en/download/
- Test: run `node -v` in the terminal
- Npm (Node comes with npm installed so you should have a version of npm.) Used to manage development dependencies.
- Test: run ` npm -v` in the terminal
- Gulp – task runner
  `npm install -g gulp`
- Test: run `gulp -v ` in the terminal

### Installing:

- Install all node packages: `npm install`
- Run `gulp dev`
- Your site is now viewable at this URL: http://localhost:3000

### Folder Structure:

- `dist/` - compiled distribution files
- `node_modules` - front-end dependencies
- `src/` - contains all of your core, working files—static assets, pages, templates, etc
- `src/assets/` - scss files, JS files, images, and fonts are here
- `src/data/` - external data
- `src/layouts/` - HTML layouts templates
- `src/pages/` - site pages
- `src/partials/` - handlebars partials files.
- `gulpfile.js` - all task definitions
- `package.json` - handles the front-end dependencies
- `.htmllintrc` - handles the HTML lint rules
- `.sass-lint.yml` - handles the SCSS lint rules
- `reports` - txt generated file for accessibility issues

### Gulp Plugins:

- [gulp-autoprefixer](https://www.npmjs.com/package/gulp-autoprefixer)
- [gulp-compile-handlebars](https://www.npmjs.com/package/gulp-compile-handlebars)
- [gulp-concat](https://www.npmjs.com/package/gulp-concat)
- [gulp-html-replace](https://www.npmjs.com/package/gulp-html-replace)
- [gulp-htmllint](https://www.npmjs.com/package/gulp-htmllint)
- [gulp-imagemin](https://www.npmjs.com/package/gulp-imagemin)
- [gulp-pretty-html](https://www.npmjs.com/package/gulp-pretty-html)
- [gulp-remove-code](https://www.npmjs.com/package/gulp-remove-code)
- [gulp-remove-logging](https://www.npmjs.com/package/gulp-remove-logging)
- [gulp-rename](https://www.npmjs.com/package/gulp-rename)
- [gulp-sass](https://www.npmjs.com/package/gulp-sass)
- [node-bourbon](https://www.npmjs.com/package/node-bourbon)
- [gulp-sass-lint](https://www.npmjs.com/package/gulp-sass-lint)
- [gulp-sourcemaps](https://www.npmjs.com/package/gulp-sourcemaps)
- [gulp-uglify](https://www.npmjs.com/package/gulp-uglify)
- [gulp-newer](https://www.npmjs.com/package/gulp-newer)
- [gulp-accessibility](https://www.npmjs.com/package/gulp-accessibility)
- [gulp-jshint](https://www.npmjs.com/package/gulp-jshint)
- [gulp-gulp-gh-pages](https://www.npmjs.com/package/gulp-gh-pages)
- [gulp-babel](https://www.npmjs.com/package/gulp-babel)
- [panini](https://www.npmjs.com/package/panini)
- [run-sequence](https://www.npmjs.com/package/run-sequence)
- [ansi-colors](https://www.npmjs.com/package/ansi-colors)
- [fancy-log](https://www.npmjs.com/package/fancy)

### Additional Resources:

- [Sass: Syntactically Awesome Style Sheets](http://sass-lang.com/)
- [Bulma](https://bulma.io/)
- [Handlebars](http://handlebarsjs.com/)
- [Panini](https://github.com/zurb/panini)
- [Gulp](https://gulpjs.org/getting-started)

repository: silvanschwarz/DragnDrop-Website-Builder

repo_name: silvanschwarz/DragnDrop-Website-Builder


text:
# Errors

Diuit uses conventional HTTP response codes to indicate the success or failure of an API request. In the following we list a table of error codes we’ll return on our platform:

Error Code | Meaning
---------- | -------
499 | UNKOWN_ERROR -- unknow error
498 | NOTCONNECTED -- Your connection is broken
497 | INVALID_PARAMS -- Your request sucks
496 | OUT_OF_MAX_UPLOAD_FILESIZE -- The data of message size must <= 5MB
495 | FILE_NOT_FOUND -- You tried to access a file which doesn't exit

repository: zxcvbnius/slate

repo_name: zxcvbnius/slate


text:
# QueryPHP Framework Hook

Modify this file ../.git/hooks/pre-commit add replace the content.

```
#!/bin/bash
#
# check PHP code syntax error and standard with phpcs
# https://blog.csdn.net/xsgnzb/article/details/52222366?locationNum=4&fps=1
# https://blog.csdn.net/ljihe/article/details/80826071

PROJECT=$(git rev-parse --show-toplevel)
cd $PROJECT
SFILES=$(git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\.php)

# Determine if a file list is passed
if [ "$#" -ne 0 ]
then
    exit 0
fi

echo "Checking PHP Lint..."

for FILE in $SFILES
do
    php -l -d display_errors=0 $FILE
    if [ $? != 0 ]
    then
        echo "Fix the php error before commit."
        exit 1
    fi
    FILES="$FILES $PROJECT/$FILE"
done

# format code style
if [ "$FILES" != "" ]
then
    echo "Running Code Sniffer..."

    isCheck=""

    for FILE in $SFILES
    do
        result=`~/.composer/vendor/bin/php-cs-fixer fix $FILE --config=.php_cs.dist`

        if [ "$result" != "" ]
        then
            echo $result
            isCheck=$result
        fi
    done

    if [ "$isCheck" != "" ]
    then
        echo "The file has been automatically formatted. Please add it again and commit it."
        exit 1
    fi
fi

exit $?
```

## How to skip

If you need to skip, use the following command.

```
git commit -h
git commit -n -m 'pass hook' #bypass pre-commit and commit-msg hooks
```

## For team

```
#!/usr/bin/env bash

set -eu

ln -s pre-commit.sh ./../.git/hooks/pre-commit
```


text:
[![Netlify Status](https://api.netlify.com/api/v1/badges/a265e8a0-69ee-4ac6-800c-645010319293/deploy-status)](https://app.netlify.com/sites/getchatify/deploys)

# **Chatify**

> Link to [FrontEnd](https://getchatify.netlify.com/)

> Link to [backend](https://chatifydotcom.herokuapp.com/)

## What is it?

- Chatify is a free community chat application built after a model of Slack.

## Motivation?

- Recreate a known application in a stack not taught by Lambda.
- Provide users a fun way to communicate with each other.
- Practice creating a mid level project from the ground up.

## How to install and Run?

Chatify requires you to create your own environmental files and variables to run.

- Fork and clone this repository
- Run the command `yarn install` to install all required dependencies.
- Run `knex migrate:latest` to roll all migrations.
- In the root of the project add a `.env` file with the following variables.
  - SECRETORKEY=[STRING]
    - This will be a passport secret key generated by you
  - jwtSECRET=[STRING]
    - This will be a jsonwebtoken secret string generated by you
  - MONGODB_URI=[STRING]
    - MONGODB_URI defaults to `mongodb://localhost:27017/[name of cluster]`
  - HOST=[SERVER URI]
- In the react client root add a `.env.development` file with the following variable.
  - REACT_APP_SERVER_URL=[http://localhost:9000] **this will need to be changed to your server URL on deployement**
- run `yarn dev`
- The site will compile both server side and client side and open in your browser.


text:
# Inversion of Control

Inversion of Control is a pattern used to reduce the coupling of objects.

[Martin Fowler](/wiki/martin_fowler) more accurately described the act of inverting control as **dependency injection**.


text:
# onepiecepredictor Package

pip install onepiecepredictor

A Small package for hyper paramter tuning pipelining and comparing multiple models performance with very little code.

Its a wrapper around sklearn, xgboost, catboost, imblearn packages.

For examples and documentation, please check [Refer to this notebook](https://github.com/vkurma/onepiecepredictor/blob/master/Examples%20and%20Documentation.ipynb)

repository: vkurma/onepiecepredictor

repo_name: vkurma/onepiecepredictor


text:
# HTTP Reverse Shell

## Overview

a simple example for http reverse shell script.

once the victim runs the client script, we're expecting to receive a reverse HTTP connection on port 5000.

Then, after client send first GET request, a reverse HTTP session back to our server has been initiate,

we can send certain shell commands to the victim/target through tcp socket,

make the victim execute them, and POST the result back to us.

## Features

*   Navigation - Navigate and list files through target file system.
*   Shell Commands - Execute shell commands on target system.
*   Download files - Download files using `grab` command.
*   Screenshoot - Take target screen image using `screenshoot` command.
*   Search - Search for files using `search` command.
*   Port Scanner - check target for open ports using `scan` command.
*   Keylogger - check target keylogs by downloading 'keylogs.txt' from target file system.
*   Encrypted Communication - all commuinication between target and server is encrypted using XOR key.
*   Persistence - script copy itself to target appdata folder, adding new registry key pointing to script location and waiting for server connection.

## Usage

Change server ip address on client and server scripts to the correct address.

Make sure to run server script before running client script on target machine.

once a client connects to the server a shell will be opened.

use `cd` command to navigate target file system.

use `grab` command to download target files.

use `screenshoot` command to download target screen image.

use `search` command to search in target file system, ex: `search C://*.pdf`.

use `scan` command to scan target for open ports, ex: `scan <IP_ADDRESS>:21,22,8080`.

## License

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


text:
[![Build Status](https://codebuild.ap-northeast-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoiQWJKb1lUc0tkNnlEVWZPMldDa3FoQncrOEdKS2M1emM2eG9pNmR4UW9aWVJmZXl3c0xUVU4wR2tmVDcySHpSRm1hTHBNSTE0V0RUU1lYV29YdmpVMS9nPSIsIml2UGFyYW1ldGVyU3BlYyI6IjI3TU5qY0hZRGFTL29EbEMiLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)](https://ap-northeast-2.console.aws.amazon.com/codesuite/codebuild/projects/build_test_johanna/history)

# Introduction

Johanna is a collection of boilerplate Python scripts that can do provisioning/deprovisioning of a simple backend system using AWS.

The backend includes below:
- VPC with two public subnets, two private subnets, routing tables, an internet gateway, a nat gateway and an EIP.
- IAM roles for Elastic Beanstalk
- EC2 key pair (SSH key)
- An Elastic Beanstalk application and an environment for Python Django API server
- An aurora RDS cluster with instances
- An sample SQS
- An sample apply SRR(Same Region Replication) to S3

You can do provisioning/deprovisioning/reprovisioning of the whole system or partial at once. Especially, the reprovisioning of Django API server means a '[continuous deployement](https://en.wikipedia.org/wiki/Continuous_delivery#Relationship_to_continuous_deployment)'.

# How To Play

Using [Lili](https://github.com/HardBoiledSmith/lili)(Vagrant provisioning script) is the simplest way to get a playground.

- Follow Lili [README manual](https://github.com/addnull/lili/blob/master/README.md)
- On Vagrant VM (Ubuntu 16.04)
  1. `sudo su`

  2. `cd /opt/johanna`

  3. Execute `conf.py` to configure your aws environment.

     ```bash
     ./conf.py --email YOUR_EMAIL --keypairname YOUR_AWS_KEYPAIR_NAME --accesskey YOUR_AWS_ACCESSKEY --secretkey YOUR_AWS_SECRETKEY --region AWS_REGION_NAME --az1 AVAILABILITY_ZONE_1 --az2 AVAILABILITY_ZONE_2 --template TEMPLATE_GIT_URL --user DB_USER --pw DB_PASSWORD
     ```

     *[Example]*

     ```bash
     ./conf.py --email ... --keypairname ... --accesskey ... --secretkey ... --region ap-northeast-2 --az1 ap-northeast-2a --az2 ap-northeast-2c --template git@github.com:HardBoiledSmith/kerrigan.git --user db-user --pw db-password
     ```

  4. `./run.py`

You can use this on web GUI

* [raynor](https://github.com/HardBoiledSmith/raynor) is web based GUI for johanna

# Script to create cloudfront and route 53
- Execute `run_create_cloudfront.py` to create cloud front
```bash
./run_create_cloudfront.py -b <s3 bucket name> -e <s3 bucket end point> -a <acm-arn> -c <cname> -f
```
- Execute `run_create_cloudfront.py` to create route53
- reference HOSTED_ZONE_ID : https://docs.aws.amazon.com/Route53/latest/APIReference/API_AliasTarget.html#Route53-Type-AliasTarget-HostedZoneIdx
```bash
./run_create_route53.py -ah Z2FDTNDATAQYW2 -at cloudfront -d <cloudfront domain name> -hn hbsmith.io -n <domain> -r A -f
```

# Notes

* If you use AWS IAM user credential instead of master account, it must have IAMFullAccess, AWSElasticBeanstalkFullAccess and PowerUserAccess permissions.

	![alt text](https://github.com/HardBoiledSmith/johanna/raw/master/docs/images/iam_user_permissions.png "IAM user permissions")

# Vagrant

- set config.json below root of johanna
- move to provisioning folder using `johanna $ cd _provisioning`
- create or run vagrant using `johanna/_provisioning $ vagrant up`
- connect to vagrant using `$ ssh<EMAIL_ADDRESS>or `$ ssh<EMAIL_ADDRESS>- move to johanna folder using  `$ cd /opt/johanna`
- run provisioning script using `/opt/johanna $ ./run.py`

# How to run Lint check (PEP8)

1. Provisioning vagrant
1. Connect `http://dv-johanna.hbsmith.io/`
1. Go to `cd /opt/johanna`
1. Run `flake8 --config=flake8 .`

# Command Completion

You can use [AWS CLI Command Completion](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-completion.html)

# S3 SRR(Same Region Replication)

This script applies replication to different AWS accounts.

At least two buckets are required to apply this policy.
1. You need a source bucket and replication bucket.
2. Create two buckets and activate the versioning function on each bucket.
3.  If this feature is applied, uploading the file to the original bucket will also indicate that the file will be uploaded to the replication bucket.

Run the script below if you want to remove the replication function below.

   - run_terminate_s3_srr.py \
    ```./run_terminate_s3_srr.py -oa <origin bucket account id> -o <origin bucket name> -r <replication bucket name> -a <replication bucket owner access key> -s <replication bucket owner secret access key> -p <policy name applied to store replication> -n <role name applied to store replication>```

   - sample code \
    ./run_terminate_s3_srr.py -oa `123456789000` -o `dv-srr-test` -r `qa-srr-test` -a `XXXXXXXXXXXXXX` -s `11XXX12XXXXXXXX` -p `srr-policy` -n `srr-role`

# Links

* [PyCon APAC 2016](https://www.pycon.kr/2016apac/program/15)
* [Slideshare](http://www.slideshare.net/addnull/daily-continuous-deployment-custom-cli-aws-elastic-beanstalk-64946800)

repository: JoosJuliet/johanna

repo_name: JoosJuliet/johanna


text:
# Config Suite TUI

![configsuite-tui](https://github.com/equinor/configsuite-tui/workflows/configsuite-tui/badge.svg)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![MIT license](http://img.shields.io/badge/license-MIT-brightgreen.svg)](http://opensource.org/licenses/MIT)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/59b5a3b6411f4242aaec85370382d35e)](https://www.codacy.com/gh/equinor/configsuite-tui/dashboard?utm_source=github.com&utm_medium=referral&utm_content=equinor/configsuite-tui&utm_campaign=Badge_Grade)
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/59b5a3b6411f4242aaec85370382d35e)](https://www.codacy.com/gh/equinor/configsuite-tui/dashboard?utm_source=github.com&utm_medium=referral&utm_content=equinor/configsuite-tui&utm_campaign=Badge_Coverage)
[![Documentation Status](https://readthedocs.org/projects/configsuite-tui/badge/?version=latest)](https://configsuite-tui.readthedocs.io/en/latest/?badge=latest)

## Introduction

Config Suite TUI is a text-based user interface extension for [Config Suite](https://github.com/equinor/configsuite). It provides a simplified, visual way of creating and editing configuration files for a given schema.

![Config Suite TUI Screenshot](https://i.imgur.com/1py3WSl.png)

## Features

-   Simplified editing of configuration files
-   Import and export YAML files
-   Instant validation
-   Plugin system to provide schemas from other python modules

## Documentation

Check out the documentation on [Read the Docs](https://configsuite-tui.readthedocs.io/en/stable/).

## Installation

Installation of Config Suite TUI can easily be done using pip:

    $ pip install configsuite-tui

## Developer guidelines

Contributions to _Config Suite_ is very much welcome! Bug reports, feature requests and improvements to the documentation or code alike. However, if you are planning a bigger chunk of work or to introduce a concept, initiating a discussion in an issue is encouraged.

### Running the tests

The tests can be executed with `python -m unittest`.

### Code formatting

The entire code base is formatted with [black](https://black.readthedocs.io/en/stable/).

### Pull request expectations

We expect a well-written explanation for smaller PR's and a reference to an issue for larger contributions. In addition, we expect the tests to pass on all commits and the commit messages to be written in imperative style. For more on commit messages read [this](https://chris.beams.io/posts/git-commit/).

## License

_Config Suite TUI_ is licensed under the MIT License. For more information we refer
the reader to the [LICENSE file](https://github.com/equinor/configsuite-tui/blob/main/LICENSE).

repository: haavardnk/configsuite-tui

repo_name: haavardnk/configsuite-tui


text:
[TOC]

# Overview

# Knowledge
## `AppData` folder each user
The AppData folder contains **app settings, files, and data specific** to the apps on your PC. The folder is hidden by default in File Explorer, and has three hidden sub-folders: `Local`, `LocalLow`, and `Roaming`.

`Roaming`. This folder (**%appdata%**) contains data that can move with your user profile from PC to PC—like when you're on a domain - because this data has the ability to sync with a server. For example, if you sign in to a different PC on a domain, your web browser favorites or bookmarks will be available.

`Local`. This folder (**%localappdata%**) contains data that can't move with your user profile. This data is typically specific to a PC or too large to sync with a server. For example, web browsers usually store their temporary files here.

`LocalLow`. This folder (**%appdata%/.../locallow**) contains data that can't move, but also has a lower level of access. For example, if you're running a web browser in a protected or safe mode, the app will only be able access data from the LocalLow folder.

The apps themselves choose whether to save to the Local, LocalLow, or Roaming folders. Most desktop apps use the Roaming folder by default, while most Windows Store apps use the Local folder by default.

# Tips and Tricks
## Encryption

- https://www.howtogeek.com/192894/how-to-set-up-bitlocker-encryption-on-windows/
- https://docs.microsoft.com/en-us/windows/security/information-protection/bitlocker/bitlocker-frequently-asked-questions
- Using built-in Bitlocker application
- Error: "The system cannot find the file specified"
    + The old recovery file of Bitlocker is corrupted.
    + Rename the file at: `C:\Windows\System32\Recovery\ReAgent.xml` to
      `ReAgent_old.xml`
- Using BitLocker with PIN or password instead of Trusted Platform
  Module (TPM)
    + Modify Group Policy in registry
    + Local Computer Policy > Computer Configuration > Administrative
      Templates > Windows Components > BitLocker Drive Encryption >
      Operating System Drives
    + Double-click the “Require additional authentication at startup”
      option in the right pane.
    + Select “Enabled” at the top of the window, and ensure the “Allow
      BitLocker without a compatible TPM (requires a password or a
      startup key on a USB flash drive)” checkbox is enabled here.
    + https://www.howtogeek.com/howto/6229/how-to-use-bitlocker-on-drives-without-tpm/

## Big AppData
- Check Apple backup (iPhone, iPad, etc)

## Shortcut
### Move windows
These are the killer shortcuts for manipulating the active window:

- Win+Left arrow: Snap to the left half of the screen
- Win+RIght arrow: Snap to the right half of the screen
- Win+Up arrow: Maximize the window
- Win+Down arrow: Minimize/Restore if it's maximized

If you have more than one monitor:

- Win+Shift+Left arrow: Move window to the monitor on the left
- Win+Shift+Right arrow: Move window to the monitor on the right

## Turn off Hibernate
Run cmd at administrator and type command: `powercfg.exe /hibernate off`

## Delete the "nul" files
Open command prompt with administration permission and use this command: `Del \\?\C:\My\Path\NUL`

# Windows Keys
## Windows 10
### Pro
TY4CG-JDJH7-VJ2WF-DY4X9-HCFC6
VK7JG-NPHTM-C97JM-9MPGT-3V66T

### Education

- Berkeley: 2019-05-30
    + Product Key: 4FHJH-VNCPK-WMGMJ-Q7TKV-RGDFM
- VW6N7-Q9Q88-73MKM-GM9PR-F6YMY

# Office Keys
## Office 2013 Plus (Office 15)
YC7DK-G2NP3-2QQC3-J6H88-GVGXT

# Troubleshooting
## Block port
Run `Windows + R`: type `resmon.exe` => resources monitor windows.

## DNS_PROBE_*
Some similar errors: `DNS_PROBE_FINISHED_NO_INTERNET`, `DNS_PROBE_FINISHED_BAD_CONFIG`, `...`

Disabled `6to4` and `isatap` adapter: (these adapter use for transfer packets IPv6 under IPv4 network)
- `netsh int ipv6 isatap set state disabled`
- `netsh int ipv6 6to4 set state disabled`
- `netsh interface teredo set state disable`
- `netsh interface isatap set state disable`

0. Command line

		ipconfig /release
		ipconfig /renew
		ipconfig /flushdns
		netsh winsock reset

	After that restart computer.

1. Try [reset TCP/IP](https://support.microsoft.com/kb/299357?wa=wsignin1.0)

2. Reinstall adapter

	a. Go to Device Manager and expand Network adapter categories
	b. Right click the item stating wireless connection and choose to Uninstall
	c. Restart the computer
	d. After a restart the system will automatically install the driver
	e. However if it doesn’t then go back to Device Manager
	f. Right click username on the top of the list and choose to scan for hardware changes
	g. The system shall automatically recognize the missing drivers
	h. Following the instructions on Driver Software Installation wizard to set up network adapter
	i. Restart the computer once again and see if it works

3. Reinstall driver: Install the network drivers from the manufacturer website.

# [Windows Subsytem for Linux](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux)
A team of sharp developers at Microsoft has been hard at work adapting some Microsoft research technology to basically perform real time translation of **Linux syscalls** into **Windows OS syscalls**. Linux geeks can think of it sort of the inverse of "**WINE**" -- Ubuntu binaries running natively in Windows. Microsoft calls it a "Windows Subsystem for Linux

- [Linux test](https://github.com/linux-test-project/ltp)

# References
[1]: https://msdn.microsoft.com/commandline/wsl/about "Bash on Ubuntu on Windows"


text:
## Describing the logic

To write mathematical equations we used 3 types of parenthesis: `(), [], {}` and these were always hierarchical like this: `{[()]}`, always in this order. And to go even further we would reuse the curly braces like this `{ { { [ ( ) ] } } }`. It's like [Matryoshka doll](https://en.wikipedia.org/wiki/Matryoshka_doll) from Russia. :)

An example would be: `{(4 + 1) * { 5 * [( 5 ^ 2 - 4 ^ 2 ) * 2 ]}} / 2`. (where `5^2` means 5 to the power of 2).

## Describing the challenge

We need an application that would take a mathematical equation as string for input and return a boolean response representing the validity of the parenthesis ordering.

Some valid equations for which the application would return `true`:
    - `5 * 5`
    - `(4 + 1) * 2`
    - `(4 + 1) * [(2 - 4) / (2 + 2)]`
    - `{(4 + 1) * { 5 * [( 5 ^ 2 - 4 ^ 2 ) * 2 ]}} / 2`

Some invalid equations for which the application would return `false`:
    - `(4 + 1) * 2)`
    - `[4 + 1] * 2`
    - `4 * ([2 - 4] / [2 + 2])`
    - `4 * {(2 - 4) / (2 + 2)}`
    - `([4 * [1 + 2] - 1])`

repository: razorcd/code-challenges

repo_name: razorcd/code-challenges


text:
---
title: Copy + Paste More Code
date: "2019-06-03"
description: 1 words
---### When is it the right decision to copy and paste a block of code?

+ Only two, slightly differing use cases for that block (when the third occurs, consider refactoring all three)

+ The originating block is working and cost of failure is high

+ Bringing a piece of an external library into your codebase

+ Refactoring would create an unnecessary, heavy abstraction

+ Prototyping or writing throwaway code.

> Copy and paste doesn't create bad code. Bad programmers create bad code.

Jeff Atwood

repository: brentbaum/brentbaum-notion-publishing

repo_name: brentbaum/brentbaum-notion-publishing


text:
## Footnotes

<include src="codeAndOutput.md" boilerplate >
<variable name="highlightStyle">markdown</variable>
<variable name="code">
**Normal footnotes:**
Here is a footnote reference,[^1] and another.[^longnote]

[^1]: Here is the footnote. Footnotes will appear at the bottom of the page.

[^longnote]: Here's one with multiple blocks.

    Subsequent paragraphs are indented to show that they
belong to the previous footnote.

**Inline footnotes:**
Here is an inline note.^[Inline notes are easier to write, since
you don't have to pick an identifier and move down to type the
note.]

</variable>
</include>

<box type="warning">

Normal footnotes won't work when used inside the attributes of MarkBind components!

For example, it won't work in the `header` attribute of [panels](../components/presentation.html#panels).
</box>

```html
**Normal footnotes:**
Here is a footnote reference,[^1] and another.[^longnote]

[^1]: Here is the footnote. Footnotes will appear at the bottom of the page.

[^longnote]: Here's one with multiple blocks.
    Subsequent paragraphs are indented to show that they
belong to the previous footnote.
```

1 + 1 = 2 ^[Math]

repository: MarkBind/markbind

gha_language: HTML

repo_name: MarkBind/markbind


text:
![Image of Huanyang VFD](https://raw.githubusercontent.com/itschleemilch/huanyango/master/huanyang_vfd.jpg)
# Huanyango

This Go-library can control Huanyang VFD (variable frequency drive) as used in CNC applications.
Here a serial port is used to send and receive the MODBUS-alike control messages.

*Note: This is not an project owned by Huanyang Electrical Co. Limited.*

## Installation

```
go get -u github.com/itschleemilch/huanyango/v1/vfdio
```

## Setup

```
                    +----------------------+                      +--------------------+
                    |                     B+---.  .---..---.  .---+ RS-                |
+-------------+     |      RS485           |    \/    /\    \/    |       Huanyang VFD |
| RPI 3    USB+-----+ Serial Interface    A+----..---.  .---..----+ RS+                |
+-------------+     |                      |                      +--------------------+
                    |                   GND+--------------------
                    +----------------------+
                                             Shielded Twisted Pair
                                             (GND single ended)
```

Required VFD settings:

```
# Enable RS485 Interface:
PD163 Communication Addresses   := 1

# Set baud rate to 9600 baud
PD164 Communication Baud Rate   := 1

# Set 8 data bytes, no party, one stop bit, RTU mode:
PD165 Communication Data Method := 3
```

### OS support

This library and examples were developed on a Raspberry PI 3. The used serial interface library claims to support OS X, Linux and Windows - but this is untested. See [go-serial OS support](https://github.com/jacobsa/go-serial/blob/master/README.markdown#os-support).

## Simple demo application

```
go get -u github.com/itschleemilch/huanyango/v1/cmd/huanyango-cli-demo
```
Example usage:

```
pi@rpi_cnc:~/go/bin $ ./huanyango-cli-demo
Huanyango Command Line Interface Demo
Commands: M3, M4, M5, Snnnn, ?, $, exit, help
> M3 S250
> ?
> Output RPM 1/min:  249
> $
> Commands: M3, M4, M5, Snnnn, ?, $, exit, help
> M4
> M5
> exit
> End.
```

A help text is provided when entering `./huanyango-cli-demo -h`.

## Further reading

1. [HY Series Inverter Manual](http://www.hy-electrical.com/bf/inverter.pdf)
2. Huayang VFD manual (older version with MODBUS details)
  - [Source 1](http://www.exoror.com/datasheet/VFD.pdf)
  - [Source 2](https://github.com/jasonwebb/tc-maker-4x4-router/blob/master/docs/spindle-and-coolant-system/Huanyang%20HY02D223B%20VFD%20manual.pdf)
3. [Windows Control App](https://github.com/GilchristT/SpindleTalker2)

repository: itschleemilch/huanyango

repo_name: itschleemilch/huanyango


text:
# xchacha20poly1305-testvectors

## Getting started

```
$ make size=1 && ./main > xchacha20poly1305.size1.vec
[...]
10 tests generated
```

```
$ make size=2 && ./main > xchacha20poly1305.size2.vec
[...]
100 tests generated
```

```
$ make size=3 && ./main > xchacha20poly1305.size3.vec
[...]
1560 tests generated
```

```
$ make size=4 && ./main > xchacha20poly1305.size4.vec
[...]
10400 tests generated
```

```
$ make size=5 && ./main > xchacha20poly1305.size5.vec
[...]
101120 tests generated
```

## Size levels

The rule of thumb is that size=`n` should include roughly `10^n` tests.

| size | keys | nonces | ADs   | messages | tests  | approx. file size |
|------|-----:|-------:|------:|---------:|-------:| -----------------:|
| 0    |    1 |      1 |     1 |        1 |      1 |            0.0 MB |
| 1    |    1 |      1 |     2 |        5 |     10 |            0.0 MB |
| 2    |    1 |      1 |     4 |       25 |    100 |            0.1 MB |
| 3    |    1 |      1 |    30 |       52 |   1560 |            0.8 MB |
| 4    |    2 |      2 |    50 |       52 |  10400 |            6.8 MB |
| 5    |    4 |      4 |    79 |       80 | 101120 |            307 MB |

## Downloads

All generated files use the format used by Botan.
Feel free to update the generator if you need a different format.

Size levels 0-3 are checked-in for convenience.
Everything above that is megabytes of plain text that should not live in a git.