text:
---
layout: post
header-img: img/default-blog-pic.jpg
author: rrawat
description:
post_id: 9185
created: 2011/06/20 18:07:32
created_gmt: 2011/06/20 13:07:32
comment_status: open
---

# Is Scala really Faster than Java?

Recently published [paper][1] from Google benchmarking different languages. It shows Scala to be faster compared to Java. I attempted to run the same benchmarks this weekend and am publishing my observations in this Blog. Observations in the blog may have been already made in the Google paper and by the developers involved.

This topic was discussed in [Scala debate mailing list][2] and i really appreciate the answer given by Martin Odersky. Analysis in Google paper attributes the lesser time taken by Scala to lesser time spent in garbage collection. Martin(and Google Analysis) also hints at use of ArrayList in java implementation(due to lack of typed Arrays) as the main culprit for lower speed of Java code. Martin did not compare the pro versions saying the implementations were not comparable.

My basic ( starter) understanding of Functional programming tells me that there should be more object churn in a functional language (implementation) and thus Scala should have trouble with GC not the Java implementation. I am looking forward to an explanation for this.

This debate seems a familiar one of whether Java is faster than C/C++. Thinking logically if some language is built on some other language then the derived language can be at most as fast as the underlying language. So how can Scala be faster than Java (after all Scala runs on JVM)? Going back to Java/C/C++ debate, it may sometimes be possible that the Hotspot generated code is faster as compared to hand written native code. So this brings in the human factor, a Scala program may perform as good as a Java program purely because of the programming model offered by Scala or Under the Hood optimizations.

I checked out the ```
[3] for the benchmark , removed the -X UseCompressedOops setting as it was not available on my machine. I created a script to record -gcutil data from jstat utility and added it to run _target_ in the MakeFiles. Data from jstat was then plotted using gnuplot.

A few basic assumptions/notes first: 1\. Programs were run using no special GC settings. So given equivalent type of code (Basic and Pro versions) and same environment which one would run fast. 2\. Comparisions are purely from a Garbage collection point of view, they do not account for implementation differences(Martin's point on pro versions). 3\. Observations do not discount the warm up period of the benchmark (but observations here are not absolute anyway).

**Observations:**

****_Java and Scala basic versions:_

1\. Java implementation uses more memory (by comparing max memory before full GC) 2\. Java code spends more time in garbage collection (nothing new here). 3\. GC Analysis

For Java Implementation GC Count java: 119 (minor & major) Full GC Count java: 20 (major) GC Time: Young : Full : Total 31.495 21.131 52.626

For Scala Implementation GC Count scala: 77 Full GC Count scala: 5 GC Time: Young : Full : Total 8.419 2.625 11.044

4\. Time collecting the young generation is significantly more in Java (more temporary objects) 5\. Size of old generation keeps on building till the Full GCs and much migher compared to scala implementation.

These facts reflect the different big difference in implemantation details as the number of objects being created differ a lot between the implementations. Finer points like use of while being better than for loop.

_Java and Scala Pro versions_

1\. GC Analysis

For Java Pro Implementation: GC Count java_pro: 31 Full GC Count java_pro: 1 GC Time: Young : Full : Total 3.623 0.286 3.910

For Scala Pro Implementation: GC Count scala_pro: 18 Full GC Count scala_pro: 3 GC Time: Young : Full : Total 1.261 0.781 2.042

2\. Java implementation spends a lot of time in collecting Young generation (object churn). 3\. There is nothing much to read in size of old generations but a marked difference in Java Pro implementation is that the old generation becomes constant in size like the scala one.

**So what is the conclusion.**

It seems that difference in implementations is the cause for difference in the time taken by Java/Scala programs.  This is reflected in the different object creation patterns for the implementations. As you can see in the graphs below that the Java pro implementation managed to get similar old generation size patterns as to Scala. I have not gone in the details of implementations to be able to comment on why.

Like they say for cricket statistics, "they hide more than they reveal". It won't be fair to conclude that Scala is faster than Java in all cases. But having a language like Scala which provides better abstractions on top the existing JVM is great. Great work by guys at Google to create a benchmark which evaluates different aspects of a language.

But i am still looking for an answer on why there is more object churn in Java implementation compared to Scala (where i would expect a lot of immutables to be created).

PS: Results shown are only for a single run. Tests were run multiple time and in randon order by a script, but the general trends were same.

Update: Discussion on Hacker News (http://news.ycombinator.com/item?id=2678353)

![][4]
![][5]

Java - Scala (old generation)
Java Pro & Scala Pro Old generation

![][6]
![][7]

Java Scala ( Time take for collecting young generation)
Java Pro & Scala Pro ( time taken for collecting young generation)

   [1]: http://research.google.com/pubs/archive/37122.pdf
   [2]: http://groups.google.com/group/scala-debate/browse_thread/thread/d42777ef7834517c
   [3]: http://code.google.com/p/multi-language-bench/
   [4]: http://xebee.xebia.in/wp-content/uploads/2011/06/java-scala-old-generation1-300x225.png (Java - Scala (old generation))
   [5]: http://xebee.xebia.in/wp-content/uploads/2011/06/java_pro-scala_pro-old-generation1-300x225.png (Java Pro & Scala Pro Old generation)
   [6]: http://xebee.xebia.in/wp-content/uploads/2011/06/java-scala-y-gc-300x225.png (Java Scala ( Time take for collecting young generation))
   [7]: http://xebee.xebia.in/wp-content/uploads/2011/06/java_pro-scala_pro-y-gc-300x225.png (Java Pro & Scala Pro ( time taken for collecting young generation))

## Comments

**[novitaOnCT2](#5629 "2011-06-20 18:36:12"):** Hi, I think the link you've provided for the paper published by Google in the first line is broken.

**[Age](#5630 "2011-06-20 22:55:47"):** Nice post. The link to the source code is broken though. I get a 404 from Google Code.

**[Ravindra](#5632 "2011-06-21 09:08:44"):** Yes, and that code already had generics in it. Martin has not taken this benchmark as marketing opportunity as others would probably have. PS: thanks to Novita & Age for pointing out the broken links.

**[Iwein Fuld](#5634 "2011-06-21 14:18:23"):** On your final question about a lot of immutables being created: Many developers know that object creation has a price tag and they conclude that code that creates a lot of objects must perform worse than code that reuses mutable objects. There are two reasons to let go of this assumption: 1\. Creating objects is dead cheap. It used to be more expensive in Java 1.3 or thereabouts, but not anymore. Garbage collection has improved a lot to a point where in most cases object creation is pretty much the last thing you need to worry about. 2\. Guarding mutable state is more expensive than creating objects. An API that pushes developers towards immutability pushes them towards better performing code, usually. In essence it all comes down to wether you put your trust in your own wits, or in the garbage collector. I have learned to go for the latter.

**[Ravindra](#5635 "2011-06-21 15:04:33"):** Totally agree with you on trusting GC. That is why the functional languages are back today. My question as around a non functional (Java) implementation generating more object churn. A few points like foreach creating a new Object in each loop (Java Tunings section of the paper)

**[eevilspock](#5636 "2011-06-21 20:12:27"):** Java is not built "on top" of C/C++. It compiles to JVM bytecode which is JIT compiled to native machine code. Likewise Scala is not built on top of Java. It compiles to JVM bytecode. So, "thinking logically", it is entirely possible that Scala tends to compile to more efficient bytecode than Java.

**[eevilspock](#5640 "2011-06-21 23:14:43"):** This article is getting many more comments on Hacker News: http://news.ycombinator.com/item?id=2678353

**[Jonathan](#5641 "2011-06-22 01:04:54"):** I was able to bump the Java version's speed significantly by adding equals/hashcode to the BasicBlock class and enabling the following JVM option: -XX:+UseCompressedStrings There's more optimizations that can be done... I guess the point of the paper was to show how ridiculously complex C++ is vs Java, and that Scala was a good compromise. In no way was it "Google's opinion" either... which a lot of people are taking it as.

**[Anand](#5645 "2011-06-22 19:22:43"):** This is a good analysis Rawat. Great job.

**[Gaurav Marwaha](#5719 "2011-07-15 21:01:40"):** As an article used to publish findings of re-run of Google test on a machine which was probably not 64bit & multi-core this is fine. But the results cannot be used further to decide which language to choose if someone want to make a decision. Choosing between languages is a tricky topic which may need further analysis of features provided by Scala like multi-core support and around Ruby...

**[Bap](#8044 "2012-03-26 18:38:50"):** Heya i'm for the first time here. I came across this board and I in finding It really helpful & it helped me out a lot. I'm hoping to give one thing back and aid others like you helped me.


text:
# Ultimate Guide to Sneaker Bot Creation 👟 (2021 Edition)

```Ultimate Guide to Sneaker Bot Creation 👟 . Very rare and valuable informations which is presented in this free guide, so please consider leaving a star to encourage me for future updates and open-source projects/tutorials.```

---

## 1. Creating your Sneaker Bot

---

### The two types of Sneaker Bots

There are two types of sneaker bot and web bot in general:

- Browser-like Bot which works through modules and libraries that offers the control of headless browser (Puppeteer, Selenium...)
- Request-Based Bot which sent requests directly to the server. For these types of bot modules such as Axios are often used.

---

### The Most Important Tool: Chrome devTools

When getting into the creation of Sneaker Bot, the most important skill you need to know is how to use the Chrome devTools.

For Browser-like bot, you will need to use the elements panel in order to get the right selector or XPath for the HTML Element that you want to target.

Meanwhile, for request-based bot you will need to use the network panel, in order to analyse the requests that get sent from the website to the server (when adding a product to the cart for example).

---

## 2. Obsfucating Bot Activity

---

### HTTP Headers

### Proxies and why are they essentials

### Port-scanning

---

## 3. Creating your user interface

---

### Electron

---

### Tkinter

---

### React

---

## 4. Deploying your Sneaker Bot

---

### Heroku

---

### Google Cloud Functions

---

## 5. Sneaker Bot Marketplace

---

### Discord

---

license: MIT

branch_name: refs/heads/main

extension: md

gha_license_id: MIT

license_type: permissive


text:
# Introduction

For our basic usage introduction, we will be testing `httpbin.org` interface. If you have not yet installed Athena, refer to Athena project page.

# Project Setup

To start using Athena, we'll need to setup a directory, where we will save our tests into.

```
myteam-tests/
├── HttpBinTest.php
├── Report
├── phpunit.xml
└── athena.json
```

`athena.json` is where Athena reads the configuration from. In this case we will contain only the necessary information for a simple API test run.

`Report/` directory is where the HTML report, generated by Athena, will be output.

## The `report`

One of our goals is to debug what actions were performed by the HTTP Client. We don't need too much detail, but enough to understand what happened, specially in case something goes wrong.

```json
{
   "report" : {
      "format" : "html",
      "outputDirectory" : "./Report"
   }
}
```

Setting up a report is fairly easy, you just have to define the `report.format`, and `report.outputDirectory`. We will make use of our `./Report` directory to keep things nice and tidy.

## The Listeners

In order to have the Report working, we need to register Athena listeners, this can be done through `phpunit.xml`.

```xml
<?xml version="1.0" encoding="UTF-8"?>
<phpunit>
    <listeners>
        <listener class="\Athena\Event\Adapter\PhpUnitAdapter">
            <arguments>
                <object class="\Athena\Event\Dispatcher\DispatcherLocator"/>
            </arguments>
        </listener>
    </listeners>

    <testsuites>
        <testsuite name="api">
            <directory>./</directory>
        </testsuite>
    </testsuites>
