text:
# alphaPhobos
Assume License: Boost

Just some of my to be Phobos code. Includes dependencies on e.g. not included with latest compiler version.

May require serious work before usable.

## TODO
- VFS testing
- Where does std.experimental.vfs.internal glob functions go?
- PR std.experimental.uri to std.uri

- Image abituary rotation
- Image tests
	- Rotation
- Image primitives unittests

- Windowing contexts

- X11 bindings
- OpenGL bindings

# Phobos TODO list

## No dependencies
- ``std.string : indexOf`` @nogc varient
- Complete overhaul of std.math, into a package with linear algerbra support (gfm:math)

## Allocators dependency
- ``std.typecons : RefCounted`` IAllocator support to deallocate/allocate
- Some sort of list e.g. std.containers.array with IAllocator support
- Some form of AA with allocator usage
- std.zlib memory allocation fix

# Feedback

Stages:
1. Initial idea + design with some example implementation and test code
2. Implementation types and design of them
3. Final scope discovery pre pull request/queue
4. Pull request and review queue

# Image library
Current completed stage 1.

Requirement for stage 2 is PNG implementation to have a comprehensive test suite.

Requirement for stage 3 is BMP implementation as well as rotation manipulation feature.

Requirement for stage 4, all dependencies are meet and in Phobos already.

# Windowing library
Currently has not been through feedback yet.

Requirement for stage 1 is image library at stage 2 and implementation fully implemented for Windows.

Requirement for stage 2 is X11 and OpenGL context.

Requirement for stage 3 is OSX + Wayland, DirectX support and image library at stage 3.

Requirement for stage 4, all dependencies are meet and in Phobos already. Image library may be concurrent with this during review queue process.

repository: rikkimax/alphaPhobos

repo_name: rikkimax/alphaPhobos


text:
Bamazon Customer:

This application creates a virtual shopping experience using mySQL and Node, and utilizing the Inquirer npm package. When you run “node bamazonCustomer.js”, you will see a list of 10 items:

Item ID for each product
Name of Product
Department of Product
Price
Quantity Available

After reviewing the products, you are prompted to input the item ID of the item you would like to purchase. You are then prompted to input the quantity of that item that you want to purchase. If there is sufficient inventory, the program will confirm your order and display the details and the total that you owe. If there is insufficient inventory, you are prompted to choose another product.

View the video demonstration here: https://drive.google.com/file/d/1cgegjUZ83hGg4bWlAi957r5UAdlm4bgo/view?usp=sharing

Bamazon Manager:

Building on Bamazon Customer, running bamazonManager.js will:

List a set of menu options:
- View Products for Sale
- View Low Inventory
- Add to Inventory
- Add New Product

If a manager selects View Products for Sale, the app should list every available item: the item IDs, names, prices, and quantities.
If a manager selects View Low Inventory, then it should list all items with an inventory count lower than five.
If a manager selects Add to Inventory, your app should display a prompt that will let the manager "add more" of any item currently in the store.
If a manager selects Add New Product, it should allow the manager to add a completely new product to the store.

license: MIT

repository: mmrydz/Bamazon

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: mmrydz/Bamazon


text:
### [CVE-2013-4900](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-4900)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

Directory traversal vulnerability in DeWeS web server 0.4.2 and possibly earlier, as used in Twilight CMS, allows remote attackers to read arbitrary files via a ..%5c (dot dot encoded backslash) in a GET request.

### POC

#### Reference
- http://www.exploit-db.com/exploits/27777

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

branch_name: refs/heads/main

gha_language: HTML

gha_license_id: MIT

repo_name: trickest/cve


