Skip to content

Instantly share code, notes, and snippets.

View juev's full-sized avatar
🏠
Working from home

Evsyukov Denis juev

🏠
Working from home
View GitHub Profile
@juev
juev / Synology-Diskstation-Git.md
Created January 23, 2024 08:50 — forked from walkerjeffd/Synology-Diskstation-Git.md
Instructions for setting up git server on Synology Diskstation

Configure Synology NAS as Git Server

Instructions for setting up a git server on a Synology NAS with Diskstation. Specifically, I am using a DS414 with DSM 5.0.

Set Up User and Folder

  • Create user gituser via Diskstation interface (with File Station and WebDAV privilages)
  • Add new shared folder called git (located at /volume1/git) with read/write access for gituser and admin. This folder will hold all the repos.
  • Install Git Server package via Diskstation
@juev
juev / README.md
Created January 28, 2023 11:14 — forked from valyala/README.md
Optimizing postgresql table for more than 100K inserts per second

Optimizing postgresql table for more than 100K inserts per second

  • Create UNLOGGED table. This reduces the amount of data written to persistent storage by up to 2x.
  • Set WITH (autovacuum_enabled=false) on the table. This saves CPU time and IO bandwidth on useless vacuuming of the table (since we never DELETE or UPDATE the table).
  • Insert rows with COPY FROM STDIN. This is the fastest possible approach to insert rows into table.
  • Minimize the number of indexes in the table, since they slow down inserts. Usually an index on time timestamp with time zone is enough.
  • Add synchronous_commit = off to postgresql.conf.
  • Use table inheritance for fast removal of old data:
#!/usr/bin/env bash
# journal.sh
# ==========
#
# One daily text file to rule them all.
#
# Copyright: 2022 Tyler Cipriani <tyler@tylercipriani.com
# License: GPLv3
set -euo pipefail
@juev
juev / convert.sh
Created July 15, 2021 07:25
convert.sh -- bash script for convert postgresdb dump file to sqlite database
#!/bin/bash
FILE=$1
SQLITE=$2
if [ -z $1 ]; then
echo "convert.sh -- convert postgresdb dump to sqlite database."
echo ""
echo "First argument is dump file"
echo "Second argument is sqlite filename (optional, default value is \`sqlite.db')."
@juev
juev / triggers.org
Created January 20, 2020 13:27 — forked from svetlyak40wt/triggers.org
Спусковые крючки по Дорофееву в формате для Org Mode

Спусковые крючки для очистки мозга

Как пользоваться картой

  1. Карта помогает выгрузить из головы все задачи
  2. Пройдитесь взглядом по всем разделам карты
  3. Если в голове “сидит” задача, то она обязательно всплывёт при взгляде на соответствующий узел
  4. Выписывайте задачи, пока их количество не достигнет 50
  5. Почувствуйте, как гора упала с ваших плеч :)

При составлении карты использовались материалы Максима Дорофеева, mnogosdelal.ru

Учёба

"go.useLanguageServer": true,
"go.languageServerExperimentalFeatures": {
"format": true,
"autoComplete": true,
"diagnostics": true,
"goToDefinition": true,
"hover": true,
"signatureHelp": true,
"goToTypeDefinition": true,
"documentSymbols": true,
@juev
juev / jenkins-decrypt.groovy
Created September 10, 2019 08:23 — forked from tuxfight3r/jenkins-decrypt.groovy
Decrypting Jenkins Password
#To Decrypt Jenkins Password from credentials.xml
#<username>jenkins</username>
#<passphrase>your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J</passphrase>
#go to the jenkins url
http://jenkins-host/script
#In the console paste the script
hashed_pw='your-sercret-hash-S0SKVKUuFfUfrY3UhhUC3J'
@juev
juev / tmux.md
Created September 5, 2019 06:29 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@juev
juev / budget.ledger
Created March 12, 2019 09:44 — forked from simonmichael/budget.ledger
seeking minimal ledger budget examples
; whenever there's a food expense, deduct the same amount from the budget
= /^expenses:food$/
(budget:food) -1
1/1 opening balances
assets:checking 1000
equity:opening balances
1/2 budget allocation ; could also do this with an automated posting on income txns