</phpunit>
```

# Writing a Test

```php
namespace Tests;

use Athena\Test\AthenaAPITestCase;

class HttpBinTest extends AthenaAPITestCase
{
    public function testIpEndpoint_PerformGetRequest_ShouldContainOrigin()
    {

    }
}
```

At the first glance, it looks fairly standard: A namespace, a parent class and a big self-explanatory method name.

## The Namespace

One of the caveats of writing a test in Athena, is the namespace. It should—always—start with—`Tests\`.
Internally Athena will map `Tests\` to your testing directory.

This behaviour gives you freedom to choose how you organise the directory, where you store your tests.

## The Parent Class

Another close look to the code will make our parent class, `AthenaAPITestCase` stand-out, and you'll ask yourself what it does, if you didn't, you have now. When building our tests we should—always—include Athena's test cases.

Each type of test is wrapped with a Athena class of it's own, as you can imagine, this introduces custom behaviour when needed. I won't cover here all the types, as the focus is our Browser test case. After completing the guide, I recommend you giving them a—quick—look.

## The Method Name Convention

Adopting conventions, in most situations, is a good idea. This keeps things consistent, making it easier to read.

We follow the `MethodName_StateUnderTest_ExpectedBehavior` convention. If you are interested in knowing more about it, refer to the [Coding Standards](../fundamentals/conventions.md) page.

Food for though: If you have however spent a lifetime using a different convention, you can always use your own. At the end of the day, it doesn't matter, consistency for the reader is the key. Is what we strive for. Easy and understandable tests.

## Performing HTTP Calls

Athena brings a client for HTTP calls, which can be accessed through `Athena::api()`. This client provides a fluent interface for not only performing these calls, but also to perform assertions on the response given by the server.

```php
namespace Tests;

use Athena\Athena;
use Athena\Test\AthenaAPITestCase;

class HttpBinTest extends AthenaAPITestCase
{
    public function testIpEndpoint_PerformGetRequest_ShouldContainOrigin()
    {
        $result = Athena::api()
                            ->get('http://httpbin.org/ip')
                            ->then()
                            ->assertThat()
                            ->responseIsJson()
                            ->statusCodeIs(200)
                            ->retrieve()
                            ->fromJson();

        $this->assertArrayHasKey('origin', $result);
    }
}
```

The good thing about this fluent interface, is that it's self-explanatory what we want to retrieve and what assertions we are performing.

# Execute The Test

Athena runs it's tests through the command line interface, so we'll need to navigate inside Athena's project directory, to access it's executable.

```bash
$ athena php api
...

usage: athena php api <tests-directory> <config-file> [<options>...] [(<phpunit-options>|<paratest-options>)...]

    <tests-directory>                 This directory will be mounted inside the docker container. PHPUnit will be executed inside this directory
    <config-file>                     Athena config file, with proxy configurations, grid options, etc
    --parallel=<number>               Specify the number of jobs to be ran in parallel. In case this options is specified, Paratest will be ran, instead of PHPUnit
    --php-version=<version>           Switch between available PHP versions. E.g. --php-version=7.0
    --override-athena-dependencies    Override PHP plugin dependencies with the ones found inside the tests directory
    --restore-athena-dependencies     Restore PHP plugin original dependencies
```

Writing `athena php api` and hitting enter, will show you the basic usage, on the requirements to run a browser test case. Most likely by now you already know the next steps.

```bash
$ athena php api ../myteam-tests ../myteam-tests/athena.json
```

Once you run that command, if it is your first time running athena, you'll most likely see a lot of input. This is athena setting up it's docker images.

When it's all completed, or you are running the command a second time, after having everything installed, you should see the following:

```bash
...

PHPUnit 5.1.7 by Sebastian Bergmann and contributors.

.                                                                   1 / 1 (100%)

Time: 753 ms, Memory: 3.75Mb

OK (1 test, 1 assertion)
```

# Reading The Report

In our configuration file, we've specified `Report/` as our output directory for the report file, so that where we will be looking for it.

Open `report.html` in your browser, and you should see nice HTML report containing all the steps we took, together with HTTP conversation for each one.

# Configure a Proxy

When `athena php api` is run, it will try to automatically link with a running Proxy Server (`athena proxy start`).

In case `--skip-proxy` exists, the link will not be performed.

For performing a link with another running container, you can optionally specify `--link-proxy=<container_name>`.

# Parallel Tests

```bash
$ athena php api my-tests/ my-tests/athena.json --parallel=<number> [<paratest-options>...]
```

```bash
$ athena php api my-tests/ my-tests/athena.json --parallel=2
```

## All Available Options

```bash
$ athena php api my-tests/ my-tests/athena.json --parallel --help
...

Usage:
  paratest [options] [--] [<path>]

Arguments:
  path                                   The path to a directory or file containing tests. (default: current directory)

Options:
  -p, --processes=PROCESSES              The number of test processes to run. [default: 5]
  -f, --functional                       Run methods instead of suites in separate processes.
      --no-test-tokens                   Disable TEST_TOKEN environment variables. (default: variable is set)
  -h, --help                             Display this help message.
      --coverage-clover=COVERAGE-CLOVER  Generate code coverage report in Clover XML format.
      --coverage-html=COVERAGE-HTML      Generate code coverage report in HTML format.
      --coverage-php=COVERAGE-PHP        Serialize PHP_CodeCoverage object to file.
  -m, --max-batch-size=MAX-BATCH-SIZE    Max batch size (only for functional mode). [default: 0]
      --filter=FILTER                    Filter (only for functional mode).
      --whitelist=WHITELIST              Directory to add to the coverage whitelist.
      --phpunit=PHPUNIT                  The PHPUnit binary to execute. (default: vendor/bin/phpunit)
      --runner=RUNNER                    Runner or WrapperRunner. (default: Runner)
      --bootstrap=BOOTSTRAP              The bootstrap file to be used by PHPUnit.
  -c, --configuration=CONFIGURATION      The PHPUnit configuration file to use.
  -g, --group=GROUP                      Only runs tests from the specified group(s).
      --exclude-group=EXCLUDE-GROUP      Don't run tests from the specified group(s).
      --stop-on-failure                  Don't start any more processes after a failure.
      --log-junit=LOG-JUNIT              Log test execution in JUnit XML format to file.
      --colors                           Displays a colored bar as a test result.
      --testsuite[=TESTSUITE]            Filter which testsuite to run
      --path=PATH                        An alias for the path argument.
