This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Adapted from https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_storage_devices/configuring-nvme-over-fabrics-using-nvme-rdma_managing-storage-devices | |
# Exports an NVMe device over Fabrics so that it can be used by remote hosts. | |
# | |
# Usage: nvmeof_controller.sh DEVICE SERVER_IP SERVER_PORT TRANSPORT SUBSYSTEM_NAME NAMESPACE PORT | |
# Example: nvmeof_controller.sh /dev/nvme1n1 192.168.0.100 4420 tcp my_nvme 10 1 | |
# | |
# Now you can import the device on a remote host. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let d=document.body,n='\n',f=d.ondragover=e=>e.preventDefault();d.style.whiteSpace='pre';d.ondrop=e=>[f(e)].map.call(e.dataTransfer.files,f=>{e=new Audio(URL.createObjectURL(f));e.controls=e.loop=1;d.append(f.name+n,e,n+n)}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[package] | |
name = "fast_read_optimizer" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
io-uring = "0.5" | |
iou = "0.3.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
What's the fastest way to read a file? | |
fast_read is a program that reads a file into memory using multiple parallel threads | |
with a stochastic hill climb optimizer to find the fastest thread count and block size. | |
Example run (note the effect of page cache, read is basically memcpy after that point): | |
$ ./fast_read iotest_6G.dat | |
Opening file iotest_6G.dat for reading | |
Reading 6442450944 bytes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const objDiff = (a, b) => { | |
if (typeof a === typeof b && typeof a === 'object') { | |
const diff = {}; | |
let changed = false; | |
for (let i in a) { | |
if (!b.hasOwnProperty(i)) { | |
diff[i] = 'DELETED'; | |
changed = true; | |
continue; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I am attesting that this GitHub handle kig is linked to the Tezos account tz2KhKnTtNyDnYzvHLATmwCcRvsthG1J6NWy for tzprofiles | |
sig:spsig16TXCkHGXnqEgWSNfsipz5KS7yMGygAtyWH3wd3AD9raSXgsGgTxg27H5EX7YdY6Eht9koHPT6KdagPwtFjKwBVB3uDigT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Nano config file for minimalistic space-saving layout. Good for e.g. Termux. | |
# Turns line numbers on, hides help and other things. | |
# Multifile support on by default. | |
# Screws with the key bindings to make them more "standard" | |
# | |
# Close file is Ctrl-Q | |
# Open file is Ctrl-O | |
# Save As is Alt-S | |
# Cut/Copy/Paste are Ctrl-X/C/V |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define CHR_NULL 0 | |
#define CHR_SOH 1 | |
#define CHR_STX 2 | |
#define CHR_ETX 3 | |
#define CHR_EOT 4 | |
#define CHR_ENQ 5 | |
#define CHR_ACK 6 | |
#define CHR_BELL 7 | |
#define CHR_BACKSPACE 8 | |
#define CHR_TAB 9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use { | |
hyper::{ | |
service::{make_service_fn, service_fn}, | |
Body, | |
Request, | |
Response, | |
Server, | |
}, | |
std::net::SocketAddr, | |
tokio::io::{BufReader, AsyncBufReadExt}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct float4 | |
{ | |
float x; | |
float y; | |
float z; | |
float w; | |
}; | |
export void runner_main(uniform int work_groups[3], uniform struct inputs& input, uniform struct outputs& output) | |
{ |
NewerOlder