text:
---
layout: default
---

# 1996-07-28 - Re: your favorite poison recipes

## Header Data

From: jim bell<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 48be36ae8adce55d38fbd7f54b87e266f8e353e236dd2ecee9d009df27b6fcf7

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-07-28 23:20:46 UTC

Raw Date: Mon, 29 Jul 1996 07:20:46 +0800

## Raw message

```
{% raw  %}From: jim bell<EMAIL_ADDRESS>Date: Mon, 29 Jul 1996 07:20:46 +0800
To<EMAIL_ADDRESS>Subject: Re: your favorite poison recipes
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

At 12:11 PM 7/28/96 -0700<EMAIL_ADDRESS>wrote:
>Please post your favorite poison recipes to this mlist.

I recommend a book called "Handbook for Poisoners," by Raymond Bond.  While
it is mostly a collection of (mostly fictional) poison stories, the forward
is a rather extensive non-fictional summary of poisons as was commonly known
when the book was written, in 1950 or so.  The main problem is that it
doesn't include the various anticholinesterases then known, such as Tabun or
Sarin.

Jim Bell
<EMAIL_ADDRESS>

{% endraw %}
```

## Thread

+ Return to [July 1996](/archive/1996/07)

+ Return to "["Christopher J. Shaulis" <cjs@netcom.com>](/authors/christopher_j_shaulis_cjs_at_netcom_com_)"
+ Return to "[jim bell <jimbell@pacifier.com>](/authors/jim_bell_jimbell_at_pacifier_com_)"
+ Return to "[The Deviant <deviant@pooh-corner.com>](/authors/the_deviant_deviant_at_poohcorner_com_)"

+ 1996-07-28 (Mon, 29 Jul 1996 07:20:46 +0800) - Re: your favorite poison recipes - _jim bell<EMAIL_ADDRESS>  + 1996-07-29 (Mon, 29 Jul 1996 10:18:10 +0800) - [Re: your favorite poison recipes](/archive/1996/07/cc2d6777364715b64cf557bcc883bb53891145b50ca61ccc387cd0fc7527ccb2) - _The Deviant<EMAIL_ADDRESS>  + 1996-07-29 (Mon, 29 Jul 1996 10:41:47 +0800) - [Re: your favorite poison recipes](/archive/1996/07/6787cf009f542b0f7d780dbfb8a13a2dd6847d7567def8a2562d1acca0aadee9) - _"Christopher J. Shaulis"<EMAIL_ADDRESS>


text:
# Binary Trees
A binary tree is a tree where every node has two or fewer children. The children are usually called left and right.

Each node of the tree will have a root value and a list of references to other nodes which are called child nodes. From graph view, a tree can also be defined as a directed acyclic graph which has N nodes and N-1 edges.

A Binary Tree is one of the most typical tree structure. As the name suggests, a binary tree is a tree data structure in which each node has at most two children, which are referred to as the left child and the right child.

```python
class BinaryTreeNode(object):

    def __init__(self, value):
        self.value = value
        self.left  = None
        self.right = None
```

## Classifying Binary Trees:
There are some particular names for classifying binary trees.
![Binary Tree](https://i1.faceprep.in/Companies-1/binary%20tree%20-%20types.png)

* If every level of the tree is completely full, we call this a 'perfect binary tree'

   * The number of total nodes on each level doubles as we move down the tree.
   * the number of nodes on the last level is equal to the sum of the number of nodes on all other levels (plus 1)
   * level n = 2^n nodes
   * If we have the height of the binary tree 'h', the total number of nodes n = 2^0 + 2^1 + ..... 2^(h-1), or n = 2^h -1
   * height 'h' = log2(n+1)

## Traversals

Unlike linear data structures (Array, Linked List, Queues, Stacks, etc) which have only one logical way to traverse them, trees can be traversed in different ways.

1. Inorder Traversal
2. Pre-Order Traversal
3. Post-Order Traversal

```bash
Algorithm Inorder(tree)
   1. Traverse the left subtree, i.e., call Inorder(left-subtree)
   2. Visit the root.
   3. Traverse the right subtree, i.e., call Inorder(right-subtree)

Algorithm Preorder(tree)
   1. Visit the root.
   2. Traverse the left subtree, i.e., call Preorder(left-subtree)
   3. Traverse the right subtree, i.e., call Preorder(right-subtree)

Algorithm Postorder(tree)
   1. Traverse the left subtree, i.e., call Postorder(left-subtree)
   2. Traverse the right subtree, i.e., call Postorder(right-subtree)
   3. Visit the root.
```

## Implementation

There are many ways to do traversals. We could do BFS/DFS (covered later) to traverse the tree in constant space. However, if the tree is small, we could just do a plain recursion to simply get to the next 'level' pf the tree and use more memory for simplicity.

Here's the recursive in-order traversal of the tree.
```python
# Definition for a binary tree node.
# class TreeNode(object):
#     def __init__(self, val=0, left=None, right=None):
#         self.val = val
#         self.left = left
#         self.right = right
class Solution(object):
    def inorderTraversal(self, root):
        """
        :type root: TreeNode
        :rtype: List[int]
        """
        l=[]
        return self.inorderTraversalHelper(root,l)

    def inorderTraversalHelper(self,root,l):
        if(root==None):
            return l
        self.inorderTraversalHelper(root.left,l)
        l.append(root.val)
        self.inorderTraversalHelper(root.right,l)
        return l

```
In this implementation however, we are traversing a tree recursively to retrieve all the data in-order. The time complexity is O(N) because we visit each node exactly once. And the depth of the tree might be N in the worst case. That is to say, the level of recursion might be at most N in the worst case. Therefore, taking system stack into consideration, the space complexity is O(N) as well.

It is comparatively easy to do traversal recursively but when the depth of the tree is too large, we might suffer from stack overflow problem. That's one of the main reasons why we want to solve this problem iteratively sometimes.

```python
# Definition for a binary tree node.
# class TreeNode(object):
#     def __init__(self, val=0, left=None, right=None):
#         self.val = val
#         self.left = left
#         self.right = right
class Solution(object):
    def preorderTraversal(self, root):
        """
        :type root: TreeNode
        :rtype: List[int]
        """
        l=[]
        st=[]

        if(root!=None):
            st.append(root)

        while(len(st) is not 0):
            cur = st.pop()
            l.append(cur.val)

            if(cur.right!=None):
                st.append(cur.right)

            if(cur.left!=None):
                st.append(cur.left)

        return l
```

For the iterative solution, the time complexity is apparently the same with recursion solution which is O(N). The space complexity is also O(N) since in the worst case, we will have all the nodes in the stack. There are some other solutions for iterative traversal which can reduce the space complexity to O(1).

## Uses
Uses of Inorder
In case of binary search trees (BST), Inorder traversal gives nodes in non-decreasing order. To get nodes of BST in non-increasing order, a variation of Inorder traversal where Inorder traversal s reversed can be used.

Preorder traversal is used to create a copy of the tree. Preorder traversal is also used to get prefix expression on of an expression tree

Postorder traversal is used to delete the tree. Please see the question for deletion of tree for details. Postorder traversal is also useful to get the postfix expression of an expression tree.

Time Complexity: O(n) for all traversals as all nodes are being visited

## More to read:
The two approaches:
* Bottoms up
* Top Down

## Problems
1) Code up the BST class, then make in-order, pre-order, and post-order traversals
2) Level traversal: nodes at each level are inserted into a common list, return the list of lists
3) LC#98 Validate BST
4) LC$104 Maximum Depth of Binary Tree
4) LC#102 level order traversal
5) LC#101 Symmetric Trees

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

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
title: nodejs-the-difference-between-development-and-production
displayTitle: 'Node.js, the difference between development and production'
description: 'Learn how to set up different configurations for production and development environments'
authors: flaviocopes, MylesBorins, fhemberger, LaRuaNa, ahmadawais, RenanTKN
category: learn
---

You can have different configurations for production and development environments.

Node.js assumes it's always running in a development environment.
You can signal Node.js that you are running in production by setting the `NODE_ENV=production` environment variable.

This is usually done by executing the command

```bash
export NODE_ENV=production
```

in the shell, but it's better to put it in your shell configuration file (e.g. `.bash_profile` with the Bash shell) because otherwise the setting does not persist in case of a system restart.

You can also apply the environment variable by prepending it to your application initialization command:

```bash
NODE_ENV=production node app.js
```

This environment variable is a convention that is widely used in external libraries as well.

Setting the environment to `production` generally ensures that

* logging is kept to a minimum, essential level
* more caching levels take place to optimize performance