text:
[**Review #76 | Bourbon Review #42 - Old Forester Signature**]( https://t8ke.review/review-76-old-forester-signature/)

**The Schtick:** This is a 50% ABV release from Old Forester. It bears no age statement.

-----

**Distiller:** Brown-Forman

**Bottler:** Brown-Forman

**Selection:** N/A

**ABV:**  50% ABV

**Age:** NAS

-----

**Nose:**  Vanilla, theres some solid cinnamon and....banana bread?

**Taste:** Rich vanilla with a mild spice kick. Its a little hot, but not unreasonably so. Banana is back though. I cant tell if theres malty sweetness that makes me think of sweet bread or if theres truly banana.

**Finish:** Okay yeah its banana. I never really expected this but it doesnt put me off too much. The finish is short but well blended and leaves gently with some more vanilla and banana bread notes.

**Overall:** For what it costs, its good. Not OGD good, but not bad at all.

Thanks for reading!

**Rank: 5**

-----

**10 Most Recent Brown-Forman Expressions I Have Reviewed:**

- [Review #1127. Jack Daniels Single Barrel Barrel Proof]( https://t8ke.review/review-1127-jack-daniels-single-barrel-barrel-proof/)

- [Review #886. Old Forester Single Barrel Ottos Selection]( https://t8ke.review/review-886-old-forester-single-barrel-ottos-selection/)

- [Review #643. Early Times 150th Anniversary]( https://t8ke.review/review-643-early-times-150th-anniversary/)

- [Review #1011. Old Forester 1910: Old Fine Whiskey]( https://t8ke.review/review-1011-old-forester-1910-old-fine-whiskey/)

- [Review #1013. Old Forester 1920: : Prohibition Style]( https://t8ke.review/review-1013-old-forester-1920-prohibition-style/)

- [Review #1007. Old Forester 1870: Original Batch]( https://t8ke.review/review-1007-old-forester-1870-original-batch/)

- [Review #1009. Old Forester 1897: Bottled In Bond]( https://t8ke.review/review-1009-old-forester-1897-bottled-in-bond/)

- [Review #253. Jack Daniels 150th Anniversary Edition]( https://t8ke.review/review-253-jack-daniels-150th-anniversary-release/)

- [Review #550. Early Times Bottled in Bond]( https://t8ke.review/review-550-early-times-bib/)

- [Review #1019. Jack Daniels Single Barrel Barrel Proof Woodmans Selection]( https://t8ke.review/review-1019-jack-daniels-single-barrel-barrel-proof-bourbon-woodmans-selection/)

-----

[WEBSITE](https://t8ke.review) | [SEARCHABLE ARCHIVE](https://t8ke.review/review-archive/) | [SUBREDDIT](https://reddit.com/r/t8kereviews)

-----

Decoded:

**1** | **Disgusting** | So bad I poured it out.

**2** | **Poor** | I wouldn't consume by choice.

**3** | **Bad** | Multiple flaws.

**4** | **Sub-par** | Not bad, but many things I'd rather have.

**5** | **Good** | Good, just fine.

**6** | **Very Good** | A cut above.

**7** | **Great** | Well above average

**8** | **Excellent** | Really quite exceptional.

**9** | **Incredible** | An all time favorite

**10** | **Perfect** | Perfect

----


text:
# Configuration

This chapter will describe NPF configuration in the context of NetBSD
or a similar UNIX-like system environment.

The standalone NPF configuration would be constructed using the `libnpf`
library and submitted to the kernel-side component, using the `npfkern`
library.  See the libnpf(3) and npfkern(3) manual pages for the API.

---
NetBSD beginners can consult
[rc(8)](http://man.netbsd.org/cgi-bin/man-cgi?rc+8+NetBSD-current),
[rc.conf(5)](http://man.netbsd.org/cgi-bin/man-cgi?rc.conf+5+NetBSD-current),
[ifconfig.if(5)](http://man.netbsd.org/cgi-bin/man-cgi?ifconfig.if+5+NetBSD-current),
[route(8)](http://man.netbsd.org/cgi-bin/man-cgi?route+8+NetBSD-current)
and other manual pages for the general networking configuration in the system.

---

## Structure and syntax

The NPF configuration is represented by a file, called `npf.conf` (the
default location is `/etc/npf.conf`).  It is loaded and NPF is generally
operated via the command line utility called `npfctl`.  For a reference,
use
[npf.conf(5)](http://man.netbsd.org/cgi-bin/man-cgi?npf.conf+5+NetBSD-current)
and
[npfctl(8)](http://man.netbsd.org/cgi-bin/man-cgi?npfctl+8+NetBSD-current)
manual pages.

There are multiple structural elements that `npf.conf` may contain, such as:
- variables
- table definitions (with or without content)
- abstraction groups
- packet filtering rules
- map rules for address translation
- application level gateways
- procedure definitions to call on filtered packets.

### Variables

Variables are specified using the dollar (`$`) sign, which is used for both
definition and referencing of a variable.  Variables are defined by
assigning a value to them as follows:
```
$var1 = <IP_ADDRESS>
```
A variable may also be defined as a set:
```
$var2 = { <IP_ADDRESS>, <IP_ADDRESS> }
```

Common variable definitions are for IP addresses, networks, ports, and
interfaces.

### Tables

Tables are specified using a name between angle brackets `<` and `>`.
The following is an example of table definition:
```
table <blocklist> type ipset
```

Currently, tables support three data storage types: `ipset`, `lpm`, or `const`.
The contents of the table may be pre-loaded from the specified file.
The `const` tables are immutable (no insertions or deletions after loading)
and therefore must always be loaded from a file.

The specified file should contain a list of IP addresses and/or networks
in the form of <IP_ADDRESS> or <IP_ADDRESS>/24

Tables of type `ipset` and `const` can only contain IP addresses.  The `lpm`
tables can contain networks and they will perform the longest prefix match
on lookup.

### Interfaces

In NPF, an interface can be referenced directly by using its name, or can
be passed to an extraction function which will return a list of IP
addresses configured on the actual associated interface.

It is legal to pass an extracted list from an interface in keywords where
NPF would expect instead a direct reference to said interface.  In this
case, NPF infers a direct reference to the interface, and does not con‐
sider the list.

There are two types of IP address lists.  With a static list, NPF will
capture the interface addresses on configuration load, whereas with a
dynamic list NPF will capture the runtime list of addresses, reflecting
any changes to the interface, including the attach and detach.  Note that
with a dynamic list, bringing the interface down has no effect, all
addresses will remain present.

The following functions exist, to extract addresses from an interface with
a chosen list type and IP address type:

| Function | Type | Description |
| -------------------- | ------------ | -------------- |
| `inet4(interface)`   | static list  | IPv4 addresses |
| `inet6(interface)`   | static list  | IPv6 addresses |
| `ifaddrs(interface)` | dynamic list | Both IPv4 and IPv6.  The family keyword of a filtering rule can be used in combination to explicitly select an IP address type. |

Example of configuration:
```
$var1 = inet4(wm0)
$var2 = ifaddrs(wm0)

group default {
  block in on wm0 all               # rule 1
  block in on $var1 all             # rule 2
  block in on inet4(wm0) all        # rule 3
  pass in on inet6(wm0) from $var2  # rule 4
  pass in on wm0 from ifaddrs(wm0)  # rule 5
}
```

In the above example, $var1 is the static list of IPv4 addresses configured
on wm0, and $var2 is the dynamic list of all the IPv4 and IPv6
addresses configured on wm0.  The first three rules are equivalent,
because with the `block ... on <interface>` syntax, NPF expects a direct
reference to an interface, and therefore does not consider the extraction
functions.  The fourth and fifth rules are equivalent, for the same reason.

### Groups

NPF requires that all rules be defined within groups.  Groups can be
thought of as higher level rules which can contain subrules.  Groups may
have the following options: name, interface, and direction.  Packets
matching group criteria are passed to the ruleset of that group.  If a
packet does not match any group, it is passed to the default group.  The
default group must always be defined.

Example of configuration:
```
group "my‐name" in on wm0 {
  # List of rules, for packets received on wm0
}

group default {
  # List of rules, for the other packets
}
```

### Rules

With a rule statement NPF is instructed to `pass` or `block` a packet
depending on packet header information, transit direction and the interface it
arrived on, either immediately upon match or using the last match.

If a packet matches a rule which has the `final` option set, this rule is
considered the last matching rule, and evaluation of subsequent rules is
skipped.  Otherwise, the last matching rule is used.

The `proto` keyword can be used to filter packets by layer 4 protocol (TCP,
UDP, ICMP or other).  Its parameter should be a protocol number or its
symbolic name, as specified in the `/etc/protocols` file.  This keyword can
additionally have protocol‐specific options, such as `flags`.

The `flags` keyword can be used to match the packets against specific TCP
flags, according to the following syntax:
```
proto tcp flags match[/mask]
```

Where match is the set of TCP flags to be matched, out of the mask set,
both sets being represented as a string combination of: `S` (SYN), `A`
(ACK), `F` (FIN), and `R` (RST).  The flags that are not present in _mask_
are ignored.

To notify the sender of a blocking decision, three return options can be
used in conjunction with a block rule:

| Keyword | Description |
| --- | --- |
| `return` | Behaves as return‐rst or return‐icmp, depending on whether the packet being blocked is TCP or UDP. |
| `return‐rst` | Return a TCP RST message, when the packet being blocked is a TCP packet.  Applies to IPv4 and IPv6. |
| `return‐icmp` | Return an ICMP UNREACHABLE message, when the packet being blocked is a UDP packet.  Applies to IPv4 and IPv6. |

Further packet specification at present is limited to TCP and UDP under‐
standing source and destination ports, and ICMP and IPv6‐ICMP understand‐
ing icmp‐type.

A rule can also instruct NPF to create an entry in the state table when
passing the packet or to apply a procedure to the packet (e.g. "log").

A "fully‐featured" rule would for example be:
```
pass stateful in final family inet4 proto tcp flags S/SA \
  from $source port $sport to $dest port $dport apply "someproc"
```

Alternatively, NPF supports
[pcap-filter(7)](http://man.netbsd.org/cgi-bin/man-cgi?pcap-filter+7+NetBSD-current)
syntax, for example:
```
block out final pcap‐filter "tcp and dst <IP_ADDRESS>"
```

Fragments are not selectable since NPF always reassembles packets before
further processing.

### Stateful

Stateful packet inspection is enabled using the `stateful` or `stateful‐ends`
keywords.  The former creates a state which is uniquely identified by a
5‐tuple (source and destination IP addresses, port numbers and an inter‐
face identifier).  The latter excludes the interface identifier and must
be used with precaution.  In both cases, a full TCP state tracking is
performed for TCP connections and a limited tracking for message‐based
protocols (UDP and ICMP).

By default, a stateful rule implies SYN‐only flag check ("flags S/SAFR")
for the TCP packets.  It is not advisable to change this behavior; how‐
ever, it can be overridden with the aforementioned `flags` keyword.

### Map

Network Address Translation (NAT) is expressed in a form of segment map‐
ping.  The translation may be dynamic (stateful) or static (stateless).
The following mapping types are available:

| Syntax | Description |
|:------:| --- |
| `‐>`   | outbound NAT (translation of the source) |
| `<‐`   | inbound NAT (translation of the destination) |
| `<‐>`  | bi‐directional NAT (combination of inbound and outbound NAT) |

The following would translate the source (<IP_ADDRESS>/24) to the IP address
specified by `$pub_ip` for the packets on the interface `$ext_if`.
```
map $ext_if dynamic <IP_ADDRESS>/24 ‐> $pub_ip
```

Translations are implicitly filtered by limiting the operation to the
network segments specified, that is, translation would be performed only
on packets originating from the <IP_ADDRESS>/24 network.  Explicit filter
criteria can be specified using `pass criteria ...` as an additional option
of the mapping.

The dynamic NAT implies network address and port translation (NAPT).  The
port translation can be controlled explicitly.  For example, the following
provides "port forwarding", redirecting the public port 9022 to the
port 22 of an internal host:
```
map $ext_if dynamic proto tcp <IP_ADDRESS> port 22 <‐ $ext_if port 9022
```

If the dynamic NAT is configured with multiple translation addresses,
then a custom selection algorithm can be chosen using the `algo` keyword.
The currently available algorithms are:

| Algorithm | Description |
|:---------:| --- |
| `ip-hash` | The translation address for a new connection is selected based on a hash of the original source and destination addresses. This algorithms attempts to keep all connections of particular client associated with the same translation address. This is the default algorithm. |
| `round-robin` | The translation address for each new connection is selected on a round-robin basis. |

The static NAT can also have different address translation algorithms,
chosen using the `algo` keyword.  The currently available algorithms are:

| Algorithm | Description |
|:---------:| --- |
| `netmap`  | Network address mapping from one segment to another, leaving the host part as-is. The new address is computed as following: `addr = net-addr | (orig-addr & ~mask)` |
| `npt66`   | IPv6‐to‐IPv6 network prefix translation (NPTv6) |

If no algorithm is specified, then 1:1 address mapping is assumed.
Currently, the static NAT algorithms do not perform port translation.

### Application Level Gateways

Certain application layer protocols are not compatible with NAT and
require translation outside layers 3 and 4.  Such translation is per‐
formed by packet filter extensions called Application Level Gateways
(ALGs).

NPF supports the following ALGs:
- ICMP ALG (keyword `icmp`): Applies to IPv4 and IPv6.  Allows to find an
  active connection by looking at the ICMP payload, and to perform NAT
  translation of the ICMP payload.  Generally, this ALG is necessary to
  support `traceroute(8)` behind the NAT, when using the UDP or TCP probes.

The ALGs are built‐in.  If NPF is used as kernel module, then they come
as kernel modules too.  In such case, the ALG kernel modules can be
autoloaded through the configuration, using the `alg` keyword.

For example:
```
alg "icmp"
```

Alternatively, the ALG kernel modules can be loaded manually, using
`modload(8)`.

### Procedures

A rule procedure is defined as a collection of extension calls (it may
have none).  Every extension call has a name and a list of options in the
form of key‐value pairs.  Depending on the call, the key might represent
the argument and the value might be optional.  Available options:
- `log: interface`: Log events. This requires the `npf_ext_log`
  kernel module, which would normally get auto loaded by NPF.  The specified
  npflog interface would also be auto‐created once the configuration is loaded.
  The log packets can be written to a file using the `npfd(8)` daemon.
- `normalize: option1[, option2 ...]`: Modify packets according to the
  specified normalization options.  This requires the `npf_ext_normalize`
  kernel module, which would normally get auto‐loaded by NPF.

The available normalization options are:

| Parameter | Description |
| --- | --- |
| `max‐mss <value>` | Enforce a maximum value for the Maximum Segment Size (MSS) TCP option.  Typically, for "MSS clamping".
| `min‐ttl <value>` | Enforce a minimum value for the IPv4 Time To Live (TTL) parameter.
| `no‐df` | Remove the Don't Fragment (DF) flag from IPv4 packets.
| `random‐id` | Randomize the IPv4 ID parameter. |

For example:
```
procedure "someproc" {
  log: npflog0
  normalize: "random‐id", "min‐ttl" 64, "max‐mss" 1432
}
```

In this case, the procedure calls the logging and normalization modules.

### Misc

Text after a hash (`#`) character is considered a comment.  The backslash
(`\`) character at the end of a line marks a continuation line, i.e., the
next line is considered an extension of the present line.

## Control and operation

NPF is controlled using the
[npfctl(8)](http://man.netbsd.org/cgi-bin/man-cgi?npfctl+8+NetBSD-current)
utility.
```
$ npfctl
Usage:	npfctl start | stop | flush | show | stats
	npfctl validate | reload [<rule-file>]
	npfctl rule "rule-name" { add | rem } <rule-syntax>
	npfctl rule "rule-name" rem-id <rule-id>
	npfctl rule "rule-name" { list | flush }
	npfctl table "table-name" { add | rem | test } <address/mask>
	npfctl table "table-name" { list | flush }
	npfctl table "table-name" replace [-n "name"] [-t <type>] <table-file>
	npfctl save | load
	npfctl list [-46hNnw] [-i <ifname>]
	npfctl debug [<rule-file>] [<raw-output>]
```

Once the NPF configuration file has been written, use `npfctl` to load it
and then start the packet handling:
```
$ npfctl load
$ npfctl start
```

Any modifications of npf.conf require reloading of the ruleset by performing
a `reload` command in order to make the changes active.  One difference from
other packet filters is the behaviour of the `start` and `stop` commands.
These commands do not actually change (i.e. load or unload) the active
configuration.  Running `start` will only enable the passing of packets
through NPF, while `stop` will disable such passing.  Therefore,
configuration should first be activated using the `reload` command and then
filtering enabled with `start`.  Similarly, clearing of the active
configuration is done by performing the `stop` and `flush` commands.
Such behaviour allows users to efficiently disable and enable filtering
without actually changing the active configuration, as it may be unnecessary.

### Autostart on boot

In NetBSD, the rc.d system can be used to start NPF on boot.  The following
is an example for starting NPF and loading the configuration through the rc.d
script:
```
$ echo 'npf=YES' >> /etc/rc.conf
$ /etc/rc.d/npf reload
Reloading NPF ruleset.
$ /etc/rc.d/npf start
Enabling NPF.
```

repository: rmind/npf

gha_language: C

gha_license_id: NOASSERTION

repo_name: rmind/npf


text:
## This does not read `foo`. Remove `$`/`${}` for that, or use `${var?}` to quiet.

### Problematic code:

```sh
read $foo
```

### Correct code:

```sh
read foo
```

### Rationale:

`read` takes a variable name, but shellcheck has noticed that you give it an expanded variable instead. This will populate whatever the variable expans to instead of the variable itself. For example:

    foo=bar
    read $foo   # Reads data into 'bar', not into 'foo'
    read foo    # Reads data into 'foo'

### Exceptions:

If this is intentional and you do want to read a variable through an indirect reference, you can silence this warning with a directive:

```sh
# shellcheck disable=SC2229
read "$foo"
```

Or take advantage of the fact that ShellCheck only warns when no parameter expansion modifiers are applied:

```sh
read "${foo}"    # ShellCheck warns
read "${foo?}"   # No warning
```

`${foo?}` fails when `foo` is unset, which is fine since `read` would have failed too. The main side effect is an improved runtime error message in that case.

### Related resources:

* [Bash Pitfalls #12](https://mywiki.wooledge.org/BashPitfalls#pf12): `read $foo`
[Source](https://github.com/koalaman/shellcheck/wiki/SC2229)

repository: codacy/codacy-shellcheck

gha_language: Scala

repo_name: codacy/codacy-shellcheck


text:
# ipmctl

ipmctl is a utility for configuring and managing Intel Optane DC persistent memory modules (PMM).

It supports functionality to:
* Discover PMMs on the platform.
* Provision the platform memory configuration.
* View and update the firmware on PMMs.
* Configure data-at-rest security on PMMs.
* Monitor PMM health.
* Track performance of PMMs.
* Debug and troubleshoot PMMs.

ipmctl refers to the following interface components:

* libipmctl: An Application Programming Interface (API) library for managing PMMs.
* ipmctl: A Command Line Interface (CLI) application for configuring and managing PMMs from the command line.
* ipmctl-monitor: A monitor daemon/system service for monitoring the health and status of PMMs.

Packages are available on Fedora.

Fedora and EPEL 7 packages can be found at: https://copr.fedorainfracloud.org/coprs/jhli/ipmctl

OpenSUSE and SLES packages can be found at: https://build.opensuse.org/package/show/home:jhli/ipmctl

Ubuntu packages can be found at: https://launchpad.net/~jhli/+archive/ubuntu/ipmctl

## Build

### Linux

The lastest Linux kernel version available is suggested.

libndctl is required to build, packages can be found at: https://copr.fedoraproject.org/coprs/djbw/ndctl/

The source can be found at: https://github.com/pmem/ndctl

All other dependencies are widely available.

```
mkdir output && cd output
cmake -DRELEASE=ON -DCMAKE_INSTALL_PREFIX=/ ..
make -j all
sudo make install
```
build artifacts can be found in output/release

To build RPMs:

```
./rpmbuild.sh xx.xx.xx.xxxx
```

The RPMs will be in output/rpmbuild/RPMS/

## Build Windows

Install VS2017
Open as a CMake project


text:
# linkedin-bot
simple js script for automatic adding contacts

![linkedin-bot](https://raw.githubusercontent.com/snmslavk/linkedin-bot/master/images/b7f6ca42f44f684341ae93781cf208a2.gif)

# How to use?
* Go to this page, previously entered into [linkedIn/mynetwork](https://www.linkedin.com/mynetwork/)
* Press the following key combination:
Ctrl + Shift + I
* Insert the console javascript code available on this page [script](https://github.com/snmslavk/linkedin-bot/blob/master/main-script.js)
* Change values of these variables
```javascript
      var countOfPagesScrolled = 0; // A number of scrolls that script should perform
      var searchPhrase = "Developer"; //Keyword that will be used in your selection
```

This script is just slightly modified, originally it is from [here](https://github.com/Kravalg/linkedin-bot)


text:
---
layout: post
disqus: 'y'
title: Wignerization
---

Though it is tedious, I would think some notes on Wigner transform is necessary to some beginner like me. All notes are based on H.T. Yau's famous result in 1999.

For Schroedinger equation, $i\psi_t = H\psi$, where $H = H_0 + \lambda V$, $H_0 = -\frac{1}{2}\Delta$. Formally, we have Dyson series

$$\psi_t = e^{-itH}\psi_0 = \sum_{n=0}^{N-1} \psi_n(t) + \Psi_N(t)$$
where $V$ is spatially variable,
$$\psi_n(t) = (-i\lambda)^n (\int_0^t)^{n+1} \prod_{j=0}^n(ds_j) \delta(t - \sum_{j=0}^n s_j) e^{-is_0H_0}V\cdots Ve^{-is_n H_0}  \psi_0$$
and remainder is
$$\Psi_N(t) = -i\lambda \int_0^t ds e^{-i(t-s)H}V\psi_{N-1}$$

We take Fourier transform on $\psi_n$, ignoring the constants $(2\pi)^d$ by normalizing the Lebesgue measure. The integral is actually in a simplex instead of full cube.

$$\widehat{\psi}_n(t, p_0) = \lambda^n \int \prod_{j=1}^n (dp_j) K(t;p,n) L(p, n) \widehat{\psi}_0(p_n)$$

where $$K = (-i)^n \int_0^t \prod_{j=0}^n (ds_j) \delta(t - \sum_{j=0}^n s_j) \prod_{j=0}^n e^{-is_j p_j^2}$$ $$L(p,n) = \prod_{j=0}^{n-1} \widehat{V}(p_j - p_{j+1})$$ It is straightforward to check this by convolution back.

The main result shows that if we truncate the series, we can get error term goes away by taking limit.

For $\psi = \psi_1 + \psi_2$, with $\psi_2$ as error, we can show that for any admissible functional $\widehat{J}_{\epsilon}(\xi, v)$,
$$|E\int \overline{\widehat{J}_{\epsilon}}(\xi, v)(\widehat{W}_{\psi}(\xi, v) - \widehat{W}_{\psi_1}(\xi, v))| d\xi dv\le C \sup\|\widehat{J}_{\epsilon}\|_{1,\infty}\sqrt{E|\psi_2|^2 E|\psi_1|^2}$$

Thus after truncation of Dyson series, above limit will be zero as $N\to\infty$, which means weak convergence.

The Wignerization of the truncated series will involve all terms like
$$ E \int \overline{\widehat{J}}_{\epsilon} \overline{\widehat{\psi}_n(t, v-\frac{\xi}{2})} \widehat{\psi}_{m}(t, v + \frac{\xi}{2}) d\xi dv$$
above expectation involves $L(p,n), L(p',m)$, when $V$ is standard Gaussian process, then $n+m$ must be even to get perfect pairing to be nonzero.

Knowing that $E \overline{\widehat{V}(p)}\widehat{V}(q) = \delta(p - q) R(p)R(q)$, we will try to find out all cases like

1. $\widehat{V}(p_j - p_{j+1})\widehat{V}(p_{k}\prime -p_{k+1}\prime)$
2. $\widehat{V}(p_j - p_{j+1})\widehat{V}(p_{k} -p_{k+1})$
3. $\widehat{V}(p_j\prime - p_{j+1}\prime)\widehat{V}(p_{k}\prime -p_{k+1}\prime)$

where $p_0 = v-\frac{\xi}{2}$ and $p'_0 = v + \frac{\xi}{2}$. Connecting all $p$ and $p'$ forming a loop, all relations can be classified as nested, crossing and simple. It can be shown that these kinds of interaction is dominated by simple relations.

[TO BE CONTINUED]


text:
---
layout: post
title: Week 6
---

# Team Assessment + Open Data Week Plans

### Team Strengths - Bitcoin

Going off my teammates' assessment of their skills on their blogs, I think we have a very varied yet complementary array of strengths. For example, we have people familiar with the Linux environment, which could be very useful for testing, considering some of us work on MacOS. Some are more experienced with Github and making contributions, but aren't too big on documentation, while I enjoy documentation/checking for less technical issues.

### Meeting Time:

\*Monday 5PM works for the group.

### Challenges:

This is an ambitious project that we aren't all really familiar with, so it will be challenging to take on the learning curve. However, I think this'll be rewarding as well.

\*In class, Joanna emphasized the difficulty of the project / the issue that it might not be newcomer-friendly for various reasons. As a result, we'll have to make a decision about whether we should/want to continue with it.

### Milestones

I would love to address a significant (defined as something substantial that won't be dismissed) issue or find one myself and be able to contribute that way. For a lot of the projects we've explored, it's been so hard to even find where to start.

### Open Data Week Events:

  The events I plan to attend are:

  [Data through Design: Art Exhibit](http://www.open-data.nyc/#details256)
  (Really excited about this, actually, as a lover of art/art history and look forward to see the intersectionality of art and open data.)

  ~~[HUMAN DATA: The Impact of Open Data for Connected Infrastructure](http://www.open-data.nyc/#details190)
  (Mostly going to this because it's close (in Greenpoint) and I think A/D/O is a fun venue, but also interested to see how physical and virtual infrastructure interact.)~~

  \*[FUTURE City Lab Curator-Led Group Tour](http://www.open-data.nyc/#details119) - Similar to the first exhibit; love checking out aesthetic representations of data. Also love history and as a NYC native, interesting to see what the data-based predictions of the future are.

\* = Updated: Mar 7


text:
## JumpIfSubstituteBlocks

Adds a new command for move scripts, `jumpifsubstituteblocks` to Fire Red. Substitute does not block moves that are sound-based or coming from a Pokémon with the ability Infiltrator.

### What do I do before I build this?

If necessary, change `move_cmds` in `constants.s`. The given address of this table is for MrDollSteak's patch, so if it is there, you will not need to modify this. This is the table of commands for move scripts (e.g. `attackcanceler` and `attackstring`).

Update `ATK_JUMPIFSUBSTITUTEBLOCKS` in `constants.s`. It will need an unused move script command id.

Sound-based moves only started bypassing Substitute in Gen VI. If you don't like that change, you can set `SOUND_BYPASSES_SUBSTITUTE` to `false` in `src/global.h`.

Change `ABILITY_INFILTRATOR` in `src/defines/abilities.h` to match what it is in your ROM. You should set this to `0xFFFF` if you don't have Infiltrator in your ROM.

The build script will search for adequate free space, but if you need to insert the code in a particular place, you can tell it where to start looking by modifying `free-space` in `config.ini`. If the given address is acceptable (i.e. is word-aligned and has enough bytes of free space), it will be inserted there.

### How do I build this?

Click [here](scripts/makinoa/README.md) for build instructions.

### What do I do after I build this?

The syntax in your move script is just `jumpifsubstituteblocks ptr`. It'll be stepped over and do nothing if Substitute doesn't block; it it does block, script execution will continue from `ptr`.

In order to use it in BSP, you'll need to add `#command jumpifbattleover ATK_JUMPIFSUBSTITUTEBLOCKS 0x1  "Offset to possibly jump to" 0x4` to BSP's `commands.bsh`. Don't literally include `ATK_JUMPIFSUBSTITUTEBLOCKS` here; replace it with whatever value you chose.

This also patches a number of existing functions that check for the Substitute status so that they instead check if Substitute should block the move instead. However, scripts for moves are untouched and may still check simply for whether Substitute is active (they should be updated to use `jumpifsubstituteblocks` instead).

### Credits

Port of the same command in [Egg's Pokeemerald Battle Engine](https://github.com/DizzyEggg/pokeemerald/blob/battle_engine_v2/src/battle_script_commands.c#L10534).

repository: Zeturic/jumpifsubstituteblocks

repo_name: Zeturic/jumpifsubstituteblocks


text:
# PN5_60896

**Created At:** 6/27/2019 11:39:58 AM
**Updated At:** 6/29/2019 9:03:18 AM
**Original Doc:** [pn5_60896](https://docs.jbase.com/61286-5-7-3-release-notes/pn5_60896)
**Original ID:** 400115
**Internal:** No

### Description

**jshow -f filename** misleading

### Current Release Behavior

Prior to this patch, under certain conditions, **jshow -f** would erroneously report that a file was visible.

repository: CBarouch/docs

repo_name: CBarouch/docs


text:
# ImTools

[![license](https://img.shields.io/github/license/dadhi/ImTools.svg)](http://opensource.org/licenses/MIT)

- Lib package: [![NuGet Badge](https://buildstats.info/nuget/ImTools.dll)](https://www.nuget.org/packages/ImTools.dll)
- Code package: [![NuGet Badge](https://buildstats.info/nuget/ImTools)](https://www.nuget.org/packages/ImTools)

Immutable persistent collections, Ref, and Array helpers designed for performance.

Note: concurrent HashMap from tests below is out until #2 is fixed.

Split from [DryIoc](https://bitbucket.org/dadhi/dryioc).

## Benchmarks

Based on [this great benchmark](https://gist.github.com/mrange/d6e7415113ebfa52ccb660f4ce534dd4) with F# and C# collections.

### Lookup

#### Speed

![Lookup Speed](BenchmarkResults/perf_Lookup.png)

#### Memory

No GC count

### Insert

#### Speed

![Insert Speed](BenchmarkResults/perf_Insert.png)

#### GC count

![GC Counts](BenchmarkResults/cc_Insert.png)

### Remove

#### Speed

![Insert Speed](BenchmarkResults/perf_Remove.png)

#### GC count

![GC Counts](BenchmarkResults/cc_Remove.png)

## Usage Example

Let's assume you are implementing yet another DI container because why not :-)

Container should contain registry of `Type` to `Factory` mappings.
On resolution `Factory` is compiled to the delegate which you would like to cache, because compilation is costly.
The cache will store the mappings from `Type` to `Func<object>`.

__The requirements:__

- The container may be used in parallel from different threads including registrations and resolutions.
- The container state should not be corrupted and the cache should correspond to the current state of registrations.

Let's design the basic container structure to support the requirements and __without locking__:

```csharp
    public class Container
    {
        private readonly Ref<Registry> _registry = Ref.Of(new Registry());

        public void Register<TService, TImpl>() where TImpl : TService, new()
        {
            _registry.Swap(reg => reg.With(typeof(TService), new Factory(typeof(TImpl))));
        }

        public object Resolve<TService>()
        {
            return (TService)(_registry.Value.Resolve(typeof(TService)) ?? ThrowUnableToResolve(typeof(TService)));
        }

        public object ThrowUnableToResolve(Type t) { throw new InvalidOperationException("Unable to resolve: " + t); }

        class Registry
        {
            ImHashMap<Type, Factory> _registrations = ImHashMap<Type, Factory>.Empty;
            Ref<ImHashMap<Type, Func<object>>> _resolutionCache = Ref.Of(ImHashMap<Type, Func<object>>.Empty);

            // Creating a new registry with +1 registration and new refeence to cache value
            public Registry With(Type serviceType, Factory implFactory)
            {
                return new Registry()
                {
                    _registrations = _registrations.AddOrUpdate(serviceType, implFactory),

                    // Here is most interesting part:
                    // We are creating new independent reference pointing to cache value,
                    // isolating it from possible parallel resolutions,
                    // which will swap older version/ref of cache and won't touch the new one.
                    _resolutionCache = Ref.Of(_resolutionCache.Value)
                };
            }

            public object Resolve(Type serviceType)
            {
                var func = _resolutionCache.Value.GetValueOrDefault(serviceType);
                if (func != null)
                    return func();

                var reg = _registrations.GetValueOrDefault(serviceType);
                if (reg == null)
                    return null;

                func = reg.CompileDelegate();
                _resolutionCache.Swap(cache => cache.AddOrUpdate(serviceType, func));
                return func.Invoke();
            }
        }

        class Factory
        {
            public readonly Type ImplType;
            public Factory(Type implType) { ImplType = implType; }
            public Func<object> CompileDelegate() { return () => Activator.CreateInstance(ImplType); }
        }
    }
```

repository: MuffPotter/ImTools

repo_name: MuffPotter/ImTools


text:
# JavaScript 101<br />Objects

---
## Objects

- JavaScript is an Object-based programming language.
- You can created your own objects and set their values
- `Properties` are are values associated with `Objects`.
- `Methods` are actions to be performed on `Objects`.

---
## Objects
#### Properties

	.runnable

	var str = "Some String";

	console.log(str.length);

- You can use properties to get information about an object.
- It will return a value based on the request.
- If the property doesn't exist an error will be thrown.

---
## Objects
#### Methods

	.runnable

	var str = "Some String";

	console.log(str.toUpperCase());

- Methods allow you to manipulate the object.
- It copies the object in the transformation so the change isn't permanent.

---
## Objects
#### Strings

	var str = "Some string";

- A string Object is used to store a piece of string text.

---
## Objects
### Date

	new Date() // current date and time
	new Date(milliseconds) //milliseconds since 1970/01/01
	new Date(dateString)
	new Date(year, month, day, hours, minutes, seconds, milliseconds)

- The `Date` object is used to work with dates and times.
- There are 4 ways to create a new `date` object.

---
## Objects
#### Arrays

	var arr = new Array();

- `Arrays` are special objects that can hold more than one value.
- You can iterate and manipulate values to an array.
- You can resort and push new values onto the array.
- JavaScript works with 0-based index arrays.

---
## Objects
#### Boolean

	var bool = new Boolean();

- These are boolean objects similar to ones that exist in other languages.
- It works on true or false properties.
- If 0, -0, null, "", false, undefined or NaN are passed to it, it will be set to false.

---
## Objects
#### Math

	var x = Math.PI;

- Used to work with mathematical values.
- Has set of mathematical methods when working with integers.

---
## Objects
#### RegExp

	var patt=new RegExp(pattern,modifiers);

- Regular expression searches for patterns in strings.
- It is a powerful tool for searching.
- JavaScript provides several search and replace functions.

repository: wpinvent/decks

repo_name: wpinvent/decks


text:
# Laravel Localizer

[![GitHub release](https://img.shields.io/github/release/codezero-be/laravel-localizer.svg)]()
[![License](https://img.shields.io/packagist/l/codezero/laravel-localizer.svg)]()
[![Build Status](https://scrutinizer-ci.com/g/codezero-be/laravel-localizer/badges/build.png?b=master)](https://scrutinizer-ci.com/g/codezero-be/laravel-localizer/build-status/master)
[![Code Coverage](https://scrutinizer-ci.com/g/codezero-be/laravel-localizer/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/codezero-be/laravel-localizer/?branch=master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/codezero-be/laravel-localizer/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/codezero-be/laravel-localizer/?branch=master)
[![Total Downloads](https://img.shields.io/packagist/dt/codezero/laravel-localizer.svg)](https://packagist.org/packages/codezero/laravel-localizer)

#### Automatically detect and set an app locale that matches your visitor's preference.

- Define your supported locales and match your visitor's preference
- Uses the most common locale [detectors](#detectors) by default
- Uses the most common locale [stores](#stores) by default
- Easily create and add your own detectors and stores

## Requirements

- PHP >= 7.1
- Laravel >= 5.6

## Install

```bash
composer require codezero/laravel-localizer
```

Laravel will automatically register the ServiceProvider.

#### Add Middleware

Add the middleware to the `web` middleware group in `app/Http/Kernel.php`, after `StartSession` and before `SubstituteBindings`:

```php
protected $middlewareGroups = [
    'web' => [
        \Illuminate\Session\Middleware\StartSession::class, // <= after this
        //...
        \CodeZero\Localizer\Middleware\SetLocale::class,
        //...
        \Illuminate\Routing\Middleware\SubstituteBindings::class, // <= before this
    ],
];
```

In Laravel 6.x you also need to add the middleware to the `$middlewarePriority` array in `app/Http/Kernel.php` to trigger it in the correct order:

```php
protected $middlewarePriority = [
    \Illuminate\Session\Middleware\StartSession::class, // <= after this
    //...
    \CodeZero\Localizer\Middleware\SetLocale::class,
    //...
    \Illuminate\Routing\Middleware\SubstituteBindings::class, // <= before this
];
```

#### Publish Configuration File

```bash
php artisan vendor:publish --provider="CodeZero\Localizer\LocalizerServiceProvider" --tag="config"
```

You will now find a `localizer.php` file in the `config` folder.

#### Configure Supported Locales

Add any locales you wish to support to your published `config/localizer.php` file:

```php
'supported-locales' => ['en', 'nl', 'fr'];
```

## Drivers

#### Detectors

By default the middleware will use the following detectors to check for a supported locale in:

1. The URL slug
2. The session
3. A cookie
4. The browser
5. The app's default locale

If you publish the configuration file, you can choose which detectors to run and in what order.

You can also create your own detector by implementing the `\CodeZero\Localizer\Detectors\Detector` interface and add a reference to it in the config file. The detectors are resolved from Laravel's IOC container, so you can add any dependencies to your constructor.

####  Stores

The first supported locale that is returned by a detector will then be stored in:

- The session
- A cookie
- The app locale

If you publish the configuration file, you can choose which stores to use.

You can also create your own store by implementing the `\CodeZero\Localizer\Stores\Store` interface and add a reference to it in the config file. The stores are resolved from Laravel's IOC container, so you can add any dependencies to your constructor.

## Testing

```
composer test
```

## Security

If you discover any security related issues, please [e-mail<EMAIL_ADDRESS>instead of using the issue tracker.

## Changelog

See a list of important changes in the [changelog](CHANGELOG.md).

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

repository: trafax/webshop

repo_name: trafax/webshop


text:
# Contributing

We would love for you to contribute to DEV IO Foudantion and help us make this even better! Start reading this document to see it is not difficult as you might have imagined.

## Table of Contents

- [Welcome](#contributing)
- [Open an Issue](#open-an-issue)
- [Submit a Pull Request](#submit-a-pull-request)
- [Code of Conduct](#Code of Conduct)
- [License](#License)

## Open an Issue

[Open an Issue](https://github.com/deviofoundation/artwork/issues/new) to report any problems or improvements.

## Submit a Pull Request

1. Fork the Github repo: git clone https://github.com/milligram/milligram.git
1. Create a new branch: git checkout -b issuenumber-feature-name
1.  Push to the branch: git push origin my-feature-name
1. Submit a pull request!

## Code of Conduct

Help us keep Milligram open and inclusive. Please read and follow our thoughts on [Code of Conduct](http://confcodeofconduct.com/).

## License

By contributing, you agree to license your contribution under the [MIT License](https://github.com/deviofoundation/artwork/blob/master/license).

repository: deviofoundation/artwork

repo_name: deviofoundation/artwork


text:
# external-file-open package for the Atom editor

Open files outside of project directory.

This package waits in the background for an `Open File ...` request for a file outside of the project directory tree.  When such an open is requested it creates a symlink to that file inside a temp directory and opens that instead.  The symlink is contained in a directory in the project root called `.external-files`.

When an external file is opened it is treated exactly as a local project file with all Atom features.  When closed the symlink is removed.  When the last symlink is removed the directory `.external-files` is removed.

There is no way to open an external file the old way that also opens the enclosing folder.  To do this simply open that enclosing folder instead.

`Open Folder ...` is not changed in any way.

That's it.  It couldn't be simpler.

This project is copyrighted with the MIT license.

repository: mark-hahn/external-file-open

repo_name: mark-hahn/external-file-open


text:
**Just married..... and.....need a holiday for summer?**
---
---
![An image of of the Maldivian ocean](./static/images/maldivespic.jpg)

## Well then **MALDIVES** is for you ....
Have a wonderful week in Maldives' most popular hotels specially chosen for your world and taste of a great holiday.

---

## **Reviews**

![picture of a couple in maldives on holiday taking a selfie](./static/images/reviews.jpg)

> " This week has been the most enjoyable holiday I have ever experienced. The facilities are great round here. Also no need to worry about communication as the **GuidePod** helps a lot. It's a great deal. I recommend it to all. "

---

 So what are you waiting for....   [**BOOK NOW!!**](#Time-to-BOOK-your-magical-holiday-in-Maldives)

With our great holiday deals and recieve your very own [**GuidePod!!**](#GuidePod-The-most-reliable-translator-and-travel-kit-you-need)

---
## Discover more about Maldives...
<iframe width="375" height="393" src="https://www.youtube.com/embed/ym7qyjIB3FM" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

---
### **GuidePod**- The most reliable translator and travel kit you need!
![picture of a translator](./static/images/giudepod.jpg)
 This wonderful translator will make your life really easy once you have it. The **GuidePod** includes....
1. A button to call for a Taxi
2. A record button to record your voice to be translated to the person you wish to communicate with.
3. A keyboard to type in what you want to translate if recording isn't your thing!
4. A fan to keep you cool!
5. And last but not least a pair of earphones to keep your converstions private!

---

repository: silakaradal/Maldives

repo_name: silakaradal/Maldives


text:
# docker-hugo

Dockerfile for using hugo locally as an alternative to [installing](https://gohugo.io/getting-started/installing/). Built as minimal container.

## Usage

    docker run -it -p 1313:1313 -v $(pwd):/host hugo [flags] [command]

This can be aliased in your `.bash_profile` to use a standard directory and port for troubleshooting. Assuming using a `blog` folder under your home directory:

    alias hugo='docker run -it -p 1313:1313 -v ~/blog:/host hugo'

Reload your terminal session, and you can run `hugo new site .`. Use the current working directory within the container to point to your blog (provided you mapped `/host` to the directory on the host).

repository: buzzsurfr/docker-hugo

repo_name: buzzsurfr/docker-hugo


text:
# Chordal graph

Every undirected cycle $X_1 - X_2 \cdots X_k - X_1$ of length $k \ge 4$ has a *chord*.

Chord is an edge that is not part of the cycle but connects two vertices of the cycle

![](../.images/graphs/chordal_graph.png)

Example of a chord. The green edges are not part of a cycle.


text:
# CppStringTools

This header only files provide utilitaries for std::basic_string classes.

WORK IN PROGRESS

### Stripping

* Each stripping function exists in 2 versions: inplace (starting with a "i") and copy.
* prefixes "l" and "r" stand for "left" and right
* Without condition parameter, stripping is done using white-spaces


text:
{
  "title": "🤯bookdown w/ runable exercises, & interactive JS extensions… 📕 \"Introduction to Econometrics w/ R\" by Christoph Hanck, Martin Arnold, Alexander Gerber & Martin Schmelzer https://t.co/SgP9CYDKkZ https://t.co/WQkb3FWJp9 #rstats #repeatTweet https://t.co/vj017el7u4",
  "date": "2019-01-16"
}

# blogdown

> **Jennifer Thompson** (@jent103; 54/8): .@apreshill's list of #blogdown don'ts:
> >
> - don't touch index.Rmd
> - don't touch /public
> - for goodness' sake, don't knit  [↪](https://twitter.com/xieyihui/status/1085304300258115584)

<!-- -->

> **Thomas Mock 👨🏼💻 @ #rstudioconf!** (@thomas_mock; 33/3): .@apreshill reminding us to never knit! just commit! when publishing your #blogdown site!
> >
> #RStudioConf Advanced R Markdown https://t.co/Vv3NKbBtxz  [↪](https://twitter.com/xieyihui/status/1085307823964278785)

<!-- -->

> **The R-Podcast (Eric)** (@theRcast; 25/6): 👏 Day 1 of the adv #rstats #rmarkdown at #rstudioconf 💼 with insights & resources!
> - @apreshill 🏋♀on  #blogdown #bookdown #xaringan #flexdashboard
> - @JoannaMellon 🔍 #learnr with real-time demo
> - me: 🚔#officer to create #powerpoint slides
> >
> 👀https://t.co/1rcevxSa0N  [↪](https://twitter.com/xieyihui/status/1085379602632056835)

<!-- -->

> **Alison Hill** (@apreshill; 24/1): I've arrived at that time in my workshop preparation when I refine my gif selection in my slides...(I promise there are very few)
> >
> This one serves many #rstats #blogdown purposes:
> 1) don't knit!
> 2) don't touch your public folder
> 3) don't touch your themes folder https://t.co/u9CBUNOY1u  [↪](https://twitter.com/xieyihui/status/1083791211222073344)

<!-- -->

> **Ming Tang** (@tangming2005; 18/6): reposting this using blogdown. added some links and typo checked by Rstudio! #rstats  Understanding p-value, multiple comparisons, FDR and q value https://t.co/TTR8EfM70u  [↪](https://twitter.com/xieyihui/status/1084543022199656448)

<!-- -->

> **Detlef Burkhardt 🚀** (@DetlefBurkhardt; 16/10): R2:D9 #100DaysOfCode <- R-Mark-Blog-Bookdown
> >
> Today I check the "blogability" of the #rstats-ecosystem. Learning the concepts of #knitr #rmarkdown #bookdown #blogdown #pandoc, mainly in @rstudio with a lot of input from @xieyihui.
> >
> \_
> #100DaysOfMLCode #301DaysOfCode #DataScience https://t.co/FmQl66keww  [↪](https://twitter.com/xieyihui/status/1084378104578146305)

<!-- -->

> **Thomas Mock 👨🏼💻 @ #rstudioconf!** (@thomas_mock; 9/1): Followup to close the #blogdown session!
> >
> Change things in your config.toml file - then serve_site() and see what happens! https://t.co/8Cle6uA69L  [↪](https://twitter.com/xieyihui/status/1085310210678444037)

<!-- -->

> **Alison Hill** (@apreshill; 8/0): @kara_woo wow 🥺
> >
> on a related note, prepping for a blogdown workshop, I did a search for blog posts on the topic and got like 1/3 of the way through reading someone's post and realized it was my blog post word for word. 🤔 but at least they didn't ask me to help tie up the loose ends 😂  [↪](https://twitter.com/xieyihui/status/1083210343390732289)

<!-- -->

> **Andrew Heiss, PhD** (@andrewheiss; 5/2): Important #rstats life hack if you want to prevent accidental knitting of blogdown and bookdown pages! https://t.co/ZjNZiZO9l5  [↪](https://twitter.com/xieyihui/status/1085353932950364160)

<!-- -->

> **Phillip Meintzer** (@FishPhilEh; 5/2): Awesome resource for creating your own academic web page using R blogdown! https://t.co/kBuWgI2W1E  [↪](https://twitter.com/xieyihui/status/1083123679964233728)

<!-- -->

> **Alexis Norris** (@AlexisLNorris; 5/0): @Hoosierflyman @chicaScientific @mgrntwrkr Have someone in your lab use #rstats to make the lab website! ✔Free ✔they learn R and make pretty figures for their papers
> https://t.co/GQ2z4sUrbv  [↪](https://twitter.com/xieyihui/status/1083593651375222789)

<!-- -->

> **Andrew Heiss, PhD** (@andrewheiss; 4/0): So I added random motivational messages to my .Rprofile, following this blog post by @mattdray, and it makes building blogdown sites kinda fun now #rstats https://t.co/aW53wG2Ypb https://t.co/kkIzT8cdu0  [↪](https://twitter.com/xieyihui/status/1083072269734240258)

<!-- -->

> **🇲🇽 Dr. Leonardo Collado-Torres** (@fellgernon; 3/2): *4* a collection of guides on how you can meet #rstats users & network for different types of individuals
> >
> From anon ways, to @Twitter lurking/posting, to #blogdown presence, etc
> >
> I’ve been talking a lot about @LIBDrstats https://t.co/9sUBa0LDaS but that’s just 1 way #rstudioconf  [↪](https://twitter.com/xieyihui/status/1085406672036745216)

<!-- -->

> **Doctorb Zhian N. Kamvar** (@ZKamvar; 3/0): These were all super confusing to me when I was starting with blogdown. https://t.co/qftr71lWvE  [↪](https://twitter.com/xieyihui/status/1085323713166233600)

<!-- -->

> **Phillip Meintzer** (@FishPhilEh; 3/0): Following @dsquintana 's instructions, I was able to build myself a simple academic website using blogdown with #Rstats. Here's an early draft. I still have to incorporate my publications etc. https://t.co/iIQT2i7ckx  [↪](https://twitter.com/xieyihui/status/1083431128927617025)

<!-- -->

> **Andrew Heiss, PhD** (@andrewheiss; 2/0): @jent103 @apreshill I would *love* a way to disable knitting for blogdown sites from inside RStudio. I’ve accidentally hit command+shift+K waaaay too often in sites :(  [↪](https://twitter.com/xieyihui/status/1085316894180093952)

<!-- -->

> **Alison Hill** (@apreshill; 2/0): @SteveDX_ well technically you can delete the whole darn public/ folder, then serve your site again, if you are wanting to clean house!
> >
> I was mainly responding to this community post: https://t.co/YU22TOqwS0
> >
> In which the user wanted to edit the index.html  [↪](https://twitter.com/xieyihui/status/1083792296686972928)

<!-- -->

> **A_maninaworld** (@TomorrowsIcons; 1/1): What’s an awesome package in R and what can I do with it? Here’s a list of the most popular packages I’ve used so far: #ggplot2 #shiny #blogdown #rvest #knitr #Tidyverse . Any recommendations? #rstats @rstats4ds @hadleywickham @kdnuggets @RLadiesGlobal @Rbloggers  [↪](https://twitter.com/xieyihui/status/1084867573223772160)

<!-- -->

> **Thomas Mock 👨🏼💻 @ #rstudioconf!** (@thomas_mock; 1/0): @myadav2009 https://t.co/rrP8EIk1GK
> >
> Lots of details here!  [↪](https://twitter.com/xieyihui/status/1085523186014478337)

<!-- -->

> **Dale Maschette 🐟🧗♂** (@Dale_Masch; 1/0): @djnavarro sure...🤷♂ you know more about blogdown than I do.  [↪](https://twitter.com/xieyihui/status/1085411113741754373)

<!-- -->

> **Danielle Navarro** (@djnavarro; 1/0): @Dale_Masch *grumbles about how little she understands blogdown*  [↪](https://twitter.com/xieyihui/status/1085397901654790145)

<!-- -->

> **kostas kougioumoutzis** (@konkougioumou; 1/0): It may not be much, but in 3 years time, I went from completely #rstats illiterate (and self-taught) to design and publish my own website completely from within #r! A huge thank you to @xieyihui for his great and book package #blogdown!  [↪](https://twitter.com/xieyihui/status/1084853876401033216)

<!-- -->

> **Taras Kaduk** (@taraskaduk; 1/0): @ma_salmon just read your rOpenSci blog post about the site running on HUGO. Quick question: do I understand it right that it is straight-up HUGO, with no blogdown layer on top?  [↪](https://twitter.com/xieyihui/status/1083378067429576704)

<!-- -->

> **Taras Kaduk** (@taraskaduk; 1/0): @ma_salmon @_inundata "Ease to move around" was my reason, too. After realizing I can't easily switch to HUGO without rewriting .Rmd files into .md files with pre-generated images 😆
> >
> @_inundata, curious to know your opinion!
> https://t.co/X9UrIXD79U  [↪](https://twitter.com/xieyihui/status/1083477714005299200)

<!-- -->

> **espinielli** (@espinielli; 1/0): @ma_salmon @rOpenSci @_inundata Yes, I started from that and want to go to full blogdown...my big issue is designing the various (template) pages and relevant CSS in order to be good (enough) for desktop and mobile...
> Catching up on the new pages from old one in production to new one under dev a burden too😭  [↪](https://twitter.com/xieyihui/status/1083102248954146816)

<!-- -->

> **Samantha Toet** (@Samantha_Toet; 1/0): @toddmorling That's a great idea! That way you will be able to keep track of everything you learn and you can look back on it in a few years and see how you're improving and growing. I may be biased, but I recommend blogdown + hugo + netlify for deploying 🙂  [↪](https://twitter.com/xieyihui/status/1083070928878223361)

<!-- -->

> **Sascha Wolfer** (@sascha_wolfer; 0/1): Dear #rstats bloggers: I want to migrate my blog https://t.co/szJQGF9E8f from https://t.co/y3JAubIZvu to a blogdown-based solution. What do I have to think of? How, for example, can I connect it to @Rbloggers? Can I get free web space somewhere? Anything else? Thx 4 ur help!  [↪](https://twitter.com/xieyihui/status/1084018582143549441)

<!-- -->

> **Mahesh Yadav** (@myadav2009; 0/0): @thomas_mock I am not able to understand the #blogdown thread, but seems very interesting. Any book or article on that? Thanks  [↪](https://twitter.com/xieyihui/status/1085340512867966976)

<!-- -->

> **Alex Albright** (@AllbriteAllday; 0/0): @xieyihui Is there a way to specify a featured image for a post on my #blogdown website? (So that the featured image -- rather than the first image -- shows up when I link to the post on twitter/fb/etc.) #rstats  [↪](https://twitter.com/xieyihui/status/1084929247767027717)

<!-- -->

> **A_maninaworld** (@TomorrowsIcons; 0/0): Check out https://t.co/omWI4nnpN4 . You can do so much through #blogdown and #netlify #rstats  [↪](https://twitter.com/xieyihui/status/1084180631003762689)

<!-- -->

> **Ed_0110100001101001 💡⚙🛠☕** (@ed19741; 0/0): How to load the same needed packages in multiple blogdown posts? https://t.co/Y7cH5vJsDs  [↪](https://twitter.com/xieyihui/status/1084588006588207104)

<!-- -->

> **Ming Tang** (@tangming2005; 0/0): Adding citations to posts in blogdown.  https://t.co/m3GBHw9Ziu  [↪](https://twitter.com/xieyihui/status/1084541850109833217)

<!-- -->

> **Rex Douglass** (@RexDouglass; 0/0): https://t.co/7zn37IBL8L  [↪](https://twitter.com/xieyihui/status/1083801386460995585)

<!-- -->

> **Benjamin Wolfe** (@BenjaminWolfe; 0/0): @xieyihui 😁
> >
> Awesome! I mean I really did put a lot of work into my reproducible example.
> >
> I've really enjoyed #xaringan by the way, and am thinking of starting with #blogdown. I guess I'm just saying I'm a big fan of your work! https://t.co/GO8Eag6YTo  [↪](https://twitter.com/xieyihui/status/1083736511215009792)

<!-- -->

> **Henrik Bengtsson** (@henrikbengtsson; 0/0): Q: I set today's date but not time in my #rstats blogdown/#gohugo yaml;
> >
> date: 2019-01-10
> >
> => RSS pubDate to be 'Mon, 10 Jan 2019 00:00:00 +0000' => causes some aggregators (eg @RBloggers) not to relay them. Shld I use date+late time:
> >
> date: 2019-01-10 23:59:59 -0700
> >
> instead?  [↪](https://twitter.com/xieyihui/status/1083522157123067904)

<!-- -->

> **Taras Kaduk** (@taraskaduk; 0/0): @ma_salmon Thanks! Since rOpenSci is very R heavy, were there any particular reasons to keep it hugo-only and not adopt blogdown?
> See my question on the same issue here: https://t.co/X9UrIXD79U  [↪](https://twitter.com/xieyihui/status/1083397194785349632)

<!-- -->

> **hello!** (@mryap; 0/0): Explore and find it possible to run @xieyihui #blogdown site https://t.co/Ty3PdxDEuq with @rstudio in the cloud using @Netlify and @github. I just need to find a better @GoHugoIO theme to fit the images #rstats  [↪](https://twitter.com/xieyihui/status/1083344825339047937)

<!-- -->

# bookdown

> **Mara Averick** (@dataandme; 96/22): 🤯bookdown w/ runable exercises, & interactive JS extensions…
> 📕 "Introduction to Econometrics w/ R"  by Christoph Hanck, Martin Arnold, Alexander Gerber & Martin Schmelzer https://t.co/SgP9CYDKkZ
> https://t.co/WQkb3FWJp9 #rstats #repeatTweet https://t.co/vj017el7u4  [↪](https://twitter.com/xieyihui/status/1083087575781396482)

<!-- -->

> **Max Kuhn** (@topepos; 74/11): Slowly starting to commit GitHub resources for the new book (https://t.co/bNeNSVDj3G) as we prepare for the last set of draft chapters.
> >
> Just added the source data sets to https://t.co/oqqIbtR6gM
> >
> #rstats https://t.co/kXQMmjpEWw  [↪](https://twitter.com/xieyihui/status/1083810506069155842)

<!-- -->

> **We are R-Ladies** (@WeAreRLadies; 54/17): 8) "R Markdown: The Definitive Guide" by @xieyihui @fly_upside_down & @StatGarrett .  A great technical reference guide to.. you guessed it.. RMarkdown in #rstats!
> >
> https://t.co/lUHNXQfCMe https://t.co/RlJlBH09NY  [↪](https://twitter.com/xieyihui/status/1084983127758565376)

<!-- -->

> **Filippo Chiarello** (@f_chiare; 17/4): Super happy of the cover of my PhD thesis! 😄 Some #NLP and #wordcloud to represent the main verbs, nouns and adjectives I've used in my work, proudly written in #bookdown. Hopefully next year I'll present some of the content at #rstudioconf 🧐 https://t.co/GZNSDIriAJ  [↪](https://twitter.com/xieyihui/status/1085243753730895872)

<!-- -->

> **Thomas Mock 👨🏼💻 @ #rstudioconf!** (@thomas_mock; 13/0): . @apreshill Spitting YAML fire while covering her highly customized Bookdown!
> >
> #RStudioConf Advanced R Markdown workshop https://t.co/yZUTsM3vco  [↪](https://twitter.com/xieyihui/status/1085284496809885696)

<!-- -->

> **McMaster Soc Sci** (@McMasterSocSci; 5/2): "Reproducible Econometrics Using R" by  Jeffrey Racine, Senator William McMaster Chair in Econometrics. #rstats #rmarkdown #bookdown https://t.co/fwOAv4cLj2  [↪](https://twitter.com/xieyihui/status/1084167822073348096)

<!-- -->

> **Matthew Hendrickson** (@mjhendrickson; 5/1): @WeAreRLadies Efficient R Programming by Colin Gillespie @jumping_uk and @robinlovelace
> https://t.co/gGE5Qa7QDO  [↪](https://twitter.com/xieyihui/status/1084994027559227392)

<!-- -->

> **Matthew Hendrickson** (@mjhendrickson; 5/1): @WeAreRLadies Exploratory Data Analysis by @rdpeng
> https://t.co/SWn2xyHW3T  [↪](https://twitter.com/xieyihui/status/1084993493330808837)

<!-- -->

> **Alex  Papageorgiou** (@alpapag; 3/1): R for marketing e-book by @LeuvenU University's marketing dept https://t.co/BkmyoUehk3 #rstats  [↪](https://twitter.com/xieyihui/status/1083653994256445440)

<!-- -->

> **Stas Kolenikov** (@StatStas; 3/0): It is very fitting that this #bookdown @GitHub project would pop up in my feed in the middle of the #RStudioConf workshop on Advanced R Markdown!
> Danke @fraukolos for bringing this to my attention
> cc: @apreshill @xieyihui https://t.co/djrVFznFqk  [↪](https://twitter.com/xieyihui/status/1085226248333414400)

<!-- -->

> **Elías Eyþórsson** (@eliaseythorsson; 2/3): Is there anyway to create a list of tables, list of figures in word with #pandoc and @xieyihui's #bookdown ? I honestly can't find a yes / no answer in documentation and my attempts have not worked. Don't know whether to give up or continue trying. #rstats #phdchat  [↪](https://twitter.com/xieyihui/status/1084055745451229184)

<!-- -->

> **Chanel Meyers** (@chanelkmeyers; 2/0): @k_e_scott_1 My RAs loved YaRrr! https://t.co/R203Zzfxre  [↪](https://twitter.com/xieyihui/status/1084662672187056128)

<!-- -->

> **Toju** (@TojYouSo; 2/0): Do you use datacamp? Is it worth it? Or is there enough material out there for free - blogs/books on bookdown etc https://t.co/F4Gm80hq7f  [↪](https://twitter.com/xieyihui/status/1083646706951041024)

<!-- -->

> **Mathew 'Night Science' Ling** (@lingtax; 2/0): @emilyandthelime @Dale_Masch @dataandme @LisaDeBruine @djnavarro But that example above isn't a datacamp type activity.  Plus there are internal options for exercises in bookdown now. https://t.co/TiGt6PvpP9  [↪](https://twitter.com/xieyihui/status/1083299258441162752)

<!-- -->

> **Mathew 'Night Science' Ling** (@lingtax; 2/0): @Dale_Masch @emilyandthelime @dataandme @LisaDeBruine @djnavarro We have my old shiny one as well that we could use / adapt, in case we didn't care for D3. Details here: https://t.co/RlpXdXZOjr  [↪](https://twitter.com/xieyihui/status/1083228232852197377)

<!-- -->

> **Eduardo Guamán Daquilema** (@guamandseduardo; 2/0): Introduction to Data Exploration and Analysis with #RStats by Michael Mahoney
> 🔗#bookdown: https://t.co/FfEoY1fw5N https://t.co/HX4cjtnE4B  [↪](https://twitter.com/xieyihui/status/1083159862891159552)

<!-- -->

> **Dataiku** (@dataiku; 1/1): What should you be adding to your data science toolbelt? |
> https://t.co/g22CdJl3OK #datascience #python #bookdown #dataflow #featuretools #keras  [↪](https://twitter.com/xieyihui/status/1085184351976022017)

<!-- -->

> **Albert Krewinkel** (@kraut0xA; 1/1): @eliaseythorsson @xieyihui Not sure about bookdown, but pandoc does not. But there are various extensions that should help. E.g., pandoc-crossref might be helpful: https://t.co/BboV4freVM  [↪](https://twitter.com/xieyihui/status/1084058801010028544)

<!-- -->

> **Udayan Roy** (@UdayanRoy62; 1/0): Can anyone show me how to insert interactive multiple-choice questions -- as in the "Try It" boxes at https://t.co/tugPOFchsU -- in a #bookdown book? Please help.  [↪](https://twitter.com/xieyihui/status/1085412548655099904)

<!-- -->

> **Darren L Dahly** (@statsepi; 1/0): @Tfeend Yeah, once the module has run, we'll put everything on Youtube and github w/bookdown (mid-March).  [↪](https://twitter.com/xieyihui/status/1084206751031930880)

<!-- -->

> **Pedro Carrillo** (@PedroCarrillo; 1/0): bookdown: Authoring Books and Technical Documents with R Markdown #R https://t.co/O74SZyswUH  [↪](https://twitter.com/xieyihui/status/1083659237107122181)

<!-- -->

> **Bruno Lopes** (@BrunoLopes2855; 1/0): @toddmorling @R4DScommunity Peng is a good author, and this book for beginners is free. On https://t.co/HnYQC18ULN you can find other free books, for all levels.
> >
> I would also check the books by  Grolemund and Wickham - specially R 4 Data Science and Hands On Programming.
> >
> https://t.co/Y4HkXMUhT8  [↪](https://twitter.com/xieyihui/status/1083152831677431808)

<!-- -->

> **Udayan Roy** (@UdayanRoy62; 0/0): @xieyihui Is it possible to insert interactive multiple-choice questions -- as in the "Try It" boxes at https://t.co/tugPOFchsU -- in Bookdown? Please help.  [↪](https://twitter.com/xieyihui/status/1085411722159112193)

<!-- -->

> **Udayan Roy** (@UdayanRoy62; 0/0): @StatGarrett Is it possible to insert interactive multiple-choice questions -- as in the "Try It" boxes at https://t.co/tugPOFchsU -- in Bookdown? Please help.  [↪](https://twitter.com/xieyihui/status/1085410988176932865)

<!-- -->

> **Mike Rustell** (@mikerustell; 0/0): Work in progress https://t.co/hTqXeOYdsb  [↪](https://twitter.com/xieyihui/status/1085310896077983744)

<!-- -->

> **Steven Senior** (@stevensenior; 0/0): PhD thesis written in bookdown. Full marks. 👏 👏👏👏 https://t.co/YZQQ9Uzg1z  [↪](https://twitter.com/xieyihui/status/1085264410770317312)

<!-- -->

> **Oleksiy Anokhin** (@OleksiyAnokhin; 0/0): https://t.co/bNMX76BjU8  [↪](https://twitter.com/xieyihui/status/1084869706140565504)

<!-- -->

> **gradschool whisperer** (@TJ__Murphy; 0/0): So I'm  stitching together a bunch of handouts into an #rstats based online bookdown for my biostats course and its already over 20 chapters and I had no idea #blackhole  [↪](https://twitter.com/xieyihui/status/1083405520457908224)

<!-- -->

> **Maëlle Salmon 🐟** (@ma_salmon; 0/0): @espinielli @rOpenSci Well *I* started working for rOpenSci after the transition, that was mainly managed by @_inundata. Also note that https://t.co/50VMq23iYK is Hugo but not blogdown.
> For my own blog I used a standard theme with minimal tweaks, and recommend reading https://t.co/vacLkKRpPE  [↪](https://twitter.com/xieyihui/status/1083008963241635840)

<!-- -->

# knitr

> **Elio Campitelli** (@d_olivaw; 9/2): I need to knit a WIP paper to pdf and word, so I added this to my #knitr YAML.
> >
> #rstats https://t.co/q8YbILuRN1  [↪](https://twitter.com/xieyihui/status/1084892720479551488)

<!-- -->

> **Alison Hill** (@apreshill; 8/1): @JenRichmondPhD Try adding this at the top of your .R script:
> #' ---
> #' output: github_document
> #' ---
> >
> See https://t.co/AXnatObT08
> >
> As taught in @JennyBryan’s What They Forgot workshop (knitr::spin is what actually happens under the hood I believe)  [↪](https://twitter.com/xieyihui/status/1083016529120129024)

<!-- -->

> **Martin John Hadley** (@martinjhnhadley; 7/1): I feel this is one of @xieyihui's #rstats knitr secrets (just like <!--html_preserve-->)... did I miss the documentation for latex, markdown and html rendering for code chunks? https://t.co/KOvuf0NKEQ  [↪](https://twitter.com/xieyihui/status/1083409601146568704)

<!-- -->

> **Yihui Xie** (@xieyihui; 6/1): @martinjhnhadley That worked just by accident. These "engines" don't exist in knitr, and the default behavior is just to echo the code: https://t.co/XFkCbFCiXz So ```{latex} is the same as ```latex. The latter is valid Pandoc Markdown syntax and triggers syntax highlighting.  [↪](https://twitter.com/xieyihui/status/1083575819795087360)

<!-- -->

> **Chris Beeley** (@ChrisBeeley; 5/0): Ooh, I'm doing parameterised RMarkdown for the first time today (done it with Shiny before, just not knitr style).
> >
> Super simple. I'm even doing some non standard evaluation with it.
> >
> Nice :-)  [↪](https://twitter.com/xieyihui/status/1085106560030908417)

<!-- -->

> **Florian @ Real Scientists DE** (@realsci_DE; 5/0): Man kann bspw. mit #rstats, #rmarkdown, #knitr und #papaja Dokumente im perfekten APA-Stil entwerfen. Eine Riesenarbeit und -leistung von @xieyihui, @FrederikAust und Co! Es ist zwar mehr Arbeit, eindeutig, aber es lohnt sich.  [↪](https://twitter.com/xieyihui/status/1083736103721549824)

<!-- -->

> **Sebastian Sauer** (@sauer_sebastian; 2/0): Writing your texts in #rmarkdown? Struggling with long lines in version control? Check out `wrap_rmd()` in package #knitr to wrap the long lines. https://t.co/7J9gJhhlbn  [↪](https://twitter.com/xieyihui/status/1084800763572953090)

<!-- -->

> **Robin Neumann** (@funktoriell; 1/0): @AlizeNero Fun fact: I did use knitr for generating reports with R in the past (https://t.co/6Ibyp2BqPI) 😂🤓
> >
> But offline-non-computer-knitting is also very awesome!  [↪](https://twitter.com/xieyihui/status/1083448441701916674)

<!-- -->

> **John Avocado 陳約翰** (@SuperCroup; 0/1): Placing two tables side by side using ‘knitr’ and ‘kableExtra’
> >
> #rstats
> >
> https://t.co/b3OkXbsnSq  [↪](https://twitter.com/xieyihui/status/1085412966344941568)

<!-- -->

> **Zorro Notorious M. E. B.** (@znmeb; 0/1): @gronke @zotero BibLaTeX supports more types than BibTeX, but I'm not sure how that integrates in R Markdown / knitr / pandoc. Certainly one can cite packages now; the default is "Manual".  [↪](https://twitter.com/xieyihui/status/1083176259922710528)

<!-- -->

> **RPubs recent entry** (@RPubsRecent; 0/0): Test of Knitr https://t.co/uys6ESc3oP  [↪](https://twitter.com/xieyihui/status/1085050697631059968)

<!-- -->

> **TKwa** (@RansuuSan; 0/0): RとMarkDownをゆるく橋渡しするのに、knitrは良さそう  [↪](https://twitter.com/xieyihui/status/1083386603857338368)

<!-- -->

# pagedown

> **niszet🎍🌅** (@niszet0; 1/0): https://t.co/bExm8qC5wq  [↪](https://twitter.com/xieyihui/status/1083911829854670848)

<!-- -->

> **Romain Lesur** (@RLesur; 1/0): @DrArunSahni @dannyjnwong @jbedford84 @PQIPNews We've planned to automate the pdf generation with headless Chrome automation (like puppeteer), see https://t.co/9fE7W1Ejqd
> Stay tuned!  [↪](https://twitter.com/xieyihui/status/1083822661204168710)

<!-- -->

# tinytex

> **statgenet@KyotoU** (@StatgenetJ; 4/1): RmarkdownでポスターサイズのPDF作成：
> devtools::install_github("brentthorne/posterdown")
> tinytex::install_tinytex()
> >
> https://t.co/Yj5x5OSKqi https://t.co/yjlnfMyHDY  [↪](https://twitter.com/xieyihui/status/1083336364651728896)

<!-- -->

> **Mitchell O'Hara-Wild** (@mitchoharawild; 4/0): @JenRichmondPhD To knit a document to PDF you will need LaTeX installed. The easiest way to do this in R is using @xieyihui's tinytex package:
> install.packages("tinytex")
> tinytex::install_tinytex()  [↪](https://twitter.com/xieyihui/status/1083235633324220416)

<!-- -->

> **Jessica Streeter** (@phillynerd; 1/2): Current feels: stoked to put a massive analysis to bed. love rmarkdown, wish tinytex and kableExtra played together nicely though. So many headaches still :/ #rstats #myrjourney  [↪](https://twitter.com/xieyihui/status/1085277000313507841)

<!-- -->

> **Frederick Solt** (@fredericksolt; 1/0): @Daniel_Laurison Approximately me, last week.  Eventually got my problem all squared away, though, thanks to @xieyihui! https://t.co/cVIzc02c6E  [↪](https://twitter.com/xieyihui/status/1084875824669564928)

<!-- -->

> **zenrud** (@ZenrudMB; 0/0): TinyTeX: A lightweight and easy-to-maintain LaTeX distribution https://t.co/d6kVgERV7M #Tinytex #Latex  [↪](https://twitter.com/xieyihui/status/1085213045452955648)

<!-- -->

> **Debian upload** (@DebianUpload; 0/0): New upload: r-cran-tinytex 0.10-1 by Dylan Aïssi into unstable... https://t.co/wqI1yiKL9p  [↪](https://twitter.com/xieyihui/status/1084402184446492673)

<!-- -->

> **CRAN Package Updates** (@CRANberriesFeed; 0/0): CRAN updates: laeken poweRlaw spatstat tinytex https://t.co/y5W2NTKSXT #rstats  [↪](https://twitter.com/xieyihui/status/1083408712830734337)

<!-- -->

# xaringan

> **Florian Privé** (@privefl; 13/0): @humanfactorsio @ma_salmon @hadleywickham This maybe? https://t.co/Bs3z5Y8RBr  [↪](https://twitter.com/xieyihui/status/1085433104519622657)

<!-- -->

> **Emil Hvitfeldt** (@Emil_Hvitfeldt; 7/0): #rstudioconf FOMO have set in.
> [✔] - Unhealthy amount of Twitter
> [✔] - Stealing css tricks for xaringan  [↪](https://twitter.com/xieyihui/status/1085244296318439424)

<!-- -->

> **Thomas Mock 👨🏼💻 @ #rstudioconf!** (@thomas_mock; 7/0): Pretty pictures in Xaringan presentations!
> >
> #RStudioConf https://t.co/HmsZrz4b0P  [↪](https://twitter.com/xieyihui/status/1085202093726666752)

<!-- -->

> **Olivier Gimenez 🖖** (@oaggimenez; 4/0): On a technical side: To build the slides, I used the awesome #markdown by @xieyihui and the RU theme for #xaringan #html presentation https://t.co/kFTJtQSALF by @jvcasill. To create a PDF, I used decktape https://t.co/KufRACQqzA by @astefanut w/ the xaringan::decktape() command.  [↪](https://twitter.com/xieyihui/status/1085492130909425664)

<!-- -->

> **Chris Mainey** (@chrismainey; 3/0): Teaching stats with #Rmarkdown and #slidify worked brilliantly today. Going to try #xaringan for next weeks session, after @ma_salmon recommendation. Great work @xieyihui !  [↪](https://twitter.com/xieyihui/status/1083774916858658816)

<!-- -->

> **Grant McDermott** (@grant_mcdermott; 2/0): @ivanjrudik I like the metropolis theme. https://t.co/VROyOQwkVc
> >
> Having said that, I've pretty much switched over all my slides to HTML / R Markdown (using the xaringan package). In fact, they even have a metropolis clone, which is what I'm using here: https://t.co/JWmeyUzuCB  [↪](https://twitter.com/xieyihui/status/1084879720682905600)

<!-- -->

> **Maëlle Salmon 🐟** (@ma_salmon; 2/0): @chrismainey It seems xaringan is the most popular package for this these days. 🙂  [↪](https://twitter.com/xieyihui/status/1083448337532182533)

<!-- -->

> **Daniel Arantes** (@D_O_Arantes; 1/0): @humanfactorsio @ma_salmon @hadleywickham #<< in xaringan?  [↪](https://twitter.com/xieyihui/status/1085470469212594176)

<!-- -->

> **Tareef Kawaf** (@tareefk; 1/0): @YatesHeath I haven't done as much with PPT to be honest.  I typically use ioslides.   I have plans to play with xaringan, and maybe I can concoct a real use case for using PPT.   You should, in theory be able to use any number of html widgets based packages and get rmarkdown to snapshot  [↪](https://twitter.com/xieyihui/status/1084777472196075520)

<!-- -->

> **Charles T. Gray** (@cantabile; 1/0): Ha, and sure enough, @JenRichmondPhD, first xaringan::infinite_moon_reader() for the day.  [↪](https://twitter.com/xieyihui/status/1084296319647178753)

<!-- -->

> **Maëlle Salmon 🐟** (@ma_salmon; 1/0): @chrismainey I don't think I ever used slidify. I like xaringan and feel that its popularity means you're more likely to get support when you have questions  [↪](https://twitter.com/xieyihui/status/1083457789027061772)

<!-- -->

> **Chris Mainey** (@chrismainey; 0/0): Hi #rstats, does anyone know how I can use incremental bullet points with #xaringan in Markdown?  [↪](https://twitter.com/xieyihui/status/1085134931897081856)

<!-- -->

> **Heath Yates** (@YatesHeath; 0/0): @tareefk Thanks. You got me intrigued and thinking about dabbling away from PPT and in favor of HTML widgets. I did some googling, but can you offer a fav website or GitHub repo that demo's ioslides? Xaringan sounds interesting too. Thanks Tareef! :)  [↪](https://twitter.com/xieyihui/status/1085004405928325120)

<!-- -->

> **Dangerous Kidd** (@CHlLEANS; 0/0): @Tehx_15 @xNashoohh @ScoriaNetwork Sasuke el xidori tmbn el xaringan  [↪](https://twitter.com/xieyihui/status/1083525534175412225)

<!-- -->

# yihui.name

> **Jozef Hajnala** (@jozefhajnala; 11/5): 🧙♂Pretty html/pdf reports directly from R scripts!
> >
> ICYMI, with knitr::spin or rmarkdown::render you can make reports directly from #rstats scripts without creating an #RMarkdown file, just by adding simple comment tags! Example from @xieyihui himself: https://t.co/8Xap87WeTc https://t.co/7D4oYBlN7C  [↪](https://twitter.com/xieyihui/status/1082740953868312581)

<!-- -->

> **Sebastian Sauer** (@sauer_sebastian; 1/1): Tip of my day by @xieyihui: "Don't Use Spaces or Underscores in File Paths; Use Dashes Instead" when working with Latex/Rmarkdown #spacepain https://t.co/NwQzQOixvH  [↪](https://twitter.com/xieyihui/status/1085120716066967552)

<!-- -->

> **Chung-hong Chan** (@chainsawriot; 1/0): In case you don't know, his Chinese blog is even more interesting.
> https://t.co/J3kL66ueBN https://t.co/iYS5JrNA8h  [↪](https://twitter.com/xieyihui/status/1083321717546803202)

<!-- -->

> **tunggul mubowo** (@mubowo; 0/0): knitr chunk options and package options https://t.co/z63EADqibj  [↪](https://twitter.com/xieyihui/status/1082996937392050176)

<!-- -->

repository: cgpu/twitter-blogdown

repo_name: cgpu/twitter-blogdown


text:
# GoBlync

goblync is a Go library for interacting with [BlyncLight](http://www.embrava.com/) devices.  This library is compatible with BlyncLight
v3.

## Building

Based on the dependency on Go [HID](https://github.com/boombuler/hid), the following operating systems are supported targets (as used by $GOOS environment variable)

* darwin (uses native IOKit framework)
* linux (uses libusb 1.0+)
* windows (uses native Windows HID library)

```
go get github.com/boombuler/hid
go build
```

For building on Windows, see the potential quirks listed [here](https://github.com/boombuler/hid).

## Usage

```
package main

import (
	"github.com/davidehringer/goblync"
	"time"
)

func main() {

	light := blync.NewBlyncLight()
	time.Sleep(time.Second * 2)
	light.SetColor(blync.Red)
	light.Play(52)
	time.Sleep(time.Second * 5)
	light.SetColor(blync.Blue)
	time.Sleep(time.Second * 5)
	light.StopPlay()
	light.Reset()

	for i := 0; i < 256; i++ {
		light.SetColor([3]byte{byte(i), 255 - byte(i), 0x00})
		time.Sleep(13 * time.Millisecond)
	}
	light.SetBlinkRate(blync.BlinkMedium)
	time.Sleep(time.Second * 5)
	light.Close()
}

```


text:
# Module stdgo.time has compilation errors, please do not use:
```
stdgo/time_test/Time_test.hx:2940: characters 16-19 : stdgo.Ref<stdgo.testing.F> has no field add
stdgo/time_test/Time_test.hx:2941: characters 16-19 : stdgo.Ref<stdgo.testing.F> has no field add
stdgo/time_test/Time_test.hx:2943: characters 20-23 : stdgo.Ref<stdgo.testing.F> has no field add
stdgo/time_test/Time_test.hx:2944: characters 20-23 : stdgo.Ref<stdgo.testing.F> has no field add
stdgo/time_test/Time_test.hx:2947: characters 12-16 : stdgo.Ref<stdgo.testing.F> has no field fuzz
stdgo/time_test/Time_test.hx:2971: characters 16-19 : stdgo.Ref<stdgo.testing.F> has no field add
stdgo/time_test/Time_test.hx:2974: characters 16-19 : stdgo.Ref<stdgo.testing.F> has no field add
stdgo/time_test/Time_test.hx:2977: characters 16-19 : stdgo.Ref<stdgo.testing.F> has no field add
stdgo/time_test/Time_test.hx:2980: characters 16-19 : stdgo.Ref<stdgo.testing.F> has no field add
stdgo/time_test/Time_test.hx:2982: characters 12-16 : stdgo.Ref<stdgo.testing.F> has no field fuzz
stdgo/time_test/Time_test.hx:3603: characters 196-266 : invalid type: TAbstract(stdgo.GoInt64,[])
stdgo/time_test/Time_test.hx:3603: characters 196-266 : ... For function argument '_a'
stdgo/time_test/Time_test.hx:3564: lines 3564-3572 : ... Called from macro here
stdgo/time_test/Time_test.hx:3907: characters 58-76 : Module stdgo.testing.Testing does not define type T_asInterface
stdgo/time_test/Time_test.hx:3907: characters 58-76 : ... For function argument 't'
stdgo/time_test/Time_test.hx:4249: characters 267-325 : invalid type: TAbstract(stdgo.GoInt64,[])
stdgo/time_test/Time_test.hx:4249: characters 267-325 : ... For function argument '_a'
stdgo/math/big/Big.hx:19642: characters 13-98 : Cannot modify the abstract value, store it into a local first

```


text:
---
layout: post
title: krev - BsidesDelhi CTF
---

In this challenge, the goal is to reverse a NetBSD kernel module and get the flag. We are provided with a zip file which contains the kernel module, NetBSD disc img, and couple of scripts to setup qemu and gdb for the challenge. It would have been easier to solve the challenge dynamically by setting up qemu and gdb but due to no experience with NetBSD reversing i proceeded to analyze the kernel module statically with IDA.

Taking a look at the strings doesn’t reveal much, but there are interesting functions in the kernel module. The two functions which looked interesting were get_flag_ready and chall1_read.

So I decided to start the analyses from chall1_read. The disassembly of chall1_read is pretty interesting.

```nasm
.text:0800037D                 cmp     byte ptr [eax], 67h
.text:08000380                 jz      short loc_80003C0
...........
.text:080003C0 loc_80003C0:
.text:080003C0                 cmp     byte ptr [eax+1], 69h
.text:080003C4                 jnz     short loc_8000382
.text:080003C6                 cmp     byte ptr [eax+2], 76h
.text:080003CA                 jnz     short loc_8000382
.text:080003CC                 cmp     byte ptr [eax+3], 65h
.text:080003D0                 jnz     short loc_8000382
.text:080003D2                 cmp     byte ptr [eax+4], 5Fh
.text:080003D6                 jnz     short loc_8000382
.text:080003D8                 cmp     byte ptr [eax+5], 74h
.text:080003DC                 jnz     short loc_8000382
.text:080003DE                 cmp     byte ptr [eax+6], 68h
.text:080003E2                 jnz     short loc_8000382
.text:080003E4                 cmp     byte ptr [eax+7], 69h
.text:080003E8                 jnz     short loc_8000382
.text:080003EA                 cmp     byte ptr [eax+8], 73h
.text:080003EE                 jnz     short loc_8000382
.text:080003F0                 cmp     byte ptr [eax+9], 5Fh
.text:080003F4                 jnz     short loc_8000382
.text:080003F6                 cmp     byte ptr [eax+0Ah], 74h
.text:080003FA                 jnz     short loc_8000382
.text:080003FC                 cmp     byte ptr [eax+0Bh], 6Fh
.text:08000400                 jnz     short loc_8000382
.text:08000402                 cmp     byte ptr [eax+0Ch], 5Fh
.text:08000406                 jnz     loc_8000382
.text:0800040C                 cmp     byte ptr [eax+0Dh], 67h
.text:08000410                 jnz     loc_8000382
.text:08000416                 cmp     byte ptr [eax+0Eh], 65h
.text:0800041A                 jnz     loc_8000382
.text:08000420                 cmp     byte ptr [eax+0Fh], 74h
.text:08000424                 jnz     loc_8000382
.text:0800042A                 cmp     byte ptr [eax+10h], 5Fh
.text:0800042E                 jnz     loc_8000382
.text:08000434                 cmp     byte ptr [eax+11h], 66h
.text:08000438                 jnz     loc_8000382
.text:0800043E                 cmp     byte ptr [eax+12h], 6Ch
.text:08000442                 jnz     loc_8000382
.text:08000448                 cmp     byte ptr [eax+13h], 61h
.text:0800044C                 jnz     loc_8000382
.text:08000452                 cmp     byte ptr [eax+14h], 67h
.text:08000456                 jnz     loc_8000382
.text:0800045C                 call    get_flag_ready
```

So the input here is getting compared with “give_this_to_get_flag” and then after that get_flag_ready is being called. Now taking a look inside get_flag_ready function reveals that 40 bytes are placed on stack (local array) at the starting of the function. There are 2 functions which are called after this namely, md5hash and sha1hash. I think the crucial part of this challenge was determining what were md5hash and sha1hash functions doing.

Code Snippet from md5hash:
```nasm
.text:0800016F                 push    ebp
.text:08000170                 mov     ebp, esp
.text:08000172                 push    esi
.text:08000173                 push    ebx
.text:08000174                 sub     esp, 78h
.text:08000177                 lea     ebx, [ebp+var_60]
.text:0800017A                 mov     [esp], ebx
.text:0800017D                 call    MD5Init
.text:08000182                 mov     esi, s
.text:08000188                 mov     [esp], esi      ; s
.text:0800018B                 call    strlen
.text:08000190                 mov     [esp+8], eax
.text:08000194                 mov     [esp+4], esi
.text:08000198                 mov     [esp], ebx
.text:0800019B                 call    MD5Update
.text:080001A0                 mov     [esp+4], ebx
.text:080001A4                 lea     esi, [ebp+var_70]
.text:080001A7                 mov     [esp], esi
.text:080001AA                 call    MD5Final
.text:080001AF                 mov     ebx, offset byte_80006B4
```

After some analysis, it was clear that this function is calculating md5 hash of a string but now the question was which string. As we can see above strlen there is an operand “s”, that is an operand name generated by IDA and it references the input string which was being compared to “give_this_to_get_flag“. This can be confirmed by checking the chall1_read function. So now its clear that md5hash function calculates the md5 hash of “give_this_to_get_flag” which is 29c5d56f77a0d0369c55101c53005050.

Code Snippet from sha1hash:
```nasm
.text:0800021D                 mov     ecx, eax
.text:0800021F                 add     cl, al
.text:08000221                 sbb     edx, offset unk_80006B7
.text:08000227                 mov     [esp+8], edx
.text:0800022B                 mov     dword ptr [esp+4], offset byte_80006B4
.text:08000233                 mov     [esp], ebx
.text:08000236                 call    SHA1Update
.text:0800023B                 mov     [esp+4], ebx
.text:0800023F                 lea     esi, [ebp+var_78]
.text:08000242                 mov     [esp], esi
.text:08000245                 call    SHA1Final
```

Now if we look carefully inside sha1hash function, we can see that it accesses the previously saved md5 hash and computes the sha1 hash of the md5 string. The sha1hash is 001b6a634bee73d9fe2d88bb4435fb1ee3ad7918.

After computing both md5 and sha1 (of md5) we are back in get_flag_ready_function. We can see from above image that the binary xor’s the earlier copied 40 bytes with the sha1 string we got from the sha1hash function. Here is a simple script to get the flag:

```python
flag = [86, 92, 80, 5, 77, 15, 83, 71, 118, 87, 33, 58, 94, 6, 59, 13, 17, 22, 2, 9, 11, 103, 27, 82, 65, 107, 64, 93, 86, 23, 93, 1, 58, 4, 19, 29, 104, 80, 6, 69]
sha1hash = "001b6a634bee73d9fe2d88bb4435fb1ee3ad7918"

for i in range(0, 40):
    flag[i] ^= ord(sha1hash[i])

print ''.join(map(chr, flag))
```
This gives us the flag: flag{netB5D_i5_4ws0m3_y0u_sh0uld_7ry_i7}


text:
# y-monaco
> [Monaco](https://microsoft.github.io/monaco-editor/index.html) Editor Binding for [Yjs](https://github.com/y-js/yjs) - [Demo](https://demos.yjs.dev/monaco/monaco.html)

This binding maps a Y.Text to the Monaco editor (the editor that power VS Code).

### Features

* Shared Cursors

### Example

```js
import * as Y from 'yjs'
import { WebsocketProvider } from 'y-websocket'
import { MonacoBinding } from 'y-monaco'
import * as monaco from 'monaco-editor'

const ydocument = new Y.Doc()
const provider = new WebsocketProvider(`${location.protocol === 'http:' ? 'ws:' : 'wss:'}//localhost:1234`, 'monaco', ydocument)
const type = ydocument.getText('monaco')

const editor = monaco.editor.create(document.getElementById('monaco-editor'), {
  value: '', // MonacoBinding overwrites this value with the content of type
  language: "javascript"
})

// Bind Yjs to the editor model
const monacoBinding = new MonacoBinding(type, editor.getModel(), new Set([editor]), provider.awareness)
```

Also look [here](https://github.com/y-js/yjs-demos/tree/master/monaco) for a working example.

## API

```js
import { MonacoBinding } from 'y-monaco'

const binding = new MonacoBinding(type, editor.getModel(), new Set([editor]), provider.awareness)
```

### Class:MonacoBinding

  constructor(Y.Text, monaco.editor.ITextModel, [Set<monaco.editor.IStandaloneCodeEditor>, [Awareness]])

If the editor(s) are specified, MonacoBinding adjusts selections when remote changes happen. Awareness is an implementation of the awareness protocol of y-protocols/awareness. If Awareness is specified, MonacoBinding renders remote selections.

  destroy()

Unregister all event listeners. This is automatically called when the model is disposed.

## Styling

You can use the following CSS classes to style remote cursor selections:

- `yRemoteSelection`
- `yRemoteSelectionHead`

See [demo/index.html](demo/index.html) for example styles. Additionally, you can enable per-user styling (e.g.: different colors per user). The recommended approach for this is to listen to `awareness.on("update", () => ...));` and inject custom styles for every available clientId. You can use the following classnames for this:

- `yRemoteSelection-${clientId}`
- `yRemoteSelectionHead-${clientId`

(where `${clientId}` is the Yjs clientId of the specific user).
### License

[The MIT License](./LICENSE) © Kevin Jahns

repository: yjs/y-monaco

gha_language: JavaScript

repo_name: yjs/y-monaco