```

Once the option --parallel is set, under hood paratest will replace phpunit.

# Final Thoughts

If you are reading this tutorial is either because you want to use it or you are curious about it. Let—that—guide you into our community, make this project grow, make it better, iterate over it several times and share your ideas and your knowledge, so that you, us, who use this project benefit from it.

repository: athena-oss/plugin-php

branch_name: refs/heads/master

gha_language: PHP

repo_name: athena-oss/plugin-php


text:
# Infinity Expansion
This addon aims to add a larger endgame to slimefun by adding 'Infinity Ingots' which take an extreme amount of resources and energy to create, and are used to craft extremely powerful machines and gear.

# Features

Adds lots of endgame items and grind aswell as some methods for reaching that point.

# Download
https://thebusybiscuit.github.io/builds/Mooy1/InfinityExpansion/master/

[![Build Status](https://thebusybiscuit.github.io/builds/Mooy1/InfinityExpansion/master/badge.svg)](https://thebusybiscuit.github.io/builds/Mooy1/InfinityExpansion/master)

If you would like your own local server, check out my guide here:

https://github.com/Mooy1/InfinityExpansion/wiki/How-to-make-a-Slimefun-Server

# Texture Pack

Texture Pack that adds texture for most items in this addon, requires optifine:

https://github.com/Mooy1/InfinityExpansion/releases/tag/v1

# Requirements
Minecraft Version: 1.16+ (Paper recommended)

https://papermc.io/downloads

Slimefun Version: DEV 786+

[![Build Status](https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/master/badge.svg)](https://thebusybiscuit.github.io/builds/TheBusyBiscuit/Slimefun4/master/)

CS-CoreLib Version: DEV 92+

[![Build Status](https://thebusybiscuit.github.io/builds/TheBusyBiscuit/CS-CoreLib/master/badge.svg)](https://thebusybiscuit.github.io/builds/TheBusyBiscuit/CS-CoreLib/master/)

# Bugs/Suggestions
Make a new issue or pull request and contact me on discord @Riley#5911

Join the Slimefun Discord: https://discord.com/invite/slimefun

repository: ZeeRaider/InfinityExpansion

repo_name: ZeeRaider/InfinityExpansion


text:
# DogBone v1.2

DogBone is a program that creates custom tool paths for Fused Filament Fabrication
3D printers (also known by the trade marked term FDM). The motivation for creating
this program was to allow the user to independently adjust as many printing
parameters as possible for the purpose of researching and characterizing each
parameter's effect on a part's properties.

Version 1 can only toolpath single profile parts (parts which can be extruded).
[Version 2](https://github.com/VanHulleOne/DogBoneV2)
can also toolpath STL files.

Through the parameters.py module you can adjust a large group of printing parameters.
Most parameters can be adjusted for each
individual layer. The program contains some methods to make it easier to print
multiple parts.

## Dependencies
NumPy

## Getting Started
After downloading the zip file and extracting it in an appropriate location either
open the parameters.py file in your preferred Python IDE or with a text editor
(I prefer Notepad++)*. The user adjustable printing parameters are broken into
five sections:

* [Part](#part-parameters)

* [Layer](#layer-parameters)

* [File](#file-parameters)

* [Misc](#misc-parameters)

* [Printer](#printer-parameters)

Parameters which are in Python lists [enclosed in square brackets] can very varied
between either parts or layers depending on which parameter set they are located.
For **_part parameters_** _the longest list determines_ **_how many_** _parts are printed_
all other parameters a cycled until the longest list is exhausted. For layer parameters
the parameters are cycled until the specified number of layers have been printed.

### Part Parameters
Part parameters are parameters that are constant throughout a single part but can
change between parts (except for outline). The longest list of part parameters
determines how many parts will be created. The part parameters are:

* outline

* solidity ratio

* print speed (mm/min)

* shift X

* shift Y

* number of layers

#### Outline
The outline of the part to be made. An outline must be of type Shape. The doneShapes
module contains several methods which return pre-defined shapes. Only one outline
is allowed.

#### Solidity Ratio
Solidity ratio is used to calculate the extrusion rate for each layer.

`extrusion_rate = solidity_ratio*layer_height*nozzle_diameter/filament_area`

#### Print Speed mm/min
Print speed is how fast in millimeters per minute the print head moves while printing.
It seems most slicing software uses mm/sec but the G-code the slicing software sends to the printer
is still defined in mm/min so that is the default I have chosen.

#### Shift X and Shift Y
To print multiple parts without them attempting to occupy the same space you
must use Shift X and Shift Y. These shifts are absolute shifts (they are not relative
to the previous shift). Since it does not make sense to have two parts printed in the
same location at least one of these two parameters should be the longest list of
part parameters and therefore will determine how many parts are printed.

#### Number of Layers
How many layers are printed in the part. The layer parameters are continuously
cycled until this number is reached for the part being printed. They are then reset
for the next part.

### Pattern and Design Type
Custom infill patterns can be designed for the part. The pattern must be of
type LineGroup. The pattern is extended by copying the design and then
connecting the start of the first line in the copy to the end of the last of
the original and saving that as the new original. This process is repeated
until the design is sufficiently longer than the outline. This whole new
line group is then copied and translated in Y by `pathWidth` until a full
field is created. Please read the comments in the
[InFill](https://github.com/VanHulleOne/DogBone/blob/master/InFill.py)
module for more details.

### Layer Parameters
Layer parameters are unique to each layer of a part. Each list of parameters is
cycled until the Number of Layers for the part is met. The lists are then started
over at the start of the next part. The layer parameters are:

* Infill Angle (degrees)

* Path Width (mm)

* Layer Height (mm)

* Infill Shift X (mm)

* Infill Shift Y (mm)

* Number of Shells

* Trim Adjust (mm)

#### Infill Angle degrees
The angle of the infill for the part. Zero (0) degrees is in the positive X direction
with the angles moving around in the counter clockwise direction.

#### Path Width mm
The distance between the centerlines of two adjacent passes. This is an orthogonal
distance, not a normal distance. If you had a zig-zag infill pattern
v^v^v^v when that pattern is turned into a field it would only be shifted
in the Y direction by path width. If the angle were 90 degrees that would mean
a path width of 1.0mm would create a normal distance of 0.707mm which will
then effect your solidity ratio.

#### Number of Shells
The number of shells you want around the part. Shells are created by a
normal offset `pathWidth` away from the previous shell/outline. Version 1
of the program does not handle shells very well. When two non-adjacent lines
cross (like when the gage section of a dogbone tensile specimen crosses before the grips are fully filled)
it pretty much blows up. Sometimes is gets mad even when that doesn't happen.
Version 2 of this program uses Shapely to fix this problem. Keep in mind that
to tool path the infill properly a trim shell is created by the program. For example
if three shells are prescribed a fourth trim shell is created inside the third
shell to properly trim the infill. If this extra trim shell has problems, Explosion.

### File Parameters
* outputFileName - The name of the output Gcode file
* start_Gcode_FileName - Name of the file which contains all of the starting
Gcode commands
* end_Gcode_FileName - File with end Gcode commands

### Misc Parameters
* filamentDiamter (mm)- The diameter of the incoming filament.
* nozzleDiamter (mm) - Nozzle outlet diameter

### Printer Parameters
These are parameters used by the printer while not actually printing

* RAPID (mm/min) - How fast the printer should move when not printing

  * The [RepRap wiki (9 July 2016)](http://reprap.org/wiki/G-code#G0_.26_G1:_Move)
says "The RepRap firmware spec treats G0 and G1 as the same command,
since it's just as efficient as not doing so." I strongly disagree with this statement.
A G01 is a feed command and as such needs an F value to know how fast to move.
A G00 command should be a rapid command where the printer knows its max velocity
and therefore does not require an F feed rate. Because of the RepRap design choice G00
needs a feed rate command requiring the programmer/operator to know each
individual machine's max speed and creates larger programs by needing the
additional text on every G00 line. How is that just as efficient?
* TRAVERSE_RETRACT (mm) - how far to retract the filament to prevent nozzle
drool when traversing around the part.
* MAX\_FEED\_TRAVERSE (mm) - if the move to the next printing position is less than
this value the head is not lifted up, no filament retract is performed, and it is moved
at the print velocity.
* Z_CLEARANCE (mm) - Relative clearance height to which the head is moved when
traversing the part.
* APPROACH_FR (mm/min) - Speed the printer should move when approaching the part.
A slightly slower speed helps prevent hard crashes and allows the filament more
time to move forward in the nozzle in preparation for printing.

## *Notepad++
If you have Python and the appropriate dependencies installed you can use
Notepad++ to edit the parameters.py files and then run the program with
Python. To do this in the menu bar select Run-> Run (F5) type the following:

`<your python path>\python.exe -i "$(FULL_CURRENT_PATH)"`

`<your python path>` is the actual path to python. For me Python was in my
Anaconda3 folder. `FULL_CURRENT_PATH` is a variable in Notepad++ so type
that exactly. On my computer the full command was:

`C:\Anaconda3\python.exe -i "$(FULL_CURRENT_PATH)"`

Now select save. For a command I chose ctrl-r and hit ok. Now you can edit
the parameters.py file, **save the changes** (if you do not save the changes
then it will run the old changes, which can be confusing) and finally hit your
hot keys (ctrl-r). Notepad++ will call Python and run your program.

repository: VanHulleOne/DogBone

repo_name: VanHulleOne/DogBone


text:
# APEX API Java Security Utility
[![Build Status](https://travis-ci.org/GovTechSG/java-apex-api-security.svg?branch=master)](https://travis-ci.org/GovTechSG/java-apex-api-security)
[![Coverage Status](https://coveralls.io/repos/github/GovTechSG/java-apex-api-security/badge.svg?branch=master)](https://coveralls.io/github/GovTechSG/java-apex-api-security?branch=master)
[![Known Vulnerabilities](https://snyk.io/test/github/govtechsg/java-apex-api-security/badge.svg)](https://snyk.io/test/github/govtechsg/java-apex-api-security)

A java helper utilities that form HTTP security header for authentication and verification

## Getting Started
Include this helper class in your java project to perform API Security operations

This project use Maven or Gradle as its build and management tools

### Maven Guide

+ Download and Install Maven (3.5.0 or above)
+ Java (1.8)

#### Build

**Option 1:** Compile and package into JAR

```bash

mvn package

```

The compiled _jar_ file will be located in the **target** folder
+ java-apex-api-security-<version>-SNAPSHOT.jar
+ java-apex-api-security-<version>-SNAPSHOT-jar-with-dependencies.jar (this includes log4j libraries)

Import this jar file into your java classpath to use the utility class

**Option 2:** Compile and install the package into your local maven repository

```bash
mvn install
```

1. The compiled _package_ file will be installed under _com.api.util.ApiSecurity_ in the .m2 repo

1. For Maven Client Project setup, add the following dependencies to your pom.xml file :

```xml
<dependency>
    <groupId>com.api.util</groupId>
    <artifactId>ApiSecurity</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>

```

**Note:**
* This project is leveraging on _slf4j-log4j12_ framework for the logging. If you are using logging implementation other than log4j, you can change to other type of implementation such as nop,simple,jdk14,logback. You could replace the following xml in pom.xml.
* If your are using Log4j _Version2_, please refer to [Log4j2-SLF4J Binding](https://logging.apache.org/log4j/2.x/log4j-slf4j-impl/index.html)

```xml
<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-log4j12</artifactId>
    <version>1.7.25</version>
</dependency>

```

### Gradle Guide

+ Download and Install Gradle (4.0 or above)
+ Java (1.8)

#### Preparation
As some of the test cases contains UTF-8 characters, you have to set following property before the JVM execute the Gradle Daemon.

```bash
export GRADLE_OPTS="-Dfile.encoding=utf-8"
```

#### Build
**Option 1:** Compile and package into JAR

```bash
gradle clean build
```

#### Test
To test with Jacoco and publish a html report

```bash
gradle test jacocoTestReport
```

The compiled _jar_ file will be located in the **build/libs** folder
+ java-apex-api-security-1.0-SNAPSHOT.jar

Import this jar into your java classpath to use the utility class

**Option 2:** Compile and install the package into your local maven repository

1. Refer to Maven Guide > Build > Option 2, for the maven repo installation (excluding Maven Client Project setup)

1. For Gradle Client Project setup, add the following dependencies to your build.gradle file :

```text
repositories {
    mavenLocal()
}
dependencies {
    compile group: 'com.api.util', name: 'ApiSecurity', version: '1.0-SNAPSHOT'
}

```

#### Development

##### Preparing Signature BaseString :

Method:
* getBaseString

Params:
* authPrefix - Authorization Header scheme prefix , i.e 'prefix_appId'
* signatureMethod
* appId - App ID created in Gateway
* urlPath
* httpMethod
* formList - only needed for Content-Type: application/x-www-form-urlencoded
* nonce - set to null for random generated number
* timestamp - set to null for current timestamp

```java
String url = "https://<<URL>>/api/v1/?param1=first&ab-param2=123";

ApiList formList = new ApiList();
formList.add("param1", "data1");

String baseString;

try {
baseString = ApiSigning.getBaseString(
    "<<authPrefix>>",
    "HMACSHA256",
    "<<appId>>",
    url,
    "post",
    formList,
    "6584351262900708156",
    "1502184161702"
);

System.out.println(baseString);

} catch (ApiUtilException e) {
    e.printStackTrace();
}

```

##### Preparing HMACSHA256 L1 Security Signature :

Method:
* getHMACSignature

Params:
* baseString
* secret

```java
String baseString = "GET&https://<<URL>>/api/v1/&ap=裕廊坊 心邻坊&<<authPrefix>>_app_id=<<appID>&<<authPrefix>>_nonce=2851111144329605674&<<authPrefix>>_signature_method=HMACSHA256&<<authPrefix>>_timestamp=1502163903712&<<authPrefix>>_version=1.0";
String secret = "<<appSecret>>";
String L1Sig;

try {
    L1Sig = ApiSigning.getHMACSignature(baseString, secret);
    System.out.println(L1Sig);

} catch (ApiUtilException e) {
    e.printStackTrace();
}

```

##### Preparing RSA256 L2 Security Signature :

Method:
* getRSASignature

Params:
* baseString
* privateKey

```java
String baseString = "GET&https://<<URL>/api/v1/&ap=裕廊坊 心邻坊&<<authPrefix>>_app_id=<<appId>>&<<authPrefix>>_nonce=7231415196459608363&<<authPrefix>>_signature_method=SHA256withRSA&<<authPrefix>>_timestamp=1502164219425&<<authPrefix>>_version=1.0&oq=c# nunit mac&q=c# nunit mac";
String alias = "alpha";
String password = "<<passphrase>>";
String keyStoreFileName = "certificates/ssc.alpha.example.com.p12";
String publicCertFileName = "certificates/ssc.alpha.example.com.cer";

try {

    PrivateKey privateKey = ApiSigning.getPrivateKeyFromKeyStore(keyStoreFileName, password, alias);

    String signature = ApiSigning.getRSASignature(baseString, privateKey);

    System.out.println(expectedSignature);
    System.out.println(signature);

    PublicKey publicKey = ApiSigning.getPublicKeyFromX509Certificate(publicCertFileName);

} catch (ApexUtilLibException e) {
    e.printStackTrace();
}

```

##### Preparing HTTP Signature Token :

Append this signature token into the Authorization header of the HTTP request

Params:
* realm
* authPrefix - Authorization Header scheme prefix , i.e 'prefix_appId'
* httpMethod
* urlPath
* appId - App ID created in Gateway
* secret - set to null for REST L2 SHA256WITHRSA
* formList
* password
* alias
* fileName
* nonce - set to null for random generated number
* timestamp - set to null for current timestamp

```java
String url = "https://<<URL>>/api/v1/?ap=裕廊坊%20心邻坊";
String certFileName = "certificates/ssc.alpha.example.com.p12";
String password = "<<passphrase>>";
String alias = "alpha";
String appId = "<<appId>>";
String secret = null;
ApiList formList = null;
String nonce = null;
String timestamp = null;

