Skip to content

Instantly share code, notes, and snippets.

View msmith-techempower's full-sized avatar

Mike Smith msmith-techempower

View GitHub Profile
import { useState } from "react";
export default function useAsyncReducer(reducer, initialState) {
const [state, setState] = useState(initialState);
async function dispatch(action) {
const newState = await reducer(state, action);
setState(newState);
}
{
"rawData": {
"json": {
"jlhttp": [
{
"latencyAvg": "88.65us",
"latencyMax": "23.59ms",
"latencyStdev": "571.17us",
"totalRequests": 3567979,
"startTime": 1536061922,
"jlhttp": [
{
"latencyAvg": "6.31ms",
"latencyMax": "93.77ms",
"latencyStdev": "5.43ms",
"totalRequests": 22787295,
"startTime": 1536062055,
"endTime": 1536062070
},
{
[16302.338475] hfi1 0000:65:00.0: hfi1_0: physical state changed to PHYS_OFFLINE (0x9), phy 0x93
[16308.331605] hfi1 0000:65:00.0: hfi1_0: physical state changed to PHYS_OFFLINE (0x9), phy 0x90
[16308.331614] hfi1 0000:65:00.0: hfi1_0: logical state changed to PORT_DOWN (0x1)
[16308.331623] hfi1 0000:65:00.0: hfi1_0: Last transmitted LNI state complete frame 0x00000000:
[16308.332299] hfi1 0000:65:00.0: hfi1_0: last reported state state: EstablishComm (0x0)
[16308.333023] hfi1 0000:65:00.0: hfi1_0: state successfully completed: no
[16308.333738] hfi1 0000:65:00.0: hfi1_0: fail reason 0x0: Reason unknown
[16308.334446] hfi1 0000:65:00.0: hfi1_0: passing lane mask: 0x0
[16308.335148] hfi1 0000:65:00.0: hfi1_0: Last received LNI state complete frame 0x00000200:
[16308.335834] hfi1 0000:65:00.0: hfi1_0: last reported state state: EstablishComm (0x0)
Ethernet1/49 is down (Link not connected)
admin state is up, Dedicated Interface
Hardware: 1000/10000/25000/40000/50000/100000 Ethernet, address: b4de.3101.0e0
4 (bia b4de.3101.0e04)
MTU 1500 bytes, BW 100000000 Kbit, DLY 10 usec
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, medium is broadcast
Port mode is access
auto-duplex, auto-speed, media type is 100G
Beacon is turned off
DEVICE=ib0
TYPE='InfiniBand'
BOOTPROTO=static
IPADDR=10.0.0.1
BROADCAST=10.0.0.255
NETWORK=10.0.0.0
NETMASK=255.255.255.0
ONBOOT=yes
CONNECTED_MODE=yes
MTU=65520
Present Port State:
Port 1 Info on HFI 1 (hfi1_0)
Subnet: 0xfe80000000000000 GUID: 0x00117501010dba03
LocalPort: 1 PortState: Down
PhysicalState: Offline
OfflineDisabledReason: Transient
IsSMConfigurationStarted: False NeighborNormal: False
BaseLID: 0x00000000 SMLID: 0x00000000
LMC: 0 SMSL: 0
PortType: Standard LimtRsp/Subnet: 32 us, 4 us
$ dub upgrade --verbose
Using dub registry url 'http://code.dlang.org/'
Refreshing local packages (refresh existing: true)...
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/vagrant/.dub/packages/local-packages.json
Note: Failed to determine version of package fwb at .. Assuming ~master.
Refreshing local packages (refresh existing: false)...
Looking for local package map at /var/lib/dub/packages/local-packages.json
Looking for local package map at /home/vagrant/.dub/packages/local-packages.json
Missing dependency vibe-d 0.8.0 of fwb
FROM phusion/baseimage:latest
WORKDIR /app
ADD . /app
CMD ["/sbin/my_init"]
EXPOSE 8080
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mQENBFfi39EBCACW42uEFfg0AZqnGE8jpM94g6R9W5iVx0PSQNJexjMvB81+V7Pq
KUZsxh8qUIy0ytSvjAOnfwUx9mQP0L4hWY6DPTzSCKgzfIglZpSFT1yiDOlhOt2B
FGQywasqR+6R/6c7hLi/WHt5ejmuVYNVFh+1bfhU6NTLvzx3FvUvRse1FVWrPQSa
3T8BI5FgCY/g7/9Y4w0Yb+YxpZOdnbVjkhtcKbVyPN1vqQNP4wl4HrHPZ2SZj0zC
lhaLoJHl27AotdbohO+NBJ0xcMLUl8ax8AfPPLqD3zD2lr2bUMW4FsYjhMvPvTXi
ch1R4l7c37tzJwgadkJBLXaJhhrbcuC3hh0PABEBAAG0HU1pa2UgU21pdGggPG1z
bWl0aEBxbGVzcy5jb20+iQE4BBMBAgAiBQJX4t/RAhsDBgsJCAcDAgYVCAIJCgsE