text:
---
id: rdp-connect
title: How to connect via Remotedesktop to your server?
sidebar_label: Connect via Remotedesktop
---

After you've [installed Remotedesktop](./remotedesktop), you should be able to connect to your server via RDP.

Here is how to do this in detail.

:::tip
After you've configured the Remotedesktop Client the first time, you most likely only need to open the Remotedesktop Client and choose to connect to your server (since everything else is already configured).
:::

### On Windows:
1. Open the **Remotedesktop Client** on your PC in the same network as your server

(search for `msct` and it will find the correct program.)
2. Type in the IPv4-address of your server (e.g. `<IP_ADDRESS>`)

(Don't press `[ENTER]` or click on `connect`, yet!)
4. Click on `options` to expand and see all available options
5. **Enable** the option:  `Allow me to save credentials`
6. Type in `ncadmin` as `User name`
7. Now click on `connect`.
8. It should open a **credential popup** now, where you should **enter your password**

(It should be the password of your Ubuntu user `ncadmin`).
9. Now press `[ENTER]` or click on `OK` to save your credentials
10. You will see now a popup with a **certificate warning**: Tick the option that it doesn't show the warning to you in the future. And select `Yes` that you want to connect to this PC.
11. Now you should finally see the internal RDP session of your server!

:::note
When enabling the option to store the password of your Ubuntu user ncadmin on your Client PC, you should make sure that your Client PC has an encrypted system drive (e.g. by enabling Bitlocker) and that the user account on your Client PC has a strong password!
:::


text:
# Notes on Debugging, Debuggers in Python

## pdb
Insert `import pdb; pdb.set_trace()` in line where you want debugging to start.

## Commands:
* l: list code snippet
* n: line by line execution
* b <NUM>: insert a breakpoint at line <NUM>
* c: continue until end or reach breakpoint
* b <LINE NUM>, <CONDITION>: conditional breakpoints
    * e.g `b 69, length != sum(aa_counts)`

## Resources
1. [Python Debugging With Pdb](https://realpython.com/python-debugging-pdb/)
2. [ipdb: an improved version of pdb](https://pypi.org/project/ipdb/)
3. [PyData Video on Debugging Python Programs](https://www.youtube.com/watch?v=04paHt9xG9U)
    * [github repo](https://github.com/krother/debugging_tutorial)

repository: palpen/ProgrammingNotes

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: palpen/ProgrammingNotes


text:
# Easy Exchange Rates

[![PyPI package](https://img.shields.io/badge/pip%20install-easy--exchange--rates-brightgreen)](https://pypi.org/project/easy-exchange-rates/)
[![version number](https://img.shields.io/pypi/v/easy-exchange-rates?color=green&label=version)](https://pypi.org/project/easy-exchange-rates/)
[![Actions Status](https://github.com/oddaspa/easy-exchange-rates/workflows/Build%20status/badge.svg)](https://github.com/oddaspa/easy-exchange-rates/actions)
[![License](https://img.shields.io/github/license/oddaspa/easy-exchange-rates)](https://github.com/oddaspa/easy-exchange-rates/blob/main/LICENSE.txt)

A python package for retrieving currency exchange data from https://exchangerate.host/ to a pandas dataframe.
## Usage
```python
from easy_exchange_rates import API
api = API()
time_series = api.get_exchange_rates(
  base_currency="EUR",
  start_date="2021-01-01",
  end_date="2021-08-13",
  targets=["USD","CAD"]
)
data_frame = api.to_dataframe(time_series)
print(data_frame.head(5))
>>>
                 CAD       USD
2021-01-01  1.549988  1.217582
2021-01-02  1.544791  1.213500
2021-01-03  1.557791  1.223409
2021-01-04  1.566076  1.225061
2021-01-05  1.558553  1.229681
```

# Testing

```
python3 -m unittest discover -s tests
```

license: MIT

repository: oddaspa/easy-exchange-rates

branch_name: refs/heads/main

gha_language: Python

gha_license_id: MIT

repo_name: oddaspa/easy-exchange-rates


text:
# Backlog

## Processes

* KEP process rollout and iteration
* New repo process
* [API review process](https://github.com/kubernetes/community/pull/419/files)
* Conformance test suite change review process
* Escalation process
* [Branching policy](https://github.com/kubernetes/community/issues/566)

## SIG-related

* Improve charter to meet expectations of Steering Committee
* Clarify criteria for areas out of scope for the SIG
* Formalize decision processes
* Identify subprojects/subefforts
* Determine initial reviewers and approvers
* How are SIG leads chosen

## Documentation

* Update What Is Kubernetes on the web site
* [Architectural diagram](https://github.com/kubernetes/community/issues/767)
* Document who owns client library, build, and release artifacts
* Document who owns conformance definition, profiles, etc.
* Document [design decisions](https://docs.google.com/document/d/1D_OlIZRSieMNPQaq2PNrh5Ax7EwXNjmGfKIWiofJ6jY/edit#)
* Overall extension strategy

## Major technical issues and conventions

* [Multi-repo plan and roadmap](https://github.com/kubernetes/kubernetes/issues/24343)
* ["v2 API" plan](https://github.com/kubernetes/kubernetes/issues/8190)
* [Architectural layers](https://github.com/kubernetes/community/issues/952)

repository: kubernetes/community

gha_language: Jupyter Notebook

repo_name: kubernetes/community


text:
# GraphJet

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

GraphJet is a real-time graph processing library written in Java that
maintains a full graph index over a sliding time window in memory on a
single server. This index supports a variety of graph algorithms
including personalized recommendation algorithms based on
collaborative filtering. These algorithms power a variety of real-time
recommendation services within Twitter, notably content (tweets/URLs)
recommendations that require collaborative filtering over a
heterogeneous, rapidly evolving graph.

GraphJet is able to support rapid ingestion of edges in an evolving
graph while concurrently serving lookup queries through a combination
of compact edge encoding and a dynamic memory allocation scheme. Each
GraphJet server can ingest up to one million graph edges per second,
and in steady state, computes up to 500 recommendations per second,
which translates into several million edge read operations per
second. More information about the internals of GraphJet can be found
in the
[VLDB'16 paper](http://www.vldb.org/pvldb/vol9/p1281-sharma.pdf).

# Quick Start and Example

After cloning the repo, build as follows (for the impatient, use option `-DskipTests` to skip tests):

```
$ mvn package install
```

GraphJet includes a demo that reads from the Twitter public sample stream using the [Twitter4j library](http://twitter4j.org/en/) and maintains two separate in-memory bipartite graphs:

+ A bipartite graph of user-tweet interactions. The left-hand side vertices represent users, the right-hand side vertices represent tweets, and the edges represent tweet posts and retweets.
+ A bipartite graph of tweet-hashtag contents. The left-hand side vertices represent tweets, the right-hand side vertices represent hashtags, and the edges represent content association (e.g., a tweet contains a hashtag).

To run the demo, create a file called `twitter4j.properties` in the GraphJet base directory with your Twitter credentials (replace `xxxx` with actual credentials):

```
oauth.consumerKey=xxxx
oauth.consumerSecret=xxxx
oauth.accessToken=xxxx
oauth.accessTokenSecret=xxxx
```

For obtaining the credentials, see [documentation on obtaining Twitter OAuth tokens](https://dev.twitter.com/oauth/overview/application-owner-access-tokens). The public sample stream is available to registered users, see [documentation about Twitter streaming APIs](https://dev.twitter.com/streaming/overview) for more details.

Once you've built GraphJet, start the demo as follows:

```
$ mvn exec:java -pl graphjet-demo -Dexec.mainClass=com.twitter.graphjet.demo.TwitterStreamReader
```

Once the demo starts up, it begins ingesting the Twitter public sample stream. The program will print out a sequence of status messages indicating the internal state of the user-tweet graph and the tweet-hashtag graph.

You can interact with the graph via a REST API, running on port 8888 by default; use ` -Dexec.args="-port xxxx"` to specify a different port.

The following calls are available to query the state of the in-memory bipartite graph of user-tweet interactions:

+ `userTweetGraph/topTweets`: queries for the top tweets in terms of interactions (retweets). Use parameter `k` to specify number of results to return (default ten). Sample invocation:

```
curl http://localhost:8888/userTweetGraph/topTweets?k=5
```

+ `userTweetGraph/topUsers`: queries for the top users in terms of interactions (retweets).  Use parameter `k` to specify number of results to return (default ten). Sample invocation:

```
curl http://localhost:8888/userTweetGraph/topUsers?k=5
```

+ `userTweetGraphEdges/tweets`: queries for the edges incident to a particular tweet in the user-tweet graph, i.e., users who have interacted with the tweet. Use parameter `id` to specify tweetId (e.g., from `userTweetGraph/topTweets` above). Sample invocation:

```
curl http://localhost:8888/userTweetGraphEdges/tweets?id=xxx
```

+ `userTweetGraphEdges/users`: queries for the edges incident to a particular user in the user-tweet graph, i.e., tweets the user interacted with. Use parameter `id` to specify userId (e.g., from `userTweetGraph/topUsers` above). Sample invocation:

```
curl http://localhost:8888/userTweetGraphEdges/users?id=xxx
```

The following calls are available to query the state of the in-memory bipartite graph of tweet-hashtag contents:

+ `tweetHashtagGraph/topTweets`: queries for the top tweets in terms of hashtags. Use parameter `k` to specify number of results to return (default ten). Sample invocation:

```
curl http://localhost:8888/tweetHashtagGraph/topTweets?k=5
```

+ `tweetHashtagGraph/topHashtags`: queries for the top hashtags in terms of tweets.  Use parameter `k` to specify number of results to return (default ten). Sample invocation:

```
curl http://localhost:8888/tweetHashtagGraph/topHashtags?k=5
```

+ `tweetHashtagGraphEdges/tweets`: queries for the edges incident to a particular tweet in the tweet-hashtag graph, i.e., hashtags contained in the tweet. Use parameter `id` to specify tweetId (e.g., from `tweetHashtagGraph/topTweets` above). Sample invocation:

```
curl http://localhost:8888/tweetHashtagGraphEdges/tweets?id=xxx
```

+ `tweetHashtagGraphEdges/hashtags`: queries for the edges incident to a particular hashtag in the tweet-hashtag graph, i.e., tweets the given hashtag is contained in. Use parameter `id` to specify hashtagId (e.g., from `tweetHashtagGraph/topHashtags` above). Sample invocation:

```
curl http://localhost:8888/tweetHashtagGraphEdges/hashtags?id=xxx
```

The demo program illustrates collaborative filtering via similarity
queries on the tweet-hashtag graph. Note that the demo does not offer
personalized recommendation algorithms on the user-tweet graph (as is
deployed inside Twitter) because the public sample stream API is too
sparse in terms of interactions to give good results. The following
endpoint for similarity queries offers related hashtags given an input
hashtag:

+ `similarHashtags`: computes similar hashtag to the input hashtag based on real time data. Use parameter `hashtag` to specify hashtag (e.g., from `tweetHashtagGraph/topHashtags` above). Sample invocation:

```
curl http://localhost:8888/similarHashtags?hashtag=trump&k=10
```

# License

Copyright 2016 Twitter, Inc.

Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)

repository: twitter/GraphJet

gha_language: Java

repo_name: twitter/GraphJet


text:
# Security Policy

## Reporting a Vulnerability

If you've found a security issue that you'd like to disclose confidentially please send email to<EMAIL_ADDRESS>.

### Who Reads Email Sent to<EMAIL_ADDRESS>
Only a restricted and carefully chosen group of KubeVela maintainers will have access to material sent to the<EMAIL_ADDRESS>address.
No outside users can subscribe to this list.

### What to Send to<EMAIL_ADDRESS>
Please provide as much information about your system and the issue as possible when contacting the list.

## How We Respond

Email sent to<EMAIL_ADDRESS>is read and acknowledged with a non-automated response within three working days.
For issues that are complicated and require significant attention,
we will open an investigation and will provide you with a mechanism to check the status of our progress at any time.

repository: DeepHiveMind/kubevela

repo_name: DeepHiveMind/kubevela


text:
# RT

Better not use this theme. The blogger theme's widget layout system follows what is showing on the page. It is impossible to configure hidden section from layout setting.

Check out the theme in blogger: [https://op-rt.blogspot.com/](https://op-rt.blogspot.com/)

![rt.png](https://raw.githubusercontent.com/treezi1004/op-blogger-themes/master/1_Column/RT/img/rt.PNG)


text:
@ajdev/sandbox-operator

## Table of Contents

* [Overview](#overview)
* [Development](#development)
* [References](#references)
* [License](#license)

## Overview

The purpose of this project is to provide a reference kubernetes operator generated by `operator-sdk`. The latest kubernetes operator is generated by<EMAIL_ADDRESS>
## Development

* Instantiate project with `operator-sdk`:
```sh
# init project: all API groups will be <group>.ajdev.com
operator-sdk init --domain=ajdev.com --repo=github.com/ajgrande924/sandbox-operator

# create memcached api
operator-sdk create api --group cache --version v1 --kind Memcached --resource=true --controller=true
```

* Update api and controller then update config assets:
```sh
# update generated code
make generate

# update manifests
make manifests
```

* Build operator controller image:
```sh
# build / push operator controller image
make docker-build docker-push IMG=docker.io/ajgrande924/sandbox-operator:1.0.1
```

* Install crd and controller to cluster:
```sh
make install
make deploy IMG=docker.io/ajgrande924/sandbox-operator:1.0.1
```

* Apply custom resource and check:
```sh
kubectl apply -f config/samples/cache_v1_memcached.yaml
kubectl logs deployment.apps/sandbox-operator-controller-manager -n default -c manager
```

* Cleanup cluster:
```sh
kubectl delete -f config/samples/cache_v1_memcached.yaml
kubectl delete deployments,service -l control-plane=controller-manager
kubectl delete role,rolebinding --all
```

## References

* [Operator SDK](https://sdk.operatorframework.io/docs/)
* [Operator Lifecycle Manager](https://olm.operatorframework.io/docs/)

## License

Sandbox Operator is under MIT license. See the [LICENSE](LICENSE) file for details.


text:
#Code 201, Day 7 Learning Journal
###Tuesday June 21st, 2016

Lecture this morning was good, I took a bunch of notes and even more from Sam's afternoon 'how to put your tr/td into the DOM' lecture.

Working on this code was actually fun, I enjoyed making the constructor function and putting the pieces together into the final product.  Working on the stretch goals was interesting and I learned a few new things:

---
####passing variables between functions (even i used as a counter) is easier than I would have thought.
---
####Nesting multiple FOR loops to access nested arrays is possible and interesting, but hard to keep straight.  Write things down and work your pseudocode until you have a solution on paper, then use that logic to write your code.
---
I'm experimenting with formatting a bit here so we'll see what sticks...

The footer function is the one I'm most proud of defenetly, it took longer than any of the others and the totals really came out nice.  It's also dynamic so if you change any of the inputs it'll adapt nicely to that change and just output more or less table cells.  I think that making pages that respond dynamically to inputs is interesting because it's less of a static output and more of a (some stuff goes here, design a way to take this stuff:()XYZABC) and put it into that not-static hole).

###Following the line break are my notes from the lecture.
---
Tuesday June 21st
Morning Notes

Quiz 4 pub’d today, due tomorrow night.  We’ll go over 2 + 3 in a few minutes.  Going over the days agenda.

Review of yesterday’s project - Sam is going to build it live so we can see it and ask questions.  1 shop location.
Good chance to really think about and consider architecture.

From project building: if you see an empty array [ ] somewhere in your code you should automatically dial in on the fact that, at some point, you’re going to use that array to store data.

We’re going to want to add location name into our constructor function.  Later on we’ll add “identifier: ‘firstandpike’ properties to our objects to use it to assign an id or class to some of our html objects.  This is already getting pretty complicated :p

We can inspect variable by entering it in the console.  If we enter console.log our code prints out the same output for us to access in the console.  console.dir(yourThingHere) shows us the object as the object, and we can open the arrays as trees and really see what is in there and (if things are broken) where they broke at.

What is the __proto__ thing at the bottom?  Just part of the browser?  idk

Building methods outside of the object (using dot notation) is cleaner looking than using the literal format but does it work with the constructor function?

Pushing things from js -> dom is ‘rendering’ them, or that’s one way to say it anyway.

(objectName.andProperty).push(varToBePushed); <— this will store a variable in an array, adding a new value each time it pushes

A shorter build -> check process would work better for me I think, that’s what Sam is suggesting.  Don’t build big pieces of code before checking them.

console.dir(someThingHere) <- is your friend

Round down cookies, there’s no crumb sales here.

Sam put the calls to his previous functions inside previous one, which I feel like has upsides and downsides.  Upside is that when you’re done writing everything you can call all of your methods via just 1 command, but the downside is that nesting them that way might obfuscate where your methods are called at later so that for anyone else coming back to look at this they’ll have extra work to do to figure out where you executed which parts.  I’m not sure which example is best?

The demo will be in the class repo for us to look at during lab.  The Math.random() function could be a global function/method of a helper object that we just call so that we don’t have to rewrite it inside every one of our project objects.

Tuesday 21st Note #2

Constructor functions woo~

We’re also going to replace the lists in our project with a single table where we put our cookies per hour into table data spots.  This could be tough to get working?

The table layout is in the repo, Totals go in first column and going across is each hourly # boop boop boop

There’s a stretch goal to get the Totals column at the bottom of the table to get it all working.

We have stretch goals for the public facing page, more images in our repo to help us and we can work on a style guide(?) which we can ask Brian about.

There’s a demo in our repo for today too so we’ve got that to look at if we need it.

Constructor functions make objects via passed in arguments, so you don’t have to write as much code.  There’s demos in the book and on the internet too, if you need help.

Sam - The key to understanding constructor functions is understanding that a constructor function looks a lot like objects in literal notation.  We just adjust the references so that they apply to this.aThingHere.

per example:

function Student(firstName, lastInitial, faveNumber) {
	this.course = ‘201d8’;
	this.firstName = firstName;
	this.lastInitial = lastInitial;
	this.faveNumber = faveNumber;
	this.isCodeNinja = true;
	this.introduction = function() {
		console.log(some introduction here);
	};
	console.log(this);
	myClass.push(this);
};

In order to make a student using that constructor function we use:

var myClass = [];
var alison = new Student(‘Alison’, ‘Z’, 16);
var david = new Student(‘David’, ’S’, 19);

the myClass array here stores the student objects inside, so we an access and otherwise use them as a group, we can work through those objects with a for or while loop, etc.  Storing them inside a container gives us lots of ways to do stuff to our array as a group.

Constructor functions allow us to save huge amounts of code because we can construct the objects by passing in arguments.  You can still add methods via dot notation or otherwise modify your objects, they’re still regular objects and are not different than objects created via literal notation.

wtf this ?

THIS in a global context refers to the window object.  It is context-dependent, which means when you use it inside a constructor function it means the object that the function creates.  When you use it in other functions it refers to its immediate parent function.

console.table creates a very nice table console that represents the objects with an entry

You can use console.log() with a , instead of a +.  When you use a comma the output goes on the next line and it’s easy to see your debugging statements.  The CONSOLE is an object.   DOT notation like this always tells you the thing to there right is a method of the object on the left.  The console is just one of many built in objects in javascript.

Adding to a constructor function:

Student.favoriteTA = ‘Nadia’; <- if you enter this after the constructor function it will change the Student object constructor, but it would need to be put above the constructor function in the code in order to work on the student objects you’re making.

Student.prototype.favoriteTA = ‘Nadia’; <- this one will work from anywhere?  it’s contained inside the __proto__ subject

Prototypal Inheritance - is a big part of javascript and front end web dev as a whole.  Everything inherits from it’s parents in a structured way.  Prototype properties will be inherited by their parents IE: with a prototype value added to that declaration, all Student objects will have a live prototype key of favoriteTa with value ‘Nadia’ immediately after that line is written into the code.

We’ll go deep into prototype inheritance next week.

So for our bigger functions from the cookies part of the assignment we can still write those functions outside the student method, then just add them back into the Student’s prototype object (or whatever our constructor is named, it won’t be Students).

SO now lets talk about Tables.  Woo tables~

Sam has made a table of the cats in his neighborhood.  That’s not creepy right?  Anyway the demo is in the repo.  It seems like the browser adds a
 tag of it’s own even if you left one out?  That’s strange.  Looking at it in the dev console way is a good way to ensure that you filled everything out correctly and it’s all inheriting downwards correctly too.

Things to put element into DOM:
 (if you’re putting it somewhere you also have to document.getElementById on the thing you’re putting it in)
1 - create element
2 - give content
3 - append to dom

Tables are made in JS via typewriter kind of functionality.  You’re going to go row by row across a table.

So for the TR you’re going to grab the place it’s going, make the element, and then stick 3x TD opening and closing tags in it, then it’s own closing comment.  You have extra stuff to do here.  Basically you’ll make a For loop that adds TD tags for the # of elements you need and then adds a closing tag.  There are some more pieces of this in the demo for todays lab so we can look through those and Sam is going to do a demo of it for us around 1:30 or 2pm so we’ll get a good look at the table demo.

Here are the starting numbers that you'll need to build these objects:
Location	Min / Cust	Max / Cust	Avg Cookie / Sale
1st and Pike	23	65	6.3
SeaTac Airport	3	24	1.2
Seattle Center	11	38	3.7
Capitol Hill	20	38	2.3
Alki	2	16	4.6

Tuesday 21st Note #3
On JS Tables and dynamically creating them woo~

Toeny is spelled correctly, we’re going to make a table with him in it using javascript.

We basically have to build the table top - > bottom row by row in JS in order to have the HTML come out right so that the table comes out correctly.

  <- creating one of these with the ID where I want my complete table to go is an easy way to get a spot to put your js output.  You /can/ add this later but it’s a big pain in the ass.

for(var i = 0; i < allCats.length, i++) {
	console.log(allCats[i].name;
}

var catTable = document.getElementById(‘cats’);  <— ‘cats’ is the id of the place where we’re going

Best Practice Syntax: trEl <- the El tells you it’s an element and it starts with the element name in lower case, so in this case
 for table row.   would be tdEl

var trEl = document.createElement(‘tr’);

var thEl = document.createElement(‘th’);
thEl.textContent = ‘Name’;
trEl.appendChild(thEl);

var thEl = document.createElement(‘th’);
thEl.textContent = ‘Color’;
trEl.appendChild(thEl);

var thEl = document.createElement(‘th’);
thEl.textContent = ‘Tail’;
trEl.appendChild(thEl);

catTable.appendChild(trEl);

The above is one way to do this.  We could also do it with a For Loop such as:

var headerTitles = [‘Name’, ‘Color’, ‘Tail’];

for(var i = 0j, i < headerTitles.length, i++) {
	put those 3 lines in here but use headerTitles[i] instead of Name, Color, Tail
};

catTable.appendChild(trEl);  <—  After either method this is the way you put the table row into the html.

We can make something like our above for loop to make the rows for our stores in our project. Woo~

We can also write a for loop to access our cookieStores array [] and run through so that you pull the information out of each one via the array and into td cells.  This means you can format 1 row and it’ll iterate for you along the table..

Different example:

var catDataArray = [];
for(var i = 0; i < allCats.length; i++) {
	var oneKitteh = [];
	oneKitteh.push(allCats[i].name)
	oneKitteh.push(allCats[i].color);
	oneKitteh.push(allCats[i].tail);
	catDataArray.push(oneKitteh);
}

text.Content = empty string <— google this, it’ll give you an empty cell for the top left of your table

our header row will be a standalone global function.  For each location you’re going to do the create -> give content -> append cycle
we need it for the store name, the daily location total, and a for loop to run through the times

The totals row?  That might not happen today, it involves traversing the DOM and is more complicated.

We could also add a “render” function that makes the row for that individual cat and storing it in an array [] so that we can just get it from the cat by grabbing that array and iterating through it.  If you do this you’ll have to add the cookies @ time TO that array as well.

Cat.prototype.render() {

}


text:
---
layout: default
---

# 1994-05-15 - Magic Money Client/Server using IPC

## Header Data

From: Sameer<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: e0727cbd3719478447edf128ca8c729caea40e90cf796e87d4e1619927b35b81

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1994-05-15 06:54:19 UTC

Raw Date: Sat, 14 May 94 23:54:19 PDT

## Raw message

```
{% raw  %}From: Sameer<EMAIL_ADDRESS>Date: Sat, 14 May 94 23:54:19 PDT
To<EMAIL_ADDRESS>Subject: Magic Money Client/Server using IPC
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

	As I posted only a few hours ago, I have been working on
improving the Magic Money interface. I've written a server application
for the Magic Money server which allows the server to sit on a port
and wait for connections. When a connection comes in it forks and
processes the request, by just taking the input, passing it to the 's'
server released by Pr0duct Cypher, and then returning the server's
output.

	The client is a front end to Pr0duct Cypher's 'c' program,
which handles the communication between the 'c' client and the server
running on a socket. I have written the client so that it can be run
from any directory, but it looks in ~/.bank for the bank.asc,
rand.dat, and other files that the program uses.

	I just wrote this code today, so I'm sure it lacks many safety
checks. If you'd like to point out where it goes wrong, I'd appreciate
it greatly.

To invoke the server:

Edit server.pl and give it the port number you want.

Run 'server.pl' in the directory which has the 's' program and the files that
the 's' program uses. server.pl will fork and wait on the port specified.

To run the client:

Create the ~/.bank directory, and put rand.dat and bank.asc in that
directory.

Edit the client.pl to reflect the port number and the hostname of the
server, as well as the location of Pr0duct Cypher's 'c' binary.

client.pl -initialize

	Generates your account.

client.pl -incoming [filename]

	Takes in incoming coins (which someone has given you) either from
filename or stdin (if the filename argument is missing) and adds their
value to your wallet. (Doing the communication with the server that is
necessary)

client.pl -extract [filename]

	Extract coins that you own into filename, or if filename
doesn't exist pgp ascii-armor the coins and send them to stdout.

client.pl -exchange

	Exchange your old coins for new ones.

server.pl:
#!/usr/local/bin/perl
# Perl script to attach a Magic Money Server to a port
# Sameer<EMAIL_ADDRESS>

($port) = @ARGV;
$port = 1992 unless $port;
$magicserver = "s";
$waitlock = "waiter.pid";
$processlock = "processor.pid";

require 'sys/socket.ph';
require './shlock.pl';

# First check to see if the process is running
unless(&shlock($waitlock))
{
    print "Process already running\n";
    exit;
}

$sockaddr = 'S n a4 x8';

($name, $aliases, $proto) = getprotobyname('tcp');
($name, $aliases, $port) = getservbyname($port, 'tcp')
    unless $port =~ /^\d+$/;

$this = pack($sockaddr, &AF_INET, $port, "\0\0\0\0");

select(NS); $| = 1; select(stdout);

socket(S, &PF_INET, &SOCK_STREAM, $proto) || die "socket: $!";
bind(S, $this) || die "bind: $!";
listen(S, 5) || die "connect: $!";

select(S); $| = 1; select(stdout);

# Ok the socket has been setup. Fork, wait for the parent lock to die
# and then lock again
if(fork)
{
    exit;
}

# Wait for the old process to die
sleep 10 unless(&shlock($waitlock));

for (;;) {
#    print "Listening again\n";
    ($addr = accept(NS,S)) || die $!;
    unless(fork)
    {
#        print "accept ok\n";
	($af,$port,$inetaddr) = unpack($sockaddr,$addr);
	@inetaddr = unpack('C4',$inetaddr);
#	print "$af $port @inetaddr\n";

	$tmpin = "/tmp/mmin." . $$ ;
	$tmpout = "/tmp/mmout." . $$ ;

	open(TIN, ">$tmpin") || die $!;

	print NS "Magic Money Bank: " . $bank . "\n";
	print NS "Feed server\n";
	while (<NS>) {
	    print TIN;
	    last if /^-----END/ ;
	}
	close(TIN);

	# Wait for the process lock to stop

	unless(&shlock($processlock))
	{
	    print NS "Please wait for other requests to finish.";
	    do
	    {
		print NS "." ;
		sleep 10;
	    }
	    until(&shlock($processlock));
	}

	print NS "order processing.";

	# Run magic money
	open(MM, "| $magicserver > $tmpout");
	open(TIN, $tmpin);
	while(<TIN>)
	{
	    print NS "." ;
	    print MM;
	}
	close(TIN);
	close(MM);

	print NS "done.\nServer response\n";
	open(OUTPUT, $tmpout);
	print NS <OUTPUT>;
	close OUTPUT;
	exit;
    }
}

client.pl:
#!/usr/local/bin/perl
# Perl script to make dealing with the magic money oh so much easier
# Sameer<EMAIL_ADDRESS>
require 'sys/socket.ph';

$mmclient = "/usr/local/bin/mmclient" ;
$pgp = "/usr/local/bin/pgp" ;
$port = 1992;
$host = "localhost";

sub connectgrab
{
    local($them, $port, $infile, $outfile) = @_;

    $sockaddr = 'S n a4 x8';
    chop($hostname = `hostname`);

    ($name, $aliases, $proto) = getprotobyname('tcp');
    ($name, $aliases, $port) = getservbyname($port, 'tcp')
	unless $port =~ /^\d+$/;
    ($name, $aliases, $type, $len, $thisaddr) =
	gethostbyname($hostname);
    ($name, $aliases, $type, $len, $thataddr) = gethostbyname($them);

    $this = pack($sockaddr, &AF_INET, 0, $thisaddr);
    $that = pack($sockaddr, &AF_INET, $port, $thataddr);

    socket(S, &PF_INET, &SOCK_STREAM, $proto) || die "socket: $!";
    bind(S, $this) || die "bind: $!";
    connect(S, $that) || die "connect: $!";

    select(S); $| = 1; select(stdout);

    # Wait until we get the prompt to start
    while(<S>)
    {
	last if /^Feed server$/ ;
    }

    # Send the stuff to the server
    print "Sending to server.\n";
    open(INPUT, $infile) || die "can't open $infile: $!";
    while(<INPUT>)
    {
	print S;
    }
    close INPUT;

    # Wait for the server to finish processing.. tell the user it is processing
    print "Waiting for server to process.\n";
    while(<S>)
    {
	last if /^Server response$/;
    }

    # Now grab the server's response
    open(OUTPUT, "> $outfile") || die "can't open $outfile: $!";
    while(<S>)
    {
	print OUTPUT;
    }
    close(OUTPUT);

    close S;
    print "Finished with server.\n";
}

## Main
## Deal with user requests

# Process incoming money

sub processincoming
{
    if($ARGV[0] ne '-')
    {
	$ARGV[0] = &expandfile($ARGV[0]);
    }
    open(FILE, "> temp.dat") || die "can't create temp.dat: $!";
    print FILE <>;
    close FILE;

    system("$mmclient temp.dat");
    unlink("temp.dat");
    &deal;
}

# Initialize client

sub initialize
{
    system("$mmclient -i");
    &deal;
}

# Exchange coins

sub exchangecoins
{
    system("$mmclient -x");
    &deal;
}

sub deal
{
    &connectgrab($host, $port, "output.asc", "serverreply.asc");

    system("$mmclient serverreply.asc");
#    unlink("serverreply.asc");
#    unlink("output.asc");
}

sub extractcoins
{

#    if($ARGV[0] eq '-')
#    {
#	# Error
#	print "Must specify a filename to extract coins to\n";
#	exit;
#    }

    if($ARGV[0] ne '-')
    {
	$file = &expandfile($ARGV[0]);

	if( -e $file )
	{
	    # Error
	    print "File already exists\n";
	    exit;
	}
	# Check if the file can be made
	open(FILE, "> $file") || die "Can't create $file: $!";
	close FILE;
	unlink($file);
    }

    system("$mmclient -p");
    # Now move coins.dat away so that another extraction doesn't mean money
    # is lost

    # Send it to another file or stdout

    if($file)
    {
	rename("coins.dat", $file);
	print "Coins moved to $file\n";
    }
    else
    {
	print "Coins going out, ascii armored.\n";
	open(COINSDAT, "coins.dat");
	open(ASCII, "| $pgp -af 2>/dev/null");
	print ASCII <COINSDAT>;
	close ASCII;
	close COINSDAT;
#	unlink("coins.dat");
    }
}

sub expandfile
{
    # If a file has a leading / don't add the startdir
    # otherwise prepend $startdir

    local($fname) = @_;
    if(index($fname, '/') == 0)
    {
	return($fname);
    }
    else
    {
	return($startdir . "/" . $fname);
    }
}

#########
# THE MAIN
#########

# This bit of the program takes the cmdline arguments, etc.
$startdir = $ENV{'PWD'};
chdir($ENV{'HOME'} . "/.bank") || die "can't chdir to ~/.bank: $!";

$command = $ARGV[0];
shift;

unless($ARGV[0])
{
    unshift(ARGV, '-');
}

&processincoming if $command eq '-incoming';
&initialize if $command eq '-initialize';
&exchangecoins if $command eq '-exchange';
&extractcoins if $command eq '-extract';

{% endraw %}
```

## Thread

+ Return to [May 1994](/archive/1994/05)

+ Return to "[Sameer <sameer@soda.berkeley.edu>](/authors/sameer_sameer_at_soda_berkeley_edu_)"

+ 1994-05-15 (Sat, 14 May 94 23:54:19 PDT) - Magic Money Client/Server using IPC - _Sameer<EMAIL_ADDRESS>


text:
# Subclassing a Gala CPotential

Demonstration of how to define a new potential class implemented in C that works with the Gala machinery.

[![Build status](http://img.shields.io/travis/adrn/gala-cpotential-demo/master.svg?style=flat)](http://travis-ci.org/adrn/gala-cpotential-demo)

repository: adrn/gala-cpotential-demo

repo_name: adrn/gala-cpotential-demo


text:
---
layout: post
category: Technical
tags: Dockers
title: Isolated Virtual Hosting Using Dockers!
---

## A Little Overview of What i Did.

I earlier worked on a project to virtually host multiple website or virtual host environment containers where every different website or environment is having a different container.Normal Apache or nginx single container can also be used for virtual hosting but using a single different container for a website makes it more secure and efficent as a single container coming down does not bring the other website down as all website have thier own different container for even more enhanced security and isolation to achieve that I used a reverse proxy with Docker.

## So Why used a Reverse Proxy
Docker containers are assigned random IPs and ports which makes addressing them much more complicated from a client perspsective. By default, the IPs and ports are private to the host and cannot be accessed externally unless they are bound to the host.
Binding the container to the hosts port can prevent multiple containers from running on the same host. For example, only one container can bind to port 80 at a time. This also complicates rolling out new versions of the container without downtime since the old container must be stopped before the new one is started.
A reverse proxy can help with these issues as well as improve availabilty by facilitating zero-downtime deployments.

### Some more advantages of Reverse Proxy
* Multiple Ports
* Multiple Hosts
* Wildcard Hosts
* SSL Backends
* SSL Support
* Diffie Hellman Groups
* Wildcard Certificates

*Traefik* is widely used as reverse proxy on container. Here is official link to Traefik https://traefik.io/ .

I used _jwilder/nginx-proxy_ docker container. https://github.com/jwilder/nginx-proxy

## Understand the Scenario

Imagine you have a bunch of apps or website in a variety of programming languages, each application should respond to a different domain and you want to bundle everything in the same machine.

## So What I Did

### First App/Website
You can either build a container for your own website or web application using dockerfile or just for an example lets run a nginx server using offical docker image.

```
docker pull nginx
```

```
docker run -it -p 80:80 -d nginx

```

### Second App/Website
Similar to First Application or website you can build or run your website . Remember You cannot assign the same port 80 once is alloted and as it would need to run on port 80

```
docker pull tomcat
```

```
docker run -p 8888:90 -d tomcat

```
Now access your webpages through its public IP and you should see the PHP app on port 80 and Tomcat on port 8888.In most of the cases its running on IP <IP_ADDRESS> but you can check using **docker ps** command .

We are advancing, but our problem has not been solved yet, we still need to point different domains to those containers and access all of them on port 80.

## Solution to our problem
So far we are binding our Webpages  ports to container ports, but we need to bind domains to containers.

We’ll use the jwilder/nginx-proxy project, which is already configured and good to go:

```
docker pull jwilder/nginx-proxy

```

Run this image on port 80:

```
docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock jwilder/nginx-proxy

```
Now if you access your Webpage from its public IP you’ll get a 503 Service Temporarily Unavailable response, which is good!

Nginx is just saying it doesn’t know how to serve your request as it is not configured to point to anywhere.
Given that your domains are pointing to the Web Application, we can run our containers using the VIRTUAL_HOST param, which will do all the magic and bind the domains to the running containers.

```
docker run -d -e VIRTUAL_HOST=website1.com nginx

```

```
docker run -d -e VIRTUAL_HOST=website2.com tomcat

```

Kudos We Did it.,..!!

Hopefully if you access website1.com and website2.com you’ll see the Nginx and Java apps respectively.

Any Issues faced in it can be commented below.


text:
# Exposing a JNDI Datasource as a Data Service

Java Naming and Directory Interface (JNDI) is a Java API (application
programming interface) providing naming and directory functionality for
Java software clients to discover and look up data and objects via a
name. WSO2 Enterprise Integrator (WSO2 EI) supports the JNDI
InitialContext implementation by inheriting the JNDI implementation of
Tomcat (
<http://tomcat.apache.org/tomcat-7.0-doc/jndi-resources-howto.html> ).
JNDI helps decouple object creation from the object look-up . When you
have registered a datasource with JNDI, others can discover it through a
JNDI lookup and use it.

Follow the topics below. Also, see the samples in [Data Integration
Samples](https://docs.wso2.com/display/EI650/Data+Integration+Samples) .

-   [Start the Create New Data Service
    wizard](#ExposingaJNDIDatasourceasaDataService-StarttheCreateNewDataServicewizard)
-   [Add a
    JNDI datasource](#ExposingaJNDIDatasourceasaDataService-AddaJNDIdatasource)
-   [Define a query for the
    datasource](#ExposingaJNDIDatasourceasaDataService-Defineaqueryforthedatasource)
-   [Define an operation to invoke the
    query](#ExposingaJNDIDatasourceasaDataService-Defineanoperationtoinvokethequery)
-   [Finish creating the data
    service](#ExposingaJNDIDatasourceasaDataService-Finishcreatingthedataservice)

------------------------------------------------------------------------

### Start the Create New Data Service wizard

Now, let's start creating the data service from scratch:

1.  Download the product installer from
    [here](http://wso2.com/integration/) , and run the installer.
    Let's call the installation location of your product the
    **\<EI\_HOME\>** directory.

    If you installed the product using the **installer** , this is
    located in a place specific to your OS as shown below:

    <colgroup>
    <col style="width: 9%" />
    <col style="width: 90%" />
    </colgroup>

    OS
    Home directory

    Mac OS
                    /Library/WSO2/EnterpriseIntegrator/6.5.0

    Windows
                    C:\Program Files\WSO2\EnterpriseIntegrator\6.5.0\

    Ubuntu
                    /usr/lib/wso2/EnterpriseIntegrator/6.5.0

    CentOS
                    /usr/lib64/EnterpriseIntegrator/6.5.0

2.  Start the ESB profile:

    -   [**On MacOS/Linux/CentOS**](#0af8a6a513604534a6c118b17795cd42)
    -   [**On Windows**](#1ccb894e33d5427e81410ea3e50b2369)

    Open a terminal and execute the following command:

    ``` java
        wso2ei-6.5.0-integrator
    ```

    Go to **Start Menu -\> Programs -\> WSO2 -\> Enterprise Integrator
    6.5.0 Integrator.** This will open a terminal and start the ESB
    profile.

3.  Log in to the management console using the following URL on your
    browser: <https://localhost:9443/carbon/> .

4.  Click **Create** under **Data Service** to open the **Create Data
    Service** wizard.

5.  Enter a name for the data service. Leave the default values for the
    other fields.

6.  Click **Next** to go to the **Datasources** screen.

### Add a JNDI datasource

You can add a JNDI datasource by following the steps given below.

1.  Click **Add New Datasource** to open the following screen:
    ![](attachments/119130785/119130786.png){width="650" height="159"}

2.  Select **JNDI Datasource** as the data source type. The
    JNDI-specific options will be available for editing as shown
    below.
    ![](attachments/16844921/17214853.png){width="550"}
    The options in the above window are explained below:

    -   **JNDI Context Class** : The corresponding context factory
        class.

    -   **Provider URL** : The URL that specifies the location of a
        resource on the Web.

    -   **Resource Name** : The name of the JNDI resource.

!!! note

You can also expose an RDBMS Carbon datasource as a JNDI datasource
using the **Configure** **\> Datasources** menu of the management
console. For instructions, see [Managing
Datasources](https://docs.wso2.com/display/ADMIN44x/Managing+Datasources)
.

### Define a query for the datasource

Now let's start writing a query for getting data from the datasource.
The query will specify the data that should be fetched by this query,
and the format that should be used to display data when the query is
invoked.

Click **Add New Query** to open the **Add New Query** screen.

Enter the following values:

-   **Query ID** : Enter an ID for the query.
-   **Datasource:** Select the datasource for which you are going to
    write a query. Select the **JNDI** datasource that you created
    previously.
-   **SQL:** In this field, enter the SQL statement describing the data
    that should be retrieved from the RDBMS datasource.

**Add input mappings** : Input mappings allow you to add parameters to a
query so that you can set the parameter value when executing the query.

**Add output mappings** : Out mapping is used to specify how the data
that is fetched from your query will be shown in the response.

Click **Next** to open the **Operations** screen.

### Define an operation to invoke the query

Data service operations are written to invoke queries.

1.  Click **Add New Operation** to open **Add New Operation** screen.
2.  Add a name for your operation in the **Operation Name** field.
3.  In the **Query ID** field, select the query that you defined
    previously.
4.  Save the operation.

### Finish creating the data service

Once you have defined the operation, click **Finish** to complete the
data service creation process. You will now be taken to the **Deployed
Services** screen, which shows all the data services deployed on the
server.


text:
# Temporal Specialization

This repository has been created to help reproduce the results presented in our
paper *Temporal System Call Specialization for Attack Surface Reduction* presented
at the 29th Usenix Security Symposium.
We have provided the resources to reproduce the main
results presented in the paper.

In particular, our artifacts cover:
* The entire toolchain:
    * LLMV Pass for Type-based pruning
    * LLVM Pass for Address-taken pruning
    * Python scripts for generating list of filtered system calls
    * Python scripts for comparing results with library debloating
* Security evaluation - shellcodes and ROP
    * Python scripts to perform security evaluation for shellcodes and ROP payloads

Our artifacts do NOT cover:
* Kernel security evaluation
* Installing SECCOMP filters in applications (We have presented
instructions on how to perform this manually [here](SECCOMP.md)

For the convenience of the artifact evaluators, we provide two ways of
exercising these artifacts. These are (in the order of increasing complexity):

* A prebuilt docker container that can be downloaded and executed.
* Instructions that can be used to replicate our setup on a different
  machine, and run our analysis tool chain.

Because our analysis is a Whole Program Analysis, we need a bitcode that
includes dependent libraries linked together. We have provided this linked
bitcode for the applications that we have reported in our paper (in the
bitcodes/ directory). We have also provided instructions on how to compile
these bitcodes from scratch [here](COMPILE.md)

## Repository Description

The source code along with all the helper scripts are part of this repo. The
important directories and files are ---
* **SVF/**: Contains the modified SVF implementation that we use
* **application-sourcecodes/**: Contains the source code of the applications
* **bitcodes/**: Contains the pre-generated full bitcodes of the applications
* **callgraphs/**: The intermediate and final callgraphs are generated here
* **docker-build/**: Contains the Dockerfile and scripts required to build the
  docker container.
* **python-utils/**: Contains scripts that orchestrate our analysis toolchain
* **security-evaluation/**: Contains scripts that perform the security
  evaluation
* **llvm-7.0.0.src.wclang.tar.xz**: The LLVM+Clang source code
* **stats**: The default path used in the scripts for storing the statistics outputs

## Running the Docker container

The easiest way to use our artifacts is by using the prebuilt Docker image.
The Docker image contains all prequisites (such as LLVM+Clang) installed, and
has a copy of this repository under */debloating-vol*.

To run the Docker image, the Docker engine must be installed on the machine.
To install Docker
on Ubuntu based systems, use:

```
sudo apt install docker.io
```

Create a directory on your machine where the results of our analysis toolchain
will be stored and mount this on the docker container. The command to do this
is:

```
docker run -d --name artifact-eval --volume <full_path_of_results_dir>:/results taptipalit/temporal-specialization-artifacts:1.0
```

(Note: All docker commands *might* need sudo, depending on the user
configuration on your system)

This will pull the container image and launch it. Then, for each application,
simply run the following commands, at the command line ---

**Note: Keep in mind that the analysis time varies depending on the complexity
of the application and how large its code base is. We have given estimates on
how long each takes. If it takes long do not worry, it is still running**

```
docker exec -it artifact-eval ./run.sh memcached.libevent
# **Estimated Time Required: 10 minutes**
```

```
docker exec -it artifact-eval ./run.sh httpd.apr
# **Estimated Time Required: 10 minutes**
```

```
docker exec -it artifact-eval ./run.sh nginx
# **Estimated Time Required: 90 minutes**
```

```
docker exec -it artifact-eval ./run.sh lighttpd
# **Estimated Time Required: 10 minutes**
```

```
docker exec -it artifact-eval ./run.sh redis-server
# **Estimated Time Required: 15 minutes**
```

```
docker exec -it artifact-eval ./run.sh bind.libuv
# **Estimated Time Required: ~10 hours**
```

The results for the analysis will be stored in the path provided in
\<full\_path\_of\_results\_dir\>, in the form
\<app\_name\>.shellcode.payload.txt and \<app\_name\>.rop.payload.txt. These
correspond to the results shown in Table 5 in our paper. (Note: Since the
submission of our paper, we have added more payloads, so the numbers have
changed slightly. But the results are generally similar, and the trends observed and
reported continue -- temporal specialization outperforms library debloating.)

The file \<app\_name\>.sensitive.stats shows the statistics of the sensitive
system calls that are filtered. This corresponds to Table 3 in our paper.
Keep in mind that each line in the sensitive.stats file has the following
format:
```
syscall-name;application;debloat-type;1|0
```
To match each line with the table you should only consider the two
debloat-types piecewise-master for library debloating and temporal-worker for
temporal. 1 means the system call is required and 0 means that it is not
required.
**So 0 is what we would like to see. 0 means that we can filter that sensitive
system call.**

The file <app\_name>.syscall.count corresponds to Table 2 in our paper.

To re-run an analysis, the easiest way is to kill the container and start
afresh. The command to do that is:

```
docker rm -f artifact-eval
```

We provide further details on how to build the container from the Dockerfile,
and other useful commands [here](docker-build/README.md).

## Running the artifacts on your machine

Follow the instructions [here](INSTALL.md) to install the artifacts on your local machine.

## Compiling source code to generate bitcode
See [here](COMPILE.md) for details on how to compile the source code to
bitcode for our analysis toolchain.

## Security evaluation details
See [here](security-evaluation/README.md) for more details about our security
evaluation scripts.

## Cite our work
```
@inproceedings{temporal2020ghavamnia,
  title={Temporal System Call Specialization for Attack Surface Reduction},
  author={Ghavamnia, Seyedhamed and Palit, Tapti and Mishra, Shachee and Polychronakis, Michalis},
  booktitle={Proceedings of the 29th Usenix Security Symposium},
  year={2020}
}
```


text:
[![npm version](https://badge.fury.io/js/pacem.svg)](https://www.npmjs.com/pacem)

![Pacem JS](https://pacem.azureedge.net/marketing/logojs.svg) Pacem JS
========

[Pacem JS](https://js.pacem.it) is a [CustomElements-v1](http://www.w3.org/TR/custom-elements/) based ecosystem for
reusable web components.

It is meant to run in a web page inside a browser.
More precisely, a **ES2015 compliant** browser (i.e. Chrome, Firefox, Opera, Edge, ...). No,
IE11 is not supported.

It follows the **MVVM Pattern** and has its own binding syntax.

It is built with [TypeScript](http://www.typescriptlang.org).

Furthermore, it does not need to be "fully componentized"
(i.e. no all-inclusive root node) in order to work:
it comes with on-the-fly bindings and autonomous bootstrap.

Basic example:
```html
<html>
    <head>
        <!-- polyfills -->
        <script src="https://github.com/webcomponents/custom-elements/blob/master/custom-elements.min.js"></script>
        <script src="node_modules/pacem/dist/js/polyfills/documentfragment.edge.js"></script>
        <!-- scripts -->
        <script src="node_modules/pacem/dist/js/pacem-foundation.min.js"></script>
        <script src="node_modules/pacem/dist/js/pacem-core.min.js"></script>
        <script src="node_modules/pacem/dist/js/pacem-ui.min.js"></script>
        <script src="node_modules/pacem/dist/js/pacem-scaffolding.min.js"></script>
        <!-- styles -->
        <style src="node_modules/pacem/dist/css/pacem.min.css"></style>
    </head>
    <body>
        <!--
        <pacem-data> is in `pacem-core`
        <pacem-data> allows its `model` attribute to be evaluated
        -->
        <pacem-data id="myModel"
                    model="{ text: 'foo' }"
                    persist-as="demoText"></pacem-data>

        <!--
        <pacem-input-text> is in `pacem-scaffolding`
        -->
        <pacem-input-text value="{{ #myModel.model.text, twoway }}"></pacem-input-text>

        <p>
            <!--
            <pacem-text> is in `pacem-core`
            <pacem-text> is the fastest custom element for plain text rendering
            -->
            <pacem-text text="{{ #myModel.model.text }}"></pacem-text>
        </p>
    </body>
</html>
```

(Source code, documentation and demos are on their ways...)

> **Pacem JS** won't obey semantic versioning until **v1**.
> i.e. breaking changes ahead.

### Road-map to v1
To-do (improvements):

- ~~**Modularize**: ongoing POC for an ES6-module version (+ WebPack)~~;
- **CSP compliancy**. Mumblings:
  - try binding syntax semplifications that may avoid `Function()`;
  - ~~`inline-styles`: deal with them~~;
- **Tests**: add more.

repository: pacem-it/pacem

gha_language: TypeScript

repo_name: pacem-it/pacem


text:
lookup_rdns.strict
===========

This plugin checks the reverse-DNS and compares the resulting addresses
against forward DNS for a match.  If there is no match it sends a
DENYDISCONNECT, otherwise if it matches it sends an OK.  DENYDISCONNECT
messages are configurable.

Configuration lookup_rdns.strict.ini
--------------------------------------------

This is the general configuration file for the plugin.  In it you can find
ways to customize user messages, specify timeouts, and some whitelist
parsing options.

* lookup_rdns.strict.general.nomatch

  Text to send the user if there is no reverse to forward match (text).

* lookup_rdns.strict.general.timeout

  How long we should give this plugin before we time it out (seconds).

* lookup_rdns.strict.general.timeout_msg

  Text to send when plugin reaches timeout (text).

* lookup_rdns.strict.forward.nxdomain

  Text to send the user if there is no forward match (text).

* lookup_rdns.strict.forward.dnserror

  Text to send the user if there is some other error with the forward
  lookup (text).

* lookup_rdns.strict.reverse.nxdomain

  Text to send the user if there is no reverse match (text).

* lookup_rdns.strict.reverse.dnserror

  Text to send the user if there is some other error with the reverse
  lookup (text).

Configuration lookup_rdns.strict.timeout
------------------------------------------------

This is how we specify to Haraka that our plugin should have a certain timeout.
If you specify 0 here, then the plugin will never timeout while the connection
is active.  This is also required for this plugin, which needs to handle its
own timeouts.  To actually specify the timeout for this plugin, please see
the general config in lookup_rdns.strict.ini.

Configuration lookup_rdns.strict.whitelist
--------------------------------------------------

No matter how much you believe in checking that DNS and rDNS match, it is not
required by RFC, and there will always be some legitimate mail server that
has great trouble getting their DNS in order.  For this reason we are
providing a whitelist.

This file will match exactly what you put on each line.

Configuration lookup_rdns.strict.whitelist_regex
--------------------------------------------------------

Does the same thing as the whitelist file, but each line is a regex.
Each line is also anchored for you, meaning '^' + regex + '$' is added for
you.  If you need to get around this restriction, you may use a '.*' at
either the start or the end of your regex.  This should help prevent people
from writing overly permissive rules on accident.


text:
{
    "title" : "Simple fish stew",
    "image" : "https://images.unsplash.com/photo-1567982047351-76b6f93e38ee?ixid=MnwxMjA3fDB8MHxzZWFyY2h8Nnx8ZmlzaCUyMHN0ZXd8ZW58MHx8MHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60"
}
===

- 1 tbsp olive oil
- 1 tsp fennel seeds
- 2 carrots, diced
- 2 celery sticks, diced
- 2 garlic cloves, finely chopped
- 2 leeks, thinly sliced
- 400g can chopped tomatoes
- 500ml hot fish stock, heated to a simmer
- 2 skinless pollock fillets (about 200g), thawed if frozen, and cut into chunks
- 85g raw shelled king prawns

## Step 1
Heat the oil in a large pan, add the fennel seeds, carrots, celery and garlic, and cook for 5 mins until starting to soften. Tip in the leeks, tomatoes and stock, season and bring to the boil, then cover and simmer for 15-20 mins until the vegetables are tender and the sauce has thickened and reduced slightly.

## Step 2
Add the fish, scatter over the prawns and cook for 2 mins more until lightly cooked. Ladle into bowls and serve with a spoon.
===
# Diet
vege        []
pescovege   [x]
with meat   []
===
# Tags:
with fish
===
# Type:
stew

repository: asondej/YumCMS

repo_name: asondej/YumCMS


text:
# Numbered Blog Pagination

**Purpose:** to add basic numbered pagination to a HubSpot blog.

## Instructions

Add this snippet in the blog listing template HTML outside of the main blog for loop where you want the pagination to show.

![Image of inline styling on media](../../../Assets/Images/blog-numbered-pagination.png)


text:
# deep-update

[`react-addons-update`](https://facebook.github.io/react/docs/update.html), except that it will fill in _object_ paths that are missing.

```
const value = {a: {b: {c: {d: 1234}}}};
// Behold, no error thrown!
const newValue = deepUpdate(value, ['a', 'b', 'c', 'd'], {$set: 2345});
```

repository: convoyinc/deep-update

gha_license_id: NOASSERTION

repo_name: convoyinc/deep-update


text:
# Quotes

#### Description, 02/2019

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.3.6. It is an online website that host different quotes from different people. The quotes can be up voted and down voted and the quote with the most up votes is the one that is highlighted. People can also contribute their own cutom quotes as they wish.

#### By **Hussein Fuaad Mahmoud**

## BDD

| Behavior- Our program should handle: | Input Example- When it receives: | Output Example- It should return: |
| :-------------: | :-------------: | :-------------: |
| Enter Quote | An apple a day | Display quote: "An apple a day" |
| Delete a quote | Delete Action | Deleted Quote |
| Up Vote a Quote | Up vote action | Up votes + 1 |
| Down Vote a Quote | Down vote action | Down votes + 1 |

## Setup/Installation Requirements

* Open your browser browser.
* Load gitHub on your browser.
* Search for fuaad001/.... repository.
* Fork the data onto your own personal repository.
* Clone project
* run 'ng install' on terminal
* run 'ng serve' on terminal
* To access the live website, click on this url https://fuaad001.github.io/quotes

## Known Bugs

No Bugs

## Technologies Used

CSS for styling.
HTML for webpage design.
Typescript for back-end.

## Dependencies

Angular CLI

## Support and contact details

Contact me using:
Telephone: +(254) 751-579-367
Email<EMAIL_ADDRESS>
### License and Copyright details

The MIT License (MIT)
Copyright (c) 2019**Hussein Fuaad Mahmoud**


text:
# Island-Hopper
Arcade style helicopter flying game
![screenshot image of the game](screenshot-island-hopper.jpg)

## Synopsis

The project consist of an arcade styled helicopter flying game using android app developed written in Kotlin.

The game is a an atypical arcade scrolling game, with touch controls from the user to try to keep in flight avoiding missiles and sky and ground barriers.

## Code Example

Code is based on Android API level 28, using Android-Studio 3.0.1.  The core code is Kotlin 1.2 stable.
THe structure of the project files is consistent with what you would expect from Android Studio.

The sprite images, codebase are based on a learning package downloaded from the internet - from an open source site/sites - that I can no longer remember, so I cannot cite them. e bad :(

## Motivation

I started this project primariliy to develop awareness of graphic APIs, game play concepts, and and animation.

## Installation

This package consists of all source code as well as a compiled and signed apk (if you want to install and try).

## API Reference

The graphics library used is the core Android sufaceView canvas - no other third party software included oustide of

## Tests

TODO - me bad again.

## Contributors

If anyone wants to assist with improving the game for use on tablets and newer devices.  It is largely complete and functional from my perspective, and the purposes of which the project was created.

Would be interesting to see how to duplicate this game on iOS using Swift!

## License

To Be Confirmed

repository: steveeri/Island-Hopper

gha_language: Kotlin

repo_name: steveeri/Island-Hopper


text:
---
title: Body as a Medium of Power and Desire
subtitle: Analysis on 'Perfect Blue' and 'All about Lily Chou-Chou'
date: '2019-09-15'
---

_Disclaimer:
This article was written for a class that I took in UCLA,
Japan 70, during Fall 2019. No one is allowed to use this
work without my authorization or you might violate
academic integrity._

__Before reading__: I make references to some scene of the film
by marking its time in the format _(hh:mm:ss)_. For instance,
_(01:30:05)_ means the scene happens at 1 hour 30 minutes and 5
seconds from the start of the film.

In this article, we discuss and explore the function and the usage
of body within the 2 films _Perfect Blue_ and _All about Lily
Chou-Chou_. The body is the interface for one’s soul, and this is
also true for the films. The body becomes the grounds from which
characters stage their powerlessness and assert their ultimate
control over their bodies. The body also acts as a medium on which
the characters express their unreachable desire.

_Perfect Blue_ uses Mima’s abuse of her own body as a reflection of
her lack of power in controlling her life. The first instance of
her body abuse is her rape scene in the TV show _Double Bind_. She
appears to be completely fine with the fact, but internally, she
is extremely disdainful with the choice. The film hinted at her
uneasiness with a shot from her POV looking up the ceiling of the
set (_Figure 1_).

<figure>

![Figure 1](Figure1.png)

<figcaption style="text-align: center;">
Figure 1 00:33:00
</figcaption>
</figure>

Our eyes feel uncomfortable staring at the light directly. We
feel Mima’s uncomfortableness through the blinding ray of light.
It resonates with the feeling of suppression that Mima feels when
she is held down by several men.
Her agony is later projected outward when she is home and has
a break down _(Figure 2)_.
Her loss of control over her body is a reflection of the show
business having having control over her.  Her attitude is clear
that abusing her own body is undesirable, but she has no choice
but to give up her body in exchange for her career prospect,
more so, to buy her time to solidify her role as an actress.
In the photo shooting scene, the same pattern of abuse is
re-enforced by the film. The scene is also interlaced with the
performance of the rest of the 2 members of "CHAM!".
The lyrics of the song that they are performing can be
interpreted to indirectly reflect Mima’s suffering: “I’d rather
wear jeans, than tight business suits” _(45:20)_. Ironically,
the “business suits” that suffocates Mima is her nakedness for
the show business. It is as if Mima is singing the song to
express her strong desire to break free from the abuse of her
body. Through Mima’s abuse of her body, the film shows the power
that the business has over her, and also her internal conflict
between dignity and career.

<figure>

![Figure 2](Figure2.png)

<figcaption style="text-align: center;">
Figure 2 00:36:47
</figcaption>
</figure>

Interestingly, in a later shot, the creepy security guard
actually imagines Mima on the stage performing as well. I
personally think this is an intentional choice made to
associate the lyrics with Mima’s current mental state
(_Figure 3_).

<figure>

![Figure 3](Figure3.png)

<figcaption style="text-align: center;">
Figure 3 00:46:50
</figcaption>
</figure>

_All about Lily Chou-Chou_ also uses body as a mean to portrait
the characters’ control and power. The obvious example is the
exploited body of Shiori. She is blackmailed by Hoshino with
her nudes and therefore has to “sell her body”. Another instance
is when Yōko is raped by Hoshino’s gang. They are clear
manifestations of the power Hoshino has over them. Perhaps what
is more interesting is how Shiori and Yōko assert control over
their body and thus over their life. Shiori committed suicide at
the end _(1:57:16)_. We can interpret her death in 2 ways, either
as the most extreme form of body mutilation, or as a way to free
her body. If we take the first interpretation, then Shiori’s act
of killing her body is an absolute demonstration of power that
Hoshino has over her. However, the second interpretation is more
convincing if we also examine the scene where she flies the kite
right before her death _(Figure 4)_.
She is taught how to pull her arm down to give momentum to the
kite. Each time Shiori pull her hands down firmly, it is an
assertion of control that she no longer has over her body. When
she declares she “want to ride on a kite” and “fly in the sky”,
the film foreshadows her suicide _(1:56:58)_. The dialog shows
Shiori’s urge for freedom.

<figure>

![figure 4](Figure4.png)

<figcaption style="text-align: center;">
Figure 4 01:56:14
</figcaption>
</figure>

With Shiori, the film attempts to
show her control over herself with the devastation of her
exploited body. On the other hand, Yōko chose a different way
to cope with the assault done to her body. After she is raped,
she cut all her hair and become bald _(Figure 5)_.
In this sequence, all students stared at Yōko’s new hairstyle.
It seems that the bald haircut is a public declaration from Yōko
to assert her control over her body. In this shot, Yūichi sits
behind Yōko, and when Yōko came into the frame, her head and
upper body covered up Yūichi, who is a culprit of the crime.
The visual arrangement here suggests Yōko tries to cover up the
abuse to her body through another “abuse to her body” of
cutting her hair, further exemplifies the use of body to assert
power, not only over other people, but also over oneself.

<figure>

![figure 5](Figure5.png)

<figcaption style="text-align: center;">
Figure 5 01:50:15
</figcaption>
</figure>

Both films use the body as a stage for the characters to
dispatch their control either over somebody else, or over
themselves. But in addition to asserting their power, the
characters enact a genuine desire to avoid engaging in the arena
of power dynamics at all, but instead to seek security through
the body. Next, we turn our attention to the characters’
display of their desire fantasy and expectation for a certain
body, which is is highly linked to their emotional desire as well.

In _Perfect Blue_, Rumi creates a virtual body of Mima online
that fits perfectly into her expectation of who Mima should be.
According to the blog, the virtual Mima is struggling with her
rape scene, since she (Rumi’s imagination of Mima) called the
producer a “total pervert” _(37:39)_.  Mima is also confused and misled by
the virtual image of herself on the blog. There is an
expectation and a wish for the “purity” of Mima’s body here,
coming from both Mima and Rumi. We focus on Rumi’s desire here.
Rumi seeks security of having the old pop idol Mima image.
Therefore, she attempts to fulfill her crave for the old Mima
image through “living” in the virtual Mima’s body. Later, her
desire grows so strong that she exhibits her desire for the
comfort zone of the pop idol image through physical action.
Particularly, we look at the scene when Rumi murders the
photographer who took the nudes for Mima. Before the film
reveals Rumi as the murderer, the scene intentionally does
the murder through “Mima’s body” _(Figure 6)_. It can be
understood as Rumi seeks comfort in Mima’s pop idol image
through using Mima’s body to do the murder thus “her Mima”
fits the expectation of her, maintaining her pop idol image.
This message is enforced by the projector screen showing a
picture Mima. The innuendo here is the Rumi’s imaginary
projection of her expected Mima’s body is doing the stabbing.
Therefore, through a mix of the virtual and physical body of
Mima curated by Rumi, the film shows the Rumi’s extreme
sickening content to stay within Mima’s pop idol image.

<figure>

![Figure6](Figure6.png)

<figcaption style="text-align: center;">
Figure 6 00:57:04
</figcaption>
</figure>

<figure>

![Figure7](Figure7.png)

<figcaption style="text-align: center;">
Figure 7 00:38:51
</figcaption>
</figure>

_All about Lily Chou-Chou_ also paints the teenagers’ wish
for security through their creates a desire for the body of
a mother.
The reason behind the intentional selection of this age
group is that they are faced with a decision to either keep
studying in high school, or just stop after finishing middle
school. There is an insecurity that is associated with the
age of 14. When Yūichi first visits Hoshino’s house, he
displayed some desire what might be misinterpreted as “sexual
interest” towards Hoshino’s mother. He purposely uses the
shampoo of Hoshino’s mother _(38:27)_. Using somebody else’s
shampoo represents an indirect physical contact with the
person’s body. It shows Yūichi’s urge to achieve intimacy with
Hoshino’s mother. The film also allows the viewers to feel the
intimacy through Yūichi’s POV. In the same shower scene,
Hoshino’s mother opens the door and talks to Yūichi
face-to-face even though Yūichi is naked in the bath tub.
Immediately after the shower scene, the shot is in the
perspective of Yūichi _(Figure 7)_.
The light is low, having her face half lit in a very intimate
setting of a bedroom. All these shots let us see the mother’s
attractiveness to Yūichi. At this point, Yūichi thinks that
the female is Hoshino’s sister. Therefore, it is confusing to
him, and also the viewer, that he has this almost sexual feeling
towards someone’s body. Later, Hoshino clarified that the female
is actually his mother _(39:06)_. At this point, the film is
trying to relate teenagers’ sexual lust to a maternal figure.

<figure>

![Figure 8](Figure8.png)

<figcaption style="text-align: center;">
Figure 8 00:54:03
</figcaption>
</figure>

The next instance when the teenager displays their desire towards
a female body is when they are in Okinawa. The boys are fighting
over the video recorder so they can film the body of the female
tour guides _(Figure 8)_.
How does this have anything to do with the maternal figure and
ultimately the crave for security of teenagers then? The answer
lies in the conversation they have with the hitchhiker:
“Okinawans say man was made from woman’s rib. So women here are
very powerful.” _(54:39)_ Here, the notion of women giving birth
or creating men’s body is being mentioned. This serves as a link
between mothers’/women’s strength and their body. Women are
being described to be a reliable figure here, not only from the
saying, but also from the fact that their tour guides, who
tourists have to depend on so they do not get lost, are girls.
After, their trip to Okinawa, Yūichi starts to get bullied by
Hoshino, getting involved in this entire power dynamics circle.
During this time of uncertainty and insecurity, the teenagers
(including Yūichi and Hoshino) seek comfort in Lily’s music.
Yūichi, as Philia, says that Lily “conceives and give birth to”
her music, and “the Ether is the amniotic fluid” _(25:10)_. Tying
 all these strings together, we see that the teenagers are
 looking for security inside a mother’s body, which is reflected
 through their sexual interest in women’s body. The security of
 being a mother’s womb, in which all of the baby’s need are being
 catered to perfectly, is what the teenagers in the power struggle
 are after. The mother offers the protection the baby needs.
 Therefore, the film describes their craving for security through
 their interest in a maternal body.

In conclusion, both the _Perfect Blue_ and _All about Lily Chou-Chou_ plays with the notion of body to reflect their manipulative relationships with their influences over their body, and to show the desire of staying away from such distorted relationships.

branch_name: refs/heads/dev

gha_language: JavaScript


text:
# Mimcss: Style Authoring in TypeScript

[![npm version](https://badge.fury.io/js/mimcss.svg)](https://badge.fury.io/js/mimcss)

* [Motivation](#motivation)
* [Features](#features)
* [Usage](#usage)
* [Quick Start](#quick-start)
* [Examples](#examples)

Mimcss is a TypeScript library that allows authoring CSS styles without creating CSS files. Instead, the styles are created via TypeScript programming. You code your styling rules including CSS tags, classes, animations, media etc. by creating TypeScript classes. The Mimcss library processes these classes and creates the rules that are inserted into a `<style>` element in the `<head>` of you HTML document. As a result, your application or library bundle is self contained and doesn't require a separate CSS bundle.

## Motivation
The goal of the Mimcss library is to support all CSS features in a type-safe and easy-to-use manner. There are several distinct areas that Mimcss addresses:

- Making names of CSS entities (classes, element IDs, animations, custom properties, counters, grid lines and areas) full TypeScript citizens so that when they are referred to from the JSX code, misspelled or undefined names cause compile time errors instead of being detected only at run time.
- Using the full expressive power of TypeScript's typing system for setting values of style properties. While in the regular CSS as well as in several CSS-in-JS libraries, style property values can only be set as strings (and sometimes numbers), Mimcss defines a separate type for each style property making the process of setting property values more convenient and less error-prone.
- Avoiding the regular monolithic structure of CSS styles that are present in the browser's memory for the entirety of the application life-time. As with regular JavaScript objects, CSS styles created with Mimcss can be loaded on demand and stay in memory only while needed. Mimcss provides several style loading and unloading technics that developers can use depending on whether the styles are used throughout the application or only needed by a certain component.
- Seeing CSS not as a static structure, but as data that can be changed programmatically in order to manipulate application visual styles and layouts. Depending on the content, it is sometimes more efficient to change the CSS style of a certain class than to assign a different class to a set of HTML elements. Mimcss also provides several scheduling mechanisms that allow coordination between DOM writing activities (including direct style changes) in order to avoid excessive style recalculations and layout thrashing.

## Features

- Compatible with and independent of any library: use with React, Angular, Vue etc.
- Co-exists with regular CSS files - doesn't require re-writing of all existing styles at once or at all. You can gradually introduce Mimcss into you project.
- Stylesheets are defined as TypeScript classes.
- Stylesheets can be dynamically activated (inserted into DOM) and deactivated (removed from DOM).
- Support for styled components where each component instance gets its individual set of CSS rules isolated from other instances.
- Names of classes, IDs, animations, custom CSS properties, counters and grid lines and areas are auto-generated, while developers use properties that return these names.
- Stylesheets support inheritance - elegant way to implement theming.
- All CSS rule types are supported including style rules and at-rules.
- Custom CSS properties are supported in a type safe manner.
- Style rules can be nested and can extend other style rules.
- All pseudo styles and pseudo elements are supported using convenient and compact notation.
- Type safety and autocomplete support for CSS property values to eliminate misspellings.
- Using numbers for default units of length, angle, percent and other CSS property types.
- Using Booleans, numbers, tuples, arrays, objects and functions (in addition to strings) when specifying CSS property values to increase convenience and eliminate misspellings.
- Convenience functions for specifying complex property values (e.g. colors, images, filters, shapes, calc(), etc.)
- Type-safe support for CSS filter, transform, shape, gradient, counter and other functions.
- Access to CSSRule-derived objects for direct rule and property manipulation.
- Several built-in mechanisms for scheduling DOM writing activities as well as the ability to write custom scheduling mechanisms.

## Usage
To install the Mimcss library for development use the following NPM command:

```shell
npm i mimcss
```

Mimcss library comes in two variants:

- `mimcss.js` - the minified build of the library, which should be used to build production versions of applications. This build creates very short but meaningless names for CSS classes and other named entities.
- `mimcss.dev.js` - the debug build of the library, which should be used during application development. This build creates names for CSS classes and other named entities, which are easily traceable to the source code. This build also prints helpful diagnostic messages.

Mimcss contains many exported types and functions; therefore, it is recommended to import the entire module under a single name:

```tsx
import * as css from "mimcss"
```

Mimcss provides [Guide](https://mmichlin66.github.io/mimcss/guide/mimcss-guide-introduction.html) and [Reference](https://mmichlin66.github.io/mimcss/ref/mimcss-reference-overview.html) documents for developers. Both documents undergo constant improvements.

## Quick Start
Let's assume that we need to create several styles for a couple of classes and an element ID. With Mimcss, you create a TypeScript class and then, in your component's TypeScript code, you refer to the CSS classes and IDs using the TypeScript class's properties:

```tsx
/* MyStyles.ts */
import * as css from "mimcss"

export class MyStyles extends css.StyleDefinition
{
    vbox = css.$class({
        display: "flex",
        flexDirection: "column",
    });

    importantElement = css.$id({
        color: 0xFFCC88,
        fontWeight: 700,
    });

    greeting = css.$class({
        padding: 8,
        border: [1, "solid", "blue"],
        boxShadow: { blur: 4, color: "cyan" },
        backgroundImage: css.gradient.conic.from(45).at("center")(Color.orange, Color.pink),
        ":hover": { opacity: 0.7 }
    });
}

/* MyComponent.tsx */
import {MyStyles} from "./MyStyles"
import * as React from "react"
import * as css from "mimcss"

let myStyles = css.activate( MyStyles);

export class MyComponent extends React.Component
{
    render()
    {
        return <div className={myStyles.vbox.name}>
            <p id={myStyles.importantElement.name}>Mimcss is easy to use.</p>
            <div className={myStyles.greeting.name}/>Hello!</div>
        </div>
    }
}
```

Coding CSS styles in TypeScript brings the following advantages:

- The autocomplete mechanism of our IDE will prompt us with the list of defined names. As soon as we type `myStyles.` the IDE will present the list of all the properties defined in our style definition class.
- If we change the name of or remove the property in the `MyStyles` class and forget to change it in our component's `render` method, the project will not build. Thus a compile time error will prevent a much harder to find run time error.
- Notice how we used numbers instead of strings when defining `color` and `fontWeight` properties. Notice also how we used array, object and function notations to specify complex style properties for the `greeting` class. Mimcss defines types for all style properties and provides numerous methods to set their values in a type-safe and easy-to-use way.
- The styles are not present in the browser's memory until the code that uses them calls the `activate` function that inserts the styles into DOM. There are several activation strategies suitable for different scenarios - from styles that are shared by entire application to those that are used by only a single component. The developers are in full control of when the rules are activated. Moreover, since activating rules means writing to DOM, components can synchronize this process with other DOM-writing activities.
- The names we are using in our code are not actually the names that will be used in the resulting HTML. The actual names to use in HTML will be auto-generated by the Mimcss infrastructure, which ensures that they will be globally unique. In Debug mode the generated names reflect the names used in the code, while in Release mode, the names are created with minimal length.

## Examples
The following short sections provide examples of Mimcss capabilities. This is really just scratching the surface - for more information please see [Mimcss Guide](https://mmichlin66.github.io/mimcss/guide/mimcss-guide-introduction.html).

### Supported CSS Rules
Mimcss supports all types of CSS rules (except @charset):

```tsx
class MyStyles extends css.StyleDefinition
{
    // class
    redClass = css.$class({ color: "red" })

    // element ID
    redElm = css.$id({ color: "red" })

    // arbitrary selectors
    all = css.$style( "*", { boxSizing: "border-box" })
    h1 = css.$style( "h1", { fontSize: 24, fontWeight: 700 })
    li = css.$style( css.selector`article > ${this.redClass} > ul > li`, { color: "brown" })

    // custom CSS variables (with style-property-specific value types)
    defaultColor = css.$var( "color", "black")
    defaultPadding = css.$var( "padding", [4,6])

    // @font-face
    font = css.$fontface( {
        fontFamily: "Roboto",
        fontWeight: 400,
        src: [{ url: 'roboto.woff', format: 'woff' }]
    });

    // @import (with @media and @supports queries)
    external = css.$import( "external.css",
        { width: [200, 400] }, { justifySelf: "baseline" })

    // @keyframes
    move = css.$keyframes( [
        [ "from", { top: 0 } ],
        [ 50, { top: 150 } ],
        [ "to", { top: "100%" } ]
    ])

    // @page
    firstPage = css.$page( ":first", { margin: "auto" })

    // @namespace
    svgNamespcae = css.$namespace( css.WebNamespaces.SVG, "svg")

    // @media
    ifSmallDevice = css.$media( { maxWidth: 600 },
        class extends css.StyleDefinition<MyStyles>
        {
            h1 = css.$style( "h1", { fontSize: 20 });
        }
    )

    // @supports
    ifGridSupported = css.$supports( {display: "grid"},
        class extends css.StyleDefinition<MyStyles>
        {
            gridLayout =css.$class({ display: "grid" })
        }
    )
}
```

It is essential to assign rules that produce names (classes, IDs, animations, custom variables) to properties because the code that needs these names will access them through these properties. Other rule types, however, don't have to be assigned to properties; instead, they can be put into an array, which is assigned to a single property:

```tsx
class MyStyles extends css.StyleDefinition
{
    unnamed =
    [
        css.$style( "*", { boxSizing: "border-box" }),
        css.$style( "h1", { fontSize: 24, fontWeight: 700 }),
        css.$style( css.selector`article > ${this.redClass} > ul > li`, { color: "brown" }),
        ...
    ]
}
```

**See Also:** [Mimcss Guide: Defining Rules](https://mmichlin66.github.io/mimcss/guide/mimcss-guide-defining-rules.html)

### Extending Style Rules
The `"+"` property allows specifying one or more style rules you want your style rule to extend:

```tsx
class MyStyles extends css.StyleDefinition
{
    red = css.$class({ color: "red" })

    bold = css.$class({ fontWeight: 700 })

    // extending one style rule
    important = css.$class(
    {
        "+": this.red,
        fontSize: 16
    })

    // extending multiple style rules
    superImportant = css.$class(
    {
        "+": [this.important, this.bold]
    })
}
```

This is equivalent to the following CSS:

```css
.red {
    color: red;
}

.bold {
    font-weight: 700;
}

.important {
    color: red;
    font-size: 16px;
}

.superImportant {
    color: red;
    font-size: 16px;
    font-weight: 700;
}
```

**See Also:** [Mimcss Guide: Defining Styles](https://mmichlin66.github.io/mimcss/guide/mimcss-guide-defining-styles.html)

### Pseudo Classes and Pseudo Elements
While pseudo classes and pseudo elements can be defined using regular style rules (via the `$style` function), there is an easier way to define them:

```tsx
class MyStyles extends css.StyleDefinition
{
    link = css.$class({
        color: "blue",
        ":hover": { color: "navy" }
    })
}
```

This is equivalent to the following CSS:

```css
.link {
    color: blue;
}

.link:hover {
    color: navy;
}
```

**See Also:** [Mimcss Guide: Defining Styles](https://mmichlin66.github.io/mimcss/guide/mimcss-guide-defining-styles.html)

### Pseudo Classes with Parameters
Some pseudo classes require parameters, e.g. `:nth-child(2n+1)`. This is how it is expressed in Mimcss:

```tsx
class MyStyles extends css.StyleDefinition
{
    row = css.$style( "tr", {
        ":nth-child": [ [2,1], { backgroundColor: 0xF8F8F8 } ]
    })

    cell = css.$style( "p", {
        ":nth-of-type": [ "odd", { backgroundColor: "cyan" } ]
    })
}
```

This is equivalent to the following CSS:

```css
tr:nth-child(2n+1) {
    background-color: #F8F8F8;
}

p:nth-of-type(odd) {
    background-color: cyan;
}
```

**See Also:** [Mimcss Guide: Defining Styles](https://mmichlin66.github.io/mimcss/guide/mimcss-guide-defining-styles.html)

### Complex Related Selectors
We often define a CSS class (or tag or ID) rule and then define related rules with complex selectors. You can use the `"&"` property to define such rules in Mimcss. Within the selectors, every occurrence of the `"&"` symbol will be replaced with the "parent" selector.

```tsx
class MyStyles extends css.StyleDefinition
{
    ul = css.$style( "ul", {
        color: "brown",
        "&": [
            [ "& > li:first-child, & > li > a", { color: "red" } ],
            [ "td > &:hover", { fontStyle: "italic" } ]
        ]
    })
}
```

This is equivalent to the following CSS:

```css
ul {
    color: brown;
}

ul > li:first-child, ul > li > a {
    color: red;
}

td > ul:hover {
    font-style: italic;
}
```

**See Also:** [Mimcss Guide: Defining Styles](https://mmichlin66.github.io/mimcss/guide/mimcss-guide-defining-styles.html)

### Custom CSS Properties
Although custom CSS properties by themselves are not CSS rules, in Mimcss they are defined using the same notation as the rules.

```tsx
class MyStyles extends css.StyleDefinition
{
    // define custom properties at the root level
    defaultColor = css.$var( "color", "black")
    defaultBgColor = css.$var( "color", "white")

    // use the custom properties by referring to the previously defined objects
    div = css.$style( "div", {
        color: this.defaultColor,
        backgroundColor: this.defaultBgColor,
    })

    // overriding the values of the custom properties
    footer = css.$style( "footer", {
        "--": [
            [this.defaultColor, "yellow"],
            [this.defaultBgColor, "blue"]
        ]
    })
}
```

This is equivalent to the following CSS:

```css
:root {
    --defaultColor: black;
    --defaultBgColor: white;
}

div {
    color: var(--defaultColor);
    background-color: var(--defaultBgColor);
}

footer {
    --defaultColor: yellow;
    --defaultBgColor: blue;
}
```

Values of custom CSS properties can be changed programmatically:

```tsx
let myStyles = css.activate(MyStyles);

// change the top-level value; that is, the value defined under the `:root` selector.
myStyles.defaultColor.setValue( "navy");

// change the value under the 'footer' element.
myStyles.footer.setCustomProp( myStyles.defaultColor, "darkgreen");

```

**See Also:** [Mimcss Guide: Custom Properties](https://mmichlin66.github.io/mimcss/guide/mimcss-guide-custom-properties.html)

### Named Colors
In CSS, there is a list of pre-defined colors, which can be specified by names. In Mimcss, you can use these colors and you can also define your own named colors and refer to them by names.

```tsx
// Some TypeScript trickery to "extend" the INamedColors interface with your own name
declare module "mimcss/lib/styles/ColorTypes"
{
    interface INamedColors
    {
        myColor?: number;
    }
}

// Provide the value for your color - it must be a number in the form OxRRGGBB
css.Colors.myFavColor = 0x123456;

// Use it just as any other named color
class MyStyles extends css.StyleDefinition
{
    anchor = css.$style( "a", { color: "myColor" })
}
```

**See Also:** [Mimcss Reference: Colors](https://mmichlin66.github.io/mimcss/ref/mimcss-reference-colors.html)

### Working with Units
In CSS, values of many properties should be specified with units corresponding to the CSS type of the property. For example, the `<length>` type has units such as "px", "rem", "in", "cm", etc.; the `<angle>` type has units such as "deg", "rad", "turn", etc. For many properties, CSS also allows using percentages - "%".

Mimcss supports all these CSS types and, for the developer convenience, allows specifying values in three ways: as an integer number, as a floating point number and as a string. For each CSS type, Mimcss defines a default unit to use with the integer number and the default unit to use with the floating point number. For example, for the `<length>` CSS type, Mimcss will treat integer numbers as having the "px" unit and floating point numbers as having the "em" unit. For the `<angle>` type, the default is "deg" for integers and "turn" for floating point numbers.

Here are several examples:

```tsx
class MyStyles extends css.StyleDefinition
{
    // top and bottom padding will be set to 0.5em, while left and right - to 8px.
    cls1 = css.$class({ padding: [0.5, 8] })

    // width is 80%, min-width is 1.5em and max-width is 500px.
    cls2 = css.$class({
        width: "80%",
        minWidth: 1.5,
        maxWidth: 500
    })

    // initial angle for the conic gradient will be 45deg.
    cls3 = css.$class({
        backgroundImage: css.gradient.conic( 45, "center", "red", "blue")
    })

    // initial angle for the conic gradient will be 0.25turn.
    cls4 = css.$class({
        backgroundImage: css.gradient.conic( 0.25, "center", "red", "blue")
    })
}
```

> Note: in JavaScript, the literal `1.0` is not a floating point number but rather an integer.

**See Also:** [Mimcss Reference: Numeric Types](https://mmichlin66.github.io/mimcss/ref/mimcss-reference-numeric-types.html)

## Conclusion
We hope you will find Mimcss useful. Please refer to [Mimcss Guide](https://mmichlin66.github.io/mimcss/guide/mimcss-guide-introduction.html) to find more information.

repository: gitter-badger/mimcss

repo_name: gitter-badger/mimcss


text:
## GTIF - Release 1.0

Welcome to the V1.0 release of the Green Transition Information Factory – Demonstrator for Austria!

**What’s new**:

- **Energy Transition:**
  - Hydroelectric reservoir monitoring
  - ML-based wind turbine detection
  - Energy planning: Seasonal solar irradiation, new constraining variables
- **Sustainable cities:**
  - Full country green & solar roofs analyses
- **Carbon accounting:**
  - 20m forest biomass products
  - Country wide disturbance mapping & change attribution
- **Mobility transition:**
  - Correlation explorer: Air quality & human mobility
  - Sentinel-2-based truck detection indicator
- **EO adaptation services:**
  - Expanded heat explorer
  - Snow depth & snow water equivalent products
  - Alpine Drought Explorer elements
- **New and Improved scrollytelling narratives**
  - UI/UX enhancements:
  - Compare regions
  - Export regions as geoJson
  - Create report

repository: eurodatacube/eodash

branch_name: refs/heads/staging

repo_name: eurodatacube/eodash


text:
# net-version [![Circle CI](https://circleci.com/gh/danesparza/net-version.svg?style=shield)](https://circleci.com/gh/danesparza/net-version)
.NET version checker written in Go.

Uses the [guidelines outlined by Microsoft](https://msdn.microsoft.com/en-us/library/hh925568%28v=vs.110%29.aspx) to determine what version(s) of .NET are installed on the current machine.

### Installing
Just [grab the latest release](https://github.com/danesparza/net-version/releases/latest) (it's just a single binary) and run from the command line.  DOES NOT require .NET to be installed on the machine in order to run.

### Example

```
$ net-version.exe
Checking to see what versions of .NET are installed...

Older .NET versions installed:
============================
v2.0.50727
v3.0
v3.5
v4
v4.0

Newer .NET versions installed:
============================
v4.6 (on an operating system other than Windows 10)

Finished.
```

repository: danesparza/net-version

gha_language: Go

repo_name: danesparza/net-version


text:
---
title: The Good Ole Days
author: ajordens
layout: post
permalink: /2005/07/the-good-ole-days/
categories:
  - General Discussions
---
Mark Cuban has a [post][1] reflecting on times past and how future generations will one day be considering 2005 to be the good ole days.

Now if you ask me whats the best console ever made, I’ll probably say the original Nintendo. Try to get to play a nintendo game now (via emulation of course), not a chance. Times have changed and while we all think about the past, very few of us would want to go back. That’s what drives innovation. Like Mark says, *the smart ignore the reminiscing about the good ole days and focus on creating unique and improved experiences*.

 [1]: http://www.blogmaverick.com/entry/1234000693049188/


text:
# Race Game
A simple race game played with 2 players made in Java, which I done for an assignment at City College.

# Build
Download / clone this repository and execute the 'RaceGame.jar' file inside the 'build' folder.

# LICENSE
Licensed under the [MIT license](LICENSE)


text:
# Some python3 codes to solve or collect GPU/Nvidia/CPU and Torch information

1. Torch's collect_env.py - to print the most detailed information
```
python3 ./collect_env.py
```

3. Shell - fix-CUDA-initialization-error.sh - to fix the common (frequently) CUDA initialization error.

repository: DrSnowbird/shell-utility

repo_name: DrSnowbird/shell-utility