Skip to content

Instantly share code, notes, and snippets.

View catvec's full-sized avatar
🐢

catvec

🐢
View GitHub Profile
@catvec
catvec / slack-status
Last active June 6, 2018 17:25
Sets your user's Slack status
#!/bin/bash
#
# Slack Status - Sets user Slack status
#
# Requires the HTTPie (https://httpie.org/) client
#
# Usage: slack-status STATUS [--help/-h]
#
# Args:
# - STATUS: Status to set, one of
@catvec
catvec / factorio-server-plan.md
Last active June 3, 2018 06:54
Plan for hosted Factorio server

Factorio Server Plan

Plan for hosting a Factorio server for my friends and I.

Table Of Contents

Features

  • Auto pause when no one is connected
  • Auto shutdown after server has been paused for 10 minutes
@catvec
catvec / factorio-prometheus-monitoring-mod.md
Last active September 25, 2018 17:13
Plan for Factorio Prometheus monitoring mod
@catvec
catvec / browser-console.log
Last active August 13, 2018 23:54
Web GL Error Logs
Error: WebGL warning: Failed to create WebGL context: WebGL creation failed:
* Error during native OpenGL init.
* Exhausted GL driver caps.
* Exhausted GL driver options.
@catvec
catvec / trizen-alacritty-install.txt
Last active December 16, 2018 02:22
Alacritty install fail.
==> Making package: alacritty-git 0.2.3.1003.g3593ec7-1 (Sat 15 Dec 2018 09:21:07 PM EST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
-> Updating alacritty git repo...
Fetching origin
==> Validating source files with sha256sums...
alacritty ... Skipped
==> Extracting sources...
-> Creating working copy of alacritty git repo...
@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() {
@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 / 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 / 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 / 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