text:
---
title: Thoughts on a Plane
date: 2022-01-25
layout: post
excerpt: "I'm thinking about sacrifice for some reason. A note in Dion Fortunes 'Dr. Taverner' stories about an affair between a poor Indian woman and a British administrator, where the affair was unhappy as a sacrifice to pay for the important role the child would play in the world."
categories: metaphysics
---

{% image /images/bonsai-unsplash.jpg %}
Photo by Devin H on Unsplash

I'm thinking about sacrifice for some reason. A note in Dion Fortunes
"Dr. Taverner" stories about an affair between a poor Indian woman and
a British administrator, where the affair was unhappy as a sacrifice
to pay for the important role the child would play in the world.

How is that so? What is possibly altered "downwind" or should I say
"down-plane" in a fortuitous way? I think about how sacrifice alters
the consciousness of the beings who experience the loss.

I had an unhappy time as a kid with my peers. They were mean and bullying.
Girls were unfriendly. I so much wanted their friendship...and love!
But it was firmly denied. It seems unfair. At any rate, it did change me.
Now I am not bitter, because I feel many gifts. However, those gifts came
because I walked a lonely road. I wouldn't have them...I wouldn't have
meditated and found joy if I'd been given that kind of happy companionship
that makes lives like Barbara's parents (no direspect to these wonderful people!
I only mean that they felt and expressed ease more than loneliness,
joy more than suffering. They passed all this on as loving parents, which
definitely improved the world).

Sacrifice then created gifts in the present. The present gifts came because
the sacrifice altered the container of the being that felt the pain. The
water held by that container was now different...or maybe the shape of the
container is different. A sacrifice is a twist...a bend...a kink.

A bonsai tree undergoes such pain, and in the end is a miniature story of
great beauty. The bends in the tree are the appearance of maturity. And not
only appearance, but the reality of maturity.

A related thought about sacrifice is the Rosicrucian idea that alcohol was
introduced to the western race as a way to cut them off from the world of
spirit. And usefully so. Without the spirit connection, commitment is
deepened to physical existence. The western man had better build his heaven
here, because he couldn't share the feeling that it waited for him behind
three breaths as the Amerindian, the Indian or the Chinese man knew.

We can see that Jesus never denied reincarnation, but for whatever reason,
His church didn't teach it. That was useful. It created people cut off
in an archipelago. And look! They did what was expected of them: they made
the world cleaner, safer, amazing. They labored over their increasingly
complicated machines, they wrote complex computer programs. They even
flew to the moon.

All along the way, it was clear that the Indian or Chinese mind was just as
capable if not more capable of subtle mathematical thought. All well and
good, but these people didn't relentlessly seek application of those
subtle ideas the way western people did.

I'm sure we've reached the end of this road...this archipelago of dulled
spirit. We're in the period of diminishing returns of this mode of being.
On the bleeding edge, they continue to kill their God. Their machines are
so fine now that electrical activity is controlled to the point that
neighboring electrons on missions begin to interfere with each other -- they
are that finely manipulated.

I'm flying over England, land of the pub and pint. As they conquered the world,
they drank. The "spirit" in alcoholic spirit was a sop to ease the pain of
the loss of connection with God.

The controlling powers knew that people denied this connection would
both rail at the loss, and build monuments to the unseen, now shut-up
realm. That there would be a darkening of spirit...that the greatest evils
would emerge from this barred gate. And that the powers of apprehension in
the physical vehicle of man would be heightened as well. The effluvia
squeeze out both sides of the tube.

This was a sacrifice. The sacrifice made by the west. For all their wealth,
was it worth the loss of God?

Who can answer that question? It is a pointless question. It was willed that
it be so on levels so far above us as to be like the weather: it is
useless to complain.

So, the window is closing. Now, God is our only chance. We must find Him
in great numbers, and that will change what we do day to day.

We are worked on like the bonsai tree. We are...in some way...beautiful.
But terrible, too. As befits gods in the womb.

## At home

Later, at home, I meditated and felt that thoughts are things. We are
scanning over an idea with our thought...we are rendering a multi-dimensional
structure into "thought space" where we can reason about it. The structure
we are traversing has a reality on some plane.

This activity will eventually move from software to hardware. What is for
us now the outermost limit of intelligent reasoning and subtle analysis will
one day be an organ. It will be the ground easily passed over by future
beings. None of this should make us feel bad or sad to live in the time
before that day. To each is given his work, and there is dignity in
simply doing it. Also, we can all come to understanding. There is no
barrier between us and our Father save what we imagine (and then must
laboriously tear down). To take my thoughts above about hardware/software
too literally is to become a futurist, and there are few sadder creatures!

It is simply that I can better feel now the mechanical, stereotyped nature
of my traverse across an idea. This means that there is a part of my
being that sits in familiar terrain, doing it's job so often that it has
fashioned mechanism, and well ahead of my dawning apprehension of its labors.

## A few days later...

Terrible 12 hour long caffeine withdrawal headache. Now, coffeed-up, I can
breathe again. This happened to me in the summer when I first quit coffee.
I had to taper it down. Now, after 2+ weeks in the USA drinking coffee,
the headache was even worse, and quite relentless. It came on at night,
when I couldn't go buy any coffee. Finally, stores opened at 8 am and I
could get some, but by then a war between tiredness and the headache had
shifted such that sleep won out. I got some coffee around 10, and now,
11:30, I'm finally recovering.

It was an interesting night though. Many quasi-astral-projection experiences.
Many insights, which, like dreams, have now faded because I didn't write
them down in time. What remains is the idea that there are no cliffs in
experience. That the border between one state of consciousness and another
is always gradual. This is good news! It means that if you are interested
in any particular thing, you can reach it from where you are without
some special magic or a gimmick. However, the way may be long and require
vast patience.

Going further in the world of spirit is akin to carving a statue out of
a block. It's only by cutting something away that a new frontier of
understanding is reached. It's easy to say things like "mind is everything,"
or "truth is within," but those statements are only meaningful when
they come from a place of experience. Yes...you may "mouth" these
platitudes, because you *suspect* there is value in those ideas.
And that is not unhelpful. However, the cutting away of unnecessary
material only comes after a taste. At that point, it's not that you
have become someone with a strong will who sacrifices pleasures A or
B. Instead, you've simply dropped those parts of your psyche that are
attuned to desire those pleasures. They just aren't there anymore.

Lending credence to the phrase "mind is everything," that dropping did
ultimately take place because your rational mind saw the logic in the
letting go of something that was beside the point. I've long been
suspicious of a way of holding spirituality that prioritizes feeling
over thinking. I believe they are fooling themselves: they are
merely entering a cul-de-sac of mind in which the thinker enters an
imaginative space in which thinking is deprecated. This is a kind of
jungle-gym. Their rational self is very much there, it is only playing
a game. The problem with this approach is that games always end, and
with the ending comes dualism -- you flip between "spirit time" and
"practical time," and it's clear that the "practical time" consciousness
is the adult.

Mind is not the enemy. It is the vehicle, and must be treated well.
Do no violence to its apprehensions. Rather, let them carry you when
they are sound. When you have a hunch that they do not serve, try to
maneuver into a place where mind can be shown the delta between the
end state of its own idea, and the alternate. By its very nature, it
must choose the better path at that point. This is the way of
relationship. You are helping each other.

Another thing that keeps coming up -- my use of the term "you." First off,
when I write "you" here, I am referring to myself. That is, I'm in no
way trying to tell some reader out there what they had better think or do,
I'm reporting the gyrations of my own mental experience. Second, the
"you" in the subject position is one of several. Hopefully the context
of the sentence points to which one it is. If I say "your enemies are
not really your enemies, but your teachers," this is a report from some
lower or middle floor "you," who needs that insight in order to overcome
the natural desire on that level to defend against or attack enemies. That
"you" is *saying* this in order to realize a higher truth on his level.
Where did it get the idea to say that? From a higher "you," from whose
position the statement is banal.

So there is a verticality to the mental activity that ultimately prunes
off branches that don't lead to the goal. A conversation carried out
between different levels in a skyscraper. If the next salvo in that
conversation comes from a sufficiently high floor, it will appear to
be direction-less -- that is, everywhere, and that will code as "outside" to
the listener. Mystical writings usually have some "other" who imparts
wisdom. I'm not convinced that this voice is truly outside the skyscraper.
I think they are usually simply higher levels of awareness.

And again, since there are no cliffs in experience, why can it not happen
that one level speaks to another? By the nature of consciousness, which
is like a lamp or flashlight shining into the direction of interest,
channels are carved into being by the sustained presence of that light.
At some higher level (invisible to "you"), awareness of the new channel
provokes interest. With something like love, the higher awareness will
speak into the channel that which seems required at the moment. And
of course, they will listen attentively for a response.

If you think I'm being fanciful, I throw the question to you: wouldn't you
behave precisely like this, when you are secure and have all that you need?
Anyone who appears in your visor will be treated with more kindness that
they expect. Your kindness is exquisite and subtle. You don't realize this
because mostly you are busy and a little bit afraid all the time. But
I say this: your will to the good is shockingly vast.

Here is a thought experiment to see it!

## Think to a time...

Think to a time when you were given a gift far beyond what you deserved.
This is the Christian experience of being "saved." You, all undeserving,
are nonetheless lifted up, valued and loved. At such moments, you are in
awe of the goodness that has touched you. You feel overwhelmed and bereft
of the ability to repay the gift. The truth is, however, that you are
forging an iron will to repay it in the level of your gut. This will
manifest as the ability to cut away what does not serve...to deny the
lower selves. But that comes later. In that moment of humble poverty, of
security, happiness and gratitude...you have discovered how kind
*you* are. **Because your ability to feel the magnitude of the gift implies
your understanding of the magnitude of it**. Your understanding of the
exquisite kindness bestowed.

And understanding is an equivalence relation. Once you understand, you cannot
help but *act* from that understanding in future. So...your ability to
perceive vast kindness means that you are now transformed into a being that
acts with that kindness.

Thusly, do lower apartments in the skyscraper get a new coat of paint,
from buckets delivered by higher floors. More and more, "you" (at whatever
level we mean) operate from an environment that is ever more closely
modeled on the environments higher up. There is always a translation of
concepts, of course. Floor One will never be Floor Ten. But it will
express union with Floor Ten.

Traditional concepts of beauty in architecture and music encompass this
notion -- of *consonance* between the levels. To get lost in them means
that you are imbibing the idea of consonance as a general good, and will
begin to express it yourself. The term "uplifing" is well-chosen.

Thusly, you are training the mind. Ultimately this is a highly *rational*
activity. The end result of which is refinement of spirit. Isn't it strange
to consider that the finest usage of your rational sense is employed
in building that most ephemeral thing, that thing so often denied by
modern culture -- the human soul?

