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 / russian-mnemonic-words.txt
Created January 26, 2025 12:14 — forked from kissarat/russian-mnemonic-words.txt
Список существительных русского языка
ад
ар
ер
ил
ом
ум
ус
юг
юр
ют
@Yuri-SN
Yuri-SN / elixir_notes.md
Created November 5, 2023 11:11 — forked from fschuindt/elixir_notes.md
My personal study notes on Elixir. It's basically a resume of http://elixir-lang.org/getting-started/ (Almost everything is copied). Still working on it!
@Yuri-SN
Yuri-SN / command_line.sh
Created October 5, 2023 08:46 — forked from mplatts/command_line.sh
Elixir Phoenix Cheatsheet
mix help
iex -S mix phx.server # like rails c
h Enum => shows help for Enum
Dossy.Accounts.__info__(:functions) => will list functions in this module
mix phx.routes
# DATABASE
mix ecto.gen.migration add_weather_table
mix ecto.migrate
@Yuri-SN
Yuri-SN / btrfs-guide.md
Created August 3, 2023 07:25 — forked from MaxXor/btrfs-guide.md
Btrfs guide to set up an LUKS-encrypted btrfs raid volume with included maintenance & recovery guide

Encrypted Btrfs storage setup and maintenance guide

Initial setup with LUKS/dm-crypt

This exemplary initial setup uses two devices /dev/sdb and /dev/sdc but can be applied to any amount of devices by following the steps with additional devices.

Create keyfile:

dd bs=64 count=1 if=/dev/urandom of=/etc/cryptkey iflag=fullblock
chmod 600 /etc/cryptkey
@Yuri-SN
Yuri-SN / postgres_recovery.md
Created July 18, 2023 16:40 — forked from supix/postgres_recovery.md
Postgres error: Missing chunk 0 for toast value in pg_toast

The problem

In some cases, it is possible that PostgreSQL tables get corrupted. This can happen in case of hardware failures (e.g. hard disk drives with write-back cache enabled, RAID controllers with faulty/worn out battery backup, etc.), as clearly reported in this wiki page. Furthermore, it can happen in case of incorrect setup, as well.

One of the symptoms of such corruptions is the following message:

ERROR: missing chunk number 0 for toast value 123456 in pg_toast_45678

This almost surely indicates that a corrupted chunk is present within a table file. But there is a good way to get rid of it.

@Yuri-SN
Yuri-SN / mongoose-cheatsheet.md
Created November 24, 2022 14:58 — forked from subfuzion/mongoose-cheatsheet.md
mongoose cheatsheet

Definitely not comprehensive. This is meant to be a basic memory aid with links to get more details. I'll add to it over time.

Install

$ npm install mongoose --save

Connect

const mongoose = require('mongoose');

Настройка Direct Upload из Ruby on Rails через Active Storage в Yandex Object Storage

  • Ruby on Rails 6.1
  • Active Storage 6.1

Yandex Object Storage

  1. Для начала работы необходимо зарегистрироваться в сервисе Yandex Cloud

  2. Создать платежный аккаунт. (После привязки карты начисляются демо-средства на 60 дней пробного периода).

@Yuri-SN
Yuri-SN / app.js
Created August 30, 2022 09:29 — forked from hagino3000/app.js
JSON-RPC for node (express)
/**
* Module dependencies.
*/
var express = require('express');
var rpcMethods = require('./methods.js');
var app = module.exports = express.createServer();
// Configuration
@Yuri-SN
Yuri-SN / 0-go-os-arch.md
Created July 5, 2022 13:53 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@Yuri-SN
Yuri-SN / aboutNodeJsArchitecture.md
Created June 3, 2022 05:59 — forked from zmts/aboutNodeJsArchitecture.md
A little bit about Node.js API Architecture

A little bit about Node.js API Architecture (Архитектура/паттерны организации кода Node.js приложений)

node.js

TL;DR

code: https://github.com/zmts/supra-api-nodejs

Предисловие

Одной из болезней Node.js комьюнити это отсутствие каких либо крупных фреймворков, действительно крупных уровня Symphony/Django/RoR/Spring. Что является причиной все ещё достаточно юного возраста данной технологии. И каждый кузнец кует как умеет ну или как в интернетах посоветовали. Собственно это моя попытка выковать некий свой подход к построению Node.js приложений.