Skip to content

Instantly share code, notes, and snippets.

View rvolosatovs's full-sized avatar

Roman Volosatovs rvolosatovs

View GitHub Profile
#!/usr/bin/env bash
disk="/dev/nvme0n1"
luksName="luksroot"
vgName="partitions"
btrfsName="butter"
swapName="swap"
swapSize="72G"
rootSub="@"
// NOTE: Adapted from https://github.com/rust-syndication/syndication/blob/fb9820a3bb7d3d3d9832c1e3b976ce59b0f0a98c/src/lib.rs#L3-L21.
#[derive(Debug)]
pub enum Feed {
Atom(atom::Feed),
RSS(rss::Channel),
}
#[derive(Error, Debug)]
#[error("failed to parse XML as either Atom or RSS feed")]
pub struct FromStrError;
@rvolosatovs
rvolosatovs / influx-export.sh
Created June 17, 2020 16:52
This is why you don't use Influx. This is necessary, because otherwise DB crashes.
#!/usr/bin/env bash
set -o pipefail
#set -x
days=${1:-7}
mins=`expr ${days} '*' 24 '*' 60`
interval=1440
now=`date +%s%N`
db='noc_171212'
d=/tti/noc/export/"${now}"
@rvolosatovs
rvolosatovs / dumb-ap-wired-link.sh
Created November 21, 2019 23:29 — forked from braian87b/dumb-ap-wired-link.sh
How to setup a Dumb AP, Wired backbone for OpenWRT / LEDE
@rvolosatovs
rvolosatovs / install.sh
Last active November 5, 2017 13:37 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
#!/usr/bin/env bash
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
@rvolosatovs
rvolosatovs / .gitignore
Created October 12, 2017 07:55 — forked from datakurre/.gitignore
Minimal Nix Docker
*.tar.gz
.sentinel.*
package main
import (
"fmt"
"testing"
"github.com/smartystreets/assertions"
"github.com/smartystreets/assertions/should"
"github.com/stretchr/testify/assert"
)
@rvolosatovs
rvolosatovs / gsoc2016.md
Last active November 19, 2018 11:00
GSoC 2016 conclusion

GSoC Project abstract

Work summary

During the GSoC I mostly worked on systemgo, and I've also made some PR's to browsix

Description

Systemgo is an init system capable of reading in systemd-unit files. It also resolves dependencies. There is a systemctl tool provided, which communicates with init using the net/rpc package.

In current implementation the sytemctl only provides start, stop, status and list-units capabilities.(while implementing new ones is easy using the already-defined server RPC

reload functionality, while supported by the system.Daemon

Keybase proof

I hereby claim:

  • I am rvolosatovs on github.
  • I am rvolosatovs (https://keybase.io/rvolosatovs) on keybase.
  • I have a public key whose fingerprint is 57CF 72B7 2BBA 3C88 A68C FE15 3AC6 6194 3D80 C89E

To claim this, I am signing this object: