Skip to content

Instantly share code, notes, and snippets.

View Yuri-SN's full-sized avatar
✌️

Yuri Solyanik Yuri-SN

✌️
  • Russia, Chelyabinsk
View GitHub Profile
@Yuri-SN
Yuri-SN / readme.md
Created May 11, 2022 04:37 — forked from mattiasghodsian/readme.md
Setup RAIDZ on Ubuntu Server 20.04 LTS

Setup RAIDZ on Ubuntu Server 20.04 LTS

In this walkthrough we'll be using 4 brand new Seagate IronWolf Pro 10TB 7200rpm 256MB hard drives to setup a ZFS storage pool (RAIDZ 10).

1. ZFS

If you don't have ZFS already installed go ahead and run

sudo apt install zfsutils-linux

2. Disk Identifier & Sector sizes

Before we do anything with the drives we need the disk identifier and sector size for each drive for step 3.

@Yuri-SN
Yuri-SN / promtail_docker_logs.md
Created February 14, 2022 03:26 — forked from ruanbekker/promtail_docker_logs.md
Docker Container Logging using Promtail
@Yuri-SN
Yuri-SN / README.md
Created February 9, 2022 11:18 — forked from joelverhagen/README.md
Jekyll YouTube Embed Plugin

This is a plugin meant for Jekyll.

Example use:

Easily embed a YouTube video. Just drop this file in your _plugins directory.

{% youtube oHg5SJYRHA0 %}

Problem

The go command line tool needs to be able to fetch dependencies from your private GitLab, but authenticaiton is required.

This assumes your private GitLab is hosted at privategitlab.company.com.

Environment variables

The following environment variables are recommended:

export GO111MODULE=on
export GOPRIVATE=privategitlab.company.com
@Yuri-SN
Yuri-SN / ohmyzsh.md
Created November 15, 2020 17:05 — forked from yovko/ohmyzsh.md
ZSH (using Oh My ZSH) on Manjaro Linux

ZSH (using Oh My ZSH) on Manjaro Linux

0. If ZSH is not already installed on your Manjaro system you can do it with the command:

sudo pacman -Syu zsh

You do not need to install manjaro-zsh-config and all the other related packages like zsh-syntax-highlighting, zsh-history-substring-search, zsh-autosuggestions, etc., as we will use Oh My Zsh.

# RESCUE BOOT
cryptsetup open /dev/nvme0n1p2 luks
mkdir /current
mount -o subvol=@,ssd,compress=lzo,noatime,nodiratime /dev/mapper/luks /current
manjaro-chroot /current /bin/bash
# INSTALL
# activate wifi
# done
@Yuri-SN
Yuri-SN / gist:86c7735263fb882ec01ea98be563e9b9
Created December 3, 2019 05:39 — forked from arjunvenkat/gist:1115bc41bf395a162084
Seeding a Rails database with a CSV file

How to seed a Rails database with a CSV file

1. Setup

First, Create a folder inside of lib called seeds

Put your CSV file example.csv into the lib/seeds folder. In the example below, the file is called real_estate_transactions.csv

Make sure you've created a resource with the appropriate columns to match your seed data. The names don't have to match up.

@Yuri-SN
Yuri-SN / node-folder-structure-options.md
Created August 29, 2019 06:28 — forked from lancejpollard/node-folder-structure-options.md
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin
@Yuri-SN
Yuri-SN / monit.rc
Last active August 29, 2015 14:18 — forked from vkurennov/monit.rc
### Nginx ###
check process nginx with pidfile /opt/nginx/logs/nginx.pid
start program = "/etc/init.d/nginx start"
stop program = "/etc/init.d/nginx stop"
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then restart
if memory usage > 80% for 5 cycles then restart
if failed host 127.0.0.1 port 80 protocol http
then restart
if 3 restarts within 5 cycles then timeout