try {
    String signature = ApiSigning.getSignatureToken("http://api.test.io/l2", "<<authPrefix>>", "get", url, appId, null, null, password, alias, certFileName, nonce, timestamp);
} catch (ApiUtilException e) {
    e.printStackTrace();
}
```

### Contributing
+ For more information about contributing PRs and issues, see [CONTRIBUTING.md](CONTRIBUTING.md).

### Release
+ See [CHANGELOG.md](CHANGELOG.md).

### Reference:
+ [UTF-8 in Gradle](https://stackoverflow.com/questions/21267234/show-utf-8-text-properly-in-gradle)
+ [SLF4J FAQ](https://www.slf4j.org/faq.html)
+ [Akana API Consumer Security](http://docs.akana.com/ag/cm_policies/using_api_consumer_app_sec_policy.htm)
+ [RSA and HMAC Request Signing Standard](http://tools.ietf.org/html/draft-cavage-http-signatures-05)

repository: ecquaria/java-apex-api-security

repo_name: ecquaria/java-apex-api-security


text:
# 🚀 Welcome to my awesome webpack template!

[![made-with-webpack](https://img.shields.io/badge/Made%20with-webpack-1f425f.svg)](http://golang.org) ![webpack version](https://img.shields.io/badge/webpack-v5.6.0-blue) ![babel 7](https://img.shields.io/badge/Babel%20-7-yellow) [![PyPI license](https://img.shields.io/pypi/l/ansicolortags.svg)](https://pypi.python.org/pypi/ansicolortags/)

This project has been created to show a simple welcome message only but the aim of it is to have a **webpack** code template that can be reused anytime later to generate an NPM package and a vanilla JS library from one source code. You can run the development env and use demo no. 1 (using React JS example) by:

```
npm install
npm run start
```

or run build for the production env and use demo no. 2 (using vanilla JS example):

```
npm install
npm run build
```

## Publish as NPM Package:

1. you need to have an npm account. Create one here if you don’t have one yet.
2. you need to login to your npm account through the command line. (You need to have Node and npm installed on your system before you perform this step. Install them here). You can now do npm Login and pusblish

```
npm login
npm publish — access public
```

## Publish as Github Package:

Github package repository is a software package hosting service that allows you to host your software packages privately or publicly and use packages as dependencies in your projects. You can publish npm, gem, mvn, nuget, gradle, docker packages and is currently in beta.

You can publish an npm package to the github package respository by changing the following in the `package.json` file:

```
"name": "@halaq/package-name",
  "publishConfig": {
    "registry": "https://npm.pkg.github.com/"
  },
  "repository": {
    "url"<EMAIL_ADDRESS>  }
```

then login to the github npm registry by the following commands in the terminal:

```
npm login --registry=https://npm.pkg.github.com --scope=@halaq
```

@halaq is the username of your github account. Executing this query will ask for username and password. Username is your github username. Password is Personal Access Token which can be generated from your github account settings page.

Run npm publish command:

```
npm publish
```

This will publish the project as npm module to github repository. The github repository link is @halaq/webpack-template . The module will be published in the scoped mode.

repository: halaq/webpack-template

repo_name: halaq/webpack-template


text:
# WW-FORM-CHECKBOX

This is an element for Weweb, to display a checkbox.

## Installation

To run locally, first install all dependencies with `npm install`.

## Start

To serve locally, run `npm run serve --port=[PORT]`, and then go to Weweb editor, open developper popup and add localhost:[PORT] as custom element.

## Build

Before release, you can check build error by running `npm run build --name="ww-form-checkbox" --type="element"`

repository: weweb-assets/ww-form-checkbox

gha_language: Vue

repo_name: weweb-assets/ww-form-checkbox


text:
Table of Contents
=================

  * [Assembly](#assembly)
    * [Basic Assembly](#basic-assembly)
    * [Canned assembly (shellcraft)](#canned-assembly-shellcraft)
    * [Command-line Tools](#command-line-tools)
      * [asm ](#asm)
      * [disasm ](#disasm)
      * [shellcraft ](#shellcraft)
    * [Foreign Architectures](#foreign-architectures)
      * [Canned Assembly](#canned-assembly)
      * [Command-line Tools](#command-line-tools-1)

# Assembly

Pwntools makes it very easy to perform assembly in almost any architecture, and comes with a wide variety of canned-but-customizable shellcode ready to go out-of-the-box.

In the [`walkthrough`](walkthrough) directory, there are several longer shellcode tutorials.  This page gives you the basics.

## Basic Assembly

The most basic example, is to convert assembly into shellcode.

```py
from pwn import *

print repr(asm('xor edi, edi'))
# '1\xff'

print enhex(asm('xor edi, edi'))
# 31ff
```

## Canned assembly (`shellcraft`)

The `shellcraft` module gives you pre-canned assembly.  It is generally customizable.  The easiest way to find out which `shellcraft` templates exist is to look at the [documentation on RTD](https://pwntools.readthedocs.org/en/latest/shellcraft.html).

```py
from pwn import *
help(shellcraft.sh)
print '---'
print shellcraft.sh()
print '---'
print enhex(asm(shellcraft.sh()))
```
```
Help on function sh in module pwnlib.shellcraft.internal:

sh()
    Execute /bin/sh
---
    /* push '/bin///sh\x00' */
    push 0x68
    push 0x732f2f2f
    push 0x6e69622f

    /* call execve('esp', 0, 0) */
    push (SYS_execve) /* 0xb */
    pop eax
    mov ebx, esp
    xor ecx, ecx
    cdq /* edx=0 */
    int 0x80
---
6a68682f2f2f73682f62696e6a0b5889e331c999cd80
```

## Command-line Tools

There are three command-line tools for interacting with assembly:

- `asm`
- `disasm`
- `shellcraft`

### `asm`

The asm tool does what it says on the tin.  It provides several options for formatting the output.  When the output is a terminal, it defaults to hex-encoded.

```
$ asm nop
90
```

When the output is anything else, it writes the raw data.

```
$ asm nop | xxd
0000000: 90                                       .
```

It also takes data on stdin if no instructions are provided on the command line.

```
$ echo 'push ebx; pop edi' | asm
535f
```

Finally, it supports a few different options for specifying the output format, via the `--format` option.  Supported arguments are `raw`, `hex`, `string`, and `elf`.

```
$ asm --format=elf 'int3' > ./int3
$ ./halt
Trace/breakpoint trap (core dumped)
```

### `disasm`

Disasm is the opposite of `asm`.

```
$ disasm cd80
   0:    cd 80                    int    0x80
$ asm nop | disasm
   0:    90                       nop
```

### `shellcraft`

The `shellcraft` command is the command-line interface to the internal `shellcraft` module.  On the command-line, the full context must be specified, in the order of `arch.os.template`.

```
$ shellcraft i386.linux.sh
6a68682f2f2f73682f62696e6a0b5889e331c999cd80
```

## Foreign Architectures

Assembling for a foreign architecture requires that you have an appropriate version of `binutils` installed.  You should see [installing.md](installing.md) for more information on this.  The only change that is necessary is to set the architecture in the global context variable.  You can see more information about `context` in [context.md](context.md).

```py
from pwn import *

context.arch = 'arm'

print repr(asm('mov r0, r1'))
# '\x01\x00\xa0\xe1'

print enhex(asm('mov r0, r1'))
# 0100a0e1
```

### Canned Assembly

The `shellcraft` module automatically switches to the appropriate architecture.

```py
from pwn import *

context.arch = 'arm'

print shellcraft.sh()
print enhex(asm(shellcraft.sh()))
```
```
    adr r0, bin_sh
    mov r2, #0
    mov r1, r2
    svc SYS_execve
bin_sh: .asciz "/bin/sh"

08008fe20020a0e30210a0e10b0000ef2f62696e2f736800
```

### Command-line Tools

You can also use the command line to assemble foreign-arch shellcode, by using the `--context` command-line option.

```
$ asm --context=arm 'mov r0, r1'
0100a0e1
$ shellcraft arm.linux.sh
08008fe20020a0e30210a0e10b0000ef2f62696e2f736800
```

repository: FDlucifer/pwntools-tutorial

repo_name: FDlucifer/pwntools-tutorial


text:
# Fallout 3 Terminals Game

The repository contains solutions to a fallout-like terminal [hacking game](http://fallout.wikia.com/wiki/Terminal). As usual some liberties were taken with rules & solutions.

## List of solutions

* [Haskell](https://github.com/lambda-dojo-sofia/fallout-terminal/tree/master/haskell)
* [Common Lisp](https://github.com/lambda-dojo-sofia/fallout-terminal/tree/master/common-lisp)

## License

Copyright © 2017
Distributed under the MIT License

repository: lambda-dojo-sofia/fallout-terminal

repo_name: lambda-dojo-sofia/fallout-terminal


text:
# Home Automation
You can find here scripts to manage my home automation devices.
The most known script language for home automation is LUA.
With Domoticz, it's also possible to create events with Blockly or DzVent (LUA based).

# My configuration
I always wanted to automate my home, but product prices in France for devices like Fibaro or Z-wave are too expensive.
Since this summer, I knew Xiaomi brand and all cheap products available to make my dreams true!
So my installation is full based on Xiaomi products and free home automation system.

I use following parts:
- Xiaomi Gateway v2
  - For controlling all Xiaomi devices with ZigBee protocol
- Domoticz on a Raspberry Pi 3
  - The free home automation system
- Devices
  - Xiaomi Yeelight RGBW
  - Xiaomi Yeelight White
  - Xiaomi Yeelight Strip
  - Xiaomi Aqara Windows Door Sensor
  - Xiaomi Aqara Temperature Humidity Sensor
  - Xiaomi Aqara Human Body Sensor
  - Xiaomi Mi Magic Controller
  - Xiaomi Aqara Smart Light Switch

repository: BlackCatDeployment/Home-automation

repo_name: BlackCatDeployment/Home-automation


text:
# React-Portfolio

[![Github Pages](https://img.shields.io/badge/Heroku%20link-%40Adellis95-orange)](https://adellis95.github.io/React-Portfolio/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

## Description

A ReactJS refactor of my Portfolio. I created a portfolio using React because I want to set myself apart from other developers whose portfolios do not use some of the latest technologies.

## Table of Contents

- [Description](#description)
- [Acceptance-Criteria](#acceptance-criteria)
- [Preview](#preview)
- [License](#license)

## Acceptance Criteria

- Updated portfolio featuring 6 total projects

- Use React

- A `Header` component that appears on multiple pages

- A single `Project` component that will be used multiple times on a single page

- Navigation with React Router, dynamic rendering, or another third part router

- A `Footer` component that appears on multiple pages

- Update GitHub profile with pinned repositories featuring those same projects

- Deploy this site to GitHub Pages using the [Create React App docs for deployment.](https://create-react-app.dev/docs/deployment/#github-pages)

## Preview

![AboutMe](./src/assets/images/preview.png)
![AboutMe](./src/assets/images/project-preview.png)
![AboutMe](./src/assets/images/contact-preview.png)

## License

MIT License

Copyright (c) 2021 Austin Ellis

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

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

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


text:
# UML Class Diagram
## Class fields and methods

## Relationship Among Classes:
## Dependency
* Used to avoid tight coupling. See dependency injection.
* Enable loose coupling.
* Dog is passed to WashedAnimal only for a method. It might be discarded within the method.
* A dependency is a semantic connection between dependent and independent model elements.
* It exists between two elements if changes to the definition of one element (the server or target) may cause changes
to the other (the client or source).
* This association is uni-directional.
* Often not shown.

## Association
* One class knows about the other without being directly dependent, e.g. using attributes.
* A binary association (with two ends) is normally represented as a line. Usually shown with a line without arrows.
* For instance, Teacher and Student and related through school without being dependent.

* An association can link any number of classes. An association with three links is called a ternary association.
* An association can be named, and the ends of an association can be adorned with role names, ownership indicators,
multiplicity, visibility, and other properties.
* There are four different types of association: bi-directional, uni-directional, aggregation (includes composition
aggregation) and reflexive. Bi-directional and uni-directional associations are the most common ones.

## Aggregation
* Weak Has-A or Whole-Part Relationship
* Represented by a hollow diamond next to the class that is whole.
* This is called *weak* since the part instances can exist independently of the whole / container instances.
* For instance, Aggregation can occur when a class is a collection or container of other classes, but the contained classes do not have a strong lifecycle dependency on the container. The contents of the container are not automatically destroyed when the container is.
In the example below, the SimpleMessage objects are created independently and added to the collection in MultiMessage.

* Example: Lake has a slide, but the slide can exist independently out of the lake.

* Example: Library has Students and books. Here the student can exist without library, the relation between student
and library is aggregation.
## Composition
* Strong "Has-A" relationship
* Represented by a  filled diamond on the container / Whole class.

* Lifecycle of the part / contained class objects is controlled by the composing class.
Instances of part are created withing the (constructor of the) Composing class and destroyed by (the destructor) of
the Composing class.

* Example

* Difference between Aggregation adn Compositon

## Inheritance / Generalization
* This relationship is between classes themselves -- not between instances.

### Relation Notation

### Example

## References:
* Murphy's Lecture: https://www.youtube.com/watch?v=5Q0ZM6ODBHw
* MargretPosch: https://www.youtube.com/watch?v=BhEoV57nj0Q
* Derek Banas: https://www.youtube.com/watch?v=3cmzqZzwNDM
* Udacity: https://www.youtube.com/watch?v=LvDtFPcdOkg

repository: spinaki/design-patterns

repo_name: spinaki/design-patterns


text:
# AngularJS Website Builder

To help start web projects using AngularJS and the [Skeleton Sass framework](https://github.com/whatsnewsaes/Skeleton-Sass)

## Demo

You can see the builder in action here: [http://tim-giblin.github.io/angular-website-builder/](http://tim-giblin.github.io/angular-website-builder/)

## Installation

**Install bower dependencies (angular etc..) via command line:**
```javascript
 $ bower install
  ```

**Install node dependencies (gulp etc..) via command line:**
```bash
 $ npm install
  ```

**Move bower dependencies into a vendor folder using gulp:**

*This command also concatenates the vendor JS into a file called **bundle.js** and puts it into the Dist folder.*
 ```bash
 $ gulp build
  ```
**Watch** [(http://localhost:8080)](http://localhost:8080)
 ```bash
 $ gulp
  ```

## Usage

#### Gulp Config
You can alter the folder structure of the builder using the config variable in the [gulpfile.js](https://github.com/tim-giblin/angular-website-builder/blob/master/gulpfile.js#L14)
```javascript
var config = {
	appFolder : './app/',
	sassFolder : 'sass', // ./app/sass/
	cssFolder : 'css', // ./dist/css/
	jsFolder : 'js', // ./app/js/ or ./dist/js/
	vendorFolder : '/lib', // ./app/js/lib/
	outputFolder : './dist/',
	angularFolder: function() { return this.appFolder+this.jsFolder+'/app'}, // ./app/js/app/
	appJs : function() { return this.appFolder+this.jsFolder},
	appSass : function() { return this.appFolder+this.sassFolder },
	outputJs : function() { return this.outputFolder+this.jsFolder},
	outputSass : function() { return this.outputFolder+this.cssFolder },
};
```
#### Sass
Folder structure is based on the [Scooter framework](https://github.com/dropbox/scooter/tree/master/scss), some mixins have been taken from that framework also.
A great mixin is the [debug mixin](https://github.com/tim-giblin/angular-website-builder/blob/master/app/sass/mixins/_debug.scss) that gives you feedback in the DOM if a selector is used outside of a given context. So it detects misused elements in BEM. This feature can be toggled using the variable [here](https://github.com/tim-giblin/angular-website-builder/blob/master/app/sass/variables/_config.scss):
```sass
$debug: true;
```

#### Angular
The folder structure for the angular app is using the **Application Structure LIFT Principle**

`L`ocating our code is easy
`I`dentify code at a glance
`F`lat structure as long as we can
`T`ry to stay DRY (Don’t Repeat Yourself) or T-DRY

The angular build is also following the [angular style guide from john papa](https://github.com/johnpapa/angular-styleguide/blob/master/a1/README.md)

##### Routes
You can add extra routes in the [app.routes.js](https://github.com/tim-giblin/angular-website-builder/blob/master/app/js/app/app.routes.js) file:
```javascript
{
	title: 'home',
	config: {
		url: '/',
		templateUrl: 'home/home.html', //template location
		controller: 'HomeController as home',
		pageMeta: {
			title: 'Home', // meta title
			description: 'This is the homepage' // meta description
		},
		nav: true // adds the route to the top navigation
	}
}
```
##### Site Config
The website config can be changed in the [app.config.js](https://github.com/tim-giblin/angular-website-builder/blob/master/app/js/app/app.config.js) file:
```javascript
.constant('config', {
			title: 'Angular Website Builder',
			headerClass: 'pageheader' // Header class in base HTML
```

##### Site Pre-loader
The pre-loader will usually disappear once the controller has been activated and page loaded. However I have added a function that uses Angulars $q service and loads functions from the controller. Once they're returned thier promises it will remove the pre-loader and show the page.
This can be used like the following:
```javascript
(function() {
	'use strict';

	angular
		.module('website')
		.controller('AboutController', AboutController);

	AboutController.$inject = ['common']; // don't forget to inject the common module

	/* @ngInject */
	function AboutController(common) {
		var vm = this;
		vm.title = 'AboutController';
		activate();

		////////////////

		function activate() {
		    var test = common.$timeout(function() {
		        console.log('Pre-loader Finished');
            },3000); // load the test object into the activateController method.
			common.activateController([test], 'AboutController'); // after 3 seconds the pre-loader will finish and show 'Pre-loader Finished' in the console
		}
	}
})();
```
If the activateController method is empty it will load a 1 second delay between page loads:
```javascript
common.activateController([], 'AboutController');
```
This is because I've added a fake promise:

```javascript
function addFakePromise() {
    return $timeout(function() {
    },1000); // alter this timer for longer page transitions
}
```

## License
Released under the [MIT](https://github.com/tim-giblin/angular-website-builder/blob/master/LICENSE.md) license.

repository: tim-giblin/angular-website-builder

repo_name: tim-giblin/angular-website-builder


text:
# [Stargazer Workshop - Freelancer Landing Page](#)

[Freelancer Landing Page](#) is a landing page theme for [Bootstrap](http://getbootstrap.com/) created by [Stargazer Workshop](#). This smooth theme has a contact form, portfolio, copy, tesimonials, about and brands sections.

## Preview

[![Freelancer Landing Page Preview](#.jpg)](theme-url-preview)

**[View Live Preview](theme-url-preview)**

## Status

[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](stargazer-landing-page-licence-url)

## Download and Installation

To begin using this template, choose one of the following options to get started:
* [Download the latest release on Stargazer Workshop](url-to-theme)
* Clone the repo: `git clone `
* [Fork, Clone, or Download on GitHub](#)

## Usage

### Basic Usage

After downloading, simply edit the HTML and CSS files included with the template in your favorite text editor to make changes.  To preview the changes you make to the code, you can open the `index.html` file in your web browser.

### Advanced Usage

After installation, run `npm install` and then run `gulp watch` which will open up a preview of the template in your default browser, watch for changes to core template files, and live reload the browser when changes are saved. You can view the `gulpfile.js` to see which tasks are included with the dev environment.

#### Gulp Tasks

- `gulp` the default task that builds everything
- `gulp watch` browserSync opens the project in your default browser and live reloads when changes are made

You must have npm and Gulp installed globally on your machine in order to use these features.

## Copyright and License

Copyright 2013-2018 Stargazer Workshop Code released under the [MIT](url-to-licence) license.


text:
# GSync Flip Switch
Switches whichever mode your GSync monitor is in.  If GSync is off, it is turned on.

[![GSync Flip Switch Youtube Video](https://i.imgur.com/QuKjhE1.jpg)](https://www.youtube.com/watch?v=1w7AlD-x3vs "GSync Flip Switch Example Youtube Video")

## Requirements
* Linux kernel from the past 10 years
* Python >= 3.5 (And also in your path)
* Nvidia Driver >= 387.12
* nvidia-settings
* GSync Monitor

## Usage
Just run the .py file.

## Gotchas
* Running the tool back-to-back too quickly may cause settings to not be applied.
* Untested in multi-monitor setups.

## Why Disable GSync?
Many monitors that support GSync also support some sort of low motion blur mode (ULMB, LightBoost, DyAc, ELMB). GSync must be disabled to use these modes. Read more here: https://www.blurbusters.com/faq/motion-blur-reduction/

Not responsible for sudden death of monitor or any damage this may cause.

gha_language: Shell


text:
---
layout: single
author_profile: true
title: Publications
---

Journal Articles / Refereed Conference Proceedings
-------
+ F. Peng, T. Sandholm. Optimal learning of large Bayesian network structure using integer programming. Working paper

+ F. Peng, T. Sandholm. Scalable segment abstraction method for advertising campaign admission and inventory allocation optimization. In *Proceedings of the 25th International Joint Conference on Artificial Intelligence (IJCAI)*, 2016. Acceptance rate: <0.25

+ F. Peng, S. Jiang, H. E. Romeijn, and M. Epelman. VMATC: VMAT with Constant Gantry Speed and Dose Rate. *Physics in Medicine and Biology* 60 (2015), 2955-2979

+ F. Peng, A. Cohn, O. Gusikhin, and D. Perner. Algorithms for the Hybrid Fleet Vehicle Routing Problem. In *Proceedings of the 1st International Conference on Vehicle Technology and Intelligent Transport Systems*, 2015

+ Z. Tian, F. Peng, M. Folkerts, J. Tan, X. Jia, and S. Jiang. Multi-GPU implementation of a VMAT treatment plan optimization algorithm. *Medical Physics* 42, 2841 (2015)

+ F. Peng, X. Jia, X. Gu, M. Epelman, H. E. Romeijn, and S. Jiang. A New Column Generation Based Algorithm for VMAT Treatment Plan Optimization. *Physics in Medicine and Biology* 57 (2012), 4569-4588

Book Chapters
-------
+ Z. Tian, Q. Gautier, X. Gu, C. Men, F. Peng, M. Zarepisheh, Y. J. Graves, A. Uribe-Sanchez, X. Jia, and S. B. Jiang. SCORE System for Online Adaptive Radiotherapy. Chapter in: *Applications of GPU-based High Performance Computing in Radiation Therapy*, Xun Jia and Steve Jiang, editors. Taylor and Francis (2015)

+ F. Peng, Z. Tian, H. E. Romeijn, and C. Men. VMAT Treatment Plan Optimization. Chapter in: *Applications of GPU-based High Performance Computing in Radiation Therapy*, Xun Jia and Steve Jiang, editors. Taylor and Francis (2015)

Patents
-------
+ Automated allocation of media campaign assets to time and program in digital media deliverysystems, T. Sandholm, F. Peng, J. Dickerson, *U.S. Patent 9,699,502*, July 2017

Other
-------
+ F. Peng, Optimization Methods for Volumetric Modulated Arc Therapy and Radiation Therapy Under Uncertainty. *Ph.D. thesis*, University of Michigan, 2013

+ F. Peng, K. Rashid, and B. Couet, Robust optimization methods for oilfield problems under uncertainty. *Technical Report OFSR/2012/132/MMC*, Schlumberger-Doll Research


text:
---
type: category
title: Rules to Better CRM – Mail Merge
guid: 6f1ddbe6-e0b9-4898-930e-a77f7cc7a2a0
uri: rules-to-better-crm-mail-merge
index:
- do-you-know-how-to-edit-a-mail-merge-template
- how-to-send-email-using-microsoft-dynamics-365-mail-merge-template
- how-to-insert-crm-data-field-in-your-template
- do-you-know-how-to-create-mail-merge-template-in-microsoft-crm-2011

---

What is mail merge? Mail merge lets you incorporate data from CRM and create customisable documents (in this case, email templates) that can be personalised and sent to multiple contacts or marketing lists.

gha_language: TSQL


text:
```unison
structural type M a = N | J a

d = {{

{{ docExample 0 '(x -> J x) }}

{J}

}}
```

```ucm

  I found and typechecked these definitions in scratch.u. If you
  do an `add` or `update`, here's how your codebase would
  change:

    ⍟ These new definitions are ok to `add`:

      structural type M a
        (also named builtin.Optional)
      d : Doc2

```
```ucm
.> add

  ⍟ I've added these definitions:

    structural type M a
      (also named builtin.Optional)
    d : Doc2

.> display d

  `x -> J x`

  J

```

repository: unisonweb/unison

branch_name: refs/heads/trunk

gha_language: Haskell

gha_license_id: NOASSERTION

repo_name: unisonweb/unison


text:
# About
This is a frontend of application build with react framework

## Clone
```bash
$ git clone https://github.com/sipkyjayaputra/frontend_react.git
```

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

## Usage
```bash
npm start
```


text:
### Chall Desc:
I need to launch the BCA CTF ROCKET to the moon! Unfortunately I lost my launch code (flag).
You can find the launch code in the control panel.

Hint 1 of 2
Have you tried looking at the website more CLOSELY?

Hint 2 of 2
You can't access the control panel from every device out there.

### Link to webpage:
http://web.bcactf.com:49197/

### Soln:

If you look at the source page, u can find the login credentials: username: `admin`, password: `password`.

> This is the comment we receive from the source code of admin page.
```py
The name of the device is "BCACTF Rocket Control Panel" in case you forgot.
```

Now, We can change the user agent and send the request to the admin page again using curl.

Command --> `curl -X POST http://web.bcactf.com:49197/ -d "username=admin&password=password" -A "BCACTF Rocket Control Panel"`

We get the flag in output of curl. The website is down now so cannot show the result.

### THE FLAG:
bcactf{u53r_4g3Nt5_5rE_c0Ol_1023}

Thank you

path: /Agent Rocket/readme.md


text:
# ps-support
A Support bot for Promise Solutions

## To Start
1. Rename `example.env` to `.env` and enter `TOKEN` and `MONGO_URL` in their place.
2. Rename `config.example.json` to `config.json` and change the information as you want.
3. Run `npm i`.
4. Run `npm start` to start the bot.


text:
# VGG16
## Model description
VGG is a classical convolutional neural network architecture. It was based on an analysis of how to increase the depth of such networks. The network utilises small 3 x 3 filters. Otherwise the network is characterized by its simplicity: the only other components being pooling layers and a fully connected layer.

## Step 1: Preparing

### Install requirements
```bash
pip3 install -r requirements.txt
```

### Set up dataset path
Sign up and login in [imagenet official website](https://www.image-net.org/index.php), then choose 'Download' to download the whole imagenet dataset. Specify `/path/to/imagenet` to your imagenet path in later training process.
:beers: Done!

## Step 2: Training
### Multiple GPUs on one machine
Set data path by `export DATA_PATH=/path/to/imagenet`. The following command uses all cards to train:

```bash
bash train_vgg16_amp_dist.sh
```
Install zlib-1.2.9 if reports "iZLIB_1.2.9 not found" when run train_vgg16_amp_dist.sh

```bash
wget http://www.zlib.net/fossils/zlib-1.2.9.tar.gz
tar xvf zlib-1.2.9.tar.gz
cd zlib-1.2.9/
./configure && make install
cd ../
rm -rf zlib-1.2.9.tar.gz zlib-1.2.9/
```

:beers: Done!

## Reference
- [torchvision](https://github.com/pytorch/vision/tree/main/references/classification)

repository: Deep-Spark/DeepSparkHub

gha_language: Python

repo_name: Deep-Spark/DeepSparkHub


text:
[![LinkedIn][linkedin-shield]][linkedin-url]
[![django-version]][django]

# Django X React Real Estate Project

This is a Python Personal Project that i did to learn more about rest api.

## Installation

Use the package manager [pip](https://pip.pypa.io/en/stable/) to install the required packages.

```bash
activate your virtualenv
run: pip install requirements.txt
```

<!-- ## Usage

```python
import foobar

foobar.pluralize('word') # returns 'words'
foobar.pluralize('goose') # returns 'geese'
foobar.singularize('phenomena') # returns 'phenomenon'
``` -->

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## License

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

<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->

[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=555
[linkedin-url]: https://www.linkedin.com/in/bijesh-raj-kunwar-7a1759195/
[django-version]: https://img.shields.io/pypi/v/django?label=django-version
[django]: https://pypi.org/project/djangorestframework/


text:
# project automation tests

uses https://github.com/marketplace/actions/assign-to-one-project

workflow:
1. issue is created through templates at https://github.com/mchelen-gov/project-automation-test/issues/new/choose
1. issue is automatically assigned a label from the template
1. issue is automatically added to a project based on label
*Note: there is some delay while the bot runs, can be monitored at https://github.com/mchelen-gov/project-automation-test/actions*

repository: mchelen-gov/project-automation-test

repo_name: mchelen-gov/project-automation-test


text:
# Minimal Boilerplate for building static pages

## 🚀 Laravel Mix, TailwindCSS with PurgeCSS

### Requirements
Make sure all dependencies have been installed before moving on:

* [yarn](https://yarnpkg.com/lang/en/) or [npm](https://www.npmjs.com/get-npm)
* [Node.js](https://nodejs.org/en/download/) >= 8.16.0

### Quick start: Installation
Clone this repository and run
- `yarn` or `npm install` to install dependencies

### Tasks
| Task Name | Description
| :------------- | :------------- |
| `yarn dev` or `npm run dev` | Run all Mix tasks
| `yarn watch` or `npm run watch` | Run all Mix tasks and watch all relevant files for changes
| `yarn hot` or `npm run hot` | Hot module replacement
| `yarn prod` or `npm run prod` | Run all Mix tasks and minify output

## Copyright and license

Copyright 2019 Tomasz Bujnowicz under the [MIT license](http://opensource.org/licenses/MIT).


text:
---
layout: post
title: On Using Serialized Events with Builtin C# Events
tags: [GameDev]
---

This is the most powerful design pattern in Game Development.
It has two parts: The standard underlying C# `event` system,
and a special one-line class derived from `UnityEvent<T,U>`:

~~~csharp
/// GameAction : (sender, args) => void
/// standard event delegate for commands
/// - sender : the object which is issuing the command
/// - args : standard event arguments
public delegate void GameAction(IObject sender, GameArgs args);

/// GameArgs : EventArgs
/// a common base argument structure for all event arguments
/// - pattern : an expression for matching against objects
/// - input : raw textual description of object from input
/// - goal : intended target of action or event
public class GameArgs : System.EventArgs {
    public Regex Pattern {get;set}
    public string Input {get;set;}
    public IObject Goal {get;set;}
}

/// GameEvent : UnityEvent
/// a serializable event handler to expose to the editor
[Serializable] public class GameEvent : UnityEvent<IObject,GameArgs> { }
~~~

Now, there's plenty going on here, but there are three main parts:

1.  The `GameAction` delegate defines the signature of the event function.
    All events should follow the same pattern of sending the `sender`,
    which is a reference to the object which raised the event,
    and the `args`, which will be an instance of the following class:

2.  The `GameArgs` class is a special class derived from `EventArgs`,
    which encapsulates all the basic information required by the event.

3.  The `GameEvent` class is the one that serializes the event in editor.
    Editor serialization is the reason why this design pattern is amazing.

This is a simple interface to a simple object which can be `View`-ed.
Built-in C# events can be required by interfaces, which is very nice.

~~~csharp
/// IObject : ILoggable
/// provides a common interface all things
public interface IObject : ILoggable {

    /// Name : string
    /// an identifying string for this object
    string Name {get;}

    /// Position : (real,real,real)
    /// represents the object's location in world coordinates
    Vector3 Position {get;}

    /// ViewEvent : event
    /// raised when the object is observed
    event GameAction ViewEvent;

    /// View : () => void
    /// views this object, and raises the view event
    void View();

    /// Do : () => void
    /// invokes the default verb, e.g., drop items, read books
    void Do();
}
~~~

Now, anything which derives from `IObject` has a `View` event.
Subscribing to events is tantamount to adding a callback to the event,
and the typical method of creating a temporary subscription is as such:

~~~csharp
GetObject().ViewEvent += (o,e) => print($"The {o.Name} was seen!");
~~~

This works well for C# events, but we want that fancy editor stuff too.
This next step is what ties the two event systems together:

~~~csharp
class Thing : MonoBehaviour, IObject {
    [SerializeField] protected GameEvent onView = new GameEvent();
    public event GameAction ViewEvent;
    void Start() => ViewEvent += (o,e) => OnView(o,e);
    void OnView(IObject o, GameArgs e) => onView?.Invoke(o,e);
}
~~~

With the event exposed in the editor, it can execute arbitrary code:
![editor-event.gif][](We Can Do Literally Anything For You, Wholesale!)

IMHO, this is truly the most flexible pattern in Game Development.
It allows programmers to expose key gameplay events to the editor
(and therefore, to both designers and their fellow programmers)
and it provides a quick and reckless way to organize interactions.

That script would otherwise be an error-prone, spaghetti-riddled mess,
but the serialized events allow extraneous things to happen `OnKill()`,
`OnFusionCoreExplosion()`, `OnRabidDogAttack()`, `OnWhateverYouPlease()`.

[editor-event.gif]: <https://cmu.box.com/shared/static/gyhxd3yb933klmkdt46lekwp201v7cwl.gif>


text:
---
last_modified_at: 2023-04-26 13:22:37
date: 2022-10-26
layout: single
published: true
title: How to find broken symlinks
excerpt: Find stale symlinks optimally
categories:
    - til
tags:
    - til
    - nix
---

The portable way to find broken symbolic links, including cyclic links, is:

```bash
find /path/to/search -type l -exec test ! -e {} \; -print
```

Via [stackexchange.com](https://unix.stackexchange.com/a/49470/198328).

To understand the options above, check out this
[explanation](https://explainshell.com/explain?cmd=find+%2Fpath%2Fto%2Fsearch+-type+l+-exec+test+%21+-e+%7B%7D+%5C%3B+-print)
from [explainshell.com](https://explainshell.com/).

gha_language: JavaScript


text:
# cython-example

This is a dummy project/tutorial to get familiar with Cython to write Python wrappers for existing C/C++ code. I wanted to start out small before wrapping an existing camera API I am going to use in one of my future projects.

## Building the module

Build the module using `python setup.py build_ext --inplace`

repository: laggui/cython-example

repo_name: laggui/cython-example


text:
# Simple Chat Bubbles 2

## Description

Simple Chat Bubbles helps to alert you when other people are talking. This addon provides a visually better and more flexible option compared to the built-in chat bubbles options (which is still in beta). Also it allowing you to see chat bubbles for players that are not on your screen right now.

The bubbles are positioned in the upper half center of screen. There are two rows of 3 bubbles, for a total of 6 bubbles. The number of bubbles shown is configurable, if you would like to save space or not have so much "bubble clutter". However, the less bubbles available, the more likely incoming chat will overwrite existing bubbles.

Bubbles expand in the following order:

* Top Center
* Top Left
* Top Right
* Bottom Left
* Bottom Right
* Bottom Center

## Features

Simple Chat Bubbles has a tidy amount of options to help you personalize the chat bubbles. Please see the screenshots for more details.

Chat bubbles can be enable or disabled for different events individually to unclutter your screen. For instance you may select to show chat bubbles for your guild and party and ignore all other messages. Chat bubbles text colored exactly as it's appearing in your chat window to make it easier to distinguish one from another.

Current events on which you can receive an alert:
* Any guild messages (including officer messages).
* Per zone messages (including language-specific).
* Whispers / tells / says / yells / emotes (including monster).
* Group / party / leader messages.

Other features:
* Bubble text font size and color are configurable or default colors from your chat window can be used. Also bubble background, shadow, opacity and other visuals can be changed too.
* Adaptive bubble duration - minimal and maximal on-screen time of bubbles can be set and the addon will adjust it automatically based on the size of a chat message displayed.
* [NEW] Positions and distance between bubbles can be adjusted to better fit your UI and screen resolution.
* Can display bubbles for your own messages sent or you can disable it.
* Of course chat bubbles can be disabled in combat to prevent distraction.
* Includes a simple spam filter :).

## Integration with Chat Sound Alerts

This addon exposes its API via LibAddonAPI and integrates with [Chat Sound Alerts](http://www.esoui.com/downloads/info1343-ChatSoundAlerts.html) at the configuration level. Right now only one way syncronization is supported - from Chat Sound Alerts to this addon. When any of notificaiton channel options are changed in Chat Sound Alerts the same options will be replicated in Simple Chat Bubbles too allowing you to keep settings of both addons in sync in a snap.

## How do I configure it?

You can find the settings in Addon Settings -> Simple Chat Bubbles. In the Chat Sound Alerts section you will find everything you need precisely configure and fine tune the addon to your individual needs. It is pretty straight forward and the tooltips on mouse overs has even more detailed information.

## What's up next?

* Better integration with Chat Sound Alerts.
* Improve spam filtering.
* Add more chat bubbles popup effects.

## Credits.

* sirinsidiator and Seerah for LibAddonMenu-2.0 - so much time saved!
* Dio for the writing original code for the [addon](http://www.esoui.com/downloads/info136-SimpleChatBubbles.html).
* RibbedStoic for reviving the [addon](http://www.esoui.com/downloads/info720-SimpleChatBubbles-Revived.html).

repository: uladz/SimpleChatBubbles

gha_language: Lua

repo_name: uladz/SimpleChatBubbles


text:
# Changelog

## [v0.9.2]
> Oct 26, 2017

- Fix issue where elements with text (eg, `title Hello`) produce errors.

[v0.9.2]: https://github.com/rstacruz/expug/compare/v0.9.1...v0.9.2

## [v0.9.1]
> Oct 19, 2017

- Fix problem with value-less attributes (eg, `input(required type="text")`).

[v0.9.1]: https://github.com/rstacruz/expug/compare/v0.9.0...v0.9.1

## [v0.9.0]
> Oct 18, 2017

- [#10] - Fix Elixir 1.5.2 warnings about `String.rstrip/1`.
- [#8] - Fix `$` not being allowed in plain texts. ([@cubeguerrero], [#7])

[#10]: https://github.com/rstacruz/expug/issues/10
[#7]: https://github.com/rstacruz/expug/issues/7
[#8]: https://github.com/rstacruz/expug/issues/8
[@cubeguerrero]: https://github.com/cubeguerrero
[v0.9.0]: https://github.com/rstacruz/expug/compare/v0.8.0...v0.9.0

## [v0.8.0]
> Mar 14, 2017

- [#6] - Fixes consecutive if-else blocks.

[v0.8.0]: https://github.com/rstacruz/expug/compare/v0.7.3...v0.8.0

## [v0.7.3]
> Aug 29, 2016

- [#5] - Fixes problems with some nodes rendering as text.

[v0.7.3]: https://github.com/rstacruz/expug/compare/v0.7.2...v0.7.3

## [v0.7.2]
> Aug 29, 2016

- Fix multiline dot blocks (`script.`).

[v0.7.2]: https://github.com/rstacruz/expug/compare/v0.7.1...v0.7.2

## [v0.7.1]
> Jul 29, 2016

Squash Elixir warnings; no functional changes.

[v0.7.1]: https://github.com/rstacruz/expug/compare/v0.7.0...v0.7.1

## [v0.7.0]
> Jul 29, 2016

Support improved multiline. Write `=`, `!=` or `-` immediately followed by a newline. All text indented inside it will be treated as part of an Elixir expression.

```jade
=
  render App.MyView, "index.html",
  [conn: @conn] ++
  assigns
```

Error messages have also been improved.

[v0.7.0]: https://github.com/rstacruz/expug/compare/v0.6.0...v0.7.0

## [v0.6.0]
> Jul 25, 2016

Fix: Line comments have been changed from `-//` to `//-` (had a mistake in implementing that, sorry!)

[v0.6.0]: https://github.com/rstacruz/expug/compare/v0.5.0...v0.6.0

## [v0.5.0]
> Jul 25, 2016

HTML comments are now supported. They are just like `-//` comments, but they will render as `<!-- ... -->`.

```jade
// This is a comment
  (Anything below it will be part of the comment)
```

[v0.5.0]: https://github.com/rstacruz/expug/compare/v0.4.0...v0.5.0

## [v0.4.0]
> Jul 23, 2016

Value-less boolean attributes are now supported.

```jade
textarea(spellcheck)
```

Unescaped text (`!=`) is now supported.

```jade
div!=<EMAIL_ADDRESS>|> sanitize()
```

You can now change the `raw` helper in case you're not using Phoenix. The `raw_helper` (which defaults to `"raw"` as Phoenix uses) is used on unfiltered text (such as `!= text`).

```ex
Expug.to_eex!("div= \"Hello\"", raw_helper: "")
```

[v0.4.0]: https://github.com/rstacruz/expug/compare/v0.3.0...v0.4.0

## [v0.3.0]
> Jul 21, 2016

[#3] - Attribute values are now escaped properly. This means you can now properly do:

```jade
- json = "{\"hello\":\"world\"}"
div(data-value=json)
```

```html
<div data-value="{"hello":"world"}">
```

`nil` values are also now properly handled, along with boolean values.

```jade
textarea(spellcheck=nil)
textarea(spellcheck=true)
textarea(spellcheck=false)
```

```html
<textarea></textarea>
<textarea spellcheck></textarea>
<textarea></textarea>
```

[#3]: https://github.com/rstacruz/expug/issues/3
[v0.3.0]: https://github.com/rstacruz/expug/compare/v0.2.0...v0.3.0

## [v0.2.0]
> Jul 17, 2016

The new block text directive allows you to write text without Expug parsing.

```jade
script.
  if (usingExpug) {
    alert('Awesome!')
  }
```

Added support for multiline code. Lines ending in `{`, `(`, `[` or `,` will assume to be wrapped.

```jade
= render App.FooView, "nav.html",
  conn: @conn,
  action: {
    "Create new",
    item_path(@conn, :new) }
```

[v0.2.0]: https://github.com/rstacruz/expug/compare/v0.1.1...v0.2.0

## [v0.1.1]
> Jun 27, 2016

Expug now supports `if do ... end` and other blocks.

```jade
= if @error do
  .alert Uh oh! Check your form and try again.
```

[v0.1.1]: https://github.com/rstacruz/expug/compare/v0.0.1...v0.1.1

## [v0.0.1]
> Jun 26, 2016

Initial release.

[v0.0.1]: https://github.com/rstacruz/expug/tree/v0.0.1
[#5]: https://github.com/rstacruz/expug/issues/5
[#6]: https://github.com/rstacruz/expug/issues/6

repository: edjroot/expug

repo_name: edjroot/expug


text:
# DEPRECATED: Please use Argo-CD instead :-) https://github.com/argoproj/argo-cd

# Deploy to Kubernetes through a Github Repo

A cli command, written in Go, that runs in Kubernetes as an agent (`deploy agent`) or raises a pull request against the cluster repo to request a deployment (`deploy request`).

### `deploy agent`

1.  watches for PR updates on a webhook
1.  clones the repo to a temporary directory
1.  checks out the commit SHA
1.  walks down any top-level directories that contain changes
1.  gathers yaml files (however they are nested)
1.  applies the manifests to a Kubernetes cluster using `kubctl`.

### `deploy request`

1.  checks out the cluster repo specified
1.  copies the specified manifests into a new branch (named with the commit sha)
1.  commits, pushes and raises a PR requesting deployment

### Note:

This is an experiment to demonstrate how a CI/CD system might deploy to environments by opening a Pull Request on a "cluster repo" with the intention "please will you accept this configuration". It's early days and not production ready.

TODO:

1.   Currently any removed manifests will not result in the resources being removed from the cluster.
1.  Implement an image resolver, similar to [`kubecfg`](https://github.com/ksonnet/kubecfg). This allows idempotent deploys even for images whose tags have changed but their content hasn't (e.g. if you're using a monorepo and the SHA is used as the tag).

Note: we can't currently use [`kubecfg`](https://github.com/ksonnet/kubecfg) as it stands, because it doesn't support accepting manifests from `stdin` (and as there are no file extensions to look at, it wouldn't know whether they were `yaml`, `json` or `jsonnet` anyway). We could raise a PR to add this functionality, or use it as a library. Jury is still out.

## To install locally:

```bash
go get github.com/redbadger/deploy

export PERSONAL_ACCESS_TOKEN=<personal access token>
export DEPLOY_SECRET=<webhook secret>
deploy help
deploy help agent
deploy help request
```

## To run the agent in Kubernetes:

`deploy agent` runs on the k8s cluster.
There is an example deployment (for minikube) in the [`k8s/minikube`](./k8s/minikube) directory.
The shell script `deploy.sh` does the following:

- creates a **namespace**
  - with name `deploy-robot`
- creates a **secret**
  - from exported `PERSONAL_ACCESS_TOKEN`
  - from exported `DEPLOY_SECRET`
- creates other resources:
  - **serviceAccount**
    - with name `deploy-robot` - useful for RBAC
  - **deployment**
  - **service**
  - **ingress**
    - backs onto the nginx ingressController which you can enable with `minikube addons enable ingress`
    - uses the hostname `deploy.internal` so you may need to add that to your hosts file so it resolves to `${minikube ip}`)

```bash
echo "$(minikube ip) deploy.internal" | sudo tee -a /etc/hosts
cd ./k8s/minikube
./deploy.sh
```

You may need to use `ngrok` if testing with a local minikube cluster in order to provide a public endpoint for your github webhook:

```bash
ngrok http -host-header=rewrite deploy.internal:80
```

This will give you an endpoint like `https://fb2e74de.ngrok.io`, so you can configure your webhook on the cluster repo to point to something like `https://fb2e74de.ngrok.io/webhooks`. The webhook should be triggered on Pull Request events.

When the webhook is configured, you should be able to use `deploy request` as shown below to trigger the whole process. Then you should be able to get the logs from the relevant pod:

```
> kubectl --namespace deploy-robot logs deploy-robot-6bb9fb46d6-ltljc
2018/03/20 18:52:33 INFO: Listening on addr: :3016 path: /webhooks
2018/03/20 18:55:09 INFO: Webhook received
2018/03/20 18:55:09 INFO: Parsing Payload...
2018/03/20 18:55:09 INFO: Checking secret
2018/03/20 18:55:09
PR #8, SHA 90a864e84cde99283cf9e2c4cc7cea93ee36308c
2018/03/20 18:55:11 Walking guestbook
deployment "redis" created
service "redis" created
deployment "guestbook-ui" created
service "guestbook-ui" created
```

## To make a deployment request:

`deploy request` runs in the CD pipeline, but you can test from the root directory of this repo. Modify the config in `/example/guestbook` and then:

```
> deploy request --namespace=guestbook --manifestDir=example/guestbook --sha=41e8650 --org=redbadger --repo=cluster-local
2018/03/17 13:50:22 copying from example/guestbook to /guestbook
2018/03/17 13:50:22 commit obj: commit cfb3da3c0b28f4bb731a13689ed0f994ba24b340
Author: Robot <robot>
Date:   Sat Mar 17 13:50:22 2018 +0000

    Commit message!
2018/03/17 13:50:26 Pull request #1 raised!
```

repository: redbadger/deploy

gha_language: Go

repo_name: redbadger/deploy


text:
# YouTube Music, 6 years later

[**Twitter Space Url**](https://twitter.com/i/spaces/1nAKEYNMzRAKL) - https://twitter.com/i/spaces/1nAKEYNMzRAKL

→ Twitter Spaces URL: [Scheduled: YouTube Music, 5 years later.](https://twitter.com/i/spaces/1nAKEYNMzRAKL)

* [YouTube Premium/YouTube Music 2021 · Issue #259 · extratone/bilge](https://github.com/extratone/bilge/issues/259)
* [YouTube Premium + Music Twitter Collection](https://twitter.com/NeoYokel/timelines/1454239067546214401)
* [First share Tweet](https://twitter.com/NeoYokel/status/1462874345613713408) - `https://twitter.com/NeoYokel/status/1462874345613713408`
* [Todoist task](https://todoist.com/showTask?id=5353356868&sync_id=5353356868)

![Telegram Live Stream](https://user-images.githubusercontent.com/43663476/142936017-65d27dc2-b557-46d1-b210-9110d7159ae6.png)

## Streaming

* [**YouTube Share URL**](https://youtu.be/JHuqIWCFhWY) - `https://youtu.be/JHuqIWCFhWY`
* Full YouTube URL: `https://www.youtube.com/watch?v=JHuqIWCFhWY`
* [Telegram Live Stream](https://t.me/extratone?livestream)
* [Discord Event Invite](https://discord.gg/GFzXF2Jk?event=912451455556923433)

## Social
```
as a young man with thoughts about streaming services, YouTube formalizing its massive role in music streaming with YouTube Music’s launch in October 2015 sounded like a GREAT idea to me.

so wtf happened? come hang out in 5 hours and share your thoughts. https://twitter.com/i/spaces/1nAKEYNMzRAKL
```

* [David Blue ※ (𝙻𝙸𝚂𝚃𝙴𝙽-𝙾𝙽𝙻𝚈 𝙼𝙾𝙳𝙴) on Twitter: "as a young man with thoughts about streaming services, YouTube formalizing its massive role in music streaming with YouTube Music’s launch in October 2015 sounded like a GREAT idea to me. so wtf happened? come hang out in 5 hours and share your thoughts. https://t.co/cVG1q05LIx" / Twitter](https://twitter.com/neoyokel/status/1462874345613713408 )

license: Unlicense

url: https://raw.githubusercontent.com/extratone/bilge/3ce1011a216cc5edfda45a25842ed8efa90b52f5/events/YouTube Music, 6 years later.md

repository: extratone/bilge

path: /events/YouTube Music, 6 years later.md

filename: YouTube Music, 6 years later.md

gha_language: HTML

repo_name: extratone/bilge


text:
# chip-8
CHIP-8 Emulator

[Click here to play](https://diogoeichert.github.io/chip-8/)

Public domain ROMs can be found [here](https://www.zophar.net/pdroms/chip8.html)

C version [here](https://github.com/diogoeichert/chip-8-dos)


text:
---
layout: default
---

# 1997-02-16 - NEW "Black Box" Technology!!

## Header Data

From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: f7d65a15b0ee76b2e61a58a2a7ee84f1ea1e50cbfca441c12829aa60e2f0a820

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-02-16 22:42:01 UTC

Raw Date: Sun, 16 Feb 1997 14:42:01 -0800 (PST)

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>Date: Sun, 16 Feb 1997 14:42:01 -0800 (PST)
To<EMAIL_ADDRESS>Subject: NEW "Black Box" Technology!!
  If you would like a FREE copy of this software or any of our other HOT programs ABSOLTELY FREE call our FAX ON DEMAND number at<PHONE_NUMBER>.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I am sending this to you because I feel that you are an honest person, with a sincere desire to improve your station in life.

If I am incorrect, please excuse my intrusion, and simply hit reply to be removed from my database. If you would like additional information, simply send me email with "info" in the subject area.

Thanks!!

NEW "Black Box" Technology !!

GET IN ON THE TOP LEVEL of the Hottest New Program

1. GLOBAL COM TECHNOLOGY -GCT- is the name
of the new company created to handle the basket of telecom-
munications breakthrough technologies we're going to
represent.  It  is based  in Chesapeake, VA.  GCT has been
put together by a highly seasoned group including MAJOR
individuals in the Telecom industry. They have selected
Kerry J. Young, a skilled executive and administrator, to be
President and CEO.  They have also assembled a blue ribbon
support team headed by a top level executive from one of the
"big three" telephone companies.  This combined powerhouse
of high-level Telecom experience, management, administration,
marketing and financial depth promises to  make GCT one of
the world's premier telecommunications companies.

Their mission: To create the world's largest MLM network to
deliver advanced Telecom technology at the most competitive
price.  In short, they plan on delivering products that will stand
the industry on its ear!

2. GCT has set up a 24-hour information line:<PHONE_NUMBER>.
Call it NOW!  It is powerful.  It will introduce several of the
key players and answer questions about the products, how
they work and how our business will be structured.

3. The company has announced the official launch date: Monday,
March 3, 1997. On Saturday, the 15th of March, GCT will be
holding simultaneous training's/meetings in eight cities across the
United States.  The locations are: Atlanta + Chicago + Dallas +
Honolulu + Los Angeles + Orlando + Seattle + Washington, DC.
The company will add additional cities as you indicate your
preference.  Seating is extremely limited and must be reserved in
advance by calling an 800# which will be made available within
a few days on the GCT hotline.  Price: $59 - includes Distributor
Kit!

4. What will we be offering?  We will have a FULL RANGE
of products -- with far more advanced technology and far better
pricing than is currently being offered by the several, hastily
launched GCT wannabees.  The first products announced
include a prepaid calling card at 9.9 cents per minute, long
distance service at 7.9 cents and WE HAVE the long awaited
"black box" technology! It comes in three versions (from basic
to advanced) and will wholesale: $39 - $69.  In addition, there
are several more advanced products which will be brought into
our portfolio.  As more information becomes available, it is
increasingly clear: We are poised to bring the world what
everyone has been promised  -- but ONLY WE CAN DELIVER!

6. Beware of other companies who have attempted to preempt
GCT by implying they can duplicate the various products that
we already have on board.  This program is not merely an
application form and compensation plan offering a single,
7.9 cent product.  GCT is a major new Telecom company
assembling a full range of leading edge telecommunications
technology.   The success of this program requires the contacts
and know-how of the Telecom industry that can only come from
years of experience at the highest levels.  Bringing these
exceptional products to market is not a project for well-meaning
amateurs.

7. The only way to participate in the program described
above is to join GCT. They are the ONLY COMPANY with
the contracts in hand, technical skill and telecommunications
experience to deliver.  Global Connections is a group of very
experienced marketers and networkers who have an Independent
Distributorship positioned directly at the top level of GCT.

8. We are signing up the frontline on Monday & Tuesday...  I can place you on the top levels...

Email me for registration form at<EMAIL_ADDRESS>
Put "BLACK BOX" in the subject box.

{% endraw %}
```

## Thread

+ Return to [February 1997](/archive/1997/02)

+ Return to "[omex@cyberservices.com](/authors/omex_at_cyberservices_com)"

+ 1997-02-16 (Sun, 16 Feb 1997 14:42:01 -0800 (PST)) - NEW "Black Box" Technology!! -<EMAIL_ADDRESS>


text:
# Assessments

unitstandard: 115365, 115368, 115369

## Formative assessment 1

The candidate's repository contains a copy of the example **blank.html** that has:

* an updated `title` attribute;
* new content.

## Formative assessment 2

The candidate's repository contains a copy of the example **blank.html** that has:

* several examples of text controls;
* several examples of pick controls;
* at least one `fieldset` element and at least one `legend` element.

## Formative assessment 3

The candidate's repository contains a copy of the example **blank.html** that has:

* several of the new HTML elements;
* either an `img` using `srcset` and `sizes` or a `picture` element.

## Formative assessment 4

The candidate's repository contains a copy of the example **blank.html** that has:

* an example of a new input type;
* an example of a date picker, range, or colour;
* an example of at least one new helper attribute.

## Formative assessment 5

The candidate's repository contains a copy of the example **blank.html** that uses formspree.io in the action, linked to the candidate's email address. The formspree.io endpoint has been set up and the candidate's email confirmed.

## Summative assessment

The candidate's repository contains a new HTML page that contains a form linked to formspree.

repository: codex-academy/HTML

branch_name: refs/heads/gh-pages

repo_name: codex-academy/HTML