Skip to content

Instantly share code, notes, and snippets.

View nordicdyno's full-sized avatar
😐

Alexander Orlovsky nordicdyno

😐
View GitHub Profile
@howardjohn
howardjohn / go-compile-without-link
Created June 2, 2021 22:04
Compile all go tests, quickly, without running them
// homerunner is Brad's shitty Docker wrapper after he got tired of running
// HA nine-VM Kubernetes clusters. Earlier versions of this tried to use podman
// and fancy cloud-init and CNI stuff but then I decided to go to the other
// extreme and write something super specific to what I need and super dumb:
// run my containers from gcr.io, and use my home Ceph cluster for mounts/state.
//
// This primarily runs Home Assistant, HomeSeer, an MQTT server, and some cameras.
// And some omitted misc stuff.
package main
@rstrlcpy
rstrlcpy / api.go
Last active July 28, 2020 07:16
go gin-gonic help-wrapper
package api
import (
"context"
"fmt"
"net/http"
"time"
"github.com/gin-gonic/gin"

Это краткая памятка, которая подходит во время вспышки любого респираторного вирусного заболевания. Я ее пишу не для того, чтобы вы срочно начинали все это делать - никакого повода нет. Но, если вы хотите снизить вероятность получения или распространения вирусов - прочитайте.

Общее поведение

  1. Контролируйте свою панику. Никакого повода для паники нет, как говорил человек, падающий с пятого этажа, пролетая мимо четвертого: “пока все нормально”. Напомню, уже на вашей памяти у людей была такая же паника из-за птичьего гриппа и атипичной пневмонии. И никакого зомби-апокалипсиса не произошло. Контролировать панику - значит следить за своими реакциями и стараться принимать решения разумно.
  2. Не осуждайте чужую панику. Это не помогает ни вам, ни паникующим - каждый человек волен паниковать или не паниковать перед лицом любой опасности. Кроме того, активное осуждение паники вокруг “эпидемий” порождает и подпитывает многочисленные теории заговора, так что просто не надо.
  3. Примите разумные меры предосторожно
@blanchonvincent
blanchonvincent / tokenized.go
Created September 8, 2019 04:24
Medium - Compiler
package main
import (
"fmt"
"go/scanner"
"go/token"
"io/ioutil"
)
func main() {

Summary

Опиши в 3-4 предложениях что происходило и почему. Это информативное представление о факапе с высоты птичьего полета, оно должно быть понятно любому человеку без контекста.

Ущерб

Качественная оценка Какая функциональность не работала, насколько долго, у кого. Была ли потеря или порча данных. Выбери поле справа.

Количественная оценка

@IAD
IAD / fsm.go
Created January 16, 2019 17:28
package fsm
import (
"context"
"reflect"
"runtime"
"strings"
)
// StateFunc function that should return next state func or nil
input {
syslog {
port => {{ bitfan_syslogd_port }}
protocol => "udp"
type => "syslog"
}
}
filter {
kv {
field_split => "\\t"
@jalaziz
jalaziz / 70-ec2-nvme-devices.rules
Last active June 19, 2024 04:29
AWS EBS NVMe udev rules
# Copyright (C) 2006-2016 Amazon.com, Inc. or its affiliates.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
@tyilo
tyilo / docker-compose.yml
Created January 14, 2018 23:12
docker: ipsec vpn server + mitmproxy
version: "3"
services:
vpn:
image: hwdsl2/ipsec-vpn-server
env_file:
- ./vpn.env
ports:
- "500:500/udp"
- "4500:4500/udp"