Skip to content

Instantly share code, notes, and snippets.

@xse
xse / summary.js
Last active April 19, 2023 09:04
/*
* updates 'summary' sheet
* uses 'a/c' sheet to link characters and accounts [[header_row],[account1,char1,char2,char3],[account2,....]]
* triggered onOpen
* assume script timezone is set or is by default correct
*/
function summary() {
const timezone = Session.getScriptTimeZone();
const offsetRow = 6;
const offsetCol = 2;
function onEdit(e) {
const sheet = e.source.getActiveSheet();
const name = e.source.getActiveSheet().getName();
const col = e.range.getColumn(), row = e.range.getRow();
if(name == "Jita2BEANSTAR") {
// options mechanics (always one option true per column)
if(col == 7 && (row > 6 && row < 9)) { // SORT OPT
sheet.getRange(7, col, 2, 1).setValue("FALSE");
WITHOUT HTTP/0.9/
xse@krkrkr ~/kcgi (git)-[master] % ./regress/test-fcgi-header :(
== Info: Trying ::1:17123...
== Info: TCP_NODELAY set
== Info: connect to ::1 port 17123 failed: Connection refused
== Info: Trying 127.0.0.1:17123...
== Info: TCP_NODELAY set
== Info: Connected to localhost (127.0.0.1) port 17123 (#0)
=> Send header, 0000000085 bytes (0x00000055)
0000: 47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d 0a GET / HTTP/1.1..
@xse
xse / test-fcgi-header
Created October 19, 2019 23:02
with verbose libcurl
xse@krkrkr ~/kcgi (git)-[master] % ./regress/test-fcgi-header
:(
* Trying ::1:17123...
* TCP_NODELAY set
* connect to ::1 port 17123 failed: Connection refused
* Trying 127.0.0.1:17123...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 17123 (#0)
> GET / HTTP/1.1
Host: localhost:17123
xse@debian:~/kcgi$ ./regress/test-fcgi-bigfile
* Expire in 0 ms for 6 (transfer 0x55c3d9671910)
* Expire in 1 ms for 1 (transfer 0x55c3d9671910)
* Expire in 0 ms for 1 (transfer 0x55c3d9671910)
* Expire in 2 ms for 1 (transfer 0x55c3d9671910)
* Expire in 1 ms for 1 (transfer 0x55c3d9671910)
* Expire in 1 ms for 1 (transfer 0x55c3d9671910)
* Expire in 4 ms for 1 (transfer 0x55c3d9671910)
* Expire in 4 ms for 1 (transfer 0x55c3d9671910)
* Expire in 4 ms for 1 (transfer 0x55c3d9671910)
xse@krkrkr ~/kcgi (git)-[master] % ./regress/test-fcgi-bigfile :(
* Trying ::1:17123...
* TCP_NODELAY set
* connect to ::1 port 17123 failed: Connection refused
* Trying 127.0.0.1:17123...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 17123 (#0)
> POST / HTTP/1.1
Host: localhost:17123
Accept: */*
execve("kcgi/regress/test-fcgi-bigfile", ["kcgi/regress/test-fcgi-bigfile"], 0x7ffcef514b38 /* 32 vars */) = 0
brk(NULL) = 0x556b087b0000
arch_prctl(0x3001 /* ARCH_??? */, 0x7fff5194d8e0) = -1 EINVAL (Invalid argument)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=30731, ...}) = 0
mmap(NULL, 30731, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f3b628f0000
close(3) = 0
openat(AT_FDCWD, "/usr/lib/libcurl.so.4", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0 \300\0\0\0\0\0\0"..., 832) = 832
strace: Process 8592 attached
strace: Process 8593 attached
strace: Process 8594 attached
strace: Process 8595 attached
strace: Process 8596 attached
child.c:1197: RFC violation: REMOTE_ADDR not set
child.c:1223: RFC violation: SERVER_PORT not set
wrappers.c:289: poll: POLLHUP
wrappers.c:289: poll: POLLHUP
wrappers.c:289: poll: POLLHUP
130 xse@krkrkr ~ % strace -f -c kcgi/regress/test-fcgi-bigfile :(
strace: Process 8569 attached
strace: Process 8570 attached
strace: Process 8571 attached
strace: Process 8572 attached
strace: Process 8573 attached
child.c:1197: RFC violation: REMOTE_ADDR not set
child.c:1223: RFC violation: SERVER_PORT not set
wrappers.c:289: poll: POLLHUP
wrappers.c:289: poll: POLLHUP
This file has been truncated, but you can view the full file.
execve("regress/test-fcgi-bigfile", ["regress/test-fcgi-bigfile"], 0x7ffc1d48fed8 /* 23 vars */) = 0
brk(NULL) = 0x55eb845fd000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=20829, ...}) = 0
mmap(NULL, 20829, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7ffb791d3000
close(3) = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libcurl.so.4", O_RDONLY|O_CLOEXEC) = 3
read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\260\356\0\0\0\0\0\0"..., 832) = 832
fstat(3, {st_mode=S_IFREG|0644, st_size=588232, ...}) = 0