text:
## Groovy RSpace API client

This project shows some examples of calling the RSpace API from a Groovy script.

To begin with you'll need an account on an RSpace server and an API key which you can get from your profile page.
 *Please note that your RSpace server must be 1.41 or later to support API calls. If you want to run post requests then your RSpace server must be 1.45 or later*.

In these examples we'll be using the HttpBuilder library which provides an abstraction over lower-level libraries.

All the code listed here is in the project.

For full details of our API specification please visit our [Community site](https://community.researchspace.com/public/apiDocs) or, if you have your own RSpace installation, go to /public/apiDocs at your site.

To run the example scripts in the scripts/ folder, `cd` to that folder, then run

    groovy -classpath ../src -Dkey=MyAPIKey -Durl=https://my.researchspace.com ExampleScript.groovy

 replacing `MyAPIKey` with your key, `https://my.researchspace.com` with the URL of your RSpace instance and `ExampleScript.groovy` with the name of the script you want to run.

 E.g.

    groovy -classpath ../src -Dkey=abcdefgh -Durl=https://community.researchspace.com DocumentSearchExamples.groovy

 Finally, you might need to configure your Grapes mechanism to pull in dependencies from MavenCentral.

### A basic query to list documents

First of all we'll define our URL and get our key from a system property.
```groovy

    @Grab('org.codehaus.groovy.modules.http-builder:http-builder:0.7')
    import groovyx.net.http.*
    import static groovyx.net.http.Method.GET
    import static groovyx.net.http.ContentType.JSON
    import  groovy.json.*

    // from command line -D property
    rspaceUrl = System.getProperty("url") + "/api/v1";

    //Set in your RSpace API key here via a -D command line property
    key = System.getProperty("key")

    // A Fixed delay between requests
    DELAY = 1000

    // by default we'll order results by name
    documents = rspaceUrl + "/documents?orderBy=name%20asc"
    def http = new HTTPBuilder(url)

    // This is the simplest request - it will retrieve a first page of documents ordered by name.
    http.request(GET,JSON) { req ->
        headers.'apiKey' = key
        response.success = { resp, json ->
            println "Query response: ${json}"
        }
    }
```

In the above example, the 'json' variable is a JSON Map object that easily be accessed for data:

```groovy

    println "Looking at page ${json.pageNumber}"
    json.documents.each  {println(String.format("%-50s%-20s%-20s", it.name, it.id, it.lastModified))}
```

#### Iterating over pages of results
The JSON response also contains a `_links` field that uses HATEOAS conventions to provide links to related content. For document listings and searches, links to `previous`, `next`, `first` and `last` pages are provided when needed.

Using this approach we can iterate through pages of results, getting summary information for each document.

```groovy

    next_link = json._links.find{it.rel == 'next'};
    if (next_link != null) {
        println("next link is ${next_link.link}")
        // fetch next page of results
    }
```

A complete example of this is the `iterateDocs` method in `DocumentSearch.groovy`.

### Searching

RSpace API provides  two sorts of search - a basic search that searches all searchable fields, and an advanced search where more fine-grained queries can be made and combined with boolean operators.

A simple search can be run by adding  a search parameter to the query string:

```groovy

    url = "https://myrspace.com/api/v1?query=mysearchQuery"

```

Here are some examples of advanced search constructs:

```groovy

    // search by tag:
    search = [terms:[[query:"ATag", queryType:"tag"]]]

    // by name
    search = [terms:[[query:"AName", queryType:"name"]]]

    // for items created on a given date using IS0-8601 or yyyy-MM-dd format
    search = [terms:[[query:"2016-07-23", queryType:"created"]]]

    // for items modified between 2  dates using IS0-8601 or yyyy-MM-dd format
    search = [terms:[[query:"2016-07-23;2016-08-23 ", queryType:"lastModified"]]]

    // for items last modified on either of 2  dates:
    search = [operand:"or",terms:[[query:"2015-07-06", queryType:"lastModified"],
                                    [query:"2015-07-07", queryType:"lastModified"] ]

    // search for documents created from a given form:
    search = [terms:[[query:"Basic Document", queryType:"form"]]]

    // search for documents created from a given form and a specific tag:
    search = [operand:"and", terms:[[query:"Basic Document", queryType:"form"], [query:"ATag", queryType:"tag"]]]

```

To submit these queries, serialise them to JSON, URL escape and submit:

```groovy

    // convert your search object to JSON
    searchAsJson = JsonOutput.toJson(search);

    //remember to URL-encode your JSON string!
    encoded = java.net.URLEncoder.encode(searchAsJson, "UTF-8")

    // construct the URL
    documentSearchUrl = rspaceUrl + "/documents?advancedQuery="+encoded

    // now list one page at a time.
    iterateDocs(documentSearchUrl)
```

### Retrieving document content

Content can be retrieved from the endpoint /documents/{id} where {id} is a documentID.

Here is an example retrieving a document in CSV format taken  from `DocumentAsCSV.groovy` script:

```groovy

    rspaceUrl = System.getProperty("url") + "/api/v1";

    //Set in your RSpace API key here via a -D command line property
    key = System.getProperty("apiKey")

    DocumentAsCSV csvRetriever = new DocumentAsCSV (key: key, rspaceUrl: rspaceUrl)

    //gets all documents created from 'BasicDocument' form in CSV format.
    // This is useful for extracting content to put in a database, for example.
    csvRetriever.searchByFormAndRetrieveAsCSV("Basic Document")

```

### Getting attached files

Here's an example where we download file attachments associated with some documents. The code is in `FileDownloader.groovy`.

```groovy

    //construct a download URL from a file id (you can get this from files/ endpoint)
    def url = rspaceUrl + "/files/" + file.id + "/file"

    // file name can also be retrieved from files/ listing
    def name = "Myfile.txt"

    // where you want the files to be downlaoded to
    def downloadFolder = File.createTempDir()

    def downloadFile (String url, String name, File downloadFolder) {
        def http = new HTTPBuilder(url)
        http.request(GET, "application/octet-stream") { req ->
            headers.'apiKey' = key
            response.success = { resp, content ->
				def file = new File(downloadFolder, name).newOutputStream()
				file << content
            }
            handleError(response)
        }
    }
```

### Uploading content

The script in [DocumentCreationAndFileUpload.groovy](scripts/DocumentCreationAndFileUpload.groovy) illustrates
 how to create a document, upload a file and link a document to a file. It uses
 [DocumentPoster.groovy](src/com/researchspace/groovy/examples/DocumentPoster.groovy) as
 a helper class.

 ```groovy
    DocumentPoster poster = new DocumentPoster (key: key, rspaceUrl: rspaceUrl)
    def toCreate = [name:"SNP analysis", tags:"groovy,api,snp", fields:[ [content:"Some metadata"]]]
	Map newDocument = poster.createDocument(toCreate)
 ```
 will create a new basic document with a name, some tags and initial content. The returned Map contains
 keys and value corresponding to the returned JSON. By default content will be put in the 'API' folder.

 You can specify a form  if you want to create a particular document type:

 ```groovy
    def toCreate =[
         name:"SNP analysis", tags:"groovy,api,snp",
         fields:[ [content:"Some metadata"]]
         form:[id:2]
         ]
 ```

 Here's how to upload a file:

 ```groovy
    File fileToPost = new File("resources/2017-05-10_1670091041_CNVts.csv")
    Map newFile = poster.uploadFile(fileToPost, "an optional  caption, can be null")
 ```

 which will return a representation of the created file.

 To link a document to a file:

  ```groovy
    Map alteredDoc = poster.appendFileAttachment(newDocument, newFile.id)
 ```
 Pass in the new document and the id of the file to link to. The file link will be appended to the current content.

 To put a link in the content using a PUT request to documents/{id} you just need to put the placeholder:
 `<fileId=xxxx>` replacing 'xxxx' with the id of your uploaded file. RSpace will replace this with HTML of the
  attachment link for viewing in a browser.

repository: rspace-os/rspace-client-groovy

repo_name: rspace-os/rspace-client-groovy


text:
# OBJECTs

Objects are the powerhouse of Throughput.  They are the elements that are linked
by annotations.  The main object classes in Throughput are grants, code repositories
and databases.  Objects are defined by `TYPE` classes.  A `TYPE`
is defined either through the types defined in the W3C Annotation documentation, or
by a set of definitions from [schema.org](http://schema.org/).

All objects have a unique ID (imposed by neo4j), and may have a second ID that is defined by the object type.  NOTE:  The parameter `id` associated with some `OBJECT` nodes is not the same as the values obtained using the cypher statement `id(node)`.  Using `id(node)` returns the internal identity value for the node as implemented by neo4j.

![](SimpleObject.svg)

An `OBJECT` in the database may be connected to a `TYPE` (`isType`) or an ANNOTATION (`Body` or `Target`).

### Matching Objects

An `OBJECT` may have one or more properties, not all `OBJECT`s have the same properties.  For example, a `TextualBody` object will (most likely) not have a `doi` associated with it.  Some common properties of `OBJECT`s are `url`s, `id`s, and `name` elements.  A simple `OBJECT` match may be:

```
MATCH (o:OBJECT)
WHERE o.name CONTAINS('Neotoma')
RETURN o
```

### Constraints & Indexes

Object ids must be unique & are indexed:

```
  CREATE CONSTRAINT ON (o:OBJECT) ASSERT o.id IS UNIQUE;
  CREATE INDEX objName FOR (n:OBJECT) ON (n.name)
```

Object names are indexed

```
  CREATE INDEX objName FOR (n:OBJECT) ON (n.name)
```

There is a fulltext index on the `name` and `description`:

```
  CALL db.index.fulltext.createNodeIndex("nameAndDesc",
                                         ["OBJECT"],
                                         ["name", "description"])
```

license: MIT

branch_name: refs/heads/prod

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive


text:
---
title: "Audio Output"
description: "Describes how to receive audio output from a session."
weight: 700
---

To synthesize speech for the user from a
[ReplyAction](../sessions/actions/#reply-action), the calling application may
create a [TTS](../glossary/#tts) stream. Bytes of audio data are sent
on the stream from Diatheke until synthesis is complete, at which
point the stream is closed. The generated audio data will be
formatted and encoded based on the specific TTS model being used for
the session (as defined in the Diatheke server config file).

## Creating the TTS Stream
The TTS stream is created using a [ReplyAction](../sessions/actions/#reply-action).

{{< tabs >}}

{{< tab "Go" "go" >}}
// Create the TTS stream
stream, err := client.NewTTSStream(context.Background(), reply)
{{< /tab >}}

{{< tab "Python" "python">}}
# Create the TTS stream
stream = client.new_tts_stream(reply)
{{< /tab >}}

{{< tab "C++" "c++" >}}
// Create the TTS stream
Diatheke::TTSStream stream = client.newTTSStream(reply);
{{< /tab >}}

{{< tab "Swift/iOS" "swift" >}}
self.ttsStream = self.client.newTTSStream(replyAction: replyAction, dataChunkHandler: { (ttsAudio) in
	// Add code here to read audio data from the stream and send it to the
	// playback device.
}, completion: { (error) in
	// Add code here to handle TTS errors and TTS streaming completion
})
{{< /tab >}}

{{< tab "Java/Android" "java" >}}
Iterator<TTSAudio> ttsResp = mDiathekeBlockingService.streamTTS(reply);
{{< /tab >}}

{{< /tabs >}}

## Convenience Functions
The SDK includes some convenience functions to make it easier to
handle the audio data sent on the TTS stream. These typically use a
writer type with the TTS stream created earlier. Applications are more than
welcome to instead use the stream methods directly to
[receive audio](#receiving-audio) if these convenience functions do
not meet their needs.

{{< tabs >}}

{{< tab "Go" "go" >}}
// Set up the audio ouput as an io.Writer
var audioOut io.Writer

// Play the reply uninterrupted
err = diatheke.WriteTTSAudio(stream, audioOut)
{{< /tab >}}

{{< tab "Python" "python">}}
# The audio output should implement a write function, such as a
# file object or process pipe.
audioOut = getAudioOutput()

# Play the reply uninterrupted
diatheke.write_TTS_audio(stream, audioOut)
{{< /tab >}}

{{< tab "C++" "c++" >}}
// Set up the audio output as a subclass of Diatheke::AudioWriter.
Diatheke::AudioWriter* audioOut;

// Play the reply uninterrupted
Diatheke::WriteTTSAudio(stream, audioOut);
{{< /tab >}}

{{< /tabs >}}

## Receiving Audio
After the stream is created, audio data is sent repeatedly from the
server to the application as it becomes available, until synthesis is
complete, at which point the stream is closed by the server. It is
left up to the application to decide how best to consume the audio data,
whether it sends it directly to an output device (e.g., speaker), saves
it to a file, or forwards it to another stream.

{{< tabs >}}

{{< tab "Go" "go" >}}
for {
	// Wait for the next audio chunk
	audio, err := stream.ReceiveAudio()
	if err == io.EOF {
		// This indicates that synthesis is complete. No more
		// audio will be coming.
		break
	}

	playAudio(audio)
}
{{< /tab >}}

{{< tab "Python" "python">}}
# Pull messages from the stream as they come.
for data in stream:
    # Play back the audio data.
    play_audio(data.audio)
{{< /tab >}}

{{< tab "C++" "c++" >}}
// Wait for the next audio chunk
std::string buffer;
while (stream.receiveAudio(buffer)) {
    // Play back the audio data.
    playAudio(buffer);
}
{{< /tab >}}

{{< tab "Swift/iOS" "swift" >}}
// audioData can be used for gathering incoming TTS data chunks into one
// object to save it to file system or playback using AVFoundation.
var audioData: Data?

// Pull messages from the stream as they come
func handleReply(_ replyAction: Cobaltspeech_Diatheke_ReplyAction) {
	self.audioData = Data()
	self.ttsStream = self.client.newTTSStream(replyAction: replyAction, dataChunkHandler: { (ttsAudio) in
		if !ttsAudio.audio.isEmpty {
			self.audioData?.append(ttsAudio.audio)
		}
	}, completion: { (error) in
		if let error = error {
			print("TTS error received: \(error)")
		} else if let audioData = self.audioData {
			// Play the full audio data using AVFoundation or other ways
			self.playAudio(data: audioData)
		}
	})
}
{{< /tab >}}

{{< tab "Java/Android" "java" >}}
private void requestAudio(ReplyAction reply) ByteArrayOutputStream {
	// Make a request to the server for TTS audio
	Iterator<TTSAudio> ttsResp = mDiathekeBlockingService.streamTTS(reply);

	// Collect the audio into a single array
	ByteArrayOutputStream os = new ByteArrayOutputStream();
	while (ttsResp.hasNext()) {
		os.write(ttsResp.next().getAudio().toByteArray());
	}

	return os;
}
{{< /tab >}}

{{< /tabs >}}

repository: cobaltspeech/sdk-diatheke

branch_name: refs/heads/master

gha_language: Swift

repo_name: cobaltspeech/sdk-diatheke


text:
# HACKER_RANK :smiley:
Welcome to HACKER_RANK 📋
This Repository was made to maintain various Programs with their suitable solutions in a single space. This Repository is maintained by [theabhishek07](https://github.com/theabhishek07) .This is a public Repository and all sorts of contributions to the code are welcomed.
## You are always welcome to add more or improve any resource in this repository.

# Steps to follow 📜
## 1. Fork it 🍴
You can get your own fork/copy of [HACKER_RANK](https://github.com/theabhishek07/HACKER_RANK) by using the `Fork` button

![Fork Button](https://github-images.s3.amazonaws.com/help/bootcamp/Bootcamp-Fork.png)

## 2. Clone it 👥
You need to go to your Fork of the Repository and then clone (download) it to local machine using

`$ git clone https://github.com/Your_Username/HACKER_RANK.git`
This makes a local copy of repository in your machine.

Once you have cloned the `HACKER_RANK` repository in Github, move to that folder first using change directory command on linux and Mac.
```python
## This will change directory to a folder HACKER_RANK
$ cd HACKER_RANK
```
Move to this folder for all other commands.

Now, lets add a reference to the original `HACKER_RANK` repository using

`$ git remote add upstream https://github.com/theabhishek07/HACKER_RANK.git`
This adds a new remote named *_upstream_*.

See the changes using
```python
$ git remote -v

  origin https://github.com/Your_Username/HACKER_RANK.git (fetch).
  origin https://github.com/Your_Username/HACKER_RANK.git (push).
  upstream https://github.com/theabhishek07/HACKER_RANK.git (fetch).
  upstream  https://github.com/theabhishek07/HACKER_RANK.git (push).
  ```

## 3.  Create a new branch ‼
Whenever you are going to make a contribution. Please create a new branch using the command below and keep your master branch clean (i.e. synced with remote branch).
```python
# It will create a new branch with name  <branchname> and switch to branch <branchname>
$ git checkout -b <branchname>
  ```
To switch to desired branch
```python
# To switch from one folder to other
$ git checkout <branchname>
  ```
To add the changes to the branch. Use
```python
# To add all files to branch
$ git add .
```
Type in a message relevant for the code reveiwer using
```python
# This message get associated with all files you have changed
$ git commit -m "relevant message"
```
Now, Push your awesome work to your remote repository using
```python
# To push your work to your remote repository
$ git push -u origin <branchname>
```
Finally, go to your repository in browser and click on `compare and pull requests`. Then add a title and description to your pull request that explains your precious effort.

# LICENSE
[License](https://github.com/theabhishek07/HACKER_RANK/blob/master/LICENSE)
# CODE_OF_CONDUCT
[CODE_OF_CONDUCT](https://github.com/theabhishek07/HACKER_RANK/blob/master/CODE_OF_CONDUCT.md)

gha_language: Java


text:
---
title: "Creating a mobile-friendly navigation component in under 100 lines of code "
date: 2020-06-04
tags: ["preact"]
category: "blog"
emoji: 💯
coverImage: 'https://images.unsplash.com/photo-1591256936776-5b4abed4299d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=900&q=60'
---

As part of the [#100DaysOfCode](https://www.100daysofcode.com/) challenge, I’ve been working on creating a goal-setting app using a Rails + Preact stack.

I wanted to begin my front-end code by building out a navigation component, as having that in place will make it easier for me to visualise how all the other components should look on the page.

> Side note - I’m not a designer by any means, but I am trying my best 🙃

## Choosing a mobile navigation style

For full sized screens, I decided to go with the fairly standard left-hand sidebar navigation.

![](web-navigation.png)

 But when it comes to deciding on a navigation style for mobile, I did a bit of looking around at what websites do today to decide what to do for my own app.

Looking at DEV or Twitter on mobile for instance, both provide left sidebars that do an animated slide into view. Twitter also has a bottom navigation that contains some of the most important navigation items.

I decided against the sliding menu pattern since I didn't think that would be necessary with the amount of navigation items I needed, and instead opted to just have a bottom bar like Twitter does.

![](mobile-navigation.png)

## Getting started with your Preact component

I’m using [Preact](preactjs.com/) for the frontend, which is a lightweight alternative to React. It doesn’t contain all the features that React does (you can take a look at their docs to learn more about [the differences to React](https://preactjs.com/guide/v10/differences-to-react)) but so far I haven't found any features that I'm missing from React.

To structure our navigation component, we’re going to need a div that contains our navigation items, a div for our content, and a container div that lives around it:
```js
import { h } from 'preact';

const Navigation = () => (
    <div>
        <div>Navigation items here</div>
        <div>Hello world!</div>
    </div>
);

export default Navigation;

```

## Styling your component

To style each of our divs, I’m going to use a CSS-in-JS library called [Emotion](https://emotion.sh/docs/introduction). If you’ve never had the chance to use CSS-in-JS before, I’ve created a guide to [getting started with styled-components](https://www.emgoto.com/react-styled-components/) which should give you a quick summary of how things work. Since Emotion lets you use the same `styled` API that styled-components has, swapping between the two libraries is very easy.

We'll be putting styles in a separate `styled.js` file. For our container div, we’ll need it to expand to the full width and height of the screen, and also to reverse the order in which the sidebar and the content are displayed when being viewed on a mobile:
```js
import styled from '@emotion/styled';

const MAX_WIDTH = 480;

export const Container = styled.div`
    display: flex;
    height: 100vh;

    @media screen and (max-width: ${MAX_WIDTH}px) {
        flex-direction: column-reverse;
    }
`;

```
> If you’ve never seen @media before,  you can read them like an if statement. If the width of the browser is smaller or equal to the given max-width value, we will apply the CSS inside of the curly braces. Here we’re using it for mobile-specific CSS.

Secondly we’ll need components for our content and navigation bar. For the content, we need to make it fill all the remaining space that is not taken up by the navbar:
```js
export const Content = styled.div`
    flex: 1;
`;

```
For the navbar, we’ll set a fixed width when we’re in desktop mode, and 100% width when we’re viewing in mobile mode:
```js
export const Navbar = styled.div`
    background-color: lightgrey;
    display: flex;
    width: 176px;
	flex: 1;

    @media screen and (max-width: ${MAX_WIDTH}px) {
        width: 100%;
		height: 52px;
    }
`;
```
We can then use these components in our app:
```js

import { Container, NavBar, Content } from './styled';

const Navigation = () => (
    <Container>
        <Navbar/>
        <Content>Hello world</Content>
    </Container>
);

```
At this point you’ll have a responsive navigation bar that moves from being on the left hand side to being at the bottom in mobile mode.

## Adding your navigation items

Next up is adding navigation items to our sidebar. I’ve created a separate component for this, which takes in an icon and some text as props:
```js
const NavItem = ({ Icon, text }) => (
    <NavButton>
        <Icon />
        {text}
    </NavButton>
);
```
This also makes use of a new styled component we’ll need to create called `NavButton`:
```js
export const NavButton = styled.button`
`;

```

Inside of `NavButton`, we’ll need to override the default HTML button styles:
```css
border: none;
background-color: transparent;
```

We then need to make sure that in desktop mode, the icon and the text will be centre-aligned next to each other:

```css
display: flex;
align-items: center;
width: 100%;
```

Finally, if we’re viewing the navigation component on a mobile, we’ll want the icon to stack on top of the text, instead of the two living side by side:
```css
@media screen and (max-width: ${MAX_WIDTH}px) {
    flex-direction: column;
 }
```

Now that your `NavItem` component is complete, you can add it to your `Navigation` component:
```js
import HomeIcon from '../assets/homeIcon';
import GoalIcon from '../assets/goalIcon';
import SettingsIcon from '../assets/settingsIcon';

const Navigation = () => (
    <Container>
        <NavBar>
            <NavItem Icon={HomeIcon} text="Tasks" />
            <NavItem Icon={GoalIcon} text="Goals" />
            <NavItem Icon={SettingsIcon} text="Settings" />
        </NavBar>
        <Content>Hello world</Content>
    </Container>
);
```

At this point, you’ll have a mobile-friendly navigation component! Of course, there is still some styling work that needs to be done, such as increasing font size, adding padding between the icon and the text, and adding some styling on hover. I've added these changes, plus everything we've done, to a [Codepen](https://codepen.io/emgoto/pen/mdVyyBP).

I couldn’t easily get Preact + Emotion working in Codepen, so the Codepen is actually using React and styled-components, which goes to show how easy it is to swap out!

## Conclusion

In under 100 lines of code, we’ve created a navigation component that works on both mobile and web! This navigation pattern should work for smaller apps that only need to show a handful of navigation items to their users. As your app grows in features, you may need to switch out to a sliding pattern - if you're looking for an example of how to do that, Jose Felix has written a similar guide on creating a [mobile friendly navigation with React](https://dev.to/jfelx/create-a-mobile-friendly-navigation-with-react-4930).

Thanks for reading!


text:
---
title: 'Boing Boing interview: Team-XBMC on the Future of XBMC for Linux'
date: 2007-08-29T04:00:00Z
author: Team XBMC
---
Freelance writer [Joel Johnson](http://www.joeljohnson.com) recently did and interview with representatives from Team-XBMC for [Boing Boing Gadget blog](https://boingboing.net/tag/gadgets) about the Future of [XBMC for Linux](http://xboxmediacenter.com/wiki/index.php?title=Linux_port_project).

 From the interview:
 [I]“Joel: How close do you feel you are to a stable version of the XBMC for Linux port?

 Team XBMC: We don’t have a date yet (it is really to early to know), our best guess today is 6-12 months or so from now but it could be longer. As we are a hobby project we depend on developers own personal interest and free time, making it impossible to set an E.T.A., more ‘outside’ developers would sure help speed things along.”[/I]

 You can read the full interview [in this blog post on gadgets.boingboing.net](https://boingboing.net/tag/gadgets)
 PS! Developers interested in contributing checkout [XBMC Linux port project](http://xboxmediacenter.com/wiki/index.php?title=Linux_port_project)

repository: ECCx/kodi-tv

branch_name: refs/heads/main

repo_name: ECCx/kodi-tv


text:
# Conceal <!-- omit in toc -->

Conceal is a command-line utility that eases the interaction between developer and OSX Keychain Access and Linux Keyring. It is the open-source companion to [Summon](https://cyberark.github.io/summon) as every secret added using this tool into Keychain/Keyring is added using Summon-compliant formatting.

## Table of Contents <!-- omit in toc -->
- [Requirements](#requirements)
- [Installation](#installation)
- [Usage](#usage)
  - [Add a secret](#add-a-secret)
  - [List Summon secrets](#list-summon-secrets)
  - [Remove a secret](#remove-a-secret)
  - [Display Help](#display-help)
  - [Display Version](#display-version)
- [Maintainer](#maintainer)
- [License](#license)

## Requirements

* MacOS or Linux

_Windows Credential Manager support coming soon._

## Installation

1. Download the latest release available at [GitHub Releases](https://github.com/infamousjoeg/go-conceal/releases).
2. Move the `conceal` executable file to a directory in your `PATH`. (I use `~/bin`.)
3. In Terminal, run the following command to make sure it's in your `PATH`: \
   `$ conceal -v`

## Usage

### Add a secret

`$ conceal -a dockerhub/token`

To add a secret to Keychain/Keyring, call `conceal` and use the `-a` argument to pass the account name to add. You will be immediately prompted to provide a secret value in a secure manner.

### List Summon secrets

`$ conceal -l`

To list all secrets associated with Summon in Keychain/Keyring, call `conceal` and use the `-l` argument to list all accounts present.

To filter the list further, pipe to `grep` like this `$ conceal -l | grep dockerhub/`.

### Remove a secret

`$ conceal -a dockerhub/token -r`

To remove a secret that was added for Summon, call `conceal` and use the `-a` argument to pass the account name to remove. The additional `-r` argument tells `conceal` to remove the secret instead of add.

### Display Help

`$ conceal`

To display the help message, just call `conceal` with no arguments.

### Display Version

`$ conceal -v`

To display the current version, call `conceal` with the `-v` argument.

## Maintainer

[@infamousjoeg](https://github.com/infamousjoeg)

[![Buy me a coffee][buymeacoffee-shield]][buymeacoffee]

[buymeacoffee]: https://www.buymeacoffee.com/infamousjoeg
[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png

## License

[Apache 2.0](LICENSE)

repository: jonahx/go-conceal

repo_name: jonahx/go-conceal


text:
# observable-profiler

[![npm](https://img.shields.io/npm/v/observable-profiler.svg)](https://www.npmjs.com/package/observable-profiler)
[![GitHub](https://img.shields.io/github/license/awerlang/observable-profiler.svg)](https://opensource.org/licenses/MIT)
[![Travis (.org)](https://img.shields.io/travis/awerlang/observable-profiler.svg)](https://travis-ci.org/awerlang/observable-profiler)
[![Code Climate](https://codeclimate.com/github/awerlang/observable-profiler/badges/gpa.svg)](https://codeclimate.com/github/awerlang/observable-profiler)

Tracks new & disposed Observable subscriptions.

## Usage

```ts
import { setup, track, printSubscribers } from 'observable-profiler';

// Call `setup` once, passing the Observable class (usually imported from `rxjs`)
setup(Observable);
// We're not tracking subscriptions yet, but have the basic support in-place by monkey-patching `Observable#subscribe()`

track();
// Subscriptions at this point are now being tracked
...
// Call `track(false)` to stop tracking, and return a list of pending subscriptions.
const subscribers = track(false);
// Output to console pending subscriptions (leaks, probably)
printSubscribers({
    subscribers,
});
```

## Recipes

### Angular Bootstrap

Begins tracking subscriptions once the app bootstraps (Angular itself doesn't unsubscribe everything, so it's better to start tracking not earlier than this moment). Perform the tests on the app. Call `window.stopProfiler()` once you want a report of pending subscriptions. The app will be unloaded.

```ts
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { Observable } from 'rxjs';
import { setup, track, printSubscribers } from 'observable-profiler';

setup(Observable);
platformBrowserDynamic([])
    .bootstrapModule(AppModule)
    .then(ref => {
        track();
        (window as any).stopProfiler = () => {
            ref.destroy();
            const subscribers = track(false);
            printSubscribers({
                subscribers,
            });
        }
    });
```

### Angular Router

This recipe collects subscriptions during the usage of a page, and reports pending subscriptions once it is navigated away.
Because Angular runs resolvers before the current route is deactivated, it may report false positives (for resolvers).
Also, use this snippet in the root outlet, do not nest trackers.

```ts
import { Component } from '@angular/core';
import { Observable } from 'rxjs';
import { setup, track, printSubscribers } from 'observable-profiler';

import { environment } from '../../../../environments/environment';

if (!environment.production) {
    setup(Observable);
}

@Component({
    selector: 'main',
    template: '<router-outlet (activate)="onActivate()" (deactivate)="onDeactivate($event)"></router-outlet>',
})
export class MainComponent {
    onActivate() {
        track();
    }

    onDeactivate(component: object) {
        const subscribers = track(false);
        printSubscribers({
            subscribers,
            prefix: component.constructor.name,
            timeout: 200,
        });
    }
}
```

## Installation

    npm install observable-profiler

## FAQ

**1. Which recipe should I use?**

A: If you're using a router, start with the router recipe, subscription tracking begins when the routed component is activated i.e. after its construction. The router recipe is intended to catch leaks as fast and localized as possible. Once you're done with router tests, use the bootstrap recipe, which would catch many more leaks, including work done outside router.

**2. I'm seeing errors in the browser's console. Are they bugs in the `observable-profiler`?**

A: The profiler will output a line `Current subscriptions (including indirect/nested): ...`, followed by a list of stack traces. Each stack trace points to a place where a subscription to an observable was made, but not yet released. The subscription might be released at a later point once it goes out of scope, but some of these are actual coding mistakes.

**3. How can I make sense of the profiler's output?**

A: The output is a stack trace, see question number 2. The last line in a stack trace likely is pointing to the source of the subscription. If that's on your own code, great, you should be able to fix it by releasing the subscription in the appropriate place and time. If it doesn't point to your own code, then it might be a problem for the third-party to solve. I suggest you report to them as a bug linking to a repro built with this tool.

**4. There's no output, is that right?**

A: If you're doing a great job, then that's right, there are no leaks. Or may be the case that no subscription was made during the period the profiler was working, as it can only catch subscriptions after tracking has begun.

**5. Does the profiler works with libraries built on top of observables, like ngrx?**

A: Yes. There's nothing special about them.

**6. Any last advice?**

A: In components, always subscribe in the `ngOnInit()` lifecycle event. Constructors are only meant for initializing fields in the component.

## License

MIT


text:
### [CVE-2022-3430](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-3430)
![](https://img.shields.io/static/v1?label=Product&message=BIOS&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=%3D%20various%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-276%20Incorrect%20Default%20Permissions&color=brighgreen)

### Description

A potential vulnerability in the WMI Setup driver on some consumer Lenovo Notebook devices may allow an attacker with elevated privileges to modify secure boot setting by modifying an NVRAM variable.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/ARPSyndicate/cvemon
- https://github.com/river-li/awesome-uefi-security

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
---
layout: post
title:  "Pentagon Icon Pack"
date:   2014-01-02 21:30:26
comments: true
tags: photoshop, icon
archive: True
---
I created these icons for an android app I was working on.

![icon pack pentagon](/images/icon-pack.jpg)
>First thing is that the icons are pentagonal shape.

>They have flat UI color background.

>They all have a long shadow.

I'll write a tutorial soon on how to do it in Photoshop so that you can create your own set of icons in any shape and color you want.

Thanks for reading!

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


text:
# Fallout 4 Creation Framework
A general purpose scripting library and framework for Fallout 4 which provides support for Actionscript 3.0 and Papyrus.
These libraries and frameworks are heavily inspired by Microsoft's .NET Framework.

The framework is divided into several assemblies, imports, and namespaces.

# Dependencies
The following projects are used as dependencies.

## [F4SE](https://f4se.silverlock.org/)
The Fallout 4 Script Extender, or F4SE for short, is a modder's resource that expands the scripting capabilities of Fallout 4.
It does so without modifying the executable files on disk, so there are no permanent side effects.

## [Fallout 4 Interface Development Kit](https://github.com/Scrivener07/FO4_Interface)
The unofficial Fallout 4 user interface development kit.
The user interface library has no assembly.
The UI scripting framework is a distributed library which may be included with source code.

# Assembly: `System.esl`
The scripting framework assembly `System.esl` is divided into several imports and namespaces.
```
System.esl
System - Main.ba2
```
#### Import: `System`
The namespace contains fundamental classes and base classes that define commonly-used functions and data types.

#### Import: `System.Diagnostics`
The namespace includes classes that allow you to interact with papyrus logs, performance counters, unit testing, and other diagnostics.

#### Import: `System.Objects`
The namespace includes classes that allow you to programmatically instantiate `new` Papyrus script instances.

# Assembly: `System.XSE.esl`
The scripting framework assembly `System.XSE.esl` provides classes for interacting with XSE.
```
System.XSE.esl
System.XSE - Main.ba2
```
#### Import: `System.XSE`
The namespace includes classes that provide extension methods for XSE functions and data types.

#### Import: `System.UI`
The namespace includes classes that allow for interacting with the Scaleform user interface.

# Assembly: `System.HUDFramework.esl`
The namespace includes classes that allow for interacting with the HUD Framework by Reg2K.
```
System.HUDFramework.esl
System.HUDFramework - Main.ba2
```

# Assembly: `System.MCM.esl`
The namespace includes classes that allow for interacting with the Mod Configuration Menu by Neanka.
```
System.MCM.esl
System.MCM - Main.ba2
```

# Assembly: `Scripting.esl`
The scripting framework assembly `Scripting.esl` contains highly reusable and common scripts.
```
Scripting.esl
Scripting - Main.ba2
```
#### Import: `Scripting`
The namespace includes classes that provide common patterns for projects.


text:
[![New Relic Experimental header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Experimental.png)](https://opensource.newrelic.com/oss-category/#new-relic-experimental)

# New Relic NestJs Integration Example

> **Warning**
> Please note that using a custom interceptor is unnecessary when instrumenting with the latest versions of the New Relic Node agent. In fact, using a custom interceptor may cause conflicts and lead to unexpected behavior (starting with [10.1.0](https://docs.newrelic.com/docs/release-notes/agent-release-notes/nodejs-release-notes/node-agent-10-1-0/) released May 4th, 2023). Please see instead [this example](https://github.com/newrelic/newrelic-node-examples/tree/main/nestjs) on how to enable New Relic instrumentation for Nest.js. That said, you can still use this repository to experiment with NestJs and the New Relic agent, and easily send data to the New Relic platform.

### App Architecture

![NestJs_NewRelic_architecture](https://user-images.githubusercontent.com/6328360/112493022-b0b2d000-8d79-11eb-812f-9622b0917f8e.png)

The above diagram shows the (dockerized) architecture of the example app with the following components:
 * `nest network` - where all the microservices reside
 * `parent` container - the outer left
 * `child` container - in the middle
 * booth `parent` and `child` have New Relic NodeJs Agent installed (and required by each of the microservices)

 ### Hot to run

#### Prerequisites
* New Relic Account (sign up [here](https://newrelic.com/signup))
* New Relic License Key (find instructions [here](https://docs.newrelic.com/docs/accounts/accounts-billing/account-setup/new-relic-license-key/))
* Docker` is installed on your machine.

#### Setup
Find two `newrelic.ts` config file in `/src` directory inside both `parent` and `child`

Change two config variables in each file

```
app_name: ['YOUR_APP_NAME'],
license_key: 'YOUR_LICENSE_KEY'
```
to a desired `app_name` and paste your New Relic License Key acquired in previous steps to `license_key` variable.

#### Start
Run `docker-compose up` and wait for all images to install and start the app.

#### Use
The `parent` service has the following endpoints:
* GET `localhost:3000/`
  * just to confirm the app works
* POST `localhost:3000/cats/create`
  * to create a cat
  * with a json body payload containing 3 properties `name`, `age` & `breed`
    ```
    // for example
    {
        "name": "Tom",
        "age": 3,
        "breed": "Persian"
    }
    ```
* GET `localhost:3000/cats/getAll`
  * to get all cats

Call any of these endpoints and you'll see a message (similar to the one below) in the console:

This particular example is a console log showing the flow of the GET `localhost:3000/cats/create` request. It's visible that `parent` calls `child` and gets a response back
intercepting `child`'s response carrying a `mongodb` record being created by `child`'s interaction with `mongodb` service.

#### New Relic Observability Platform

Once you make a few calls, go to you New Relic account where the app data is being send and navigate to `Explorer` and find the app (by the name you gave it to during the setup)
Go to `Distributed Tracing` and click on one of `Root Entry Spans`

You should be able to see `Distributed Tracing` spans captureg by New Relic Agents installed in both `parent` and `child`

## Contributing
We encourage your contributions to improve New Relic NestJs Integration Example! Keep in mind when you submit your pull request, you'll need to sign the CLA via the click-through using CLA-Assistant. You only have to sign the CLA one time per project.
If you have any questions, or to execute our corporate CLA, required if your contribution is on behalf of a company,  please drop us an email at<EMAIL_ADDRESS>
**A note about vulnerabilities**

As noted in our [security policy](../../security/policy), New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.

If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through [HackerOne](https://hackerone.com/newrelic).

## License
New Relic NestJs Integration Example is licensed under the [Apache 2.0](http://apache.org/licenses/LICENSE-2.0.txt) License.

repository: matewilk/nestjs-test-app

repo_name: matewilk/nestjs-test-app


text:
# math-lib

A set of reusable arithmetic functions. All functions handle numbers in decimal, binary, octal, and hexadecimal formats, returning the result in decimal form.

## Basic Usage (browser)

### Setup

1. Clone this repository
1. Import the desired function(s) in a script tag with `type="module"`

For example, within your HTML page, add:

```html
<script type="module">
  import { add } from "directory-where-this-project-is-added/";
  const sum = add(1, 2);
</script>
```

All functions require parameters to be of JavaScript type `number`, and either return a `number` or throw an error.

## Tests

Unit tests were created leveraging Eric Elliott's [`riteway`](https://github.com/ericelliott/riteway) test environment. Run `npm install` at the project root to install the environment.

To run the tests, run `npm run test`. Alternatively, run `npm run watch` to have the tests run each time a change to the JavaScript files occurs.

## Reusability Measures

The functions each verify that a valid number (argument with JavaScript `number` type) is passed for each argument. They also handle a wide variety of number formats -- decimal, binary, octal, and hexadecimal.

repository: skitterm/math-lib

repo_name: skitterm/math-lib


text:
[![node-discord](https://raw.githubusercontent.com/Alon-L/node-discord/gh-pages/assets/images/header.png)](#)

  More than just a Discord API Wrapper.

Node-discord is a strict TypeScript Discord API Wrapper that focuses on utility and extensibility.
The library implements every core aspect of the Discord API and provides additional tools to assist developers with their needs.

# Getting Started
Install the library using NPM or Yarn:
```
$ npm install @node-discord/core

$ yarn add @node-discord/core
```

## Quick Code Example
Here is a short code example to initialize a Bot and connect it to the Discord gateway.
```javascript
const { Bot, BotEvent } = require('@node-discord/core');

const bot = new Bot('YOUR BOT TOKEN');

bot.events.on(BotEvent.Ready, () => {
  console.log('Ready!');
});

bot.connect();
```

# Features
✔ Strictly written in TypeScript
✔ Lightweight
✔ Fully supports the Discord API

## Coming Features
☄ Fully extendable plugins API
☄ Additional utilities
☄ CLI generator for new projects
☄ Custom ESLint configuration

# Optional Libraries
There are multiple optional libraries which could be installed in addition to node-discord to improve performance.
- **[discord/erlpack](https://github.com/discord/erlpack)** - Provides fast encoding and decoding for WebSocket payloads.
- **[zlib-sync](https://www.npmjs.com/package/zlib-sync)** - Compresses and decompresses WebSocket payloads before attempting to parse them.
- **[OpusScript](https://www.npmjs.com/package/opusscript)** - Decodes and encodes opus encoded voice packets. **Needed for voice support**
- **[sodium-native](https://www.npmjs.com/package/sodium-native)** - Decodes incoming voice packets from Discord. **Needed for voice support**

repository: cborac/node-discord

repo_name: cborac/node-discord


text:
# Extraction

Assuming that we have some email addresses in the<EMAIL_ADDRESS>format, please write program to print the company name of a given email address. Both user names and company names are composed of letters only.

The first line of the input contains an email address. You have to print the company name in single line.

## Examples

##### Input:

<EMAIL_ADDRESS>
##### Output:

qxf2

repository: HarshCasper/python-exercises

repo_name: HarshCasper/python-exercises


text:
---
title: Royal Opera House website case study
cover: /work/roh/images/logo.png
location: UK
color: "#c60c30"
categories: web wordpress zend php inverted featured
template: project
---

The Royal Opera House was my first professional experience in the UK. I was hired as a Digital Developer by the Design & Development Manager (former lead designer of BBC programs) with a very important objective: to completely rebuild the ROH website from scratch. A business critical project that required a major overhaul in the online ticketing system, server infrastructure, information architecture, user experience, content management and an online shop to match the high standards of the organization.

Once we understood the issues with the old website, we decided to start building [the news section](http://www.roh.org.uk/news), which is quite an isolated piece that could be driven by a WordPress installation with a custom theme and plugins.

![](/work/roh/images/1.jpg "Screenshot of the ROH news section")

### The requirements and the plan

While we were working on the news section, we continued exploring and learning about the organization. We followed a domain-driven[ design](https://en.wikipedia.org/wiki/Domain-driven_design) approach, which it's a very effective way to understand the needs and requirements of the many different departments and units that work within the institution. Things like the navigation or page hierarchy are very political topics and building the correct information architecture can take some time...

On the other hand, one of the main issues with the old website was **the waiting room**. The ROH sells its tickets very quickly. As soon as they are available to purchase, thousands of customers will go online to buy them. This situation was creating a bottleneck in the infrastructure and users were having to wait online for long periods until they were able to purchase their tickets.

The new website would have to address that issue as the main priority. To do so, we partnered with [Pop](http://www.popagency.com/), a digital agency based in the US. They had a lot of experience with [Tessitura](http://www.tessituranetwork.com/), the software that many theatres around the world use to manage the box office and their network, so they were the perfect partner for our project.

The agreement with Pop was that they will take care of the Tessitura API and checkout journey (including the seat selection and payment gateway) and we would take care of the rest. The actual bottleneck was in the Tessitura database. It was huge and slow. We needed to decouple the website from that DB if we wanted to have a smooth experience.

At this point, another developer joined the team. We were now three! still a small number for a project of this size, but we had 100% dedication and direct contact with stakeholders, customers and other members of the digital media department.

### Framework and infrastructure

![](/work/roh/images/3.jpg "Evaluating the current website and developing the new © ROH 2011")

Once we understood the problem, we studied the different open source PHP frameworks out there to build the rest of the website. Although the static pages we decided to build them with WordPress. Why open source and why PHP? Well, the ROH is partly funded with public money and we believed in Open Data, Web Standards and making things as open and accessible as possible. I remember that Zend, CodeIgniter or Symfony were the most popular at that time, so we decided to go with Zend due to its robustness and huge community. We also decided to use Doctrine (Symfony's ORM), Apache, Linux and MySQL. A classic LAMP stack.

For the infrastructure, we started with Rackspace but soon moved to Amazon AWS elastic cloud. This would allow us to scale the website during the ticket sale days to allow more traffic and make the purchase experience more enjoyable.
At this point, we knew that we were going to have an API to access data from ticket prices, event dates, etc, but not all the data we needed! The API was going to give access only to a subset of data related to tickets and events. We still needed to access data related to productions, artists, season calendars, etc. To get hold of this data, we came out with a plan: to implement MS SQL triggers in the Tessitura DB that will update the data in our MySQL DB. This means that we designed our own MySQL database, with tables like 'productions', 'events', 'people', etc, and the data of those tables will be updated automatically from the main Tessitura DB. Awesome! The theory was great, but the practice turned out to be a bit complex due to firewall restrictions, ODBC connectors and writing some complex SQL queries. Nevertheless, we were able to set it up and it felt great to see it working.

### The Internet as a CMS

Another interesting topic was imagery and video management. The ROH is an Art organization and the audiovisual documents are very important. We needed an inexpensive system, scalable, social media are friendly and easy to work with. We decided to use Flickr for images, Youtube for videos, SoundCloud for audio and Delicious for related content.

Here is where I learned a very important lesson from my team leader... "**We have to use the Internet as a CMS**". This line resonated with me for years and I used it several times later on in other projects. It's so powerful and meaningful. At first, I wasn't confident about it. I wanted to have control and host the files on our server. But then I realized the benefits of delegating this task to someone who is the best at it, like Flickr. They had a strong and well-documented API, an automatic cropping system, and a huge audience! These sites don't disappear in one day, why should we worry about it?

So we customized a Flickr WordPress plugin (for the news section) and created a small admin area to allow the content team to update the homepage imagery. The rest of the pages with dynamic data (events, productions, seasons, etc) were using images and videos coming directly from the Tessitura database.

### Less is more

![](/work/roh/images/0.jpg "The Royal Opera House home page")

Another lesson I learned in this project is about minimalism and simple design, or how is commonly known as "less is more". The best example is when we were discussing adding social media icons to share news articles. Having a personal blog and knowing the benefits of having those buttons, I was convinced that the same principle would apply to the ROH website but I was wrong.

By looking at the iOS interface, I realized how easy and clear interfaces make a better UX. At first, I thought that it could come across as some sort of 'institutional elitism'. For example, "I don't put social links because I don't need them and that's something small blogs do". But then I realized that this decision has more to do with the target audience's habits and favoring an easy UX. This approach has also an SEO benefit due to users having to come back to the website to continue their conversation about a story.

### Open Data

I would also like to talk about the API system that we built to open the ROH data. It seemed like a great idea at that moment. What we did was implement lots of different formats (XML, JSON, RDF, RSS, ATOM, ICS) and [hackable/semantic URLs](https://en.wikipedia.org/wiki/Semantic_URL) for the website content.

As a user, you could get news stories in many different formats. Not only the article, but the categories, archive, most read, most commented, etc. You could also download the events calendar (a particular day, month, week,...) in the ICS microformat. The events and production data were also available to be consumed in JSON or XML. It was mainly a system to allow people to consume the ROH data in a machine-readable manner. All you had to do was to add ".xml" or ".rss" or ".json" at the end of the URL.
This idea follows what was implemented in the [BBC programs](http://www.bbc.co.uk/blogs/radiolabs/2008/05/helping_machines_play_with_pro.shtml).

### Conclusion

There are many interesting topics that I could continue talking about, like the global search, consistent tagging, proscenium (global header and footer), or **how we photographed every single seat in the theatre** and the view from that seat to let the users know in the seat selection page during the ticket purchasing process.

It was a great professional experience and I learned a lot. It was also my first job in the UK, so I was unaware of many cultural differences, which made it even more interesting. As of today, **I still consider this project one of my career best achievements**, mainly because it was a very small team with high responsibility and I was surrounded by very talented professionals that mentored me and made me a more thoughtful and capable developer.

### Related articles

21/02/2012: [Our new website: An update on progress](/blog/our-new-website-an-update-on-progress)

12/01/2012: [Our website: A look forward](/blog/our-website-a-look-forward)

### Some screenshots

![](/work/roh/images/15.jpg "Home page")

![](/work/roh/images/14.jpg "Production page")

![](/work/roh/images/4.jpg "About page")

![](/work/roh/images/5.jpg "Article page")

![](/work/roh/images/6.jpg "User account page")

![](/work/roh/images/7.jpg "Restaurant reservation")

![](/work/roh/images/8.jpg "Ticket selection")

![](/work/roh/images/9.jpg "Seat selection")

![](/work/roh/images/9.jpg "Order placed")

![](/work/roh/images/11.jpg "Lunchtime booking")

![](/work/roh/images/12.jpg "Upcoming events")

![](/work/roh/images/13.jpg "Calendar by week")

![](/work/roh/images/16.jpg "Article with me and Jamie")

### Ballet screens

Another side project I had the pleasure to work on, was the ballet screens. An app that runs on the tv screens of the dancing studios of the ROH. It's an HTML page with some CSS with data coming from an XSLT document.

![](/work/roh/images/ballet.jpg)

### Team and office

![](/work/roh/images/roh-office.jpg "The development team was small but talented!. Just two developers and one designer/manager)")

![](/work/roh/images/roh-workspace.jpg "My workspace")

![](/work/roh/images/roh-team-2.jpg "The digital media team")

![](/work/roh/images/party.jpg "ROH Party")

## Old design

![](/work/roh/images/old-home.jpg "Old home page")

![](/work/roh/images/old-whats-on.jpg "Old What's on page")

![](/work/roh/images/old-discover.jpg "Old discover landing page")

repository: gazpachu/joanmira

gha_language: EJS

repo_name: gazpachu/joanmira


text:
# GDC Data Dictionary

## Introduction

The GDC Data Dictionary defines components of the [GDC Data Model](../Data/Data_Model/GDC_Data_Model.md) and relationships between them.

## Data Dictionary Viewer

The [GDC Data Dictionary Viewer](viewer.md) is a user-friendly interface for accessing the dictionary. It includes the following functionality:

*   _Dictionary contents:_ Display of entities defined in the dictionary, including their descriptions, properties, and links.
*   _Links to semantic resources:_ Links to semantic data resources that define [Common Data Elements (CDEs)](http://cde.nih.gov) used in the dictionary
*   _Submission templates:_ Generation JSON and TSV templates for use in GDC data submission.

## Entity JSON Schemas

In technical terms, the dictionary is a set of YAML files that define JSON schemas for each entity in the dictionary. The files are available [on GitHub](https://github.com/NCI-GDC/gdcdictionary/tree/develop/gdcdictionary/schemas).

The GDC API can generate entity JSON schemas in JSON format. The API also provides the template generation functionality accessible via the GDC Data Dictionary Viewer. See [API documentation](../API/Users_Guide/Submission/#gdc-data-dictionary-endpoints) for details on how to access these functions programmatically.

repository: NCIP/gdc-docs

branch_name: refs/heads/develop

repo_name: NCIP/gdc-docs


text:
+++
Description = ""
date = "2015-11-02T16:58:32-08:00"
menu = "main"
title = "Why We're Here"
extra_css = ["/css/about.css"]
type = "page"

+++

# What's This All About?

The Author

      I'm Aaron Schlesinger, creator of Go In 5 Minutes. I've been writing Go code for about 4
      years. I've gathered best practices, tips and tricks, great packages, and other practical
      knowledge and best practices on how to write good Go code in the Go way.

      Read on to learn more about the series.

Concise Lessons

      You're a busy professional. Instead of reading entire books on the language, use
      these screencasts to quickly learn focused, relevant topics.

Real, Working Code

      Each screencast explains and runs real, working code. And everything
      is open source on Github.

You're Involved

      I use Github to get your feedback. Simply
      create an issue to request
      topics for future screencasts, ask questions or start a discussion.

Perfect For All Levels

      I teach all things Go in these screencasts, so there's just as much beginner content as advanced. Still not sold?
      Take 5 minutes to watch the first cast and decide for
      yourself.


text:
##Who doesn't like delicious pizza?

Some performance indicators might not work properly if ran locally on your computer thus it is recommended to host it publicly.

To run this website publicly on github, changed to views directory in terminal. Then enter these commands:
  git add *
  git commit -m "initial commit"
  git push -u origin master
when done go to, http://[your username].github.io

Optimizations made to get under 60 FPS:

-Resized Pizzeria image to load quickly.

-Reduced number of pizzas generated at page load from 200 to 25.

-Changed changePizzaSizes() function so that dx and newwidth are calculated before the for loop runs.

-Changed updatePositions() function by calculating '(document.body.scrollTop / 1250)' before the for loop.


text:
# sdg17MacroeconomicDashboard

Code for the *upcoming* SDG 17.13 Dashboard

UNSD Indicator Code: C171301
Target: 17.13 Enhance global macroeconomic stability, including through policy coordination and policy coherence
Indicator: 17.13.1 Macroeconomic Dashboard


text:
# Tail Sampling Processor

Supported pipeline types: traces

The tail sampling processor samples traces based on a set of defined policies.
Today, this processor only works with a single instance of the collector.
Technically, trace ID aware load balancing could be used to support multiple
collector instances, but this configuration has not been tested. Please refer to
[config.go](./config.go) for the config spec.

The following configuration options are required:
- `policies` (no default): Policies used to make a sampling decision

Multiple policies exist today and it is straight forward to add more. These include:
- `always_sample`: Sample all traces
- `numeric_attribute`: Sample based on number attributes
- `string_attribute`: Sample based on string attributes value matches, both exact and regex value matches are supported
- `rate_limiting`: Sample based on rate

The following configuration options can also be modified:
- `decision_wait` (default = 30s): Wait time since the first span of a trace before making a sampling decision
- `num_traces` (default = 50000): Number of traces kept in memory
- `expected_new_traces_per_sec` (default = 0): Expected number of new traces (helps in allocating data structures)

Examples:

```yaml
processors:
  tail_sampling:
    decision_wait: 10s
    num_traces: 100
    expected_new_traces_per_sec: 10
    policies:
      [
          {
            name: test-policy-1,
            type: always_sample
          },
          {
            name: test-policy-2,
            type: numeric_attribute,
            numeric_attribute: {key: key1, min_value: 50, max_value: 100}
          },
          {
            name: test-policy-3,
            type: string_attribute,
            string_attribute: {key: key2, values: [value1, value2]}
          },
          {
            name: test-policy-3,
            type: string_attribute,
            string_attribute: {key: key2, values: [value1, val*], enabled_regex_matching: true, cache_max_size: 10}
          },
          {
            name: test-policy-4,
            type: rate_limiting,
            rate_limiting: {spans_per_second: 35}
         }
      ]
```

Refer to [tail_sampling_config.yaml](./testdata/tail_sampling_config.yaml) for detailed
examples on using the processor.

gha_language: Go


text:
# _Order Pizza_

#### _Pizza ordering program for Epicodus, 2.4.2019_

#### By _**Young Liu**_

## Description

_This website takes in user input for pizza size and toppings and calculates the price of the pizza. This website was made to practice object oriented programming._

## Specifications

* _Website will allow clicks of the text field for checkbox inputs._
  * _Example input: Click anywhere in the text field for a checkbox input._
  * _Example output: That topping will be inputted in for the pizza._
* _Website will allow the customer to select a size for the pizza, and adjust the price accordingly._
  * _Example input: Input a regular, medium pizza._
  * _Example output: "You ordered a medium pizza. Your total price comes out to $12.00."_
  * _Example input: Input a regular, large pizza._
  * _Example output: "You ordered a large pizza. Your total price comes out to $14.00."_
* _Website will allow the customer to add toppings, and adjust the price accordingly._
  * _Example input: Input a medium pizza with mushrooms and onions._
  * _Example output: "You ordered a medium pizza with mushrooms and onions. Your total price comes out to $14.50."_
* _Website will allow for different topping prices for different topping categories._
  * _Example input: Input a medium pizza with mushrooms and chicken._
  * _Example output: "You ordered a medium pizza with mushrooms and chicken. Your total price comes out to $15.13."_
* _Website will adjust the price of toppings based on the size of the pizza._
  * _Example input: Input a large pizza with mushrooms and onions._
  * _Example output: "You ordered a large pizza with mushrooms and onions. Your total price comes out to $17.00." (bigger increase than plain medium to medium with mushrooms and onion)_
* _Website will round prices to two digits._
  * _Example input: Input an extra large pizza with mushrooms, ham, and extra sauce._
  * _Example output: "You ordered an extra large pizza with mushrooms, ham and extra sauce. Your total price comes out to $22.56."_

## Setup/Installation Requirements

* _Clone this Repository._
* _Open index.html in your browser of choice._

## Support and contact details

_For support find me at Epicodus._

## Technologies Used

_This website was created using HTML, CSS, the Bootstrap CSS file, Javascript, and the jQuery javascript file._

### License

*MIT License*

*Copyright (c) 2019 Young Liu*

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

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

*THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*

repository: youngzliu/orderPizza

repo_name: youngzliu/orderPizza


text:
---
title: Unity dependency injection for ASP.Net
categories: .Net
tags: ASP.Net, Dependency Injection, Unity, WCF
date: 2010-05-19 15:39:13 +10:00
---

I’ve been wanting to get dependency injection happening for ASP.Net pages like I have for WCF service instances (see [here][0] and [here][1]). The solutions that I found on the net use combinations of abstract ASP.Net pages or Global.asax with an IHttpModule. I didn’t like these solutions because it is messy to make multiple changes to your application to introduce a single piece of functionality.

My version uses a single IHttpModule without any other dependencies. The only impact on the application is to configure the module in web.config.

My UnityHttpModule looks like the following.

<!--more-->

```csharp
using System;
using System.Diagnostics.Contracts;
using System.Web;
using System.Web.UI;
using Microsoft.Practices.Unity;

namespace Neovolve.Toolkit.Unity
{
    public class UnityHttpModule : IHttpModule
    {
        private static readonly Object _syncLock = new Object();

        private static IUnityContainer _container;

        public void Dispose()
        {
            DestroyContainer();
        }

        public void Init(HttpApplication context)
        {
            AssignContainer(UnityContainerResolver.Resolve);

            context.PreRequestHandlerExecute += OnPreRequest;
            context.PostRequestHandlerExecute += OnRequestCompleted;
        }

        private static void AssignContainer(Func<IUnityContainer> getContainer)
        {
            Contract.Ensures(_container != null, "Container was not created");

            if (_container != null)
            {
                return;
            }

            lock (_syncLock)
            {
                // Protect the container against multiple threads and instances that get past the initial check
                if (_container != null)
                {
                    return;
                }

                _container = getContainer();
            }
        }

        private static void DestroyContainer()
        {
            Contract.Ensures(_container == null, "Container was not destroyed");

            if (_container == null)
            {
                return;
            }

            lock (_syncLock)
            {
                // Protect the container against multiple threads and instances that get past the initial check
                if (_container == null)
                {
                    return;
                }

                _container.Dispose();
                _container = null;
            }
        }

        private static void OnPreRequest(Object sender, EventArgs e)
        {
            ProcessUnityAction(sender, page => _container.BuildUp(page.GetType(), page, null));
        }

        private static void OnRequestCompleted(Object sender, EventArgs e)
        {
            ProcessUnityAction(sender, page => _container.Teardown(page));
        }

        private static void ProcessUnityAction(Object sender, Action<Page> unityAction)
        {
            if (sender == null)
            {
                throw new ArgumentNullException("sender");
            }

            if (unityAction == null)
            {
                throw new ArgumentNullException("unityAction");
            }

            if (HttpContext.Current == null)
            {
                return;
            }

            Page page = HttpContext.Current.Handler as Page;

            if (page == null)
            {
                return;
            }

            unityAction(page);
        }

        public static IUnityContainer Container
        {
            get
            {
                return _container;
            }

            set
            {
                AssignContainer(() => value);
            }
        }
    }
}
```

The UnityHttpModule calls into a UnityContainerResolver helper class to resolve the unity container. The code for UnityContainerResolver can be found [here][2].

The instancing behaviour of IHttpModule must be considered for this implementation as we only want a single container to be used. Many instances of a IHttpModule type get created within an application pool. This is because there are many HttpApplication instances created to satisfy multiple requests for a site. Each HttpApplication instance has it own set of modules. A thread lock is used in this module to protect the static container while it is being assigned or destroyed. The creation of the container happens when the first IHttpModule across any of the the HttpApplications is initialized and the disposal happens when the first IHttpModule is disposed. All other creations and disposals are ignored.

Once created, this module builds up pages with injection values and then tears them down again when the pages are finished with their request processing.

The following is an example ASP.Net page that uses property injection.

```csharp
using System;
using System.Configuration;
using System.Security.Cryptography;
using System.Text;
using System.Web.UI;
using Microsoft.Practices.Unity;

namespace Neovolve.Toolkit.Unity.WebIntegrationTests
{
    public partial class _Default : Page
    {
        protected void Page_Load(Object sender, EventArgs e)
        {
            if (HashCalculator == null)
            {
                throw new ConfigurationErrorsException("Unity was not used to build up this page");
            }

            String valueToHash = Guid.NewGuid().ToString();
            Byte[] valueInBytes = Encoding.UTF8.GetBytes(valueToHash);
            Byte[] hashBytes = HashCalculator.ComputeHash(valueInBytes);

            Original.Text = valueToHash;
            HashValue.Text = Convert.ToBase64String(hashBytes);
        }

        [Dependency]
        public HashAlgorithm HashCalculator
        {
            get;
            set;
        }
    }
}
```

The property injection for this page is configured via the web.config. The following example also includes the configuration for the module for both classic and integrated IIS pipeline modes.

```xml
<?xml version="1.0" ?>
<configuration>
    <configSections>
        <section name="unity"
                    type="Microsoft.Practices.Unity.Configuration.UnityConfigurationSection, Microsoft.Practices.Unity.Configuration"/>
    </configSections>
    <unity>
        <containers>
            <container>
                <register type="System.Security.Cryptography.HashAlgorithm, mscorlib"
                            mapTo="System.Security.Cryptography.SHA256CryptoServiceProvider, System.Core, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>
            </container>
        </containers>
    </unity>
    <system.web>
        <compilation debug="true"
                        targetFramework="4.0"/>
        <authentication mode="None"></authentication>
        <httpModules>
            <add type="Neovolve.Toolkit.Unity.UnityHttpModule"
                    name="UnityHttpModule"/>
        </httpModules>
    </system.web>
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false"/>
        <modules runAllManagedModulesForAllRequests="true">
            <add type="Neovolve.Toolkit.Unity.UnityHttpModule"
                    name="UnityHttpModule"/>
        </modules>
    </system.webServer>
</configuration>
```

The beauty of the way Unity is used here is that you do not need to configure each page that uses injection in the Unity configuration. Only the types being injected need to be defined. There are however a few things to note about this usage:

* Properties (and their types) that accept injected values must be public
* Properties that accept injected values must be decorated with the Dependency attribute.
* Named Unity containers are not supported.
* Non-standard Unity section configuration names are not supported (must use “unity”)

The only part I do not like about this implementation is that the Unity Dependency attribute must be assigned to the ASP.Net page properties that will use injection. This couples the ASP.Net application to Unity. I suppose a Unity extension could be written to bypass this behaviour, but the attribute is no doubt there for a good reason. My guess is that it caters for scenarios where properties have an associated type in the Unity config but are not intended to have values injected.

The full code for this module with xml comments can be found on my [Toolkit project][3] in Codeplex.

[0]: /2010/05/15/unity-dependency-injection-for-wcf-services-e28093-part-1/
[1]: /2010/05/17/unity-dependency-injections-for-wcf-services-e28093-part-2/
[2]: http://neovolve.codeplex.com/SourceControl/changeset/view/58851#1195163
[3]: http://neovolve.codeplex.com/SourceControl/changeset/view/58941#1216713

license: MIT,Unlicense

detected_licenses: MIT Unlicense

gha_language: SCSS


text:
# Create new organization

This procedure shows you how to create a new organization and new spaces for it.

1. Navigate to _User management > Manage organizations_.

9. Choose the _Add organization_ tab.

9. Specify a new name of the organization.

9. Click the _Submit_ button.

![](https://github.com/trustedanalytics/platform-wiki/blob/963aaac53281783f4adda9ec98601ce51785be5b/wikiImages/TAP_create_new_organization.png)

# Add new space

This procedure shows you how to add a new space within an existing organization.

1. Navigate to _User management > Manage organizations_.

9. Choose an organization for management.

9. Specify a new name for the space.

9. Click the _Add Space_ button.

![](https://github.com/trustedanalytics/platform-wiki/blob/963aaac53281783f4adda9ec98601ce51785be5b/wikiImages/TAP_create_new_space.png)

repository: rodorad/platform-wiki-notes

repo_name: rodorad/platform-wiki-notes


text:
# Vos - Virtual Operating System

Small abstraction over Operating System, mainly it should be used in conjunction with [Virtual File System][vfs] tool. Kind of
Capistrano but without extra stuff and more universal, not forcing You to follow 'The Rails Way'.

Currently, there are following implementations available:

- local os
- remote os (over ssh)

## Installation

```bash
$ gem install vos
```

## Code samples:

```ruby
gem 'vos'                                         # Virtual Operating System
require 'vos'

server = Box.new('cool_app.com')                  # it will use id_rsa, or You can add {user: 'me', password: 'secret'}

server.bash 'ls'                                  # ls /
server['apps/cool_app'].bash 'rails production'   # cd /apps/cool_app && rails production
```

For more details look also to [Virtual File System][vfs] project.
Or checkout configuration I use to control my production servers [My Cluster][my_cluster] in conjunction with small
configuration tool [Cluster Management][cluster_management].

## License

Copyright (c) Alexey Petrushin http://petrush.in, released under the MIT license.

[vfs]: http://github.com/alexeypetrushin/vfs
[cluster_management]: http://github.com/alexeypetrushin/cluster_management
[my_cluster]: http://github.com/alexeypetrushin/my_cluster

repository: momolog/vos

repo_name: momolog/vos


text:
# Marchers protest alleged police brutality in Brooklyn subway melee

Published at: **2019-11-02T00:37:19+00:00**

Author: **Eyewitness News**

Original: [ABC7 New York](https://abc7ny.com/marchers-protest-alleged-police-brutality-after-nyc-subway-melee/5665470/)

NEW YORK (WABC) -- About 1,000 people protesting what they say is New York police brutality marched through downtown Brooklyn, chanting "no justice, no peace!"
The peaceful protesters filled main avenues Friday evening as they passed the Barclays Center arena where the Brooklyn Nets play. The march came several days after a video emerged on social meida showing police officers fighting with teenagers inside city subway stations.
Marchers say they oppose what they consider over-policing of the subway system.
The protest comes after a period in which the New York Police Department has been under scrutiny for several shootings of armed civilians.
No arrests were reported on Friday.
A 15-year-old punched by a police officer during the subway melee in Brooklyn is filing a notice for a lawsuit against the officer and the NYPD.
Officers trying to break up the fight punched Benjamin Marshall in the face.
On Wednesday the teenager and his parents gathered at the law office of attorney Sanford Rubenstein to announce the filing of a $5 million notice of claim against the city.
Police brass placed the officer, assigned to the 84th Precinct, on non-enforcement duty as the investigation continues.(The Associated Press contributed to this report.)

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
# Getting Started with Jenkins Pipelines as Code

This repository contains

* a shell script to run Jenkins in a Docker container,
* a simple front end that can be hosted in the form of static files,
* a simple back end that can deployed in the form of a Docker container, and
* a Jenkinsfile that declares the pipelines for continuous integration and continuous deployment of these apps.

Before running `run-jenkins-with-docker.sh`, change the line that reads `-v /Users/lucengelen/Repositories:/Users/lucengelen/Repositories \` so that the folder where you keep your repositories is accessible from the Docker container.
This allows you to use file URLs to point Jenkins to Git repositories on you local machine.
This, in turn, makes it possible to quickly test changes to your Jenkinsfile without pushing those changes.
If that's not something you'd want to do, simply remove the line.

repository: ljpengelen/jenkinsfile

repo_name: ljpengelen/jenkinsfile


text:
---
layout: post
title: E-commerce design strategy
category: Digital
excerpt: Retaining loyal customers in a time of transformation
tags: [ecommerce, design strategy, ux, product design]
cta: {label: "ipon.hu", link: "http://www.ipon.hu "}
year: 2016
---

🏢 A Hungarian top 10 e-commerce company (50k visits per day, €30K in revenue).

⚡ Our client opted for complete website redesign for two reasons:

- Once catering to a niche market, our client decided to introduce a wider range of offerings.
- They acquired an online magazine recently, which had to be integrated into their existing content strategy.

💡 I led the month-long design strategy phase, and utilized a combination of qualitative and quantitative methods with heavy emphasis on data analysis to map the webstore's current customer base and their attitude towards the current website and towards the proposed changes.

1. Strategy
	- scoping
    - research planning
	- crunching CRM data (purchase history based segmentation)
	- contextual inquiries,
	- quantitative research (GA, surveys, behaviour-based segmentation, Customer Effort Score, perception-based segmentation) to back up insights with data,
	- qualitative followup (card sort, interviews, usability tests),
	- customer journey mapping,
	- establishing KPIs

2. Brand identity: brand strategy, look and feel, content marketing strategy
3. UX/UI: page flows, wireframes, UI designs, implementation support

✌ The cross-examination of CRM-, behavioural- and perception-based segmentation painted a picture of  drastically different customer groups. To accommodate the needs of both, our client had to make some difficult choices.

👥 As an independent consultant in partnership with Why Partners, a boutique product design agency

repository: thefranciscook/webportfolio

repo_name: thefranciscook/webportfolio


text:
# Mobile_Robot
Mobile Robot controlled  via WiFi(VNC)

keyboard_control.py file is used for controlling.

Robot Images:
![alt text](https://github.com/jsmithrovitch118/Mobile_Robot/blob/main/img/robot.jpeg "Robot Image 1")


text:
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.1.5] - 2021-02-09

-  Take into account the globally set API version.

## [0.1.4] - 2020-10-15

### Fixed

-   Update operations are now correctly included in transactions.

## [0.1.3] - 2020-10-15

### Changed

-   Changed the folder structure and package contents to match common pratices.

## [0.1.2] - 2020-10-15

Updated dependencies.

## [0.1.1] - 2020-10-15

### Added

-   Preserve the order of items in a transact write operations wrt the result returned by AppSync (#9a91c11).

## [0.1.0] - 2020-10-15

The initial version.

[unreleased]: https://github.com/futuratrepadeira/ribosome/compare/v1.1.3...HEAD
[0.1.4]: https://github.com/futuratrepadeira/ribosome/releases/tag/v0.1.4
[0.1.3]: https://github.com/futuratrepadeira/ribosome/releases/tag/v0.1.3

repository: umani/ribosome

repo_name: umani/ribosome


text:
make it work
=======
**is mysql installed? does it have a DB named "forge"?**

1. clone
2. composer install https://getcomposer.org/doc/00-intro.md
3. install gdal
  * Ubuntu
    * apt-add-repository ppa:ubuntugis/ubuntugis-unstable
    * apt-get update
    * apt-get install gdal-bin
  * Fedora
    * sudo yum install gdal
    * sudo yum install gdal-python
4. import shape files into mysql (do this from the project directory)
  * `ogr2ogr -overwrite -progress -f "MySQL" MYSQL:forge,user=root -lco ENGINE=MyISAM tl_2014_53_sldl.shp`
5. install sphinx
  * sudo add-apt-repository ppa:builds/sphinxsearch-rel22
  * sudo apt-get update
  * sudo apt-get install sphinxsearch
5. get json stuff into Sphinx
  * from the json_legs directory: `sudo bash make_tsv.sh`
6. run migrations
  * `php artisan migrate`
7. play!
  * create a new user, login, comment on bills

##next steps##
1. make "following" work (follow comments made by other users)
2. clean up css shit (move it off of the layout blade template into the css file and make sure everything there is necessary)
3. learn more about models, make sure the right code is in the right place (controllers vs. models... gotta figure this shit out)
4. improve style (make it simple as hell)

repository: ByThePeoplesDotCom/project

repo_name: ByThePeoplesDotCom/project


text:
# Athletics Results Visualization

Athletics Results Visualization is a Django app built to visualize athletics results of individual athletes
It curretnly uses data from the [HKSSF](http://www.hkssf-hk.org.hk/) website.
It uses chart.js as the javascript plotting tool.

## Set up

1. Start Django Project

  ``` bash
  django-admin startproject ath_res_vis_project
  cd ath_res_vis_project
  ```

2. Clone the git repository

  ``` bash
  git clone https://github.com/cameronlai/ath_res_vis
  ```

3. Edit settings.py in your project folder

  ``` bash
  cd ath_res_vis_project
  nano settings.py
  ```

  > Add 'ath_res_vis' in INSTALLED_APPS
  > Add 'ath_res_vis/static/', in STATICFILES_DIR

4. Edit urls.py in your project folder

  ``` bash
  nano urls.py
  ```

  > Add url(r'$^', include('ath_res_vis.urls')), to urlpatterns

5. Run migrations with manage.py

  ``` bash
  cd ../
  python manage.py migrate
  ```

6. Dump athletics results data into Database

   - The data used are in PDF formats and they are copied into text files.
   - process_data.py parses the data into a sqlite database format.
   - export_sql.py copies the data from one database file to another.
   - Data can be found from this [link](http://www.hkssf-hk.org.hk/hk/sec/events/ath.htm).
   - You may write your own parser and reuse the web visualization part for other data.

## Running Django app

1. Run server

  ``` bash
  python manage.py runserver
  ```

2. Launch web browser, enter correct IP address (Default is <IP_ADDRESS>:8000) and your app is running.

## Database format

   The database is in the following format as in models.py

Field Name | Description
------------ | -------------
Name	| Name of the athelete
School	| Name of the school the athlete is representing
Event	| Name of the event the athelete completed (e.g. 100m)
Sex	| Sex of the atehlete
Result	| Results of the athelete (either in seconds or meteres)
Date	| Date of the event completion
IsTrack	| True = Track event, False = field event

## Dependencies

- Chart.js

## License

The app is released under the MIT License and more information can be found in the LICENSE file.

## Contributions

ath_res_vis is a project to help people visualize athletics results more easier, instead of looking up multiple PDF / old text formats.
Contributions for improvements and bug fixes are sincerely welcome!


text:
# braucher/puppet 1.4.0

This image is based off of ubuntu-upstart. It contains puppet, librarian-puppet, and the deep_merge rubygem.

## Usage
/puppet-apply is the default entrypoint. This script runs puppet apply with verbose output and returns 0 if all manifests are applied successfully, non-zero otherwise.

## Development
See DEVELOPMENT.md

## License
MIT license

repository: jwbraucher/docker-puppet

repo_name: jwbraucher/docker-puppet


text:
# The Note Taker App!
![Note Taker Screenshot Image](./public/assets/images/screenshot.png)
Live URL: https://shrouded-wildwood-94524.herokuapp.com/

## Description
This app allows users to keep track of simple notes!
## Table of Contents
- [Usage](#usage)
- [Credits](#credits)
- [License](#license)

## Badges
![license](https://img.shields.io/badge/license-MIT-blue)

## Usage

Simply enter a note and click the save icon in the upper right hand corner of the screen!

## Credits

Created by [d606n6k](https://github.com/d606n6k)

## License
License: MIT

## Features
- easily take notes and retrieve them for later!

## How to Contribute
If you would like to contribute to this project, please fork the project as needed.

## Questions
Have any questions for the author? Contact this author via<EMAIL_ADDRESS>
Check out the author's [Github](https://github.com/d606n6k)


text:
# Emoji Badges for VS Code

Snippets to insert emoji badges to your markdown file. These are shields.io badges boosted with emojis 😎

[![Build status](https://clydedsouza.visualstudio.com/Emoji%20Badges%20VS%20Code/_apis/build/status/Emoji%20Badges%20VS%20Code%20Master)](https://clydedsouza.visualstudio.com/Emoji%20Badges%20VS%20Code/_build/latest?definitionId=25)
![Azure DevOps coverage](https://img.shields.io/azure-devops/coverage/clydedsouza/Emoji%20Badges%20VS%20Code/25.svg)
![Azure DevOps tests](https://img.shields.io/azure-devops/tests/clydedsouza/Emoji%20Badges%20VS%20Code/25.svg)
![LGTM Grade](https://img.shields.io/lgtm/grade/javascript/github/ClydeDz/emoji-badges-vscode.svg?logo=lgtm)
[![Maintainability](https://api.codeclimate.com/v1/badges/25cc71185468b2209a85/maintainability)](https://codeclimate.com/github/ClydeDz/emoji-badges-vscode/maintainability)
![MIT License](https://img.shields.io/static/v1.svg?label=📜%20License&message=MIT&color=informational)
[![Tweet about this](https://img.shields.io/static/v1.svg?label=Tweet%20about%20this&message=🎵&color=blue&logo=twitter&style=social)](https://ctt.ac/5ET9U)

## Examples
Here are some examples of emoji badges. You can find the complete list of badges [here](https://github.com/ClydeDz/emoji-badges-vscode/blob/master/list-of-badges.md).

[![Follow author profile on Amazon](https://img.shields.io/static/v1.svg?label=Follow%20me%20on%20Amazon&message=📖&color=FF9900&logo=amazon&logoColor=white)](https://www.amazon.com/Michelle-Obama/e/B07B436TLF)
[![Add to Firefox](https://img.shields.io/static/v1.svg?label=Add%20to&message=Firefox%20🦊&color=431a7f&labelColor=ff3129)](https://addons.mozilla.org/en-US/firefox/addon/grammarly-1/)
[![npm install](https://img.shields.io/static/v1.svg?label=Install%20chalk&message=🎁&logo=npm&style=social)](https://www.npmjs.com/package/chalk)

![Demo GIF](https://raw.githubusercontent.com/ClydeDz/emoji-badges-vscode/master/images/demo-gif.gif)

## Release notes
For detailed release notes, please refer to [this page](https://github.com/ClydeDz/emoji-badges-vscode/releases).

## Credits
Emoji Badges for VS Code (c) 2019 [Clyde D'Souza](https://clydedsouza.net)
Badge service by [Shields.io](https://shields.io/)
Emoji's by [Emojipedia.org](https://emojipedia.org/)


text:
# 🔮 Apollo iOS Roadmap

**Last updated: July 2022**

For up to date release notes, refer to the project's [Change Log](https://github.com/apollographql/apollo-ios/blob/main/CHANGELOG.md).

> **Please note:** This is an approximation of **larger effort** work planned for the next 6 - 12 months. It does not cover all new functionality that will be added, and nothing here is set in stone. Also note that each of these releases, and several patch releases in-between, will include bug fixes (based on issue triaging) and community submitted PR's.

## ✋ Community feedback & prioritization

- Please report feature requests or bugs as a new [issue](https://github.com/apollographql/apollo-ios/issues/new/choose).
- If you already see an issue that interests you please add a 👍 or a comment so we can measure community interest.

---
## 0.x - _Current_

This version is being used in many Production codebases, and we're committed to resolving issues and bugs raised by the community. We are not considering any further substantial work to be done in this version.

These are the three guiding principles we aim for in each major release:

- **Stability**: Achieve a stable foundation that can be trusted for years to come, maintaining backwards compatibility within major version releases.
- **Completeness**: There are three main parts to the SDK: code generation, network fetching/parsing, and caching. These must provide enough functionality to be a good foundation for incremental improvements within major releases without requiring breaking changes.
- **Clarity**: Everything must be clearly documented with as many working samples as possible.

## 1.0 - _In Beta release phase_

[Beta 1 is available](https://github.com/apollographql/apollo-ios/releases/tag/1.0.0-beta.1), please try it and give us your feedback.

These are the major initiatives planned for 1.0/1.x:

- **Swift-based Codegen**: The code generation is being rewritten with a Swift-first approach instead of relying on scripting and Typescript. This will allow easier community contribution to code generation and provide the opportunity to improve various characteristics such as generated code size and performance.
- **Modularized GraphQL Code Generation Output**: To support advanced usage of Apollo iOS for modular code bases in a format this is highly configurable and agnostic of the dependency management and build system used. This should be achieved while maintaining the streamlined process for the default usage in unified code bases.

See Github [1.0 Beta Milestone](https://github.com/apollographql/apollo-ios/milestone/62) for more details.

## 2.0

These are the major initiatives planned for 2.0/2.x:

- **Networking Stack Improvements**: The goal is to simplify and stabilise the networking stack.
    - The [updated network stack](https://github.com/apollographql/apollo-ios/issues/1340) solved a number of long standing issues with the old barebones NetworkTransport but still has limitations and is complicated to use. Adopting patterns that have proven useful for the web client, such as Apollo Link, will provide more flexibility and give developers full control over the steps that are invoked to satisfy requests.
    - We would love to bring some of the new Swift concurrency features, such as async/await, to Apollo iOS but that depends on the Swift team's work for backwards deployment of the concurrency library. It may involve Apollo iOS dropping support for macOS 10.14 and iOS 12.

See Github [2.0 Milestone](https://github.com/apollographql/apollo-ios/milestone/60) for more details.

## 3.0

These are the major initiatives planned for 3.0/3.x:

- **Cache Improvements**: Here we are looking at bringing across some features inspired by Apollo Client 3 and Apollo Kotlin
    - Better pagination support. Better support for caching and updating paginated lists of objects.
    - Reducing over-normalization. Only separating out results into individual records when something that can identify them is present
    - Real cache eviction & dangling reference collection. There's presently a way to manually remove objects for a given key or pattern, but Apollo Client 3 has given us a roadmap for how to handle some of this stuff much more thoroughly and safely.
    - Cache metadata. Ability to add per-field metadata if needed, to allow for TTL and time-based invalidation, etc.

This major release is still in pre-planning, more details will come in the future.

## Future

These are subject to change and anything that dramatically changes APIs or breaks backwards compatibility with versions will be reserved for the next major version.

- **Wrapper libraries**. A very highly voted suggestion in our fall 2019 developer survey was wrapper libraries for concurrency helpers like RxSwift, Combine, PromiseKit, etc.
    - Note that we are **not** locked into any particular set of other dependencies to support yet, but we anticipate these will be wrappers in a separate repository that have Apollo as a dependency. As individual wrappers move into nearer-term work, we'll outline which specific ones we'll be supporting.

repository: JoeMatt/apollo-ios

repo_name: JoeMatt/apollo-ios


text:
---
title: Introducing SHanC - A Static Hacker News Clone
date: '2018-05-26'
banner: ./images/featured-image-2.jpg
published_at: '2018-05-26T18:33:11.000Z'
tags: showdev
author: Sung M. Kim
---

I read [Hacker News](https://news.ycombinator.com/) (HN hereafter) daily. The way I read is that, I _**skim through**_ titles and open 5~10 stories and actually read 2~5.

Two problems I have with HN.

1. Each HN page shows 30 stories only and
2. having to click on "more" for a post-back seemed too much of a pain

_And I don't need real-time updates of the story._

So I created [SHaNc](https://shanc.netlify.com/), a Static page Hacker News clone.

I will only introduce you SHaNc in this article. Details on how it was built and problems faced while building it will be discussed in the next post.

### ❓ Why?

It solves two problems mentioned above.

1. Skimming through 30 pages at a time takes focus away
2. Loading next page with a post-back is slow

SHaNc loads all stories in one page (solves the first problem) and fast as it's a static page _and also learn [GatsbyJS](https://www.gatsbyjs.org/) & [Styled Components](https://www.styled-components.com/) along the way._

### 🤷 What?

SHaNc is a static page, which displays all stories (Best & New story pages planned), which solves both problems - loads all stories & fast (for being a static page).

A static page is by definition doesn't change. So the page is rebuilt every hour on the hour. _So you will probably be at most 1 hour behind._

### 🤔 How about other static HN clones? 😕

There are other two awesome static HN clones.

1. [Nuxt Hacker News](https://hn.nuxtjs.org/news)
2. [Hacker Next](https://next-news.now.sh/)

They are fast but I still had the problem of having to load next page manually, which takes your focus away.

### 🏭 Tech Stack & Architecture

Nothing fancy.

1. [GatsbyJS](https://www.gatsbyjs.org/) - a static site generator using [ReactJS](https://reactjs.org/)
2. [Styled Components](https://www.styled-components.com/) - CSS in JS
3. [Netlify](https://www.netlify.com/) - deployment & Build WebHook
4. [Azure Functions](https://azure.microsoft.com/en-us/services/functions/) - triggering site build via Build WebHok every hour

Hand-drawn on a piece of paper 😝.

\[caption id="attachment\_1028" align="alignleft" width="1024"\]![architecture](./images/architecture.jpg) SHaNc architecture\[/caption\]

### 🏃♂ Parting Words

If you have a similar HN reading style, I hope [SHaNc](https://shanc.netlify.com/) can help to address your problems.

Please leave a feedback, issues, suggestion on [GitHub page](https://github.com/dance2die/SHANc/issues) (MIT licensed).