Skip to content

Instantly share code, notes, and snippets.

View catvec's full-sized avatar
🐢

catvec

🐢
View GitHub Profile
@catvec
catvec / xbps-src-install-go.error.out
Last active March 5, 2019 05:00
xbps-src install go error
# ./xbps-src install go
=> Using `/opt/void-packages/hostdir/binpkgs/go-1-12' as local repository.
[*] Updating `https://alpha.de.repo.voidlinux.org/current/musl/x86_64-repodata' ...
ERROR: [reposync] failed to fetch file `https://alpha.de.repo.voidlinux.org/current/musl/x86_64-repodata': Not Found
[*] Updating `https://alpha.de.repo.voidlinux.org/current/musl/nonfree/x86_64-repodata' ...
[*] Updating `https://alpha.de.repo.voidlinux.org/current/x86_64-repodata' ...
[*] Updating `https://alpha.de.repo.voidlinux.org/current/nonfree/x86_64-repodata' ...
[*] Updating `https://alpha.de.repo.voidlinux.org/current/aarch64/x86_64-repodata' ...
ERROR: [reposync] failed to fetch file `https://alpha.de.repo.voidlinux.org/current/aarch64/x86_64-repodata': Not Found
[*] Updating `https://alpha.de.repo.voidlinux.org/current/multilib/x86_64-repodata' ...
@catvec
catvec / o-fix.patch
Created March 4, 2019 07:18
mklive.sh -o fix patch
diff --git a/mklive.sh.in b/mklive.sh.in
index c568e45..4dfd36a 100644
--- a/mklive.sh.in
+++ b/mklive.sh.in
@@ -287,7 +287,7 @@ generate_iso_image() {
-no-emul-boot -boot-load-size 4 -boot-info-table \
-eltorito-alt-boot -e boot/grub/efiboot.img -isohybrid-gpt-basdat -no-emul-boot \
-isohybrid-mbr "$SYSLINUX_DATADIR"/isohdpfx.bin \
- -output "$CURDIR/$OUTPUT_FILE" "$IMAGEDIR" || die "Failed to generate ISO image"
+ -output "$OUTPUT_FILE" "$IMAGEDIR" || die "Failed to generate ISO image"
@catvec
catvec / init.sls
Last active March 3, 2019 10:02
Salt mount.mounted s3fs keeps remounting
/opt/factorio/mods:
mount.mounted:
- device: factorio-mods
- fstype: fuse.s3fs
- mkmnt: True
- device_name_regex:
- s3fs
- factorio-mods
- opts:
- allow_other
@catvec
catvec / init.sls
Created February 28, 2019 19:13
Salt s3fs-fuse configuration for a Digital Ocean Space
MOUNT_POINT:
mount.mounted:
- device: DIGITAL_OCEAN_SPACE_NAME
- fstype: fuse.s3fs
- mkmnt: True
- opts: passwd_file=YOUR_S3FS_PASSWD_FILE,use_path_request_style,url=https://REGION.digitaloceanspaces.com,uid=UID,gid=GID,umask=000
@catvec
catvec / mail.log
Last active February 13, 2019 18:57
Postfix <> OpenDKIM Warning
2019-02-13T15:07:41.52901 mail.info: Feb 13 15:07:41 postfix/master[17246]: daemon started -- version 3.3.2, configuration /etc/postfix
2019-02-13T15:08:48.94832 mail.info: Feb 13 15:08:48 postfix/pickup[17312]: E77D0627F3: uid=1000 from=<noah>
2019-02-13T15:08:48.96592 mail.info: Feb 13 15:08:48 opendkim[27922]: configuration reloaded from /etc/opendkim/opendkim.conf
2019-02-13T15:08:48.96645 mail.info: Feb 13 15:08:48 postfix/cleanup[18973]: E77D0627F3: message-id=<[email protected]>
2019-02-13T15:08:48.96988 mail.notice: Feb 13 15:08:48 opendkim[27732]: terminated with signal 11, restarting
2019-02-13T15:08:48.96990 mail.warn: Feb 13 15:08:48 postfix/cleanup[18973]: warning: milter inet:localhost:12301: can't read SMFIC_EOH reply packet header: Invalid argument
2019-02-13T15:08:48.97047 mail.info: Feb 13 15:08:48 opendkim[18975]: OpenDKIM Filter v2.10.3 starting (args: -x /etc/opendkim/opendkim.conf -f)
2019-02-13T15:08:48.97181 mail.info: Feb 13 15:08:48 postfix/qmgr[17313]: E77D0627
@catvec
catvec / strace
Last active February 8, 2019 08:09
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=5822, si_uid=0, si_status=111, si_utime=0, si_stime=0} ---
open("finish", O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or directory)
open("supervise/pid.new", O_WRONLY|O_CREAT|O_TRUNC|O_NONBLOCK, 0644) = 9
rename("supervise/pid.new", "supervise/pid") = 0
open("supervise/stat.new", O_WRONLY|O_CREAT|O_TRUNC|O_NONBLOCK, 0644) = 9
rename("supervise/stat.new", "supervise/stat") = 0
open("supervise/status.new", O_WRONLY|O_CREAT|O_TRUNC|O_NONBLOCK, 0644) = 9
rename("supervise/status.new", "supervise/status") = 0
stat("control/u", 0x7fff8926f320) = -1 ENOENT (No such file or directory)
open("supervise/pid.new", O_WRONLY|O_CREAT|O_TRUNC|O_NONBLOCK, 0644) = 9
@catvec
catvec / init.sls
Last active January 29, 2019 21:06
Salt sshd restart state
{% set file = '/etc/ssh/sshd_config' %}
{{ file }}:
file.managed:
- source: salt://sshd-config/sshd_config
- mode: 664
sshd:
service.running:
- reload: True
@catvec
catvec / main.go
Last active January 24, 2019 13:38
Go context.Done() question
package main
import (
"context"
"time"
)
func main() {
ctx, ctxCancel := context.WithCancel(context.Background())
@catvec
catvec / mklive.out
Created January 13, 2019 03:50
Void xbps-uchroot (Invalid argument) bug
# Output of running script
# ...
TEST BEFORE
ERROR: Failed to move /var/tmp/void_mklive/void-mklive-master/tmp.WH8p117ovx/void-host as rootfs (Invalid argument)
TEST AFTER
# ...
@catvec
catvec / fifo.c
Last active December 29, 2018 20:04
Named Fifo Select Bug
#include <errno.h>
#include <sys/select.h>
#include <stdlib.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdbool.h>
#include <unistd.h>
#include <string.h>
int main() {