Skip to content

Instantly share code, notes, and snippets.

View farwydi's full-sized avatar

Leonid Zharikov farwydi

View GitHub Profile
{"ignition":{"config":{},"security":{"tls":{}},"timeouts":{},"version":"2.3.0"},"networkd":{"units":[{"contents":"[Match]\nName=eth0\n\n[Network]\nAddress=195.2.76.236/24\nGateway=195.2.76.1\nDNS=8.8.8.8\n","name":"static.network"}]},"passwd":{"users":[{"groups":["sudo","docker"],"name":"core","passwordHash":"$6FMi11BJFsAc","sshAuthorizedKeys":["ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAlwAiep+i/ls7mVN8gSdsgiYZQdg9M4C4WzRljpEfd1EFmcpTrnZ9tDUC+v6od+DHaKn/gT6cCPKlyFoLqoy2vwuPxDLJKD170BJoQ3ihXViHzn7DgvDsB9ESRwJRXybiopy5qdl4oCqLsEjMxFtWEtWwj9fTrEbIi4QFbJL+6Pt+QUw9uXHJ4vdur5kP+kFAgdNrp/dwUoV8tHtC9wv/f33/BqZ1k8U6JQWzU0/H0qOE09gXYLcd0/wDNZ5B5JXzwcaW8Go7dsyCoOlmKMsTkc9sUElM6p7ws3CSkNzTMh9HTANcgeX5nBOVR1kI+9SCPPyV4ExFzLI4Mkyuu323uQ=="]}]},"storage":{},"systemd":{"units":[{"contents":"[Unit]\nDescription=NGINX example\nAfter=docker.service\nRequires=docker.service\n[Service]\nTimeoutStartSec=0\nExecStartPre=-/usr/bin/docker rm --force nginx1\nExecStart=/usr/bin/docker run --name nginx1 --pull always --net host docker.io/ngin
dir -Path . -Filter node_modules -recurse | foreach {echo $_.fullname; rm -r -Force $_.fullname}
# -*- mode: ruby -*-
# # vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = $box
(1..$num_instances).each do |i|
config.vm.define vm_name = "%s-%01d" % [$instance_name_prefix, i] do |node|
node.vm.hostname = vm_name
package main
import "gorm.io/gorm"
type Billing struct {
Id *int64
Msisdn uint64
RealDatetime string
CreateDatetime *string
Status int
@farwydi
farwydi / audio.sh
Last active September 22, 2020 19:25
amixer -c 1 set 'Master' 57
amixer -c 1 set 'HP/Speaker Auto Detect' on
amixer -c 1 set 'Enable OutFX' off
sudo alsactl store
@farwydi
farwydi / 1.txt
Last active July 24, 2020 22:30
SFL
apt-get install build-essential texinfo flex bison -y
export LFS=/mnt/lfs
# DO
mkfs.ext4 /dev/disk/by-id/scsi-0DO_Volume_volume-lon1-01
#!/bin/sh -x
export DEBIAN_FRONTEND=noninteractive
sudo locale-gen en_GB.UTF-8
events := NewQuestionnaireB(
NewMessage("Привет! Пройди опрос"),
NewMessage("Спасибо за уделённое время"),
NewQuestion(
NewMessage("Где вы живёте?")).
Answer(NewAnswerMenu().
AddItem("Россия", nil).
AddItem("США", nil).
AddItem("СНГ", nil).
AddItem("Европа", nil)),
CREATE TABLE public.attachments
(
id SERIAL NOT NULL
CONSTRAINT attachments_pk
PRIMARY KEY,
file UUID NOT NULL,
content INTEGER NOT NULL
);
ALTER TABLE public.attachments
@farwydi
farwydi / application.js
Last active February 5, 2020 21:37
admin lte 3
import 'bootstrap';
import 'admin-lte/build/js/AdminLTE';