## Minor aside

My sister and I were in a yurt for a weekend, watching movies and enjoying
the hot tub out in the snow from time to time. Somehow, the human liver
came up as a topic (I don't remember how!). We know that the alcoholic
ruins his liver. He continually *chooses* poison over health. The liver
is charged with filtering poison out of the body. It finally fails him,
because its purpose has been overridden too many times -- it can
only handle so much poison.

Funny, that this organ is called "liver" in english. "Leber" in german, which
means "the one who lives." Above I spoke of concepts being expressed
differently on different levels, though they are always consonant with
their meaning on higher levels. Well, perhaps, distilled to its essence
on a rudimentary, physical level "to live" means "to choose."

That is, what need is there to live a life unless meaningful choices are
made in that span? So the fundamental activity is chosing.

This organ, the liver, is expressing that concept from "the floor" of the
body. It is the body's way to hold faith with the notion that living
is a serious and honorable undertaking. On a higher level, we know it is
our job to chose the better and avoid the worse. On a lower level, that
same attitude is expressed, only coded into "hardware" with the
responsibility of chosing.

Thusly, we can say alcoholism is a disease of the spirit, effecting its violence
down-plane into the body. If you object to this characterization on the
grounds that a chemical need has been fostered in the physical apparatus,
my response is to agree, but say that this is not the primary cause. It is
simply the importation of the spiritual corruption already present into
the physical level, for the vast system within each of us expresses
homeostasis (or "consonance") not only for the good things, but also for
the bad things. To knowingly chose what destroys is, frankly, evil. We
would never admit this when we make those choices, of course. But at
higher levels we know it (we can tell by the silence emerging from upper floors),
and on lower levels it is known too (the sickening of the liver, for example).

Here we see the Satanic expressing
the will to stand apart from God emerging from middle levels of the skyscraper
of being, and casting blight in both directions. On higher levels, the pain
of lost relationship with the lower levels is felt, though they will
not turn their eyes away from God, thank goodness. On lower levels, real
suffering of all kinds is unleashed. It is rough for us humans...
we are threaded through with this impulse, and often we need to see it
play out in ourselves in order to recognize it and "cast it out."

repository: ripsawridge/site

repo_name: ripsawridge/site


text:
# webformhax
bang bang on the admin login webpage
----------------
Part 1: recon
https://digital-watchdog.com/productdetail/VMAX
admin
Password blank (default)
Use the login.html form as the template for a local apache server on kali

Put the page on /var/www/html/
In kali FireFox open localhost/login.html

The page needs to render, even if there is no CCS. we just want to test the automation part.
If more parts are needed, we’ll need to add those too. Resources like JavaScript and other files that are referenced.

We want to use this to refine the script that will bang on the actual page.
Target uri: 10.0.0.x (box)
Test uri:   localhost  (kali)

We basically want to know what the page does after it logs in successfully and what DOM object to look for after the login has failed.

--------------------------------------
Part 2: Testing
Using a framework to automate FireFox called Selenium
This will open a page, enter a sequence of numbers, press a button and wait for the next page to load. If the same page is presented, move on to the next sequence, if the page is not the same on the url bar..winner winner chicken dinner.
The script to run can be from shell script (hard) or preferably python (easy).
The script will log the successful pin.

We need names of the DOM items to manipulate. The names and IDs will help.
HTML IDs and/or HTML names:
Form is actually a set of nested <table> objects :-\
Name: login_id type:input
Name:login_pwd type:input
Button ID:btn_login type:div <dummy object>
Actual DOM object to simulate click: <a onfocus="blur()" onclick="auto_submit()"

Python examples on using Selenium:
https://selenium-python.readthedocs.io/locating-elements.html

Example: var inputElement = driver.find_element_by_id("login_id")
Example: inputElement.send_keys(Keys.ENTER)
Example: inputElement_link.send_keys(var);
Example: driver.findElement(By.xpath("//a[@href='/docs/configuration']")).click();
Example: getting the link to click on for submission with find_element_by_xpath
Firefox - Inspect Element - Copy - XPATH ;-)

Setup Kali  box
https://selenium-python.readthedocs.io/installation.html
Literature
http://lifeofpentester.blogspot.com/2018/03/selenium-with-python-using-geckodriver.html?m=1
http://lifeofpentester.blogspot.com/2013/10/web-applications-authentication-brute.html?m=1

Running the tests
place vendor files in /var/www/html
--vmax.html
--dashboard.html
These are modified version for test the framework only. Simulate the real server locally.
After the target URL is added to the .py script, the real vmax.html will be used.

-----------------------------------------
Part 3: Security ByPass
If the box has security measure that prevent the brute force attack, we’ll need to re-write the script to wait or use a proxy chain to modify mac and ip address so the box thinks its a new machine and network.

We won't know most of this until we try our code against the target.

---------------------------
Part 4: Bang Bang!
The fun part is running the script until the page locks or denies access and the next pin can be retired. The kali box will need to loop with local access to the target box.
Update the .py script and change the 'loginURL' variable to the target box.

Possible logins
admin
alma
IT

Things we know:
It has to be 4 numeric values per embedded js
“alert("Password must be a combination of numbers.");”
admin (default) account is immutable

GDrive has prototype .py scripts.

Once it runs on our Kali boxes it's ready for use against target

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
[![Build Status](https://travis-ci.org/silvae86/rlequire.svg?branch=master)](https://travis-ci.org/silvae86/rlequire)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/cff4cfde36144314adbdce30226737e6)](https://www.codacy.com/app/silvae86/rrequire?utm_source=github.com&utm_medium=referral&utm_content=silvae86/rrequire&utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/cff4cfde36144314adbdce30226737e6)](https://www.codacy.com/app/silvae86/rrequire?utm_source=github.com&utm_medium=referral&utm_content=silvae86/rrequire&utm_campaign=Badge_Coverage)
[![npm version](https://badge.fury.io/js/rlequire.svg)](https://badge.fury.io/js/rlequire)

# rlequire
Tired of require("../../../../../whatever") ????

"Relative Require": A nodejs module for requiring files in paths relative to one where a specific package.json is located.

## Why is this needed?

Because NodeJS does not have a robust way of determining the root path of a running application. Sure, when your app is a couple of files you dont have problems, but as it starts growing, with modular parts and plugins, you want to be sure you can locate the actual root of your application. Also, mocha makes your `__basedir` stop working.

https://stackoverflow.com/questions/10265798/determine-project-root-from-a-running-node-js-application

## How to use?

````bash
npm install rlequire --save
````

````node
const rlequire = require("rlequire")
const Client = rlequire("your-app", "./src/model/client.js", [optional, boolean] forceRecheck).Client;
````

rrequire will search the current folder of the file from which it is invoked and the entire upstream directory until the root of the filesystem. Whenever a `package.json` file is detected, it will attempt to parse it.

 - If the `name` field in the package.json matches `your-app`, it will detect that folder as the root of the app.
 - If the file path `"./src/model/client.js"` exists, relatively to the detected root folder, it will require the file for you.
 - The expensive directory traversal operation is done only the first time we need to determine the root of an app, unless the `forceRescan` optional argument is specified as `true`.


text:
# DeleteBlobFileFolderCustomActivity

## Introduction

Customers have a requirement wherein they want to delete the files from the source Azure Blob location once the files have been copied. This sample showcases a C# file which can be used as part of ADF custom .net activity to delete particular blobs or an entire folder. You can also find a sample pipeline json on how to invoke the ADF Custom .Net activity.

## Contents

* DeleteFromBlobActivity.cs - C# file to be used as part of ADF Custom .Net activity to delete blob folders
* PipelineSample.json - Showcases how to invoke the ADF Custom .Net delete blob activity. Replace placeholders corresponding to datasets names, schedule and linked services in the sample pipeline json.

### Custom Activity

Provide a list of Azure Blob datasets to be deleted as a comma sepearted list in the 'inputToDelete' extended property in your pipeline json. The custom .Net activity will retrieve the dataset folderpath and filename property. In case folderpath is only specified, it will delete all the contents of the blob folder.

Note: ADF custom .Net activity cannot reference higher version of storage lib directly. So, please refer to the workaround here: https://github.com/Azure/Azure-DataFactory/tree/master/Samples/CrossAppDomainDotNetActivitySample

repository: Azure/Azure-DataFactory

branch_name: refs/heads/main

gha_language: C#

gha_license_id: NOASSERTION

repo_name: Azure/Azure-DataFactory


text:
# Primer CSS box

[![NPM version](http://img.shields.io/npm/v/primer-box.svg)](https://www.npmjs.org/package/primer-box)
[![Build Status](https://travis-ci.org/primer/box.svg?branch=master)](https://travis-ci.org/primer/box)

> Box is a module for creating rounded-corner boxes with a white background and gray borders. Box has optional element styles for headers, lists, and footers.

This repository is a module of the full [primer-css][primer-css] repository.

## Install

This repository is distributed with [npm][npm]. After [installing npm][install-npm], you can install `primer-box` with this command.

```
$ npm install --save primer-box
```

## Usage

The source files included are written in [Sass][sass] (`scss`) You can simply point your sass `include-path` at your `node_modules` directory and import it like this.

```scss
@import "primer-box/index.scss";
```

You can also import specific portions of the module by importing those partials from the `/lib/` folder. _Make sure you import any requirements along with the modules._

## Build

For a compiled **css** version of this module, a npm script is included that will output a css version to `build/build.css` The built css file is also included in the npm package.

```
$ npm run build
```

## Documentation

You can read more about other primer modules in the [full primer docs][docs].

<!-- %docs
title: Box
homepage: https://github.com/primer/primer-box
status_issue: https://github.com/github/design-systems/issues/198
status: New release
-->

### Box

A `.Box` is a container with a a white background and light gray border. By default there are no additional styles, such as padding. These should be added as needed with utility classes.
Additional `margin` or `padding` may be required to properly space content.

```html
  <div class="Box">
    This is a box.
  </div>
```

## Box elements
Box elements include `Box-header`, `Box-body`, and `Box-footer`. These elements include borders and consistent padding.

```html
  <div class="Box">
    <div class="Box-header">
      Box header
    </div>
    <div class="Box-body">
      Box body
    </div>
    <div class="Box-footer">
      Box footer
    </div>
  </div>
```

<!-- %enddocs -->

## License

[MIT](./LICENSE) © [GitHub](https://github.com/)

[primer-css]: https://github.com/primer/primer
[docs]: http://primercss.io/
[npm]: https://www.npmjs.com/
[install-npm]: https://docs.npmjs.com/getting-started/installing-node
[sass]: http://sass-lang.com/

repository: BooneTeam/tabula-rasa

repo_name: BooneTeam/tabula-rasa


text:
# Refetch Interval

## One-Click Deploy

Deploy your own SWR project with Vercel Now.

[![Deploy with Vercel Now](https://vercel.com/button)](https://vercel.com/new/project?template=https://github.com/vercel/swr/tree/master/examples/refetch-interval)

## How to Use

Download the example:

```bash
curl https://codeload.github.com/vercel/swr/tar.gz/master | tar -xz --strip=2 swr-master/examples/refetch-interval
cd refetch-interval
```

Install it and run:

```bash
yarn
yarn dev
# or
npm install
npm run dev
```

Deploy it to the cloud with [now](https://vercel.com/home) ([download](https://vercel.com/download))

```
now
```

## The Idea behind the Example

Show how to make SWR fetch the API again in an interval automatically to ensure the data up-to-date.

repository: PeanutQAQ/swr

gha_license_id: MIT

repo_name: PeanutQAQ/swr


text:
---
title: "Unexpected phenology and lifespan of shallow and deep fine roots of walnut trees grown in a silvoarable Mediterranean agroforestry system"
date: 2016-04-01
publishDate: 2020-07-19T14:27:57.854836Z
authors: ["Amandine Germon", "Rémi Cardinael", "Iván Prieto", "Zhun Mao", "John Kim", "Alexia Stokes", "Christian Dupraz", "Jean-Paul Laclau", "Christophe Jourdan"]
publication_types: ["2"]
abstract: "Fine roots play a major role in the global carbon cycle through respiration, exudation and decomposition processes, but their dynamics are poorly understood. Current estimates of root dynamics have principally been observed in shallow soil horizons (< 1m), and mainly in forest systems. We studied walnut (Juglans regia × nigra L.) fine root dynamics in an agroforestry system in a Mediterranean climate, with a focus on deep soils (down to 5m), and root dynamics throughout the year."
featured: false
publication: "*Plant and Soil*"
url_pdf: "https://doi.org/10.1007/s11104-015-2753-5"
doi: "10.1007/s11104-015-2753-5"
---

repository: agermon/academic-kickstart

repo_name: agermon/academic-kickstart


text:
# Naranja LaTeX template

![](jpg/preview.jpg)

Naranja is a LaTeX class for reports, theses, etc.  This repository includes an
`example_report.tex` file as a template to start using the class.
A [PDF file](pdf/report_example.pdf) with the compiled `tex` file is in the
`pdf` folder.

To compile the example just run `make`.

## Fonts

This class uses `URW garamond` for the main text and maths. This font can be
installed from a `lua` script in
[https://www.tug.org/fonts/getnonfreefonts/](https://www.tug.org/fonts/getnonfreefonts/).
Download it and run it with:

    texlua install-getnonfreefonts

assuming you have TeXLive installed.

If you want to use the normal Modern LaTeX fonts, just comment the

    % \renewcommand{\rmdefault}{ugm}
    % \renewcommand{\sfdefault}{ugm}
    % \usepackage[urw-garamond]{mathdesign}

lines in `naranja.cls`.

In addition, `lato` fonts are used for the headings. Future versions of
`naranja.cls` might use this font for the main text.

## Requirements

`naranja` is based on `komascript` with `tocstyle`. It seems `tocstyle` can
change in the future so this dependency might be updated in future versions of
the template.

I suggest to compile a report that uses this class, using a recent version of
TeXLive, since packages as `lato` fonts are not available in old TeXLive
versions. The following is a list of packages used in `naranja.cls`:

    komascript      % base class
    scrlayer        % chapter styling
    aurical         % font for chapter numbers
    ugm             % urw gramond font for main text
    textcomp        % text symbols
    lato            % font for headings
    tocstyle        % for table of contents. It comes with komascript
    tocbibind       % bibliography at the TOC
    minitoc         % mini table of contents in chapter heading
    amsmath
    colortbl        % colours for tables
    makecell        % tables
    hyperref        % links
    cite
    caption
    array
    geometry
    tikz
    tikzpagenodes
    pdfpages
    etoolbox

In Linux, different distributions have `extra` TeXLive packages to easily get
most of the dependencies for this class.

## TODO

* Figure and table labels should be at the right or left side according
  if the page is odd or even
* Update table of contents or `tocstyle`
* Update to a sans serif font (?)

---

This template is licensed under the [MIT License](LICENSE)


text:
# vagrant-fortios

I created this vagrant box for playing with fortigate because it has it's own DPI engine and I had to test some stuff on it.(finding out which vpn's their engine is able to block and which not) That's why traffic logging is enabled by default. However, if you woud like to do something else with it, changing it is very easy.

Example packer file for fortios + virtualbox.
Based on `FortiOS 6.0.0 build 0076`. Since the fortios eula does not
allow for sharing the image, please create the ova yourself by getting the
`fortios.qcow2` image and then running following commands.
```
VM='fortios-600build0076'
qemu-img convert -f qcow2 fortios.qcow2 -O vmdk $VM.vmdk
VBoxManage createvm --name $VM --ostype Linux_64 --register
VBoxManage storagectl $VM --name "SATA Controller" --add sata --controller IntelAHCI
VBoxManage storageattach $VM --storagectl "SATA Controller" --port 0 --device 0 --type hdd --medium fortios.vmdk
VBoxManage modifyvm $VM --ioapic on
VBoxManage modifyvm $VM --memory 1024 --vram 128
VBoxManage modifyvm $VM --nic1 nat
vboxmanage export $VM -o $VM.ova
```

Depending on your machine you might have to change `"boot_wait": "50s",` to a higher value

It will also setup DHCP on the `port2` interface with the <IP_ADDRESS>/24 subnet. Change this if needed. Because the vagrant ssh provisioner does not work inside fortios, we do all default config in packer. Doing this using ansible provisioner [might be possible](https://docs.ansible.com/ansible/2.6/modules/fortios_config_module.html) , but I didn't test it.

Build the packer box:
```bash
packer build fortios-600build0076.json
```
when the box is built we can start playing `vagrant up`

The vagrant image also includes a ubuntu bionic64 client to test the fortigate. Connect to the client using `vagrant ssh client` Access the fortigate by going to http://localhost:8080 and login using user: vagrant pass: vagrant

repository: versionsix/vagrant-fortios

repo_name: versionsix/vagrant-fortios


text:
# Cursed Fox Bot
*a quickly done bot to create pictures of unsettling foxes, to post on Twitter*

---

## Building

Either:
- Use `go get github.com/vulppine/cursed-fox-bot/bot` in order to get the code, and then put `import "github.com/vulppine/cursed-fox-bot/bot"` in your code
- Use `go install github.com/vulppine/cursed-fox-bot` to install it as an application.

---

## Usage

**Desktop**

You will need to have the following:
- DeepAI key
- Twitter Application Consumer API key
- Twitter Application Consumer Secret key

Set these keys in your environment variables as:
```
DEEP_AIKEY = DeepAI key
TWITTER_APIKEY = Twitter Consumer API key
TWITTER_APISECRET = Twitter Consumer API secret
```

Afterwards, run the program. You will get a link to Twitter, with URL search parameters oauth_token and oauth_verifier. Copy these into these environmental variables:

```
TWUSER_TOKEN
TWUSER_SECRET
```

If successful, you should be able to run the program without error.
A picture of a red fox, generated by DeepAI's text2img API will be posted on your feed.

**Google Cloud Functions**

Get the above keys either through the provided method, or some other method.
Afterwards, upload a copy of the bot/ folder into your Google Cloud Function.
Set the entrypoint to be `GooglePubSubEntryPoint` and run.

---

# Thanks

Scott Ellison Reed and DeepAI for providing the Text to Image API

---

# License

Copyright (c) Flipp Syder under the MIT License

repository: vulppine/cursed-fox-bot

repo_name: vulppine/cursed-fox-bot


text:
# LightningSharing

Lightning Components  Apex to implement adhoc sharing in Lightning Experience

For more information, please see the documentation

## Contributing or using from Source
Apologies, but this thing has the ltngsharing__ namespace used throughout.  You'll need to get rid of that, and remove it from the testdata and project.json file if you want to work on the source, deploy to a scratch org, or use the unpackaged version in production.

I need to make some tooling for doing a build with/without namespace, but haven't yet.

repository: afikrico/LightningSharing

repo_name: afikrico/LightningSharing


text:
OpenCL C++ specification
================================================

These instructions describe how to generate OpenCL C++ specification from AsciiDoc files

The OpenCL C++ specification is maintained by members of the The Khronos Group Inc.,
at https://github.com/KhronosGroup/OpenCL-CXX.

Contributions via merge request are welcome. Changes must be provided under the [Apache 2.0](#license).  You'll be prompted with a one-time "click-through" Contributor's License Agreement (CLA) dialog as part of submitting your pull request or other contribution to GitHub.

We intend to maintain a linear history on the GitHub `master` branch.

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

* GNU-compatible make
* asciidoc (http://www.methods.co.nz/asciidoc/)

On some systems/build targets you may also need:
* dblatex
* source-highlight
* docbook

These tools are known to work on several varieties of Linux, MacOS X, and Cygwin running under Microsoft Windows.

Git:
* git lfs must be installed (https://git-lfs.github.com/)

-----------------------------------
Generating PDF and HTML files
-----------------------------------

Clone the OpenCL C++ specification:

```bash
  git clone https://github.com/KhronosGroup/OpenCL-CXX master
```

Generate PDF and HTML files:

```bash
  cd OpenCLCXX
  make
```

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

Full license terms are in [LICENSE](LICENSE).
```
Copyright (c) 2015-2017 The Khronos Group Inc.

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

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

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

OpenCL and the OpenCL logo are trademarks of Apple Inc. used by permission by Khronos.


text:
# cassandra-extra

Set of tools enhancing the experience with Apache Cassandra. For now, the project includes only EmbeddedCassandra and CassandraRule.

## Instalation

The instalation is done by pulling an artifact from Maven central:

````xml
<dependency>
    <groupId>com.spotify</groupId>
    <artifactId>cassandra-extra</artifactId>
    <version>0.0.1</version>
</dependency>
````

## EmbeddedCassandra

EmbeddedCassandra allows spawning a 1-node Apache Cassandra cluster within the currently running JVM. This is useful for some tests that go beyond simple client requests. For example, it's very useful to test things like integration with data processing technologies.

EmbeddedCassandra's API is intentionaly rather raw and feature-less. Please, see CassandraRule for more convenience.

## CassandraRule

CassandraRule wraps EmbeddedCassandra and exposes it as a JUnit @Rule. An example usage:

````java
  @Rule
  public CassandraRule cassandraRule = CassandraRule.newBuilder()
      .withManagedKeyspace()
      .withManagedTable("CREATE TABLE user (id TEXT PRIMARY KEY, email TEXT);")
      .build();

  Insert insertQuery = QueryBuilder
      .insertInto("user")
      .value("id", "zvo")
      .value("email", "foo@bar.baz");

  Select.Where selectQuery = QueryBuilder
      .select("id", "email")
      .from("user")
      .where(eq("id", "zvo"));

  @Test
  public void insertAndSelect() {
    Session session = cassandraRule.getSession();
    session.execute(insertQuery);
    List<Row> rows = session.execute(selectQuery).all();
    assertEquals(1, rows.size());
    assertEquals("zvo", rows.get(0).getString("id"));
<EMAIL_ADDRESS>rows.get(0).getString("email"));
  }
````

In the above example, `.withManagedKeyspace()` will create a randomly named keyspace and execute an `USE` command. Next, `.withManagedTable()` will create a table in the keyspace. Consequently, `.getSession()` will return a session with the keyspace already created and initialised. Keyspaces and tables are created and destroyed during `@Before`, resp. `@After` each `@Test`. Having the keyspace and table managed is optional; if this feature is not enabled, `@Before` and `@After` don't manipulate them.

# License

This software is released under the Apache License 2.0. More information in the file LICENSE distributed with this project.

repository: spotify/cassandra-extra

repo_name: spotify/cassandra-extra


text:
---
layout: post
title: "Clean Code: Chapter 8 - Boundaries"
date: 2016-03-16
---

Boundaries are the points when your code meets with code written by others, where you have little control on what they deliver. It’s good to buffer these boundaries with Adapters so that your dependency on third party software isn’t widespread and when the third party software changes, you have one place to go and make the change.

You want to explore the boundaries of third party systems. While it is not necessary to test third party code, you still want to know how the code works and that you understand what is actually going on. You never want to make assumptions about what the code should do.


text:
# Demo Environments for the Cloud

This repo contains Terraform modules that create disposable Cloud environments for scratch that can be used for interesting demos. For instance, Multi-Cluster Ingress (MCI) across regions on Google Cloud.

## Usage
Simply create use the terraform module with at least the required arguments (packages have more options but are opinionated for ease of use):
```hcl
module "gke_ingress_demo" {
    source              = "github.com/andresrcb/demo-envs/gke-private-cluster"
    project_id          = "unique-project-id"
    billing_account     = ""
    org_id              = ""
    # Folder is optional
    # folder_id           = ""
}

output "instance_connect_command" {
  value       = module.gke_ingress_demo.instance_connect_command
  description = "Command to connect to instance via SSH"
}

output "get_cluster_credentials_command" {
  value       = module.gke_ingress_demo.get_cluster_credentials_command
  description = "Command to get cluster credentials for kubectl"
}
```

## Cleaning up
Most (if not all) demo environments will create a new account/project so that you can easily destroy them after use. That said, you can use the `terraform destroy` command as well, but it would take longer and might fail if you modified some resources during the demo.


text:
# Shoe Distribution Tracker
A user can save and enter stores and brands, and track which stores sell which brands.
#### Ruby, Sinatra, ActiveRecord
#### USER STORIES

 * As a user, I want to be able to add, update, delete and list shoe stores.
* As a user, I want to be able to add shoe brands in the application (don't worry about updating, listing or destroying shoe brands).
* As a user, I want to be able to add shoe brands to a store to show where they are sold.
* As a user, I want to be able to see all of the brands a store sells on the individual store page.
* As a user, I want store names and shoe brands to be saved with a capital letter no matter how I enter them.
* As a user, I do not want stores and shoes to be saved if I enter a blank name.

#### Create Database

Run Rake Commands:

* rake db:Create
* rake db:migrate

##### Licence

License Copyright (c) 2016 Brian Grant
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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

repository: BrianHGrant/shoe-distribution-tracker

repo_name: BrianHGrant/shoe-distribution-tracker


text:
# ![](../images/sempare-logo-45px.png) Sempare Boot Velocity Template Engine

Copyright (c) 2019 [Sempare Limited](http://www.sempare.ltd), [Conrad<EMAIL_ADDRESS>
## Parse Time Evaluation

Parse time evaluation is done by enabling the options eoEvalEarly and eoEvalVarsEarly in the _context_ options.

The requirement for parse time evaluation is that variables must be defined within the context. This is useful when you know certain information is _static_ and is unlikely to change.

The following is an example of a template that would be eligable for parse time evaluation:
```
<% year := 2019 %>

<% if year = 2019 %>

The year is twenty nineteen

<% else %>

The year is <% year %>

<% end %>
```

In the example above, the variable _year_ was declared in the template itself.

The following would be equivalent:
```
var ctx := Velocity.Context();
ctx.Options := [eoEvalEarly, eoEvalVarsEarly];
ctx.Variable['year'] := 2019;

var template := Velocity.Parse('<% if year = 2019 %>twenty nineteen<% else %><%year%><%end%>');

writeln(Velocity.Eval(ctx, template));

```

In the above scenario, the template is parsed. When the template is evaluated the conditional expression is no longer evaluated as it was preprocessed during the parsing stage.

Parse time evaluation can be applied to most expressions - logical expressions, numeric and string expressions. Functions and method calls are not currently supported, but could be.


text:
# Brief Introduction of Program Tracing System {#intro}

Program log is the breadcrumbs of code execution process. Searching for these breadcrumbs can not only find bugs hidden in code: fontawesome-solid-bug; more importantly, continuous program log tracking provides an observable way to build program execution process.

## Start with the Log {#log}

> Have and only log files

Before the Tracking System, the only way we could get the health of the system was through local logs, `actually logging several generations of iterations of different types of products before the Tracking System`.

By locating the standard output and standard error output to a local file and using the power of the magic operating system, we can ideally get an endless log of program execution. As long as the system does not crash, there is no single error, and there is no process interrupting your file writing stream, you can always get a process execution process file and search for events you care about in the oversized file.

## Before Traceable {#befor}

> Log server

The importance of program logs to programs gives birth to independent log servers. Yes, you don't have to worry about SPoF. The log server is waiting on a fixed port to continuously record the program log sent by the process.

In the early stages of log servers, they work more like file servers, except that the operation interface changes from terminal to browser, and the logs that can be retrieved change from a single program to multiple programs. But the log is still that log that heap of process execution sequence records, as follows simulates a log on the login server.

``` mermaid
classDiagram
  class LoginAPI {
    name: login server
    host: localhost
    port: 8080
    dscp: print some descriptive information
    ...
    1978-03-12 xx:xx:xx file:api.js line:232 call checkToken()
    1978-03-12 xx:xx:xx file:api.js line:178 call parseParameters()
    1978-03-12 xx:xx:xx file:api.js line:348 call validate()
    1978-03-12 xx:xx:xx file:api.js line:456 call callRedis()
    1978-03-12 xx:xx:xx file:api.js line:79 call callMysql()
    1978-03-12 xx:xx:xx file:api.js line:914 call writeBack()
  }
```

Only isolated program events can be seen in the log text, but it is difficult to get the running status of the program from an execution document. In the later stage of the file server, a UI for log viewing and a series of program running environment status parameters appeared. The log service in this stage is more like a database service based on log files. Yes, you can search for program events you care about more smoothly.

## Tracing System {##tracing}

> The Rise of Observability

The program tracing system is not a more advanced logging service. It is not even a logging service, but it is a real breadcrumb. Tracing system will generate execution state data structure (Span) in the process of process execution. With the step-by-step advancement of processing flow, a large number of Spans are connected according to their execution order to form the Tracing of the current process, and multiple processes are connected according to their calling order to form the observable execution state of the current system.

Or take a fictitious login service as an example:

```mermaid
graph LR
  A(UserInterface) -->|input| B{LoginAPI};
  B -->|check token| C{RedisServer};
  B -->|update database probably| D{MysqlServer};
```

The above figure only shows the link diagram generated by the tracing system under multi-process. In fact, you can also see the status of each execution process like a log in the tracing system. If you want, you can customize each field in the reported status data structure (Span) and give them meaning. Tracing system is not used for Deug. `Of course, bugs can't be hidden in tracking system.` Tracing system finds system problems by describing the running state of the system in detail, thus providing a positive feedback mechanism to promote the iteration of versions and continuously improve the system.

Tracing system mainly solves two problems:

`How to collect status data`

: Based on the technology stack on which the implementation of the monitored system depends. The common [tracing system solutions](#循迹系统解决方案) in the market provide fully automatic data acquisition and manual data collection. By monitoring the runtime of programs to complete system tracking, such as NodeJS, JAVA, C #, etc., all system implementations based on this kind of technology stack can carry out automatic system tracing. At the same time, the Tracing system provides a Tracing Library for all technology stacks, so that we can track the system manually by introducing dependencies into the project and making simple code editing.

`How to organize state data`

: The natural relationship between calling and being called in the process of program execution makes all tracking systems in the market concatenate the definition of state data structure in a parent-child relationship. Use ParentID and ID to associate Span generated by caller and callee. Different calling procedures in the same process (including threads in concurrent environment here) connect parent procedures and child procedures by passing context containing caller ID; Between different processes, the caller associates the parent process with the child process by sending the context containing his ID between different processes (which can praise the communication of the process through the network or pipeline, etc.).

## Tracing System Solution {#sln}

Program Performance Monitoring (APM): The ability to track programs in the market can be said to be indispensable. Here is a brief introduction to several common solutions in the market.

[DataDog](https://docs.datadoghq.com/tracing/){:target="_blank"}

: Presently the most complete APM solution provider, providing monitoring and deep visualization capabilities for applications in production environments. Provide out-of-the-box performance monitoring dashboards for network services, message queues, and databases to monitor all program events. Tracing link data can be seamlessly linked across services and containers to sessions, logs, system profiles, comprehensive inspection, networks, processes, and system basic measurements. In DataDog, you can directly locate the code causing the problem when investigating a slow link caused by a system bottleneck.

[Jaeger](https://www.jaegertracing.io/docs/){:target="_blank"}

: Jaeger is an open source distributed program tracing system, inspired by Dapper and OpenZipkin, released by Uber Technologies, especially suitable for monitoring systems based on microservice architecture. It provides the following capabilities
:  - Distributed context propagation
:  - Distributed transaction monitoring
:  - Analytical ability to trace the source
:  - Service dependency analysis
:  - Performance optimization
: If you are interested in Jaeger, you can refer to the [internal practice](https://www.uber.com/blog/distributed-tracing/){:target="_blank"} of Uber's technical team.

[OpenTelemetry](https://opentelemetry.io/docs/){:target="_blank"}

: OpenTelemetry (OTeL) is an open source program visualization framework developed based on third-party tracking protocols that detects, generates, collects, and pumps monitoring data such as tracking links, metrics, logs, etc. As an industry standard, it is natively supported by many service providers.

[Skywalking](https://skywalking.apache.org/docs/){:target="_blank"}

: Skywalking is an open source APM system, which provides distributed cloud-based systems with monitoring, tracking, diagnosis and other capabilities. The core capabilities are as follows.
: - Server-side measurement analysis
: - Analytical ability to trace the source
: - Service topology analysis
: - Service dependency analysis
: - Slow service discovery
: - Performance optimization
: - Cache monitoring, read-write performance, and slow access discovery
: - Database monitoring, slow query discovery
: - Message queuing performance monitoring
: - Browser performance detection, root tracing capability
: - Infrastructure monitoring provides support for main streaming cloud vendors
: - System Alarm

[Zipkin](https://zipkin.io/pages/quickstart.html){:target="_blank"}

: Zipkin is a distributed tracing system that collects sequential data for system monitoring and discovery of service-level system problems. Zipkin provides a solution that includes data collection and data query. You can jump directly from log to link based on a TraceID in Zipkin UI and provide retrieval capability based on diversified data.

[Datakit](https://docs.guance.com/datakit/datakit-tracing/){:target="_blank"}

: Different from the above tracking systems, the solution provided by Datakit does not generate any program execution state data (Span) or change the data organization form. Datakit listens to receive link data sent by major tracking systems on network ports. Datakit's tracing module not only provides out-of-the-box capability, but also is almost zero configuration, and users can transition to Datakit without friction from any other tracing system.

: Datakit is a link data processing & analysis network service. As a network application, Datakit has the following characteristics:

: - Datakit can continuously handle high-load traffic data, and the multi-channel local caching technology used in Datakit can maintain a low CPU load in the face of flooded link data in practice.
: - Datakit can work continuously in a highly concurrent network request environment. Datakit uses access policies and thread pools to deal with highly concurrent network requests and can control CPU load in a low range.
: - Datakit can dock with many mainstream tracking systems on the market without friction and is still expanding.

: Datakit as an analytic computing tool has the following features

: - Highly flexible and configurable, you can use Datakit's link data capability with zero configuration, and you can customize the various link computing capabilities provided by Datakit including sampling, rare link picking and resource closing through simple configuration.
: - Efficient and distributed consistent sampling algorithm.
: - A variety of data processing filters in the front section of data processing meet the daily data processing needs.
: - Data processing back-end Pipeline support, which allows you to customize data before it is sent to the hub with the help of [the powerful Pipeline script provided by Guance Cloud](https://docs.guance.com/logs/pipelines/text-processing/){:target="_blank"}.

## Summary {#conclude}

Tracking system provides a multi-dimensional and deep visualization ability of system execution state, which changes the form of system maintenance and development, greatly reduces the cost of development and operation and maintenance, and can provide various analysis tools to find system bottlenecks, which gives valuable clues for subsequent system version iteration.

repository: GuanceCloud/datakit

gha_language: Go

repo_name: GuanceCloud/datakit


text:
---
severity: Important
pillar: Security
category: Encryption
resource: Storage Account
online version: https://github.com/Microsoft/PSRule.Rules.Azure/blob/main/docs/rules/en/Azure.Storage.UseEncryption.md
ms-content-id: 595c6ca0-1464-4e53-a692-6cf3c2f91cd5
---

# Use Storage service encryption

## SYNOPSIS

Storage Service Encryption (SSE) should be enabled.

## DESCRIPTION

Storage Service Encryption (SSE) should be enabled.

## RECOMMENDATION

Storage Service Encryption (SSE) should be enabled.

## LINKS

- [About Azure Storage encryption](https://docs.microsoft.com/azure/storage/common/storage-service-encryption#about-azure-storage-encryption)


text:
html5videobrowser
=================

A key-frame based html5 video browser.

User-Manual is contained in index.html

Install/Start:
```sh
git clone https://github.com/cinemast/html5videobrowser.git
cd html5videobrowser
chromium --allow-file-access-from-files index.html
```

Screenshot
=============

![Screenshot](https://raw.githubusercontent.com/cinemast/html5videobrowser/master/doc/screenshot.png)


text:
# The Replication Game

> Compete on the fastest replication algorithm - [Participate here!](http://replication-game.herokuapp.com/)

![](https://ipfs.io/ipfs/Qmdr2HMghfsknH9nfrRU2fjcdqZK8bjM8xa2JShBkehsCF/giphy.gif)

## Introduction

**What is this "game"?** The Replication Game is a competition where participants compete to outperform the default implementation of Proof-of-Replication. To participate in the game, you can run the current replication algorithm (or your own implementation) and post your proof on our server.

**What is Proof-of-Replication?** Proof of Replication is the proof that: (1) the Filecoin Storage Market is secure: it ensures that miners cannot lie about storing users' data, (2) the Filecoin Blockchain is secure: it ensures that miners cannot lie about the amount of storage they have (remember, miners win blocks based on their storage power!). In Filecoin, we use the Proof of Replication inside "Sealing" during mining.

**How does Proof of Replication work?** The intuition behind Proof of Replication is the following: the data from the Filecoin market is encoded via a slow sequential computation that cannot be parallelized.

**How can I climb up in the leaderboard?** There are some strategies to replicate "faster", some are practical (software and hardware optimizations), some are believe to be impractical or impossible (get ready to win a price and be remembered in the history of cryptography if you do so!)

- *Practical attempts*: Implement a faster replication algorithm with better usage of memory, optimize some parts of the algorithm (e.g. Pedersen, Blake2s) in hardware (e.g. FPGA, GPU, ASICs), performing attacks on Depth Robust Graphs (the best known attacks are [here](https://eprint.iacr.org/2017/443)).
- *Impractical attempts*: Find special datasets that allow for faster replication, break the sequentiality assumption, generate the proof storing less data, break Pedersen hashes.

## Play the Replication Game

This executes an actual game, using [rust-proofs](https://github.com/filecoin-project/rust-proofs), feel free to implement your own version.

Make sure you have all required dependencies installed:

- [rustup](https://www.rust-lang.org/tools/install)
- Rust nightly (usually `rustup install nightly`)
- [PostgreSQL](https://www.postgresql.org/)
- Clang and libclang
- [jq](https://stedolan.github.io/jq/download/) (optional) - prettify json output on the command-line, for viewing the leaderbord
- gzip

From the replication-game/ directory, compile the game binary:

```bash
cargo +nightly build --release --bin replication-game
```

### Play the game from the command line

There are two ways to play:
- **Method 1:** Run the `play` helper script
- **Method 2:** Run each individual command

#### Method 1: Run the `play` helper script

From the replication-game/ directory, run the `play` helper script in `bin/`, specifying:
- `NAME`: your player name
- `SIZE`: the size in KB of the data you want to replicate
- `TYPE`: the type of algorithm you want to run (current options are `zigzag` and `drgporep`)

```bash
# Run like this:
# bin/play NAME SIZE TYPE

# E.g.

# Zigzag 10MiB
bin/play NAME 10240 zigzag

# Zigzag 1GiB
bin/play NAME 1048576 zigzag

# DrgPoRep 10MiB
bin/play NAME 10240 drgporep

# DrgPoRep 1GiB
bin/play NAME 1048576 drgporep
```

The `play` script will retrieve the seed from the game server, replicate the data, generate a proof, and then post that proof to the game server. The script runs each of the commands in **Method 2**, but wraps them in an easy-to-use shell script.

#### Method 2: Run each individual command

Set your player name:

```bash
export REPL_GAME_ID="ReadyPlayerOne"
```

Get the seed from our server:

```bash
curl https://replication-game.herokuapp.com/api/seed > seed.json
export REPL_GAME_SEED=$(cat seed.json| jq -r '.seed')
export REPL_GAME_TIMESTAMP=$(cat seed.json| jq -r '.timestamp')
```

Play the game:

```bash
./target/release/replication-game \
	--prover $REPL_GAME_ID \
	--seed $REPL_GAME_SEED \
	--timestamp $REPL_GAME_TIMESTAMP \
	--size 10240 \
	zigzag > proof.json
```

Send your proof:

```bash
curl -X POST -H "Content-Type: application/json" -d @./proof.json https://replication-game.herokuapp.com/api/proof
```

### Check the current leaderboard

There are three ways to check the leaderboard, two from the command line and one from the browser:
- **Method 1:** (From the command line) Run the `show-leaderboard` helper script
- **Method 2:** (From the command line) Curl the leaderboard
- **Method 3:** View the leaderboard in the browser

#### Method 1: Run the `show-leaderboard` helper script

From the replication-game/ directory, run the `show-leaderboard` helper script in `bin/`, specifying `SIZE`, which is the size in KB by which you want to filter the leaderboard results. The leaderboard shows all results across all parameters in a single list, so filtering by `SIZE` allows you to see only those results that match a particular size.

```bash
bin/show-leaderboard SIZE
```

#### Method 2: Curl the leaderboard

To check the current leaderboard using `curl`:

```bash
curl https://replication-game.herokuapp.com/api/leaderboard | jq
```

#### Method 3: View the leaderboard in the browser

You can also directly view the leaderboard in the browser at https://replication-game.herokuapp.com/.

## FAQ

>  What parameters should I be using for the replication?

Our leaderboard will track the parameters you will be using, feel free to experiment with many. We are targeting powers of two, in particular: 1GiB (`--size 1048576`), 16GiB (`--size 16777216`), 1TB (`--size<PHONE_NUMBER>`)

> How do I know what the parameters mean?

```bash
./target/debug/replication-game --help
```

> What do I win if I am first?

So far, we have no bounty set up for this, but we are planning on doing so. If you beat the replication game (and you can prove it by being in the leaderboard), reach out to [filecoin-research@protocol.ai](mailto:filecoin-research@protocol.ai).

------

## Replication Game Server

```bash
$ cargo +nightly run --bin replication-game-server
```

This server requires Postgresql to work. The details of the expected configuration can be found in [`Rocket.toml`](Rocket.toml). The default environment is `development`.

### API

- GET `/api/seed`:
  - Returns a `timestamp` (unix time) and a `seed` to be used as `replica_id` in the proof of replication
- POST `/api/proof`
  - Inputs: `timestamp`, `seed`, `prover_id` and `proof`
  - Checks authenticity of the seed (using the timestamp and a secret on the server)
  - Checks that the `proof` is correct
  - Computes `replication_time = timestamp - current_time`
  - If `replication_time < times[prover_id]`, then `times[prover_id] = replication_time`
- GET `/api/leaderboard`:
  - Shows a leaderboard of all the miners sorted by replication time

## License

The Filecoin Project is dual-licensed under Apache 2.0 and MIT terms:

- Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)

repository: wxswhh/replication-game

repo_name: wxswhh/replication-game


text:
# Crunchme

This utility compresses your `.js` into a self extracting file and appends minimal JavaScript required to decompress the file.

It uses several algorithms to find the best solution or even leave the file as is, if compression overhead will actually increase
the files size.

This file does not use minification tools like `uglify-js`, you have to apply that yourself before using this module.

For better compression rates use [this excellent tool](http://crunchme.bitsnbites.eu/) instead.

## Usage

Using command line:

    crunchme file.js file.bin.js

Programmatically:

```javascript
var crunchme = require("crunchme");
var output = crunchme(js_code);
```

## License

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

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

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

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

For more information, please refer to <http://unlicense.org/>

license: Unlicense

repository: mikalv/crunchme

repo_name: mikalv/crunchme


text:
# Hazumu
Alexander Chan and Emily Vo
![](img/hazumu.gif)

## Goal
Analyzing dynamic animated scenes with DXR.

## Summary
[Link to slides](https://docs.google.com/presentation/d/13p2GebDdX0fR9fK_T6GdMJvwfSSTqB0XvoTX17432ps/edit?usp=sharing)

In a traditional rasterization pipeline, skeletal animation is done entirely on the GPU in the vertex shader. However, with raytracing, this technique is unavailable, as the entire scene along with the acceleration structure must be sent to the GPU before rendering happens. Transforming the vertices individually on the CPU will affect performance greatly. The vertices are transformed per frame in a CUDA kernel, and the acceleration structure is refitted, rather than rebuilt from scratch. Raytracing skeletal animation should be more performance intensive than rigid body animation since different parts of the mesh can move in different ways, and it is not enough to simply inverse transform a ray based on the updated bounding box of the rigid body transformation.

We initially used assimp to read in fbx files containig skeletons and animations. However, many of the tests we used had a mismatch between the skeletons and the meshes, as well as having multiple meshes. We were unsure as to how cases like these are supposed to be handled, so we opted for simpler meshes and animations.

In the end, we were able to raytrace an animated mesh. We added a large triangle sim around the animated mesh to analyze how fast acceleration structure updates take in DXR.

## Performance
The following analysis was performed on a GTX 1080 @ 1620 MHz 8GB and an i7-5820k @ 3.70 GHz 16GB.

![](img/cpu-wolf.png)

![](img/gpu-wolf.png)

Above are timing graphs for raytracing the skinned wolf. As expected, GPU skinning is faster than CPU skinning. However, refitting the acceleration structure is also slightly faster. Doubling the number of triangles in the scene roughly doubles the time taken to update the acceleration structure. The only benchmark to hit the target of 60fps was the fewest number of triangles, 664. This is also with no lighting calculation.

## Requirements
* Windows 10
* [Visual Studio 2017](https://www.visualstudio.com/) with the [Windows 10 October 2018 Update SDK (17763)](https://developer.microsoft.com/en-US/windows/downloads/windows-10-sdk)

## Acknowledgements
This code is based on the [DirectX raytracing samples](https://github.com/Microsoft/DirectX-Graphics-Samples/tree/master/Samples/Desktop/D3D12Raytracing/src).

The Titan V used for this project was donated by the NVIDIA Corporation.

We gratefully acknowledge the support of NVIDIA Corporation with the donation of the Titan V GPU used for this project.

## References
- assimp
- glm

repository: Hengle/hazumu

repo_name: Hengle/hazumu


text:
---
layout: post
title:  "Usage of Fossil fuels"
date:   2016-05-02 12:45:31 +0530
categories: ["factors"]
sort: 1
---

Fossil fuels are non-renewable energy resources. That means we can't reproduce/recycle it. Fossil fuels are formed by decomposition of plants and animals inside Earth for a period of more than 100 million years. There are three type of fossil fuels like Coal, Oil and Natural gas. I don't want to go deep on why/how these fossil fuels are used, I will just stick on why the combustion of fossil fuels is Evil, IMO.

Fossil fuels generate a huge amount of energy by combustion process. In combustion process, the result will be Energy + Heat (`co2`). This heat when gone into outermost layers of our atmosphere where ozone is present, it reacts with the ozone

Petrol is like boon to our society. When petrol is combusted, we can produce lots of energy which can be used for many good things like travelling long distances in short time. Travelling in short time is possible by using machines which can combust this petrol (known as Vehicles).


text:
# Views

See http://techiferous.com/2012/05/experimenting-with-the-architecture-of-ember-js/
for a description of a useful architecture for managing views via bindings.

Extract:

... some application state does not need to be persisted, such as which tab is selected or a currently selected item in a list. To distinguish between these two types of objects, objects that are meant to be persisted I call Storables and objects that are used to remember the display state I call Viewables.

When the state of the application changes, the display needs to be updated. Ember.js provides a wonderful mechanism for this, called Bindings. So Bindings are the mechanism for the state layer to affect the display layer.

For the display layer to affect the state layer, I created a new type of object called a Handler. Controls are always hooked up to a Handler. A Handler receives the action generated by the Control and, in response, changes the state of a Viewable or Storable. That’s all a Handler does: receives an action from the display, responds by changing state. Ideally, it has no knowledge of the DOM.


text:
# object (v9.3.0)

## Stability

> 0 - Experimental

A utility library for working with objects

## Table of Contents

  * [Parameters](#parameters)
- [object](#object)
  * [Parameters](#parameters-1)
- [object](#object-1)
  * [Parameters](#parameters-2)

## API Documentation

<!-- Generated by documentation.js. Update this documentation by updating the source code. -->

##

Return a clone of an object only containing the provided properties.

### Parameters

-   `object` **[Object][1]** an arbitrary object
-   `props` **[Array][2]<[String][3]>** an array of property names to keep.

Returns **[Object][1]** an object with a subset of
                    properties from an input object.

## object

Return a clone of an object removing selected properties.

### Parameters

-   `object` **[Object][1]** an arbitrary object
-   `props` **[Array][2]<[String][3]>** an array of property names to keep.

Returns **[Object][1]** an object with a subset of
                    properties from an input object.

## object

Select listed properties from an object

### Parameters

-   `object` **[Object][1]**
-   `props` **[Array][2]** a list of string

Returns **[Object][1]**

[1]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object

[2]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array

[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String

## Dependencies

- Node.js >= v10.6.0
- NPM >= v10.6.0

## License

Copyright (c) 2020 Róisín Grannell

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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

gha_language: JavaScript


text:
# 3v-pwm-controller
An Arduino M0 PWM controller with 3 mosfets designed to perform PWM at 3V
with a 3A 3V supply

This PWM controller provides 3 PWM channels designed to source and sink current.
The PWM signals are configured as an H-bridge with 6 GPIO pins controlling it.
One set of GPIO pins controlls the P-channel mosfets and another set controls
the N-channel mosfets.

Do not pull the P-channel mosfets low while pulling the attached N-channel
mosfet high!  Bad things happen!

If you can't control both N and P channels simultaneously, set the P-channel
high and the N-channel low as an intermediate step.

PW0: P-channel = PA02, N-channel = PA05
PW1: P-channel = PA01, N-channel = PA04
PW2: P-channel = PA00, N-channel = PA03

For example, to pull PW0 high and PW1 low and PW2 high impedence (open),
set PA02 low, PA05 low, PA01 high, PA04 high, PA00 high, PA03 low.

The 3V supply is capable of providing up to 3A of current and is designed
to be powered by a 5V supply.

Each PWM channel should be able to handle at least 3A of current at 3V.
The MOSFETs are rated at over 5A each.

J1:
1: +5V
2: +5V
3: PWM0 GNR controlled by pulling PA05 high, +3 controlled by pulling PA02 low
4: PA08
5: PWM1 GND controlled by pulling PA04 high, +3 controlled by pulling PA01 low
6: PA09
7: PWM2 GND controlled by pulling PA03 high, +3 controlled by pulling PA00 low
8: PA10
9: +3V
10: +3V
11: GND
12: GND

J2:
1: D_P (D+) USB signal
2: D_N (D-) USB signal
3: PA22
4: PA21
5: PA19
6: PA18
7: +3V
8: GND

J3:
1: +5V
2: GND

SW1: Reset


text:
<!--#echo json="package.json" key="name" underline="=" -->
webgit-easycgi-pmb
==================
<!--/#echo -->

<!--#echo json="package.json" key="description" -->
A CGI to easily webserve only committed objects and selected branches of git
repositories.
<!--/#echo -->

Purpose
-------

I want to share some of my git repos on the intranet.
One easy way to do this is to put them on a webspace.
Well, _almost_ easy.

### Problems with the naive approach:

* Intended sharing is cumbersome:
  I'd have to (set up a mechanism to) run `git update-server-info` whenever
  I want my new commits to become visible to regular git web clients.
* Unintended sharing is easy:
  When sharing the entire `.git` directory, a snoopy web audience can access
  stuff that maybe they shouldn't. Examples:
  * My git config
  * My temporary/draft branches (see chapter "Security" below)
  * My remotes
  * Which branch I've currently checked out
  * Various temporary files from git tools, e.g.
    `COMMIT_EDITMSG` or `GIT_COLA_MSG` (when using git-cola)

### CGI to the rescue!

Thus the need for a way to easily share the parts important for cloning
selected branches, while sharing as little as possible of the other stuff.

Install
-------

1.  Clone this repo somewhere. For this tutorial, we'll assume you cloned it
    to `/home/bernd/webdev/webgitcgi`.
1.  In your webspace's CGI directory, create some subdirectory for your
    repos. For this guide we'll assume it's `/var/www/cgi-bin/gits`.
1.  Copy `stub.sh` from this repo into `/var/www/cgi-bin/repos/` as any
    filename you like and your webmaster allows; for this tutorial,
    we'll name the remote copy `gits.sh`.
    * With some combinations of server type and copy method, you may need
      to manually set the executable flag on the remote copy of the stub file.
    * If CGI doesn't easily work with your webspace, you can try to use PHP
      instead. In this case, copy `stub.php` as `gits.php`.
1.  Edit the stub file in your webspace and configure it
    (see the "Config" chapter below).
    You'll probably need to adjust at least the `share_sh_path`
    to wherever you cloned this repo. In case of this tutorial,
    it would be `/home/bernd/webdev/webgitcgi/share.sh`.
1.  Add symlinks to the `objects` directories of the git repos you want
    to share. We'll assume you want to share the repository
    `/home/bernd/webdev/brot/app-repo` as visible name `brot-app`.
    In this case, your symlink should be `/cgi-bin/repos/brot-app`
    and its target should be `/home/bernd/webdev/brot/app-repo/.gi/objects`.
1.  Assuming your webspace is on http://example.net/, visit
    http://example.net/cgi-bin/repos/gits.sh/brot-app
    (or `…/gits.php/brot-app` for the PHP approach).
    There you should see information about how to clone the repo.

Config
------

Near the top of your stub file, you'll find a marker line
`#=== Config starts here ===#`.
That section is where you should put your settings.

For descriptions of the available settings, please refer to
[`cfg.defaults.rc`](cfg.defaults.rc).

Security
--------

* Secret branches, or at least their objects, may still be discoverable
  in some circumstances:
  * If people know or guess the SHA-1 of available objects.
    * This is trivial if directory indexes are enabled on the webspace.
  * Probably packs.
  * Stuff I may have forgotten.

* Webhosting CGIs securely is hard. Take care.

<!--#toc stop="scan" -->

Known issues
------------

* Needs more/better tests and docs.

License
-------
<!--#echo json="package.json" key=".license" -->
ISC
<!--/#echo -->

license: ISC

repository: mk-pmb/webgit-easycgi-pmb-bash

repo_name: mk-pmb/webgit-easycgi-pmb-bash


text:
Amazon ECS PHP Simple Demo App
------------------------------

A simple demo created by @marekq to demonstrate how CI/CD can be done using various AWS container services. You can deploy the application to both ECS and EKS using the instructions below.

###  ECS and CodePipeline

You can clone the repository to your own CodeCommit repository and use the included buildspec.yml to automatically build the container and push it to your Amazon ECR repository. Finally, you can leverage CodePipeline to automatically orchestrate the whole deployment process. Within ECS, you could use one of the Load Balancers to automatically distribute traffic to the Fargate containers.

### EKS and DockerHub

The container can also be deployed to Kubernetes using EKS using the deployment YAML files. In the folder 'k8s-deploy', you will find the neccesary files and scripts to get started. Whenever you run the 'build.sh' script, a namespace, replicaset, ingress controller using ALB and service will be created. You can easily delete these by running 'delete.sh' from the same folder.

### Modifications made on the original container

The container image is based on the ecs-demo-php-simple app repository, but has been modified with a newer OS image and a few modifications to the HTML, JavaScript and PHP code. The landing page displays the external IP address of the container and shows a unique background color per container host, which makes it easier to show how the end to end CI/CD deployment works during demo's.

![alt tag](https://raw.githubusercontent.com/marekq/ecs-demo-php-simple-app/master/docs/webpage.png)

In case of any issues or questions, please reach out to @marekq or raise an issue on GitHub.

repository: marekq/ecs-demo-php-simple-app

repo_name: marekq/ecs-demo-php-simple-app


text:
# Lab 9
```bash
minikube start

kubectl create deployment hello-node  --image=zhandos1609/moscow-time:latest
kubectl expose deployment hello-node --type=LoadBalancer --port=5000
```

```bash
~ >>> kubectl get pods,svc
NAME                              READY   STATUS    RESTARTS   AGE
pod/hello-node-79b587b694-rtsn2   1/1     Running   0          9m19s

NAME                 TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
service/hello-node   LoadBalancer   <IP_ADDRESS>   <pending>     5000:31154/TCP   2m44s
service/kubernetes   ClusterIP      <IP_ADDRESS>       <none>        443/TCP          9m34s
```

```bash
kubectl delete deployment,svc hello-node
```

## Run with configuration files

```bash
~/.../lab_1_2/k8s >>> kubectl get pods,svc                                                                                ±[●][main]
NAME                               READY   STATUS    RESTARTS   AGE
pod/moscow-time-7fb75cb9fc-jsdr5   1/1     Running   0          2m22s
pod/moscow-time-7fb75cb9fc-s8pc6   1/1     Running   0          2m22s
pod/moscow-time-7fb75cb9fc-sppkz   1/1     Running   0          2m22s

NAME                  TYPE           CLUSTER-IP       EXTERNAL-IP   PORT(S)          AGE
service/kubernetes    ClusterIP      <IP_ADDRESS>        <none>        443/TCP          54m
service/moscow-time   LoadBalancer   <IP_ADDRESS>   <pending>     5000:32170/TCP   13s
```

# Lab 10

```bash
helm create moscow-time
helm package moscow-time
helm install moscow-time ./moscow-time-0.1.0.tgz

minikube service moscow-time
```

```bash
~/.../lab_1_2/k8s >>> kubectl get pod,svc                                                                                ±[●][main]
NAME                               READY   STATUS    RESTARTS   AGE
pod/moscow-time-8475cf98cb-2vfth   1/1     Running   0          8m48s

NAME                  TYPE           CLUSTER-IP      EXTERNAL-IP   PORT(S)          AGE
service/kubernetes    ClusterIP      <IP_ADDRESS>       <none>        443/TCP          85m
service/moscow-time   LoadBalancer   <IP_ADDRESS>   <pending>     5000:30246/TCP   8m48s
```

repository: InnoZhan/devops

repo_name: InnoZhan/devops


text:
# JavaScript Code Runner

JavaScript Code Runner allows the execution of JavaScript code.
This package base on an awesome [JS-Interpreter](https://github.com/NeilFraser/JS-Interpreter) written by Google's Neil Fraser.

Execution is completely isolated from the global JavaScript environment.
None of the DOM APIs are exposed. That is the point of a sandbox.

## Installation

```
npm i javascript-code-runner
```

## Usage

```javascript
import JSrunner from "javascript-code-runner";

const fibonacciCode = `
const result = [];
const fibonacci = (n, result) => {
  var a = 1, b = 1, sum;
  for (var i = 0; i < n; i++) {
    result.push(a);
    sum = a + b;
    a = b;
    b = sum;
  }
}
fibonacci(12, result);
result.join(', ');`;

const { result, message } = JSrunner(fibonacciCode);
console.log(result); // 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144
console.log(message); // null (error message)
```

#### Example with a web worker

_worker.js_

```javascript
import JSrunner from "javascript-code-runner";

addEventListener("message", (e) => {
  postMessage(JSrunner(e.data));
});
```

repository: dannegm/javascript-code-runner

repo_name: dannegm/javascript-code-runner


text:
# SIG Addons Releases

SIG Addons release process consists of the folowing steps:
1. Create new rX.X branch on tensorflow/addons
2. Create and merge a new PR into the release branch
	* Set the correct version and suffix in [version.py](https://github.com/tensorflow/addons/blob/master/tensorflow_addons/version.py)
	* Ensure the proper minimum and maximum tested versions of TF are set in [version.py](https://github.com/tensorflow/addons/blob/master/tensorflow_addons/version.py)
	* Ensure the proper minimum and maximum ABI compatibility versions are set in [resource_loader.py](https://github.com/tensorflow/addons/blob/master/tensorflow_addons/utils/resource_loader.py)
	* Ensure proper supported python libraries are set in [setup.py](https://github.com/tensorflow/addons/blob/master/setup.py)
3. Create and merge a new PR which [sets the build docker image](https://github.com/tensorflow/addons/blob/master/tools/docker/build_wheel.Dockerfile#L3) to match the tensorflow dependency
	* We keep the "latest" image on nightly, but for building old TFA versions we should pin to the proper container for that release.
4. Publish and tag a [release on Github](https://github.com/tensorflow/addons/releases)
    * Add updates for new features, enhancements, bug fixes
    * Add contributors using `git shortlog <last-version>..HEAD -s`
    * **NOTE: This will trigger a GitHub action to release the wheels on PyPi**

## SIG Addons Release Team

Current Release Team:
- Sean Morgan - GitHub: [@seanpmorgan](https://github.com/seanpmorgan) - PyPI: [seanmorgan](https://pypi.org/user/seanmorgan/)
- Yan Facai(颜发才) - GitHub: [@facaiy](https://github.com/facaiy) - PyPI: [facaiy](https://pypi.org/user/facaiy/)

repository: tensorflow/community

repo_name: tensorflow/community


text:
# Warpwire Sakai 2.9 Install Instructions #

The steps to add the Warpwire Sakai plugin to a Sakai 2.9 instance are as follows:

1. Locate the ```<sakai-installation-location>/webapps/portal-render/vm/<skin>/includeStandardHead.vm``` file in your Sakai instance, where ```<skin>``` is the current skin in use for Sakai – in the default Sakai installation, this is the ‘neoskin’

2. Within the includeStandardHead.vm file, locate the closing ```</head>``` tag, and add the following line immediately preceeding the ```</head>``` tag:

     ```<script type="text/javascript" language="JavaScript" src="/portal/scripts/warpwire.js"></script>```

3. Locate the ```<sakai-installation-location>/webapps/portal-render/vm/<skin>/pda.vm``` file in your Sakai instance, where <skin> is the current skin in use for Sakai – in the default Sakai installation, this is the ‘neoskin’

4. Within the ```pda.vm``` file, locate the closing ```</head>``` tag, and add the following line immediately preceeding the ```</head>``` tag:

     ``` <script type="text/javascript" language="JavaScript" src="/portal/scripts/warpwire.js"></script>```

5. Within the ```<tomcat-installation-directory>/sakai``` directory, create a folder named 'portlets', if it does not already exist (Resulting folder location will be ```<tomcat-installation-directory>/sakai/portlets```)

6. Copy the ```IMSBLTIPortlet.xml``` file (located at ```xml/IMSBLTIPortlet.xml``` in the included archive) into the folder from the previous step (```<tomcat-installation- location>/sakai/portlets```). This is the xml configuration file that allows the Warpwire plugin to exist as an LTI tool within your Sakai installation.

7. Replace the ```[[WW_LAUNCH_URL]]```, ```[[WW_SECRET]]```, and ```[[WW_CONSUMER_KEY]]``` within the newly created ```<tomcat-installation-location>/sakai/portlets/IMSBLTIPortlet.xml``` file with the applicable values provided by Warpwire.

8. Copy the 'warpwire.js' file (located at ```js/warpwire.js``` in the included archive) to the applicable location within your Sakai installation (```<sakai-installation-location>/webapps/portal/scripts/warpwire.js```)

9. Copy the ‘warpwire’ directory (located within the ‘plugin’ folder) into the ckextraplugins folder within your Sakai installation (Resulting folder location will be ```<sakai-installation-location>/webapps/library/editor/ckextraplugins/warpwire```).

10. Locate the ```<sakai-installation-location>/webapps/library/editor/ckeditor.launch.js``` file, and add the following line to the ckconfig variable within the file:

     ```warpwireURL: '[[WW_ROOT_DOMAIN]]',```

11. Replace the ```[[WW_ROOT_DOMAIN]]``` within the ```<sakai-installation-location>/webapps/library/editor/ckeditor.launch.js``` file with the applicable value provided by Warpwire. An example of the necessary changes is located on line 62 of the file located at ```js/ckeditor.launch.js``` in the included archive.

12. Add ‘warpwire’ to the ```sakai.editor.enableResourceSearch``` array, the extraPlugins variable, and within the addExternal plugin function in the ckeditor.launch.js file (located at ```<sakai-installation-location>/webapps/library/editor/ckeditor.launch.js```). An example of the changes necessary are located in the attached folder on lines 91, 92, 145, and 158 of the file located at ```js/ckeditor.launch.js```.

***Note***: After following the provided steps, a restart of Sakai will be necessary in order for the Warpwire Site Tool to be accessible from within Sakai.


text:
Rebol

# VSCode extension for [Rebol](http://rebol.com/)

An extension with rich support for the [Rebol language](http://rebol.com/), with features including the following and more:
* hint all syntax errors
* auto completion

Rebol is pronounced "reb-ol".
It's similar to "rebel yell" or "rebel with a cause".
Rebol rebels against the idea that modern software must be large and complex.
Such systems are painfully slow and expensive to develop and maintain. They quickly degrade into chaos, requiring constant updates and patches.
Rebol has been downloaded over 5 million times.
Many of its features have been added to other computer languages, but due to their older, syntax-driven designs, they will never come close to the expressive power of Rebol.
Rebol is nearly syntax free.
And, as you become fluent, you end up writing code in sentences, somewhat similar to human languages. Because our brains are well optimized for sequences of words, Rebol sentences feel natural, and you become more productive.
Rebol invented the concept of dialects.
Dialects provide expressive leverage not found in other languages. They amplify your coding effort by focusing on the essence of what you are trying to do, whether that's creating a user interface or programming a robot's motion.
Rebol is more than just a programming language.
It is also a language for representing data and metadata. It provides a consistent architecture for computation, storage, and exchange of information.
Rebol has been intentionally kept small and lightweight.
It only takes a few seconds to download, requires no special libraries, and includes hundreds of functions, dozens of data-types, built-in help, multiple Internet protocols, graphics, sound, and much more.

Github actions auto updates the version of the extension from now.

## Quick Start

### 1. Install the extension
### 2. Install [Rebol](http://www.rebol.com/downloads.html)

## Source

[Github](https://github.com/karpad2/vscode_rebol)

## License

[Apache License](https://raw.githubusercontent.com/karpad2/vscode_rebol/master/LICENSE)


text:
# Spacebook

[![Netlify Status](https://api.netlify.com/api/v1/badges/68791233-b2d6-4a86-8c42-e654e112a157/deploy-status)](https://app.netlify.com/sites/spacebook-app/deploys)

Create your own spacebook and customize it to your needs. Spacebooks are speedy to set up, free, and 100% open source. Spacebooks are modern notebooks you can use to create documentation, sketch out new ideas, build a simple website, or whatever suits your fancy.

---

<big>Demo and documentation:</big>

https://spacebook.app

</>

🙋 💥 👩🏽🚀 🚀 👨🚀 🛰

---

## Contributing

If you want to contribute or make fixes to spacebook, it is best to fork this repository directly and submit pull requests against it. If you spot a typo on the demo/documentation site, you can also open a fork directly from the edit button on the top of each page.

## Install spacebook

If you want to quickly install for local testing follow the instructions below:

### Requirements

You must be running **Node version 12 or higher** due to the Tailwind 2.0 release. I recommend using NVM to easily manage your Node versions if you need to switch back and forth between older versions.

- [Node](https://nodejs.org/)
- [NVM](https://github.com/nvm-sh/nvm) (optional)

**To find your current node version:**

```
node --version
```

### Step one

```
git clone https://github.com/broeker/spacebook
```

### Step two

Install the site and run an initial build command:

```
cd spacebook

npm install

npm run build (only necessary the first time!)
```

_If you get errors here, double check your node version!_

### Step three

Now spin up your local server to see your site!

```
npm run start
```

This command will start a local server and you'll be able to work on your site with hot reloads and some nice Browsersync features. 💥

---


text:
---
layout: post
title:  Why is it necessary to close standard input/output/error when writing a daemon?
date:   2023-02-13 09:12:32
categories: program
tags: program
---

* content
{:toc}

#### ANSWER1:
Not only stdin, stdout and stderr should be closed, but all open files.

From "Advanced Programming in the UNIX Environment", W. Richard Stevens, Addison-Weseley, 18th Printing, 1999, page 417.
>Unneeded file descriptors should be closed. This prevents the daemon from holding open any descriptors that is may have inherited from its parent (which could be a shell or some other process).

Mr. Stevens proposal is to get the maximum file descriptor and close all files up to that value.

The cited chapter is about 'Daemon Processes'. Please note that closing file descriptors is only one point from five when writing daemons.

#### ANSWER2:

You don't have to definitely close standard output/error, but you have to be sure where your daemon (and child) are going to writing to. Redirecting the output to a log file is a common practice.

Closing standard input is required so that the daemon (and/or child) doesn't get stuck trying to read some input from the user.

But if you're going to detach you daemon from a controlling TTY using ``setsid()``, the standard input/output/error are going to be invalid.


text:
# composition_interfaces
This is a package containing message and service definitions for managing composable nodes in a container process.
Generally these services are used by the ROS 2 [`roslaunch`](https://design.ros2.org/articles/roslaunch.html) system.

For more information about ROS 2 interfaces, see [docs.ros.org](https://docs.ros.org/en/rolling/Concepts/About-ROS-Interfaces.html).

## Services (.srv)
* [ListNodes](srv/ListNodes.srv): Retrieve a list of running composable nodes, including their names and ids.
* [LoadNodes](srv/LoadNode.srv): Load a composable node.
* [UnloadNode](srv/UnloadNode.srv): Unload a specified node by its id.

## Quality Declaration
This package claims to be in the **Quality Level 1** category, see the [Quality Declaration](QUALITY_DECLARATION.md) for more details.

branch_name: refs/heads/rolling


text:
---
layout: post
title: LeetCode - Friend Circles
categories:
    - LeetCode(Second)
tags:
    - LeetCode(Second)
    - Medium
    - Depth-first Search
excerpt_separator: "<!--more-->"
---

### Question Definition
There are N students in a class. Some of them are friends, while some are not. Their friendship is transitive in nature. For example, if A is a direct friend of B, and B is a direct friend of C, then A is an indirect friend of C. And we defined a friend circle is a group of students who are direct or indirect friends.

Given a N*N matrix M representing the friend relationship between students in the class. If M[i][j] = 1, then the ith and jth students are direct friends with each other, otherwise not. And you have to output the total number of friend circles among all the students.
<!--more-->
**Example 1:**
```
Input:
[[1,1,0],
 [1,1,0],
 [0,0,1]]
Output: 2
Explanation:The 0th and 1st students are direct friends, so they are in a friend circle.
The 2nd student himself is in a friend circle. So return 2.
```
**Example 2:**
```
Input:
[[1,1,0],
 [1,1,1],
 [0,1,1]]
Output: 1
Explanation:The 0th and 1st students are direct friends, the 1st and 2nd students are direct friends,
so the 0th and 2nd students are indirect friends. All of them are in the same friend circle, so return 1.
```
**Note:**
1. N is in range `[1,200]`.
2. `M[i][i]` = 1 for all students.
3. If `M[i][j]` = 1, then `M[j][i]` = 1.

### Java Solution
```java
public int findCircleNum(int[][] M) {
    boolean[] visited = new boolean[M.length];
    int count = 0;
    for(int i = 0; i < M.length; i++){
        if(!visited[i]) {
            count++;
            visited[i] = true;
            dfs(M, i, visited);
        }
    }
    return count;
}

private void dfs(int[][] M, int start, boolean[] visited){
    for(int i = 0; i < M.length; i++){
        if(M[start][i] == 1 && !visited[i]) {
            visited[i] = true;
            dfs(M, i, visited);
        }
    }
}
```


text:
# Contributing to this project

Please take a moment to review this document in order to make the contribution
process easy and effective for everyone involved.

Following these guidelines helps to communicate that you respect the time of
the developers managing and developing this open source project. In return,
they should reciprocate that respect in addressing your issue or assessing
patches and features.

## Using the issue tracker

The issue tracker is the preferred channel for [bug reports](contribution/bug-reports.md),
[features requests](contribution/feature-requests.md) and [submitting pull
requests](contribution/pull-requests.md).

repository: shantanuneosoft/rest-node-nestjs

repo_name: shantanuneosoft/rest-node-nestjs


text:
# Tweaking the game

## Copyright

Look up for `StrCopyright` in the file `data/text.68k`. Remember to write "`@`" when you want to write "`©`" (e.g. "`@2016`"). The copyright notice should automatically be aligned to the bottom right of the screen.

If you want to remove the copyright notice in the title screen, go to `buildme.68k` and disable `SHOW_COPYRIGHT`.

## Player physics

You can change the constants at the beginning of `src-68k/player.68k` to modify the player physics. *Note that speeds are indicated in 1/256ths of a pixel per frame (e.g. to move 2.5 pixels per second you need to use `$280`)*

* **`MAX_SPEED`:** the speed at which the player runs
* **`ACCEL_SPEED`:** how quickly the player accelerates to run
* **`ACCEL_FALL`:** how quickly the player falls (i.e. her "weight")
* **`JUMP_FORCE`:** how far the player jumps (*initial speed*, peak height is hard to calculate!)
* **`ATTACK_TIME`:** how long does it take to attack with the broom
* **`MAGIC_TIME`:** how long does it take to use magic normally
* **`SUPERMAGIC_TIME`:** how long does it take to use magic with the yellow potion
* **`RECOIL_SPEED`:** like `MAX_SPEED` when recoiling from getting hurt
* **`RECOIL_FORCE`:** like `JUMP_FORCE` when recoiling from getting hurt

The player's collision size can be changed with the following (relative to the player coordinates), although we need deeper testing to ensure they're working exactly as intended everywhere (i.e. no value is accidentally hardcoded somewhere):

* **`PLAYER_X1`:** left boundary
* **`PLAYER_Y1`:** top boundary
* **`PLAYER_X2`:** right boundary
* **`PLAYER_Y2`:** bottom boundary

It's worth noting that many objects have similar parameters in their respective files, so you may want to check those too! :)

## Scoring

The score awarded by different actions can be found in the list of constants at the beginning of `buildme.68k`. *Note that these values are BCD, so keep the `$` prefix in the numbers!* Also note that the score is capped at 99999999 points.

* **`SCORE_BROOM`:** defeating an enemy with a normal attack
* **`SCORE_MAGIC`:** defeating an enemy with a magic attack
* **`SCORE_FREEZE`:** *(for multiplyer, currently not implemented)*
* **`SCORE_ITEM`:** collecting an item

license: Zlib

repository: sikthehedgehog/dragon

repo_name: sikthehedgehog/dragon