For example [Pug](https://pugjs.org), the templating library used by [Express](https://expressjs.com), compiles in debug mode if `NODE_ENV` is not set to `production`. Express views are compiled in every request in development mode, while in production they are cached. There are many more examples.

You can use conditional statements to execute code in different environments:

```js
if (process.env.NODE_ENV === 'development') {
  // ...
}

if (process.env.NODE_ENV === 'production') {
  // ...
}

if (['production', 'staging'].includes(process.env.NODE_ENV)) {
  // ...
}
```

For example, in an Express app, you can use this to set different error handlers per environment:

```js
if (process.env.NODE_ENV === 'development') {
  app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
}

if (process.env.NODE_ENV === 'production') {
  app.use(express.errorHandler());
}
```

branch_name: refs/heads/main

gha_language: TypeScript

gha_license_id: MIT


text:
# Kitchen Recipes
Though TVML is static xmls, we can generate TVML dynamically by defining **Recipe**.

## Available Recipes

- [x] Alert with button handler
- [x] Descriptive Alert with button handler
- [x] Search
- [x] TabBar

You can create your own Recipe by conforming to `RecipeType` protocol.

## AlertRecipe
```
let alert = AlertRecipe(
    title: Sample.title,
    description: Sample.description)
)
Kitchen.serve(recipe: alert)
```

## Tab Controller

Should you wish to use tabs within your application you can use `KitchenTabBar` recipe. First, create a `TabItem` struct with a title and a `handler` method. The `handler` method will be called every time the tab becomes active.

**Note:** The `PresentationType` for initial view should always be set to `.Tab`.

````swift
struct MoviesTab: TabItem {

    let title = "Movies"

    func handler() {
        Kitchen.serve(xmlFile: "Sample.xml", type: .Tab)
    }

}
````

Present tabbar using `serve(recipe:)` method.

````swift
let tabbar = KitchenTabBar(items:[
    MoviesTab(),
    MusicsTab()
])
Kitchen.serve(recipe: tabbar)
````

Reload tab using `reloadTab(atIndex:_:)` method.

```swift
// reload with xmlFile
Kitchen.reloadTab(atIndex: 0, xmlFile: "Oneup.xml")

// reload with xmlString
Kitchen.reloadTab(atIndex: 0, urlString: Sample.tvmlUrl)

// reload with Recipe
let search = MySearchRecipe()
Kitchen.reloadTab(atIndex: 0, recipe: search)
```

## SearchRecipe
SearchRecipe supports dynamic view manipulation.

#### Configuring SearchRecipe
Subclass `SearchRecipe` and override `filterSearchText` method.
SeeAlso: [SampleRecipe/MySearchRecipe.swift](https://github.com/toshi0383/TVMLKitchen/blob/master/SampleRecipe/MySearchRecipe.swift), [SearchResult.xml](https://github.com/toshi0383/TVMLKitchen/blob/master/Sources/Templates/SearchResult.xml)

#### SearchRecipe as TabItem
Use `PresentationType.TabSearch`. This will create keyboard observer in addition to `.Tab` behavior.
```
struct SearchTab: TabItem {
    let title = "Search"
    func handler() {
        let search = MySearchRecipe(type: .TabSearch)
        Kitchen.serve(recipe: search)
    }
}
```

repository: LeviTrammell/TVMLKitchen

gha_language: Swift

repo_name: LeviTrammell/TVMLKitchen


text:
---
author: sivel
categories:
- Asides
- Plugins
- WordPress
date: '2009-03-10'
description: Public Post Preview WordPress Plugin v1.1 Released
slug: public-post-preview-v11
title: Public Post Preview WordPress Plugin v1.1 Released
type: post
---

The [Public Post Preview][1] WordPress Plugin has been updated to version 1.1. New to this update is not limiting public previews to posts in draft or pending status. The plugin now allows public previews of any post that is not in 'publish' status. Enjoy!

 [1]: http://sivel.net/2009/02/public-post-preview/


text:
---
title: Supported Vertices
short_title: Vertices
description: Computation graph nodes for advanced configuration.
category: Models
weight: 4
---

## What is a vertex?

In Eclipse Deeplearning4j a vertex is a type of layer that acts as a node in a `ComputationGraph`. It can accept multiple inputs, provide multiple outputs, and can help construct popular networks such as InceptionV4.

## Available classes

---

### L2NormalizeVertex
 [[source]](https://github.com/eclipse/deeplearning4j/tree/master/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/vertex/impl/L2NormalizeVertex.java)

L2NormalizeVertex performs L2 normalization on a single input.

---

### L2Vertex
 [[source]](https://github.com/eclipse/deeplearning4j/tree/master/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/vertex/impl/L2Vertex.java)

L2Vertex calculates the L2 least squares error of two inputs.

For example, in Triplet Embedding you can input an anchor and a pos/neg class and use two parallel
L2 vertices to calculate two real numbers which can be fed into a LossLayer to calculate TripletLoss.

---

### PoolHelperVertex
 [[source]](https://github.com/eclipse/deeplearning4j/tree/master/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/vertex/impl/PoolHelperVertex.java)

A custom layer for removing the first column and row from an input. This is meant to allow
importation of Caffe's GoogLeNet from https://gist.github.com/joelouismarino/a2ede9ab3928f999575423b9887abd14.

---

### ReshapeVertex
 [[source]](https://github.com/eclipse/deeplearning4j/tree/master/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/vertex/impl/ReshapeVertex.java)

Adds the ability to reshape and flatten the tensor in the computation graph. This is the equivalent
to the next layer. ReshapeVertex also ensures the shape is valid for the backward pass.

---

### ScaleVertex
 [[source]](https://github.com/eclipse/deeplearning4j/tree/master/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/vertex/impl/ScaleVertex.java)

A ScaleVertex is used to scale the size of activations of a single layer

For example, ResNet activations can be scaled in repeating blocks to keep variance
under control.

---

### ShiftVertex
 [[source]](https://github.com/eclipse/deeplearning4j/tree/master/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/vertex/impl/ShiftVertex.java)

A ShiftVertex is used to shift the activations of a single layer

One could use it to add a bias or as part of some other calculation.
For example, Highway Layers need them in two places. One, it's often
useful to have the gate weights have a large negative bias. (Of course
for this, we could just initialize the biases that way.)
But, _also_ it needs to do this:
(1-sigmoid(weight  input + bias)) () input + sigmoid(weight  input + bias) () activation(w2  input + bias) (() is hadamard product)
So, here, we could have
1. a DenseLayer that does the sigmoid
2. a ScaleVertex(-1) and
3. a ShiftVertex(1)
to accomplish that.

---

### StackVertex
 [[source]](https://github.com/eclipse/deeplearning4j/tree/master/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/vertex/impl/StackVertex.java)

StackVertex allows for stacking of inputs so that they may be forwarded through
a network. This is useful for cases such as Triplet Embedding, where shared parameters
are not supported by the network.

This vertex will automatically stack all available inputs.

---

### UnstackVertex
 [[source]](https://github.com/eclipse/deeplearning4j/tree/master/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/vertex/impl/UnstackVertex.java)

UnstackVertex allows for unstacking of inputs so that they may be forwarded through
a network. This is useful for cases such as Triplet Embedding, where embeddings can
be separated and run through subsequent layers.

Works similarly to SubsetVertex, except on dimension 0 of the input. stackSize is
explicitly defined by the user to properly calculate an step.

---

### ReverseTimeSeriesVertex
 [[source]](https://github.com/eclipse/deeplearning4j/tree/master/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/vertex/impl/rnn/ReverseTimeSeriesVertex.java)

ReverseTimeSeriesVertex is used in recurrent neural networks to revert the order of time series.
As a result, the last time step is moved to the beginning of the time series and the first time step
is moved to the end. This allows recurrent layers to backward process time series.

Masks: The input might be masked (to allow for varying time series lengths in one minibatch). In this case the
present input (mask array = 1) will be reverted in place and the padding (mask array = 0) will be left untouched at
the same place. For a time series of length n, this would normally mean, that the first n time steps are reverted and
the following padding is left untouched, but more complex masks are supported (e.g. [1, 0, 1, 0, ...].

##### setBackpropGradientsViewArray
```java
public void setBackpropGradientsViewArray(INDArray backpropGradientsViewArray)
```

Gets the current mask array from the provided input
- return The mask or null, if no input was provided

gha_language: HTML


text:
### dev-master

* Travis & Coveralls

### 0.1.2 (26.11.2015)

* #4: Crontab::save() returns TRUE if the crontab has been modified
* #3: Every hour (without number)

### 0.1.1 (26.11.2015)

* #2: Do not exec the crontab, if the content has not changed

### 0.1.0 (18.11.2015)

* Crontab: save crontab files by the config
* Job: a cron job - create from a string, make the string representation
* JobList: a list of jobs - load from a file, create the file content
* Setter: set/get crontab for a user

repository: axypro/crontab

repo_name: axypro/crontab


text:
# Feature Title - {Trello-ID as a link to Trello Board}
## Features included
* Feature 1
* Feature 2
* ...

## Dependencies (optional)
* Dependency 1
* Dependency 2
* ...

## Refactored Code (if included)
* Refactored Code 1
* Refactored Code 2
* ...

## Documentation link


text:
# Contribution Guidelines

## To contribute you must follow these guidelines \/

* **Must** write all variables in camelCase, EXCEPT for Roblox services, which should be written in PascalCase, and constants should be written in LOUD_SNAKE_CASE. (Currently the only guideline)

repository: Mark-Marks/BanIt

repo_name: Mark-Marks/BanIt


text:
[![Build Status](https://travis-ci.org/dragonfly-science/django-pigeonpost.png?branch=master)](https://travis-ci.org/dragonfly-science/django-pigeonpost)

## Pigeonpost is a django application for sending emails

## About

Pigeonpost is a tool to queue and send emails relating to a Django model.

## Installation & Usage

See [Getting Started](http://dragonfly-science.github.io/django-pigeonpost/getting_started.html).

## Licence

Pigeonpost is copyright [Dragonfly Science](http://www.dragonfly.co.nz) and is made
available under an [MIT License](LICENCE.txt).

## The Kereru

The kereru or [New Zealand wood pigeon](http://en.wikipedia.org/wiki/New_Zealand_Pigeon)
is a large fruit-eating forest pigeon, endemic to New Zealand. The population
declined considerably duing the 20th century, due to pressure form habitat
destruction and from introduced mammalian pests. While it is beautiful bird, it
is a clumsy, noisy flyer. As far as we know, it has not been used for carrying
either letters or email.

![Kereru](http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Hemiphaga_novaeseelandiae_-Kapiti_Island-8.jpg/320px-Hemiphaga_novaeseelandiae_-Kapiti_Island-8.jpg)

repository: dragonfly-science/django-pigeonpost

gha_language: Python

repo_name: dragonfly-science/django-pigeonpost


text:
# Knowledge Bot

## :book: Description

Self hosted discord bot that offers translation and dictionary utilities.

### :dart: Features

- Text translation
- Language detection
- Definitions, synonyms, antonyms and rhymes
- Word of the day and random words

### :high_brightness: Visuals

![Link to image](img/dictionary_definition_command.png)

## :bulb: Getting Started

Follow the instructions below to work on the project on your local environment.

### :clipboard: Prerequisites

In case you don't use Docker, you'll need Git, Python 3.8 and a Virtual Environment (in this case, Pipenv is used as a package manager and virtual environment).

All dependencies are listed on the Pipfile.

### :computer: Installation

```
# Clone this repository
$ git clone https://github.com/miguel-osuna/Knowledge-Bot.git

# Go into the repository from the terminal
$ cd Knowledge-Bot

# Remove current origin repository
$ git remote remove origin
```

## :whale: Running project with Docker

This will run the project on your local environment.

Make sure to create a hidden folder like `envs.example` named `.envs`, with the same kind of environment variables.

```
docker-compose up -d --build
```

## :rocket: Deployment

This project includes a Procfile for Heroku, but can be deployed to any other host.

- Heroku: read the [following tutorial](https://devcenter.heroku.com/articles/getting-started-with-python) to learn how to deploy to your heroku account..

## :wrench: Built With

- [discord.py](https://discordpy.readthedocs.io/en/latest/) - Python Library for Discord API
- [Google Cloud Translation](https://cloud.google.com/translate)

## Project Documentation

To learn about bot commands, check the [project documentation](#)

## :performing_arts: Authors

- **Miguel Osuna** - https://github.com/miguel-osuna

## :ledger: License

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

repository: miguel-osuna/Knowledge-Bot

repo_name: miguel-osuna/Knowledge-Bot


text:
---
layout: page
title: Software
menu: true
---

I love everything code and open-source. Several hours of my free time are dedicated to coding. Below is a list of my most relevant software side-projects. You can find more about my software and open-source contributions on [Github](https://github.com/dovyski).

___

cvui C++ OpenCV

A header-only C++ lib to create UI in OpenCV projects. I created this lib out of the need of creating a full GUI application using nothing but OpenCV.

A (very) simple UI lib built on top of OpenCV drawing primitives. Other UI libs, such as imgui, require a graphical backend (e.g. OpenGL) to work, so if you want to use imgui in a OpenCV app, you must make it OpenGL enabled, for instance. It is not the case with cvui, which uses only OpenCV drawing primitives to do all the rendering (no OpenGL or Qt required).

	 Source code
     Website

___

Codebot PHP MySQL Javascript

The back-end is PHP with no frameworks, serving REST APIs (speaking JSON). Front-end was built using HTML/CSS enhanced with jQuery, Bootstrap and some UI libs.

Codebot is a code editing program equipped with built-in tools to help you make your game faster (read full thoughts here). Developing a game is much more than just coding, you have to tweak art, build levels, convert files, find assets/extensions, read docs about building and publishing, and so on. The IDE should help us do that, or do it all by itself. Imagine you are working on your Ludum Dare/1GAM game and you need an 8-bit SFX.  Loaded content is dynamically arranged according to user settings.

Live Broadcast Kit (LBK) is a web app to easily and effortlessly create overlays for video content. It has been originally designed to work in conjunction with OBS to add and control overlays on live feeds, however it can be used as a standalone app as well. LBK has been developed to help with broadcast and video content creation within the Computer Science program at Federal University of Fronteira Sul, Chapecó, Brazil.

	 Source code
	 Website

___

Reslide PHP Javascript

A javascript front-end shows a PDF presentation using PDF.js. Current slide of the presentation is controled by the back-end (PHP using files) via AJAX requests.

Share and remotely control your PDF-based presentations, all in the browser, without plugins or network restrictions. The process is simple: first you upload a PDF file to the website (no login required). When the upload is complete you receive two URLs: one for the presenter (can change the slides) and another for the viewers (can't change the slides). That's all!

	 Source code
	 Website

___

Besearcher PHP SQLite Javascript

A daemon (PHP/SQLite) controls the execution of several tasks. A web interface (PHP/HTML/CSS/Javascript) allows the monitoring and control of the daemon.

Besearcher (bot researcher) is a cross-platform tool to help researchers automate and keep track of software-based experiments. The main idea to define a command, its parameters and the possible values of those parameters. Besearcher will then generates all permutations of that command and its parameter values. It will execute each one of them, keeping track of their status (running, finished or aborted) and the output they produced.

	 Source code

___

Pigeon PHP

PHP microservice that communicates using a REST API exposes system capabilities regarding e-mail sending.

Pigeon is an easy to use, hassle-free PHP microservice for sending e-mails via HTTP requests. It values simplicity above all, i.e. no database required, extremely easy and quick installation. It is intended for small, in-house projects that require e-mail sending capabilities.

	 Source code

___

Jarena Java

I developed this project as a tool for my OOP classes. It is a gamified way of developing and learning about Java classes and objects. All rendering code is based on AWT.

A game approach to teaching OPP and Java. It is a battle arena where student-developed agents fight each other in order to survive. The last team to be eliminated from the arena wins the challenge.

	 Source code

___

Sac PHP MySQL Javascript

A MVC web application built with PHP (back-end) and HTML/CSS/Javascript (front-end).

A web app to manage tiny conferences. It allows administrators to manage payments, schedules, attendance lists, competitions, rooms, etc. Visitors can book the events they want to participate.

	 Source code

___

Aura PHP MySQL Javascript

Web part built using PHP/MySQL and the aura-client is PHP  running as a command line app on every computer to be managed.

A tool with limited AI capabilities to manage computers in academic labs. It is composed of two parts: the web part (PHP/MySQL) and the aura-client (PHP, running as a command line app on every computer to be managed).

	 Source code

___

Progbot PHP MySQL Javascript

A MVC web application built with PHP (back-end) and HTML/CSS/Javascript (front-end).

Progbot is a PHP/MySQL webapp to manage programming assignments. It allows professors to add and organize programming challenges, as well as grade them in an easy an contextual way. Students can keep track of solved challenges, deadlines and grading comments. It's is also possible to code directly in the browser, which avoids the hassle of configuring a complete programming tool chain (if that is not part of the deal).

	 Source code

gha_language: CSS

gha_license_id: NOASSERTION


text:
# jTag Javascript Library v 0.3.0

This library makes it really easy to generate html markup in javascript:

    document.write(
      jTag(h1, "Welcome to jTag") +
      jTag(p,
        "jTag Features" +
        jTag(ul,
          jTag(li, "Optional Params - tag, text, attributes") +
          jTag(li, "Easy way to structure markup for readability") +
          jTag(li, "Integrates with jQuery and should work with other libs") +
          jTag(li, "FormHelpers for writting forms and fields")
        , jAttribute("id","feature_list"))
      )
    );

## Lab

Check out the jTag Lab at [jtag2html.heroku.com](http://jtag2html.heroku.com)

## Features

jTag Features

* Optional Params - tag, text, attributes
* Easy way to structure markup for read-ability
* Integrates with jQuery and should work with other libs
* FormHelpers for writting forms and fields
* Simple tables
* Simple Divs

## Support

If you find a bug or have a change request submit to [http://groups.google.com/group/jtag-support](http://groups.google.com/group/jtag-support)

## Contribution

If you have a patch please submit to [jtag<EMAIL_ADDRESS>

repository: jackhq/jTag

extension: markdown

repo_name: jackhq/jTag


text:
![Alt text]( https://github.com/RAVURISREESAIHARIKRISHNA/Android-Apps/blob/master/LifeCycleOfApp/lifecycle.png "Optional title")

Image Credits

https://thenewboston.com/forum/topic.php?id=3234

repository: RAVURISREESAIHARIKRISHNA/Android-Apps

repo_name: RAVURISREESAIHARIKRISHNA/Android-Apps


text:
#

#
Java Programming Course
MOOC

 ##
Materiais de Estudo (Compilado por Hugo Pfeffer)

# About the course

During this course, you will learn the basics of computer programming, along with algorithms and object-oriented programming through the Java programming language. The course includes comprehensive materials and plenty of programming exercises - all of which are tested using our automatic testing service Test My Code.

Anyone can join - no previous programming knowledge is required.

Unlike many programming courses found online, ours is completely unabridged; the course’s scope and material are identical to our CS1 Introduction to Programming and Advanced Programming courses.

This is the first course in our computer science learning track, and we use industry-grade tooling from day one. As such, the course is about programming in a real integrated development environment (IDE) instead of a browser or an educational IDE.[... mais](https://java-programming.mooc.fi/)

# About this repository
This repo is dedicated to record and track my progress through out the [Java Programming course](https://www.mooc.fi/en).

# Requisitos
- [Java](https://www.java.com/pt_BR/download/)
- [NetBeans with TMC](https://www.mooc.fi/en/installation/netbeans)

repository: HugoPfeffer/mooc-java-programming

gha_language: Java

repo_name: HugoPfeffer/mooc-java-programming


text:
Apache Pony Mail (Incubating) is a web-based mail archive browser
licensed under the Apache License v/2.0 and built to scale
to millions of archived messages with hundreds of requests
per second.

Pony Mail allows you to browse and interact with mailing lists
using Mozilla Persona or OAuth2 (Google, GitHub, Facebook etc) for authentication.

![Ponies](images/demo.png)

![Trends](images/demo_trends.png)

![N-grams](images/demo_ngrams.png)

See [https://lists.apache.org.org](https://lists.apache.org) for a demo.

Pony Mail works in both public, private and mixed-mode, allowing you
to have one unified place for all your communication, both public and
private.

### Features include: ###

* Importing from standard mbox files, maildir directory, Pipermail or an mod_mbox-driven site
* Public and private list viewing based on auth
* Cross-list threading
* OpenSearch support for browsers (can add as search engine)
* In-browser reply to mailing lists
* Fast and intuitive searching
* Threaded, flat and tree view modes
* Notifications of replies to emails sent via Pony Mail
* Email and list statistics
* Multi-site, multi-list handling
* Word clouds
* Fuzzy-logic email grouping/threading (based in part on JWZ's ideas)
* Supports both custom OAuth, Google Auth, OAuth.online and Mozilla Persona
* Atom feeds for all lists (including private ones!)
* Source view and custom range mbox export
* Customized trend analysis and n-grams

### Requirements: ###

* Linux operating system (tested on Ubuntu, Debian, Fedora and CentOS - Windows or OS/X may work)
* ElasticSearch backend
* Apache HTTP Server frontend with mod_lua loaded OR
  * Nginx with nginx-extras (ng-lua module) AND lua-apr installed
* Python 3.x for importing (with elasticsearch and formatflowed via pip)
* A mailing list system:
  * MailMan3 if you fancy that (we have a python3 archive plugin)
  * OR any mailing list system of your choice (use archiver plugin with stdin)
* Lua >=5.1 + lua-cjson, luasec and luasocket

### Development Benchmarking ###
Pony Mail has been built for and tested with the mail archives of the Apache
Software Foundation, which span more than 15 million emails sent across more
than 20 years. To put things into perspective, importing all this on a modern
machine (2xSSD with 64GB RAM) took around 12 hours and resulted in a performance
at around 100 archive search requests per second per ES node, depending on mailing
list size and available bandwidth.

### TODO: ###
This is a list of what we would love to get done:

* Start on documentation (WIP)
* Rework JS, turn those ugly innerHTML hacks into proper DOM handling
* Set up notification system (depends on reply system) (works, but still *WIP!*)
* Have it work with ES with auth mode or via HTTPS

repository: gmcdonald/incubator-ponymail-site

branch_name: refs/heads/asf-site

repo_name: gmcdonald/incubator-ponymail-site


text:
# Android DAPI & Schema Demo
Demo of DAPI and Schema usage in an Android app using a VMN.

This demo consists of a simple contact list application.
DAP Objects will be created using
[Dash-Schema-Android](https://github.com/dashevo/dash-schema-android) and be sent to a
[VMN](https://github.com/dashevo/vmn-dapi-rest) instance using
[DAPI-Client-Android](https://github.com/dashevo/dapi-client-android)

## Dependencies
- Android JSON Schema: https://github.com/sambarboza/json-schema
- VMN Dapi Rest: https://github.com/dashevo/vmn-dapi-rest
- Dash Schema Android: https://github.com/dashevo/dash-schema-android
- Dapi Client Android: https://github.com/dashevo/dapi-client-android

## Installation
- Clone the 4 repos above in the same folder and run:
  - `npm install` inside `vmn-dapi-rest`
  - `mvn install -DskipTests` inside `json-schema`
  - `./gradlew assemble` inside `dash-schema-android` and `dapi-client-android`

## Running
- Before running the application, make sure that the VMN is running and set your local ip in [DapiDemoClient.kt#L18](https://github.com/dashevo/dapi-demo-android/blob/master/app/src/main/java/org/dashevo/dapidemo/dapi/DapiDemoClient.kt#L18)
- Open the main folder of this repo in Android Studio and run on device or emulator.
- To run on a device, make sure that both computer and mobile device are in the same network.

## Usage
- The first login should be made with the username "alice", so the hardcoded DAP id in the app will match with the one created by alice on the first login.
- A user will be created on its first login and a DAP Object of the type user will be sent.
- To change the current user just kill/close the app and login with a new/existing user.
- A contact can have one of these 3 states: `requested`, `pending` and `approved`, in Alice's perspective they would be:
  - `pending`: Alice added Bob as contact and it is pending of approval.
  - `requested`: Bob added Alice as a contact but Alice has not approved yet.
  - `approved`: Bob added Alice as contact and she approved.

## States and DAP Context examples
Contact states are derived based on the presence of DAP Objects containing the contact information in a user DAP Context.

#### Alice signup, no contact added:
```json
{
    "dapid": "c78a05c06876a61a3942c2e5618ceec0a51e301b2b708f908165a2c00ca32cb8",
    "buid": "9ac9f8f7082f9d78975e9e6c186c7f358ee7c6855cedea4b06b10df5d34fdabc",
    "objects": [
        {
            "act": 1,
            "objtype": "user",
            "rev": 0,
            "idx": 0,
            "aboutme": "I'm alice"
        }
    ],
    "related": null,
    "maxidx": 0
}
```
#### Alice added Bob as contact and it is waiting for approval:
##### Alice's State (Bob is in the "Pending" list):
```json
{
    "dapid": "c78a05c06876a61a3942c2e5618ceec0a51e301b2b708f908165a2c00ca32cb8",
    "buid": "9ac9f8f7082f9d78975e9e6c186c7f358ee7c6855cedea4b06b10df5d34fdabc",
    "objects": [
        {
            "act": 1,
            "objtype": "user",
            "rev": 0,
            "idx": 0,
            "aboutme": "I'm alice"
        },
        {
            "meta": {
                "sig": "1ae00a11b6ea301fa0d7e42b8c02af5bb9f5533aee824d16abe4950071031d14"
            },
            "act": 1,
            "objtype": "contact",
            "rev": 0,
            "idx": 1,
            "user": {
                "type": 0,
                "userId": "c5a653f70aac16e8a99baa8a9fb60e37f782a7dd9141ab2bb8ecacaeaa129178"
            }
        }
    ],
    "related": null,
    "maxidx": 1
}
```
##### Bob's State (Alice is in the "Requests" list):
```json
{
    "dapid": "c78a05c06876a61a3942c2e5618ceec0a51e301b2b708f908165a2c00ca32cb8",
    "buid": "c5a653f70aac16e8a99baa8a9fb60e37f782a7dd9141ab2bb8ecacaeaa129178",
    "objects": [
        {
            "act": 1,
            "objtype": "user",
            "rev": 0,
            "idx": 0,
            "aboutme": "I'm bob"
        }
    ],
    "related": [
        {
            "meta": {
                "sig": "1ae00a11b6ea301fa0d7e42b8c02af5bb9f5533aee824d16abe4950071031d14",
                "buid": "9ac9f8f7082f9d78975e9e6c186c7f358ee7c6855cedea4b06b10df5d34fdabc",
                "uname": "alice"
            },
            "act": 1,
            "objtype": "contact",
            "rev": 0,
            "idx": 1,
            "user": {
                "type": 0,
                "userId": "c5a653f70aac16e8a99baa8a9fb60e37f782a7dd9141ab2bb8ecacaeaa129178"
            }
        }
    ],
    "maxidx": 0
}
```
#### Bob accepted Alice's contact request:
##### Alice`s State (Bob is in the "Contacts" list):
```json
{
    "dapid": "c78a05c06876a61a3942c2e5618ceec0a51e301b2b708f908165a2c00ca32cb8",
    "buid": "9ac9f8f7082f9d78975e9e6c186c7f358ee7c6855cedea4b06b10df5d34fdabc",
    "objects": [
        {
            "act": 1,
            "objtype": "user",
            "rev": 0,
            "idx": 0,
            "aboutme": "I'm alice"
        },
        {
            "meta": {
                "sig": "1ae00a11b6ea301fa0d7e42b8c02af5bb9f5533aee824d16abe4950071031d14"
            },
            "act": 1,
            "objtype": "contact",
            "rev": 0,
            "idx": 1,
            "user": {
                "type": 0,
                "userId": "c5a653f70aac16e8a99baa8a9fb60e37f782a7dd9141ab2bb8ecacaeaa129178"
            }
        }
    ],
    "related": [
        {
            "meta": {
                "sig": "d803ca496eabe6546da01a0262ab3fdc60143ea263925640f6b360c924395cd6",
                "buid": "c5a653f70aac16e8a99baa8a9fb60e37f782a7dd9141ab2bb8ecacaeaa129178",
                "uname": "bob"
            },
            "act": 1,
            "objtype": "contact",
            "rev": 0,
            "idx": 1,
            "user": {
                "type": 0,
                "userId": "9ac9f8f7082f9d78975e9e6c186c7f358ee7c6855cedea4b06b10df5d34fdabc"
            }
        }
    ],
    "maxidx": 1
}
```
##### Bob's State (Alice is in the "Contacts" list):
```json
{
    "dapid": "c78a05c06876a61a3942c2e5618ceec0a51e301b2b708f908165a2c00ca32cb8",
    "buid": "c5a653f70aac16e8a99baa8a9fb60e37f782a7dd9141ab2bb8ecacaeaa129178",
    "objects": [
        {
            "act": 1,
            "objtype": "user",
            "rev": 0,
            "idx": 0,
            "aboutme": "I'm bob"
        },
        {
            "meta": {
                "sig": "d803ca496eabe6546da01a0262ab3fdc60143ea263925640f6b360c924395cd6"
            },
            "act": 1,
            "objtype": "contact",
            "rev": 0,
            "idx": 1,
            "user": {
                "type": 0,
                "userId": "9ac9f8f7082f9d78975e9e6c186c7f358ee7c6855cedea4b06b10df5d34fdabc"
            }
        }
    ],
    "related": [
        {
            "meta": {
                "sig": "1ae00a11b6ea301fa0d7e42b8c02af5bb9f5533aee824d16abe4950071031d14",
                "buid": "9ac9f8f7082f9d78975e9e6c186c7f358ee7c6855cedea4b06b10df5d34fdabc",
                "uname": "alice"
            },
            "act": 1,
            "objtype": "contact",
            "rev": 0,
            "idx": 1,
            "user": {
                "type": 0,
                "userId": "c5a653f70aac16e8a99baa8a9fb60e37f782a7dd9141ab2bb8ecacaeaa129178"
            }
        }
    ],
    "maxidx": 1
}
```
## Screenshots

|  |  |
| ------------- | ------------- |
| Login  | User search |
|  |  |
| Added contacts, waiting for approval | Contact request  |
|  |
| Approved contact | |

repository: dashevo/OLD-dapi-demo-android-OLD

repo_name: dashevo/OLD-dapi-demo-android-OLD


text:
---
theme: post
date:  29-04-2021
title: "opinion: Emacs is ... better?"
---

*Sorry, the debate for myself is over.*

# Emacs made me a bit of a better programmer.

IKR, I've been such an advocate of VIM for a long time, and still use it a lot. But for some things
Emacs is just ... better. Funny enough I find that I dislike emacs with evil mode as it just messes
up all the nicety of working with emacs (If I wanted vim I would use VIM is my philosophy).

# IDE vs text editor

I guess Emacs is ... an IDE - or at least much more so than VIM. I have tried VSCode this year, and
it is nice, but it felt detached from how I like to work. It is nice and easy and it has a lot of
plugins, but somehow it doesn't feel right for me. Emacs on the other hand, has great plugins, great
modes, and just works (well, debatably right? ... kind of just works, like VIM does ... with a lot of
tinkering ... and that's probably why I like it).

After using it for most of my programming work, emacs has changed the way I code, and the way I think
about my programming ways - for the better.

- If you are programming - emacs is better - you can interact with a running compiler, a running REPL, compile
  see the output, run again. It just works so seemlessly. And all the modes allow you to interact
  with the program in a much easier and stable way.
- If you are editing 1 line in the terminal on the fly ... probably VIM is better as it just is easy.

*And that's it*

I have a deadline approaching so will keep it short. Bye!


text:
![](https://img.shields.io/badge/Stability-Experimental-red.svg)

Kubernetes on Equinix Metal
===========================

This guide can be used as a reference to deploy Kubernetes on Equinix Metal bare-metal servers in a single facility.  This repository is [Experimental](https://github.com/packethost/standards/blob/master/experimental-statement.md) meaning that it's based on untested ideas or techniques and not yet established or finalized or involves a radically new and innovative style! This means that support is best effort (at best!) and we strongly encourage you to NOT use this in production.

| Component  | Version |
| ---------- | ------- |
| Kubernetes | v1.18.8 |
| Calico     | v3.15.1 |
| MetalLB    | v0.9.3  |

Kubernetes Network:

| Network                  | Subnet           |
| ------------------------ | ---------------- |
| Pod subnet               | <IP_ADDRESS>/12    |
| Service subnet           | <IP_ADDRESS>/16   |

Equinix Metal Network:

| Network                         | Subnet                    |
| ------------------------------- | ------------------------- |
| Equinix Metal Elastic IP(EWR1)  | <IP_ADDRESS>/31(example) |

Operating System:

This terraform script has been verified to work with ubuntu 18.04 (default) and 16.04. Ubuntu 20.04 works for most Equinix Metal instance types but the c2.medium.x86 seems to have pod network issues (unable to reach TCP port 80 between pods) with ubuntu 20.04 (possibly due to iptables bug).

TL;DR
----

This will deploy a cluster of 3, 1 master and 2 worker nodes. It will allow you to use the service type `LoadBalancer`.

Make a copy of `terraform.tfvars.sample` as `terraform.tfvars`  and set the `auth_token` as well as `organization_id`. You can also configure other options like the server type, amount of worker nodes, kubernetes version etc.

```sh
auth_token = "PACKET_AUTH_TOKEN"
organization_id = "PACKET_ORG_ID"
project_name = "k8s-bgp"
facilities = ["ewr1"]
controller_plan = "t1.small.x86"
worker_plan = "t1.small.x86"
worker_count = 2
docker_version = "19.03.10"
kubernetes_version = "1.18.3"
kubernetes_port = "6443"
kubernetes_dns_ip = "<IP_ADDRESS>"
kubernetes_cluster_cidr = "<IP_ADDRESS>/12"
kubernetes_service_cidr = "<IP_ADDRESS>/16"
kubernetes_dns_domain = "cluster.local"
```

```sh
terraform apply
```

You can now use the kubernetes service type `LoadBalancer` and you will be assigned a External IP.

For example we can deploy the traefik ingress and use that as our public load balancer.
Here we are using the `DaemonSet` deployment from the traefik [guide](https://docs.traefik.io/user-guide/kubernetes/).

We modified the Service by adding the `metallb.universe.tf/address-pool: packet-public` annotation and type to use `type: LoadBalancer` like so:

```yaml
kind: Service
apiVersion: v1
metadata:
  name: traefik-ingress-service
  namespace: kube-system
  annotations:
    metallb.universe.tf/address-pool: packet-public
spec:
  selector:
    k8s-app: traefik-ingress-lb
  ports:
    - protocol: TCP
      port: 80
      name: web
    - protocol: TCP
      port: 8080
      name: admin
  type: LoadBalancer
```

This results into this:

```sh
$ kubectl get svc -n kube-system
NAME                      TYPE           CLUSTER-IP       EXTERNAL-IP      PORT(S)                       AGE
kube-dns                  ClusterIP      <IP_ADDRESS>     <none>           53/UDP,53/TCP                 11m
traefik-ingress-service   LoadBalancer   <IP_ADDRESS>   <IP_ADDRESS>   80:32358/TCP,8080:32196/TCP   7s
````

Overall Network Topology
------------------------

![alt text](images/network-arch.png "Equinix Metal BGP Diagram")

BGP on Equinix Metal uses the private `/31` IPv4 network to peer with.

As an example in the diagram above the server has the IP `<IP_ADDRESS>/31` assign on the server and the gateway is `<IP_ADDRESS>/31`, which is the IP your would peer with since that is the IP assigned to the ToR router.

Kubeadm
-------

We will be using kubeadm to bootstrap the Kubernetes cluster.

To start we will be deploying a single master server with 3 workers.
We do not want to expose the Kubernetes components over the public internet and because of how the interface and network setup at Equinix Metal is we have to make this clear in out config as it by default will listen on all IPs/interfaces.

Example kubeadm.yaml:

[Link](kubeadm.conf.md)

NOTE: In kubeadm v1.13.3 it seems like the `KubeProxyConfiguration` configs are not being read correctly and so the kube-proxy is not using the `bindAddress` and so listening on all IPs of the server.

```sh
# Setup the first master
kubeadm init --config kubeadm-config.yaml
```

Take note of the resulting `kubeadm join` command

Run the `kubeadm join` command on the nodes you to add to this cluster.

e.g.

```sh
kubeadm join <IP_ADDRESS>:6443 --token tcqfab.8d5qen6tf2gaztam --discovery-token-ca-cert-hash sha256:9843f4de7165fb6edf141e0a35a4d815cdb318a6eba1a45fb85376d01fe8f382
```

Kubernetes Network Setup
------------------------

Equinix Metal has private ASNs setup for users to use.

ASN:

- 65530: Private Equinix Metal ToR
- 65000: Private Equinix Metal Server
- 65480: Private MetalLB

Issues:

[MetalLB cannot peer with BGP routers that Calico is already peering with](https://github.com/google/metallb/issues/114)

- To work around this we make it so that `bird` does not listen on the loopback if there is something configured by setting `passive on` in `bird`

### Calico

We will be using the Calico [Kubernetes API datastore—50 nodes or less](https://docs.projectcalico.org/v3.5/getting-started/kubernetes/installation/calico#installing-with-the-kubernetes-api-datastore50-nodes-or-less) setup for both policy and networking.

Since we are not using the typical Kubernetes Pod CIDR, `<IP_ADDRESS>/16`, and we are adding a custom `bird` template we have to change the manifest a bit.

```sh
# Download the Calico Manifest
curl -O \
https://docs.projectcalico.org/v3.5/getting-started/kubernetes/installation/hosted/kubernetes-datastore/calico-networking/1.7/calico.yaml

# Change the Pod CIDR
POD_CIDR="<IP_ADDRESS>/12" \
sed -i -e "s?<IP_ADDRESS>/16?$POD_CIDR?g" calico.yaml
```

To get the latest calico bird templates:

```sh
# List all the templates
kubectl exec calico-node-kvb9d -n kube-system -- /bin/ls -l /etc/calico/confd/templates

# Copy a template locally
kubectl cp \
  kube-system/calico-node-kvb9d:etc/calico/confd/templates/bird.cfg.template \
  bird.cfg.template
```

[Calico Custom BGP config](https://docs.tigera.io/v2.3/usage/custom-bgp-config)

You will need to edit the Global peers section in `bird.cfg.template` to make it so `bird` does not listen on the loopback IP.
If there is someone else trying to listen on that IP, in this case MetalLB will be listening on <IP_ADDRESS>.

You will need to add this line:

```sh
{{if eq $data.ip ("<IP_ADDRESS>")}}passive on; # Don't talk to yourself{{end}}
```

[GitHub Calico Issue](https://github.com/projectcalico/calico/issues/1603)

[GitHub MetalLB Issue](https://github.com/google/metallb/issues/114)

TODO: example calico config yaml.

```sh
...
# ------------- Global peers -------------
{{if ls "/global/peer_v4"}}
{{range gets "/global/peer_v4/*"}}{{$data := json .Value}}
{{$nums := split $data.ip "."}}{{$id := join $nums "_"}}
# For peer {{.Key}}
{{- if eq $data.ip ($node_ip) }}
# Skipping ourselves ({{$node_ip}})
{{- else}}
protocol bgp Global_{{$id}} from bgp_template {
  {{if eq $data.ip ("<IP_ADDRESS>")}}passive on; # Don't talk to yourself{{end}} <======== Add this line here
  neighbor {{$data.ip}} as {{$data.as_num}};
{{- if and (eq $data.as_num $node_as_num) (ne "" ($node_cluster_id)) (ne $data.rr_cluster_id ($node_cluster_id))}}
  rr client;
  rr cluster id {{$node_cluster_id}};
{{- end}}
}
{{- end}}
{{end}}
{{else}}# No global peers configured.{{end}}
...
```

Apply the config

```sh
kubectl create configmap calico-metallb-bird -n kube-system --from-file=bird.cfg.template
```

We will leave Calico doing the default node-to-node mesh but will add another peer which will be to our servers ToR (Top of the Rack) router.

First get the `calicoctl` binary

```sh
# Download the matching version
curl -O -L  https://github.com/projectcalico/calicoctl/releases/download/v3.5.0/calicoctl

# Make it executable
chmod +x calicoctl

# If you like you can move it to a valid PATH
mv calicoctl /usr/local/bin/calicoctl
```

Set a default BGP configuration for Calico

```sh
cat << EOF | DATASTORE_TYPE=kubernetes KUBECONFIG=~/.kube/config calicoctl create -f -
apiVersion: projectcalico.org/v3
kind: BGPConfiguration
metadata:
  name: default
spec:
  logSeverityScreen: Info
  nodeToNodeMeshEnabled: true
  asNumber: 65000
EOF
```

Setup the generic MetalLB BGP peer

```sh
cat << EOF | DATASTORE_TYPE=kubernetes KUBECONFIG=~/.kube/config calicoctl create -f -
apiVersion: projectcalico.org/v3
kind: BGPPeer
metadata:
  name: metallb
spec:
  peerIP: <IP_ADDRESS>
  asNumber: 65480
EOF
```

You will need to define the IP Pools we will setup with MetalLB in Calico as well,
in order for Calico to know they are allowed in the filter ACL

Examples:

```sh
cat << EOF | DATASTORE_TYPE=kubernetes KUBECONFIG=~/.kube/config calicoctl create -f -
apiVersion: projectcalico.org/v3
kind: IPPool
metadata:
  name: metallb-ewr1-public
spec:
  cidr: <IP_ADDRESS>/31
  disabled: true
EOF
```

```sh
cat << EOF | DATASTORE_TYPE=kubernetes KUBECONFIG=~/.kube/config calicoctl create -f -
apiVersion: projectcalico.org/v3
kind: IPPool
metadata:
  name: metallb-global-ips
spec:
  cidr: <IP_ADDRESS>/32
  disabled: true
EOF
```

```sh
cat << EOF | DATASTORE_TYPE=kubernetes KUBECONFIG=~/.kube/config calicoctl create -f -
apiVersion: projectcalico.org/v3
kind: IPPool
metadata:
  name: metallb-ewr1-private
spec:
  cidr: <IP_ADDRESS>/25
  disabled: true
EOF
```

We will also need Calico to peer with each of our servers ToR Router which requires a per node config. You can get BGP peer info directly from the API:

```
https://api.packet.net/devices/${INSTANCE_UUID}/bgp/neighbors
```

Setup the BGP peers for each worker node.

Example Calico peer config for older Equinix Metal locations where peering is done through the private ipv4 gateway adress:

```sh
cat << EOF | DATASTORE_TYPE=kubernetes KUBECONFIG=~/.kube/config calicoctl create -f -
apiVersion: projectcalico.org/v3
kind: BGPPeer
metadata:
  name: ewr1-worker-0
spec:
  peerIP: <IP_ADDRESS>
  node: ewr1-worker-0
  asNumber: 65530
EOF
```

```sh
cat << EOF | DATASTORE_TYPE=kubernetes KUBECONFIG=~/.kube/config calicoctl create -f -
apiVersion: projectcalico.org/v3
kind: BGPPeer
metadata:
  name: ewr1-worker-1
spec:
  peerIP: <IP_ADDRESS>
  node: ewr1-worker-1
  asNumber: 65530
EOF
```

For the new Equinix IBX locations, BGP peering is done through 2 link-local addresses, <IP_ADDRESS> and <IP_ADDRESS> where each IP represents one of the 2 top of rack routers for redundancy. Those 2 link-local peering IPs are always the same for every instance and in all the new Equinix IBX locations. For the Calico BGPPeer, the name under the metadata section changes for each peer but the node name under the spec section needs to remain the same as it is targeting the same node.

For calico, you will just need to add both peers under the same node spec hostname. So it would be something like this:

```sh
cat << EOF | DATASTORE_TYPE=kubernetes KUBECONFIG=~/.kube/config calicoctl create -f -
apiVersion: projectcalico.org/v3
kind: BGPPeer
metadata:
  name: ewr1-worker-0-peer1
spec:
  peerIP: <IP_ADDRESS>
  node: ewr1-worker-0
  asNumber: 65530
EOF
```

```sh
cat << EOF | DATASTORE_TYPE=kubernetes KUBECONFIG=~/.kube/config calicoctl create -f -
apiVersion: projectcalico.org/v3
kind: BGPPeer
metadata:
  name: ewr1-worker-0-peer2
spec:
  peerIP: <IP_ADDRESS>
  node: ewr1-worker-0
  asNumber: 65530
EOF
```

```sh
cat << EOF | DATASTORE_TYPE=kubernetes KUBECONFIG=~/.kube/config calicoctl create -f -
apiVersion: projectcalico.org/v3
kind: BGPPeer
metadata:
  name: ewr1-worker-1-peer1
spec:
  peerIP: <IP_ADDRESS>
  node: ewr1-worker-1
  asNumber: 65530
EOF
```

```sh
cat << EOF | DATASTORE_TYPE=kubernetes KUBECONFIG=~/.kube/config calicoctl create -f -
apiVersion: projectcalico.org/v3
kind: BGPPeer
metadata:
  name: ewr1-worker-1-peer2
spec:
  peerIP: <IP_ADDRESS>
  node: ewr1-worker-1
  asNumber: 65530
EOF
```

### MetalLB

> Kubernetes does not offer an implementation of network load-balancers ([Services of type LoadBalancer](https://kubernetes.io/docs/tasks/access-application-cluster/create-external-load-balancer/)) for bare metal clusters. The implementations of Network LB that Kubernetes does ship with are all glue code that calls out to various IaaS platforms (GCP, AWS, Azure…). If you’re not running on a supported IaaS platform (GCP, AWS, Azure…), LoadBalancers will remain in the “pending” state indefinitely when created.
> Bare metal cluster operators are left with two lesser tools to bring user traffic into their clusters, “NodePort” and “externalIPs” services. Both of these options have significant downsides for production use, which makes bare metal clusters second class citizens in the Kubernetes ecosystem.
> MetalLB aims to redress this imbalance by offering a Network LB implementation that integrates with standard network equipment, so that external services on bare metal clusters also “just work” as much as possible.
>
> \- [Why MetalLB?](https://metallb.universe.tf/#why)

At Equinix Metal there is no load balancing service provided and so we need to find another way to expose our services via the traditional `LoadBalancer` service type. To achieve this we use the BGP to the server feature.

```sh
kubectl apply -f https://raw.githubusercontent.com/google/metallb/v0.7.3/manifests/metallb.yaml
```

Example MetalLB config file:

```yaml
apiVersion: v1
kind: ConfigMap
metadata:
  namespace: metallb-system
  name: config
data:
  config: |
    peers:
    - peer-address: <IP_ADDRESS>
      peer-asn: 65000
      my-asn: 65480
    address-pools:
    - name: ewr1-public
      protocol: bgp
      addresses:
      - <IP_ADDRESS>/30
    - name: ewr1-private
      protocol: bgp
      addresses:
      - <IP_ADDRESS>/25
    - name: global-ip
      protocol: bgp
      addresses:
      - <IP_ADDRESS>/32
```

NOTE: After this is setup the master will have its calico-node as not ready becuase it is not peering with anything on <IP_ADDRESS> even though it's set to passive.

```sh
$ kubectl get pod -n kube-system -o wide | grep calico-node
calico-node-9pls6                           1/1     Running   0          7h47m   <IP_ADDRESS>   ewr1-worker-0       <none>           <none>
calico-node-cgcbb                           1/1     Running   0          7h47m   <IP_ADDRESS>   ewr1-worker-1       <none>           <none>
calico-node-wz4x4                           0/1     Running   0          7h47m   <IP_ADDRESS>   ewr1-controller-0   <none>           <none>
```

It is not peering with MetalLB becuase the metallb-speakers do not run on the master.

```sh
$ kubectl get pod -n metallb-system -o wide
NAME                          READY   STATUS    RESTARTS   AGE     IP           NODE            NOMINATED NODE   READINESS GATES
controller-7cc9c87cfb-q6hh4   1/1     Running   0          7h16m   <IP_ADDRESS>   ewr1-worker-0   <none>           <none>
speaker-jrzlc                 1/1     Running   0          7h16m   <IP_ADDRESS>   ewr1-worker-1   <none>           <none>
speaker-qgvp5                 1/1     Running   0          7h16m   <IP_ADDRESS>   ewr1-worker-0   <none>           <none>
```

Everything works though and the node-to-node mesh is also fine.

```sh
root@ewr1-controller-0:~# calicoctl node status
Calico process is running.

IPv4 BGP status
+---------------+-------------------+-------+----------+-------------+
| PEER ADDRESS  |     PEER TYPE     | STATE |  SINCE   |    INFO     |
+---------------+-------------------+-------+----------+-------------+
| <IP_ADDRESS> | node-to-node mesh | up    | 21:35:48 | Established |
| <IP_ADDRESS> | node-to-node mesh | up    | 21:35:48 | Established |
| <IP_ADDRESS>     | global            | start | 03:33:18 | Passive     |
+---------------+-------------------+-------+----------+-------------+

IPv6 BGP status
No IPv6 peers found.
```

[kubectl Cheat Sheet](https://kubernetes.io/docs/reference/kubectl/cheatsheet/)

repository: marvel-works/kubernetes-bgp

repo_name: marvel-works/kubernetes-bgp


text:
# Asva double panel

Double panel layout for vue.js.

## The gist

Imagine modal. Then modal inside of modal. This library does the same, just with two panels. Parent on the left - child on the right. Child on the left - parent on the right. Makes no sense? Check [demo](http://double-panel.asva.by/#/demo/DoublePanel/DoublePanel.demo.vue).

## Usage examples

* [Trizeri example](trizeri-double-panel-example.gif)

## Sponsors

[![Trizeri](https://trizeri.com/images/logo-and-text.png)](https://trizeri.com)

## Install

* **npm**: `npm install -D asva-double-panel`
* **yarn**: `yarn add -D asva-double-panel`

## Commands

* **yarn dev** - run dev server (then go to `/#/demo`)
* **yarn dist** - bundle distribution package for npm
* **yarn demo** - bundle demo

## How to use

First - create a double panel wrapper component.

In example **ListPanelExample** and **CloudPanelExample** are root panels (displayed by default).

```html
<template>
    <DoublePanel :left="leftPanel" :right="rightPanel"/>
</template>

<script>
  import { DoublePanel } from 'asva-double-panel'

  import PanelComponent from './PanelComponent.vue'

  export default {
    components: {
      DoublePanel,
      ListPanelExample,
      CloudPanelExample,
    },
    computed: {
      leftPanel: () => PanelComponent,
      rightPanel: () => PanelComponent,
    },
  }
</script>
```

Let's dive into panel component structure. 2 things to notice here:

* Register **panelMixin** in your component to make it a panel component.
* Add **value** prop to receive payload (toss data from one panel to another).

```html
<template>
    <div class="panel-component-example">
        <p>
            Test value from prop: {{ value.test }}
        </p>
        <p>
            <button @click="$panel.close()">Close</button>
            <button @click="$panel.closeChild()">Close child</button>
        </p>
        <p>
            <button @click="$panel.create()">Create</button>
        </p>
        <p>
            <button @click="$panel.switchPosition()">Switch position</button>
            Position: {{$panel.position}}
        </p>
        <p>
            <button @click="$panel.toggleFullWidth()">Toggle full-width</button>
            Full width: {{$panel.isFullWidth}}
        </p>
    </div>
</template>

<script>
  import { panelMixin } from 'asva-double-panel'

  export default {
    name: 'panel-component',
    mixins: [panelMixin],
    props: ['value'],
  }
</script>
```

#### Styles

You have to import styles for double panel to function properly.

* **css** - `~asva-double-panel/dist/css/main.css`

### Api

* `$panel.close()` - close current panel and its descendants.
* `$panel.closeChild()` - close only panel descendants.
* `$panel.switchPosition()` - move panel from left to right and vice-versa.
* `$panel.toggleFullWidth()` - widen the panel to occupy full space (useful for prints and tables).

#### Create new panel

`this.$panel.create(component, [payload, [options]])`, where

* **component** - component object (the thing you get via `import Component from 'Component.vue'`). If you want to create same component recursively - use `this.constructor`.
* **payload** - any data you want to provide into newly created component.
* **options** - additional options, if you don't provide any - defaults will be used.

Options:

* `replaceSelf` - Don't create new panel on top, instead replace current one.
* `fullWidth` [Boolean, default: false] - Create panel in fullWidth mode.
* `reuse` [Boolean, default: false] - If true, and panel with current component already exists on top of current one - we'll just refresh payload (useful for iframe reuse).
* `position` ['same' | 'opposite', default 'opposite'] - Defines whether new panel should be created directly on top of current one in opposite side.

## Features
* Two panel layout.
* Nested panels.
* Internal panel component.

## Feedback

If you feel something is not right - please leave feedback. I might even tweak library a bit for you needs if you case is common. : 3

## Licence

MIT

repository: asvae/double-panel

repo_name: asvae/double-panel


text:
pbis-auth
=========

This cookbook provides authentication against a Microsoft Active Directory domain on Linux systems. Written for an tested against Centos, but script has been kept simple enough that there is no reason it would not work against RedHat or Ubuntu, assuming you have a pbis-open package available from your package manager.

REQUIREMENTS
------------

* Centos 5/6
* sudo cookbook
* Likewise-open 7.5 from the Powerbroker Open site

ATTRIBUTES
----------

* ad_network: This is the Active Directory domain you want the system to join.  This is used to fetch a databag of the same name containing authentication details. If this is not set, a databag matching the Environment name will be fecthed (so you can have a bag for dev, test, prod etc with appropiate details).

USAGE
-----

Start by extracting the Likewise-open RPM from the shell script installer.
* Download the installer from http://www.beyondtrust.com/Products/PowerBroker-Identity-Services-Open-Edition/Evaluation/
* Run the installer to start the extraction process and then terminate the process
* Extract the .deb or .rpm file from the temporary directory and place this in a local repository


text:
---
layout: default
---

# 1997-08-31 - Re: Confirmation on Diana, please?

## Header Data

From<EMAIL_ADDRESS>(Anonymous)

To<EMAIL_ADDRESS>Message Hash: 96550a87634e4d6b950e98890374edff54cb53c495b72d1f3a25c6de4f5a043f

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-08-31 13:24:40 UTC

Raw Date: Sun, 31 Aug 1997 21:24:40 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Anonymous)
Date: Sun, 31 Aug 1997 21:24:40 +0800
To<EMAIL_ADDRESS>Subject: Re: Confirmation on Diana, please?

Up the paparazzi or whoever honored Labor Day
doing dirty work, giving a lesson: run, can't hide.

Two down, thousands more to go worldwide, the
sooner the better, inshallah, scare the beasts back
to bunker. Guards will drain their blood, day by day.

Grieve for the driver, maybe the royal bitch's cop,
praise Oswald or whoever.

{% endraw %}
```

## Thread

+ Return to [August 1997](/archive/1997/08)

+ Return to<EMAIL_ADDRESS>(Anonymous)](/authors/nobody_at_replay_com_anonymous_)"

+ 1997-08-31 (Sun, 31 Aug 1997 21:24:40 +0800) - Re: Confirmation on Diana, please? -<EMAIL_ADDRESS>(Anonymous)_


text:
---
title: Placing RadGantt inside RadWindow
page_title: Placing RadGantt inside RadWindow
description: Check our Web Forms article about Placing RadGantt inside RadWindow.
slug: gantt/how-to/placing-radgantt-inside-radwindow
tags: placing,radgantt,inside,radwindow
published: True
position: 0
---

# Placing RadGantt inside RadWindow

This help article demonstrates how to place **RadGantt** inside a **RadWindow**, setting its height and width to 100%, without displaying vertical and horizontal scrollbars.
##

If you place **RadGantt** inside a **RadWindow** and set its width and height to 100% scrollbars will appear. This is due to the borders adding 2% resulting in a content size that is 102% of its parent element's size. Showing the scrollbars can be avoided by placing the RadGantt in a container div and applying the following CSS styles to the div:

````CSS
.gantt-container {
    padding: 0 2px 2px 0;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}
````
````ASPNET
<telerik:RadWindow RenderMode="Lightweight" ID="RadWindow1" runat="server" VisibleOnPageLoad="true"
     Height="700" Width="1000" OnClientShow="OnClientShow">
    <ContentTemplate>
        <div class="gantt-container">
            <telerik:RadGantt RenderMode="Lightweight" ID="RadGantt1" runat="server" Width="100%"
                Height="100%" Skin="Default" ShowFullTime="true">
            </telerik:RadGantt>
        </div>
    </ContentTemplate>
</telerik:RadWindow>
````

repository: telerik/ajax-docs

gha_language: C#

repo_name: telerik/ajax-docs


text:
# Botometer Python API

With this piece of python code, you can extract a user's follwoers and run botometer to figure out whether they show bot-like bahvior or not. From [IUNetSci/botometer-python](https://github.com/IUNetSci/botometer-python) with some additional feature to extract followers from Twitter and only showing the Universal score of that acccount.

A Python API for [Botometer by OSoMe](https://osome.iuni.iu.edu).

## API Keys

### Mashape Market API key
Our API is served via [Mashape Market](//market.mashape.com). You must sign up
for a free account in order to obtain a Mashape secret key.

### Twitter app
In order to access Twitter's API, one needs to have/create a [Twitter app](https://apps.twitter.com/).
Once you've created an app, the authentication info can be found in the "Keys and Access Tokens" tab of the app's properties

### Installation
From your command shell install botometer, tweepy, csv, json, and pandas.

```
$ pip install botometer
$ pip install tweepy
$ pip install pandas
$ pip install json
```

### Python Code

in your shell run:

```
$ python follower_botometer.py
```

For more information on this response object, consule the [API Overview](https://market.mashape.com/OSoMe/botometer/overview#wiki-response-object) on Mashape.

repository: royapakzad/botometer-python

repo_name: royapakzad/botometer-python


text:
# go-geopoint

GPS Point encoding library with privacy in mind.

```go
import "go.zenithar.org/geopoint"

func foo() {
  p := geopoint.Encode(43.603574, 1.442917)

  fmt.Printf("%d\n", uint64(p))
  //<PHONE_NUMBER>1126838

  fmt.Printf("%s\n", p.Code())
  // 10AB5:69A51:94D36
}
```
## What's the difference with geohash ?

For compatibility, you should use geohash.

The main objectives is to find a way to encode point (lat,lon) as an uint64
(like geohash) and make it sortable.

## Brain dump

I tryied to apply CryptoPan anonimyzer on the uint64 encoded coordinate, I know that
this algorithm is told to be prefix-preserving, but after application of the algorithm
point are not keeping their geospace properties at first sight.

I'm trying to find a cryptographic keyed hash function for GPS point, and the result
should be a GPS point too. Maybe all GPS related arithmetic should be influenced by
the cryptographic hash, like in homothecy. GPS Point anonymization are based on
precision loss.

A real GPS point is projected in another `planet` GPS point. The other planet is
generated with the `key` of the hash function. An origin point as always the same
other planet point value (injective function but collision must be proved also).
It could be visualized with a homothetic transformation of the original planet
were the `key` could be part of the homogeneous dilatation factor, but not only
countries of the generated earth should have different shapes.

Maybe I should investigate in Format Preserving Encryption field...
I'm not a mathematician or a scientist, just an intuitive person.

## Fun ideas

:star2: It could be used to represents GPS coords on other planets !

```
$ <planet>:<tile>:<inner-x>:<inner-y>
```

repository: Zenithar/go-geopoint

repo_name: Zenithar/go-geopoint


text:
# Remote Profile Cleanup

This simple tool was developed to remotely delete one or more user profiles from a Microsoft Windows workstation or server. It is a HTA application developed in VBS, JavaScript, and HTML.

### Installing

Just copy the .HTA file anywhere on your system and run it.

### Usage

Enter a hostname into the input field at the top. Leaving the hostname blank will cause the tool to connect locally. Uncheck "Use Windows Integrated Authentication" if you want to supply a different username and password. All user profiles will be listed. Check the ones you want to remove and click Delete.

### Screenshot

![ScreenShot](https://user-images.githubusercontent.com/24300330/29925362-bb2f98c6-8e25-11e7-9c57-f0063f460f33.png "Remote Profile Remover")


text:
# Lumina

Lumina is a package designed to let you create custom route-by-route preprocessing and validation methods for your Restify or Express server.
Processing methods are added to a middleware manager that allows you to select which routes have which validation methods executed on them.

## Usage

Start out by installing Lumina using npm:

    npm install lumina

Set up your Restify/Express server to use Lumina:

```javascript
var lumina = require("lumina");

var lumen = new lumina();

lumen.use("requiredBodyFields", lumina.requiredBodyFieldValidator());
lumen.use("requiresAuthentication", function(forceAuth) {
    return function(req, res, next, pass) {
        if ( forceAuth === false ) {
            return pass();
        }
        if ( req.authorization.credentials === "valid auth token" ) {
            return pass();
        }
        res.status(401);
        res.send({
            code: "UnauthorizedError",
            message: "You aren't authorized to access this resource"
        });
        return next();
    };
});
```

Then set up your routes to take advantage of the validators that are set up.

```javascript
server.post("/models", lumen.illuminate({
    requiredBodyFields: ["fieldA", "fieldB"],
    handler: function(req, res, next) {
        Model.create({a: req.body.fieldA, b: req.body.fieldB}, function() {
            res.send(201);
            return next();
        });
    }
}));

server.get("/models/:modelId", lumen.illuminate({
    requiresAuthentication: true,
    handler: function(req, res, next) {
        Model.fetch(req.params.modelId, function(model) {
            res.send(200, model);
            return next();
        });
    }
}));
```

### Features

Gives you an easy way to keep your validation code out of your ordinary application code.
Can be extended to execute any common validation or request manipulation code in your routes.

repository: Eagerod/lumina

gha_language: JavaScript

repo_name: Eagerod/lumina


text:
# Limitation

An efficient rate limiter with several backends, including a Kademlia DHT.

## Features

- Fully synchronous local limit checking for lowest latency and high
    throughput. Using node 4.3 on a single core, a throughput of about 8
    million limit checks per second is typical.
- Backends scale constant in number of requests, and linear in number
    of keys. Tested with thousands of distinct limits.
- Backends:
    - Resilient Kademlia DHT storage backend using an exponentially decaying
      counter.
    - Simple and very fast local in-memory storage backend.

## Installation
```bash
npm install limitation
```

## Usage

Simple in-memory backend:

```javascript
var Limitation = require('limitation');

var ratelimiter = new Limitation();

if (ratelimiter.isAboveLimit('some_key', 10)) {
  console.log('Limit of 10 req/s exceeded!');
}
```

Kademlia backend:
```javascript
var Limitation = require('limitation');

var ratelimiter = new Limitation({
    seeds: [{
        address: 'localhost',
        port: 3050
    },
    // Host names are also supported, expands to some.host:3050
    'some.host'],

    // Optional parameters
    // Address / port to listen on
    // Default: localhost:3050, random port fall-back if port used
    listen: {
        address: '<IP_ADDRESS>',
        port: 3050
    },
    // Counter update / block interval; Default: 10000ms
    // Shorter interval means quicker limiting, but also higher load.
    interval: 10000
});

// Returns Promise<Limitation>
ratelimiter.setup();

if (ratelimiter.isAboveLimit('some_key', 10)) {
  console.log('Limit of 10 req/s exceeded!');
}

// Clears any set timers so the process can exit cleanly.
ratelimiter.stop()
```

See also [test/index.js](test/index.js) for a runnable Kademlia example. It
starts multiple DHT nodes, and you can start multiple copies of the script to
play with nodes going down etc.

repository: wikimedia/limitation

repo_name: wikimedia/limitation


text:
# Getting Started with Rocket on Ubuntu Trusty

The following guide will show you how to build and run the sample [etcd aci](https://github.com/coreos/etcd/releases/download/v0.5.0-alpha.4/etcd-v0.5.0-alpha.4-linux-amd64.aci) on the standard vagrantcloud.com [box for ubuntu trusty](https://vagrantcloud.com/ubuntu/boxes/trusty64).

## Download and start an Ubuntu Trusty box

```
vagrant init ubuntu/trusty64
vagrant up --provider virtualbox
```

## SSH into the VM, Install Rocket and Download the ACI

```
vagrant ssh
sudo su

curl -L https://github.com/coreos/rocket/releases/download/v0.1.1/rocket-v0.1.1.tar.gz -o rocket-v0.1.1.tar.gz
tar xzvf rocket-v0.1.1.tar.gz
cd rocket-v0.1.1
./rkt fetch https://github.com/coreos/etcd/releases/download/v0.5.0-alpha.4/etcd-v0.5.0-alpha.4-linux-amd64.aci

```

## Run the ACI

Now try running the container and you should see output like this:

```
./rkt run https://github.com/coreos/etcd/releases/download/v0.5.0-alpha.4/etcd-v0.5.0-alpha.4-linux-amd64.aci
/etc/localtime is not a symlink, not updating container timezone.
2014/12/02 08:13:11 no data-dir provided, using default data-dir ./default.etcd
2014/12/02 08:13:11 etcd: listening for peers on http://localhost:2380
2014/12/02 08:13:11 etcd: listening for peers on http://localhost:7001
2014/12/02 08:13:11 etcd: listening for client requests on http://localhost:2379
2014/12/02 08:13:11 etcd: listening for client requests on http://localhost:4001
2014/12/02 08:13:11 etcdserver: name = default
2014/12/02 08:13:11 etcdserver: data dir = default.etcd
2014/12/02 08:13:11 etcdserver: snapshot count = 10000
2014/12/02 08:13:11 etcdserver: advertise client URLs = http://localhost:2379,http://localhost:4001
2014/12/02 08:13:11 etcdserver: initial advertise peer URLs = http://localhost:2380,http://localhost:7001
2014/12/02 08:13:11 etcdserver: initial cluster = default=http://localhost:2380,default=http://localhost:7001
2014/12/02 08:13:11 etcdserver: start member ce2a822cea30bfca in cluster 7e27652122e8b2ae
2014/12/02 08:13:11 etcdserver: added local member ce2a822cea30bfca [http://localhost:2380 http://localhost:7001] to cluster 7e27652122e8b2ae
2014/12/02 08:13:12 raft: elected leader ce2a822cea30bfca at term 1
2014/12/02 08:13:12 etcdserver: published {Name:default ClientURLs:[http://localhost:2379 http://localhost:4001]} to cluster 7e27652122e8b2ae
```

You are now running etcd inside of a rocket container.

repository: hazbo/rocket

repo_name: hazbo/rocket


text:
# bat-ager

This project is an automated hardware and software tool for aging batteries in a precise fashion. The repo includes both hardware schematics and firmware.

**HARDWARE**

The aging process is done by repeatedly charging and discharging the battery. The hardware therefore switches between a charging mode and a discharging mode. Charging is done using a bi-directional DC/DC converter powered by a benchtop supply. Discharging is done via a DC/DC converter, carefully controlling a fet that shorts the battery to ground. Current is measured using a shunt and op-amp. The PCB is divided into five charging sections so that multiple batteries may be aged simultaneously. The system is controlled using an STM32F0 MCU. Also supports injecting a small AC ripple voltage during charging and discharging, which is used to measure the battery's impedance in real time.

**FIRMWARE**

The firmware is based on the STM HAL libraries. Features include:
+ Independent charge/discharge settings for each battery
+ Constant current / constant voltage charging, low-voltage disconnect
+ Programmable load for discharging
+ Injection of small AC ripple voltage
+ Data collection and reporting

~~The firmware is Arduino based to make development easy (though I use the [Arduino makefile](https://github.com/sudar/Arduino-Makefile) to make customizing and automation easier in Linux). Features will include:~~
~~+ Independent charge/discharge settings for each battery~~
~~+ Serial communication via FTDI cable. With a Raspberry Pi attached, can be monitored via SSH.~~
~~+ Safeties ?!~~

repository: awdensmore/bat-ager

repo_name: awdensmore/bat-ager


text:
This playbook is part of the 'Malware Investigation And Response' pack. For more information, refer to https://xsoar.pan.dev/docs/reference/packs/malware-investigation-and-response.
This playbook supports investigation actions for the analyst, including:
- Running a full AV scan for a specific endpoint.
- Requesting an investigation package (a zip file containing forensic data with a size of ~ 15MB) from an endpoint.
- Requesting to run automatic investigation on an endpoint.

## Dependencies
This playbook uses the following sub-playbooks, integrations, and scripts.

### Sub-playbooks
Microsoft Defender For Endpoint - Collect investigation package

### Integrations
MicrosoftDefenderAdvancedThreatProtection

### Scripts
This playbook does not use any scripts.

### Commands
* microsoft-atp-run-antivirus-scan
* microsoft-atp-start-investigation

## Playbook Inputs
---

| **Name** | **Description** | **Default Value** | **Required** |
| --- | --- | --- | --- |
| Task | Option for input \( can be entered as comma-separated values\):
\`Full Scan\` - Fully Scan the provided endpoint/s
\`Collect Investigation Package\` - Collect investigation package from endpoint/s \(only for supported devices\)
\`Automated Investigation\` - Run Automated Investigation on the provided endpoint |  | Optional |
| EndpointsID | Provide a list of endpoints for the Scan and Collection of investigation Package to be run on. |  | Optional |
| AutoCollectinvestigationPackege | True/Fasle | True | Optional |
| AutoAVScan | True/Fasle | True | Optional |
| AutoAutomatedInvestigation | True/Fasle | True | Optional |

## Playbook Outputs
---
There are no outputs for this playbook.

## Playbook Image
---
![MDE - Pro-Active Actions](../doc_files/MDE_-_Pro-Active_Actions.png)

repository: demisto/content

repo_name: demisto/content


text:
# Packaging notes

## Overview

This section exposes information useful when designing a walt package for a new Linux distribution.

## Change the default systemd service names

WalT server manages some services through systemd. You may specify the name of
these services in server configuration file.
Those values are optional, and defaults to the names used in Debian.
Currently, only the NFS server can be configured this way, because other services
are either run as a walt-specific service configuration, or have no interaction
with WalT server daemon.

The content of this file could be:
```
$ cat /etc/walt/server.conf
{
    "network": {
        # [...]
    },
    # Services configuration
    # ----------------------
    "services": {
        "nfsd": {
            "service-name": "nfs-kernel-server.service"
        }
    }
}
```

repository: drakkar-lig/walt-python-packages

repo_name: drakkar-lig/walt-python-packages


text:
# Use case : Integrate syslogs to detect SSH failure connections

**Workflow :**
- Integrate syslogs from ubuntu docker container into a kafka topic `logs`
- Parse syslogs and extract only ssh connection (Failure & Accepted) via logstash into kafka topic `ssh_logs`
- Use KsqlDb to materialize only failed connection windowing 5 minutes, group by user
``` sql
CREATE OR REPLACE TABLE SSH_TABLE_LOGS
    WITH (kafka_topic='SSH_TABLE_LOGS') AS
    SELECT SSHD_USER,
           COUNT(SSHD_USER) AS BAD_AUTH_COUNT,
           WINDOWSTART as WINDOW_START,
           WINDOWEND as WINDOW_END,
           AS_VALUE(SSHD_USER) USER
    FROM SSH_LOGS
    WINDOW TUMBLING (SIZE 5 MINUTES)
    WHERE SSHD_RESULT = 'Failed'
    GROUP BY SSHD_USER;
```
- Stream this table into a kafka topic `SSH_BAD_AUTH_COUNT`
- Use ElasticSinkConnector to forward `SSH_BAD_AUTH_COUNT` record into an elasticsearch db
- Use Kibana Dashboarding to visualize metrics

## How to run

Start command:
```
$ playground run -f start<tab>
```

At the end of the `start.sh` log ouput, you have something similar like this :
``` log
15:23:29 ℹ Try to connect with a wrong password on ssh endoint localhost:7022
15:23:29 ℹ <ssh test@localhost -p 7022> or <ssh admin@localhost -p 7022>
15:23:29 ℹ Explore in parallel Kibana dashboarding at http://localhost:5601/app/dashboards#/view/076624e0-58f1-11ec-9ae7-ed37822fa749?_g=(filters:!(),refreshInterval:(pause:!f,value:2000),time:(from:now-15m,to:now)) to show in real time metrics on SSH failure connections
```

You have just to try to connect in ssh daemon container using this command :
``` bash
ssh test@localhost -p 7022
# OR
ssh admin@localhost -p 7022
```

Please enter a bad password to complete the workflow.

Visit the dashboard URL present in the end of `start.sh` logs output

Please try to connect with a right password, you can visualize that counter doesn't increase.
```
Below correct passwords
--------------------
USER | RIGHT PASSWORD
--------------------
test | test
--------------------
admin| admin
--------------------
```

## How to stop

Stop command:
```
$ playground run -f stop<tab>
```

repository: vdesabou/kafka-docker-playground

gha_language: Shell

repo_name: vdesabou/kafka-docker-playground


text:
# Yetamine branching #

A *published branch* must respect a common naming schema with following rules:

* Branch names are hierachical.
* Branch name components are separated with `/`.
* The first name component indicates the type of the branch.

The usual `master` branch should be avoided, except for simple repositories with strict linear history or when the `master` branch name is required for some reason.

A *private branch* does not have to obey any rules. The commonly used private branch names are `current` for the current working state and `playground` for experiments that shall be scratched later.

## Branch types ##

Some of the branch types are defined by the used workflow, e.g., `version/` or `fix/` defined by Yetamine workflow. The list below provides a few more branch types:

* `feature/`: introduces a new feature with the working name of the feature included in the branch name.

* `improve/`: provides improvements with preferably no external visibility, like code refactoring, reformatting or clean-up. Attempts to resolve an issue should be rather handled within a `resolve/` branch.

* `resolve/`: supplies an issue resolution. The name of the branch should refer to the ticket number. It is a good idea to start the branch with an empty commit with the commit message describing the problem to solve, the final commit before merging the branch elsewhere should then describe the solution or the state after the resolution.


text:
---
layout: post
title:  "Intro to Cross platform App development"
date:   2015-05-15 13:00:00
categories: dev
comments: true
---

https://www.airpair.com/javascript/posts/switching-from-ios-to-ionic

Phonegap/Cordova
https://www.youtube.com/watch?v=sSr1s19gND8

Context: wrapper around a web application

Challenges:
  To a web developer, there's quite a lot of challenge. In term of architecture, you need to think to an a offline first app.
  With that, comes a all bunch of sub-challenges: internet lost, app launched in background (JS stop).


text:
farmbot-precision-agriculture-dss
=================================
For a high level overview of what the Decision Support System (DSS) does, as well as context of how it fits into the other FarmBot software components, see the wiki page at: http://farmbot.cc/wiki/Decision_Support_System

Technical documentation coming soon here on GitHub

# Technical Documentation
## Summary
The Farmbot Decision Support System (DSS) Engine coordinates all of the channels
and modules, scheduling and running the modules for each channel, producing an
optimized schedule of operations for the Farmbot to grow plants. The DSS Engine
is written in Scala, an object-functional programming language. Scala is
compiled to Java byte code and is run on the JVM. Another key component of the
DSS Engine is the use of Amazon Web Services (AWS) DynamoDB and S3 services, for
storing information needed by the Farmbot DSS such as channel configuration and
modules, as well as communication status information within the DSS Engine, such
as job statuses.

The DSS Engine has two main programs, which run simultaneously. The MasterMain
program checks farm channel schedules to find channels that are ready to be run,
and creates the jobs for the channel, in a linked list structure so that each
job for the channel is run in the correct order. The SlaveMain program checks
for and runs ready jobs, updating job statuses along the way. Each job in a
channel passes its output to the next job as input, with the output of the final
job for a channel being POSTed to the Farmbot website, with the optimized
schedule of instructions for the Farmbot.

## Master Main
The Master Main program runs continually, executing the following process every
5 minutes. First, the Farm Channel DynamoDB table is scanned (based on the
schedule for the channel and the current time), which returns the farm channels
that are ready to be run. For each ready Farm Channel, the MasterMain gets the
resourceIds for the farm channel, by using the farm channel id as a key into the
Resource DynamoDB table. The list of modules for a channel is retrieved from the
channel configuration, which is retrieved from the farmbot-dss-channels S3
bucket, with a key of the form "farmChannel_version". For each resource, a
linked list of jobs for each module is created, setting the first job to 'ready'
 and the rest to 'pending'. Each job is added to the JobStatus table.

## Slave Main
The Slave Main program also funs continually, repeating the following process.
SlaveMain scans the JobStatus table for ready jobs. When a ready job is found,
the executable module for that job is run. The stdout and stderr for the
module run are each written to the farmbot-dss-rundata S3 bucket. The status of
the job is updated based on the result of the run, if successful the next job in
the list is changed from pending to ready. For the final job for a farm
channel resource, the output of the optimized Farmbot instructions is sent to
the Farmbot website through and HTTP POST.

## AWS

### DynamoDB
The DSS Engine uses several DynamoDB tables, which are primarily used for
communicating status and other information internal to the DSS.

#### farmbot-dss-ChannelFarm
The key into this table is ChannelAndVersion, which is of the form
"channelName_version". The table also has entries for FarmId (Int),
LastRunTime (Int), OpaqueId (String), ScheduleHour(Int, Optional), and
ScheduleMinute (Int). The LastRunTime and ScheduleHour/ScheduleMinute fields
are used to determine whether a channel is ready to be run. If a channel does
not have a ScheduleHour entry, this means it is run hourly, after the
ScheduleMinute. Otherwise, the channel is run daily, after the defined
ScheduleHour:ScheduleMinute each day. For example, a channel with ScheduleHour =
10 and ScheduleMinute = 15 will be ran once a day after 10:15. A channel with
no ScheduleHour and ScheduleMinute 30 will be ran hourly, 30 minutes after each
hour. To determine whether a channel is ready to be run by the DSS, the engine
checks this table to determine which channels are ready to be run.

#### farmbot-dss-FarmResources
The primary key into this table is FarmChannelOpaqueId, a String. The other
entry is ResourceId, a String. This is a one-to-many table, so each OpaqueId
may have many entries in the table, with different resourceIds. This allows
a FarmChannel to have multiple resources in the DSS Engine. When a channel is
ready to be run, the DSS gets a list of the resources for the channel from this
table. Then, for each resource in the channel, a list of jobs is created, one
for each module in order.

#### farmbot-dss-JobStatus
This table is used in the DSS Engine to store status information on the jobs.
The most important fields are the "Status", "NextId", and "PreviousId" fields.
The status field may be "Ready", "Pending", "Running", "Success", or error
statuses (such as "ErrorInvalidOutput" or "TimedOut"). "Ready" means a job is
ready to be run and "Pending" means a job is waiting for another job to be run
before it can be run. The "NextId" field defines the next job id that is ready
to be run after this job. The "PreviousId" field defines the previous job id
that was run before this job. This creates the linked list structure of jobs.
When the list of jobs is created for a farm channel's resource, the first job
is set to "Ready" with others set to "Pending". When a job is finished, it sets
its NextId job to "Ready" state. This is how the order of jobs is enforced.

#### farmbot-dss-ModuleConfiguration
The primary key of this table is ModuleName, of the format "moduleName_version".
There is also a boolean entry Persistent, and an integer entry Timeout. These
define whether a module is persistent, and how many milliseconds before a module
times out, respectively

#### farmbot-dss-ModuleConfiguration
### S3
The DSS Engine uses several S3 buckets, each of which is described below

#### farmbot-dss-channels
The farmbot-dss-channels bucket is used to store Farmbot channel configurations.
The keys into this bucket are of the format "channelName_version". Each file
in the S3 bucket is a file holding the channel configuration JSON. The channel
configuration JSON should fit the following schema:

 {
      "name" : String,
      "version" : Int,
      "modules" : List[Modules],
      "metadata" : Map,
      "initialInput" : JSON,
      "schema" : JSON Schema
   }

For the list of Modules, each module should fit the schema:

 {
      "version" : Int,
      "name" : String,
      "persistent" : boolean,
      "timeout" : Int
   }

The schema field defines the JSON schema that the output of modules must adhere
to. The initial input field's JSON must also fit this schema.

#### farmbot-dss-modules
This S3 bucket contains the modules which the DSS Engine runs for channels. The
key for this table is "moduleName_version". A module can be any arbitrary
executable file.

#### farmbot-dss-rundata
This S3 bucket stores the stderr and stdout for each job that the DSS Engine
runs. The stdout run data of each job is passed as the input to the next job.
Another important use of the run data is for debugging when errors arise.

## Integration
In order to integrate the DSS Engine with the rest of the Farmbot systems, the
main work needed is to update the DynamoDB tables and S3 buckets when modules
are created or farm channels are configured on the Farmbot website. Other than
that, servers need to be setup to run the MasterMain and SlaveMain programs. The
DSS Engine was created to continuously run, checking for and running ready jobs
as described above.

When a Farmbot module is created, the executable file needs
to be put in the farmbot-dss-modules bucket under the key "moduleName_version". An entry for this module also needs to be added to the
farmbot-dss-ModuleConfiguration table, defining a timeout for the module and
whether it is persistent.

When a Farmbot farm channel is configured on the Farmbot website, the
appropriate S3 buckets and DynamoDB tables need to be updated for this channel:
farmbot-dss-ChannelFarm and farmbot-dss-FarmResources tables,
farmbot-dss-channels bucket.

AWS has APIs for Java, .Net, Node.js, PHP, Python, and Ruby. The API
documenation can provide instruction on how to update the tables and buckets.
For an example of the use of the AWS API, the files in
src/main/scala/aws/{dynamo,s3} use the Scala AWS API (a wrapper around the
Java API) to add as well as retrieve entries from the Farmbot DynamoDB tables
and S3 buckets.

Once the servers are set up to run the DSS Engine main programs, and the Farmbot
website is configured to update the appropriate tables and buckets when a
module or farm channel is added, the DSS Engine is ready to run. The final
output for each resource in each channel (from the final module) is sent to
the Farmbot website in an HTTP POST.


text:
Disable Ipv6 stack
============================

Disables nodes ipv6 stack options in sysctl without reloading and apply them

Requirements
------------

Ability to access the nodes through public or private IPv4 networks

Role Variables
--------------

Dependencies
------------

User should reboot or reload sysctl after the role is run (because maybe the ansible uses the ipv6 network already)

Example Playbook
----------------

Including an example of how to use your role (for instance, with variables
passed in as parameters) is always nice for users too:

- hosts:  servers
  become: yes
  roles:
    - { role: disable_ipv6 }

License
-------

Apache 2

Author Information
------------------

GRNET

repository: Tas-sos/argo-ansible

repo_name: Tas-sos/argo-ansible


text:
NOTICE
=========

 **This project was done with little knowledge on Scala and playframework! Some parts of the code should not be taken as best practice  examples or examples at all. Refactoring  is planned.
 I've done this just for fun.**

 Thank you for reading!

Spirit-Play
=================================

##What is Spirit?
 Spirit-News is a simple blogging system for the Faculty of Computer Science of the University of Applied Sciences Schmalkalden!

##Features
 * News will be directly posted on Twitter and Facebook
 * responsive design
 * using playframework, Java 8 and Elasticsearch
 * personal schedule stored in localstorage of the browser
 * ical export to import to your favorite calendar application
 * schedule will updated dayly

#Quickstart
 **NOTICE**: You have to install elasticsearch and start the daemon.
 The fowllowing command will create the Database:

```shell
    curl -XPUT 'http://localhost:9200/spirit-play'
```

For development you need jdk8 or higher.
```shell
 cd /path/to/repo
 ./init.sh
 ./bin/activator
 ~run
```
This will download all librarys and start the application in dev mode.
For IDE setup take a look [here](https://playframework.com/documentation/latest/IDE).

gha_language: Scala