Skip to content

Instantly share code, notes, and snippets.

@davit312
davit312 / massindex.go
Created July 18, 2025 14:48
Մարմնի զանգվածի ինդեքսի հաշվիչ
package main
import "fmt"
func main() {
var (
height float32
weight float32
index float32
)
@davit312
davit312 / orc.txt
Created August 24, 2024 14:06
Local ORC with docker, (it includes Aremenian too)
# Run ORC on local host with docker
# Download https://github.com/tesseract-ocr/tessdata_best for best quality
# Use -l hye+eng+rus to read Armenian and other languages
# And download tessconfigs, it is a link in repo as @tessconfigs
IMAGE_FULL_PATH=
docker run -it --rm \
-v /path/to/tessdata_best:/usr/local/share/tessdata/ \
-v $IMAGE_FULL_PATH:/tmp/img \
@davit312
davit312 / piper-run.sh
Last active August 19, 2024 04:07
Frontend for piper-tts
#!/usr/bin/env bash
# This model has high quality voice and proccessing time is small
FAVORITE_MODEL="en_US-ryan-low.onnx"
if [[ "$1" == "-h" ]]; then
echo -e "
@davit312
davit312 / win_reader.pyw
Last active January 3, 2024 11:20
Windows text reader
import tkinter as tk
from tkinter import ttk
from threading import Thread
import subprocess
import time
import os
import pyclip
@davit312
davit312 / armascii-unicode.py
Created July 18, 2023 17:53
armascii to unicode
import sys
map = dict()
map[162] = "—"
map[163] = ":"
map[164] = ")"
map[165] = "("
map[166] = "»"
map[167] = "«"
map[168] = "և"
@davit312
davit312 / background_exec.bash
Last active April 16, 2022 04:37
Execute command in background; Execute command in background and close terminal
# Run command in background without using ampersand
coproc vlc .
# Run command in background and close terminal
coproc vlc . ; exit
# Note: coproc command works in bash but not works in shell
@davit312
davit312 / 5tv.bash
Last active March 29, 2022 14:39
5tv ալիքի ուղիղ եթերը ձայնագրող script
#!/usr/bin/env bash
prefix='https://live-5tvam.cdnvideo.ru/5tvam/5tvam/'
chunklistData=$(curl -s ${prefix}'playlist.m3u8')
declare -a chunks=('-', '-', '-')
appends=0
targetTime=15
out='out.ts'
https://yoyo.am
Կայք մտնելուց երբեմն redirect ա անում դեպի spam կայք, սա հիմնականը լինում ա երբ
google -ի որոնման արդյունքից կամ facebook -ում դրած գովազդի լինկով են մտնում։
Եթե մի անգամ արդեն արել ա redirect, դրանից հետո մոտ մեկ օր էլ չի անում նույնիսկ եթե incognito-ով են կայքը բացում։
ip -ներով ա user ին որոշում. երբ wifi ից փոխում եմ մոբայլի նորից redirect անում ա incognito-ով։
database ի մեջ կար wp_bv_ip_store դրա վերջում 111 եմ ավվելացրել, չի ազդել խնդիրը շարունակվել ա
@davit312
davit312 / ssh.js
Created June 3, 2021 08:45
Execute commands on remote server with node js
const http = require('http')
const qs = require('querystring')
const {exec} = require('child_process')
const PASSWORD = 'your secure password'
const PORT = 8080
const PATH = '/'
let server = http.createServer(function(req,resp) {
if(req.method == 'GET'){
function getSign(year){
let devider = 12
let signNames = [
'կապիկ', 'աքլոր', 'շուն', 'խոզ',
'մուկ', 'ցուլ', 'վագր', 'կատու',
'վիշապ', 'օձ', 'ձի', 'այծ',
]
return signNames[year % devider]