Skip to content

Instantly share code, notes, and snippets.

View easy-quest's full-sized avatar

Ivan Yastrebov easy-quest

  • Krasnodar
  • 08:18 (UTC +03:00)
View GitHub Profile
@easy-quest
easy-quest / body.json
Last active August 25, 2021 23:48
[body.json]
{
"folderId": "b1g4pjfti5fqa7vh4967",
"texts": ["Hello", "World"],
"targetLanguageCode": "ru"
}
@easy-quest
easy-quest / trans.sh
Last active August 25, 2021 23:44
[trans.sh]
export API_TOKEN=AQVNzZ5HyuZo1_dljl1sV6RDDcqF1J4XeVf6VKB3
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${API_TOKEN}" \
-d '@body.json' \
"https://translate.api.cloud.yandex.net/translate/v2/translate"
@easy-quest
easy-quest / ssh_confin
Last active August 22, 2021 13:34
[ssh_config] full Страница руководства по Люнукс
---
created: 2021-08-22T09:59:39 (UTC +03:00)
source: https://man7.org/linux/man-pages/man5/ssh_config.5.html
author: Ivan Yastrebov
---
# ssh_config(5) - Страница руководства по Linux
---
___
‎‎​
@easy-quest
easy-quest / snippet cat
Created August 18, 2021 14:56
cat.snippet
cat > ${filename}.html <<ZZZ
pass
ZZZ
@easy-quest
easy-quest / App.sh
Last active September 17, 2021 11:06
script run jupyter lab
#!/usr/bin/sudo bash
apt update -y && apt upgrade -y
git config --global user.email "easy-quest@mail.ru"
git config --global user.name "Ivan Yastrebov"
curl -L https://packagecloud.io/gbt/release/gpgkey | sudo apt-key add -
echo 'deb https://packagecloud.io/gbt/release/ubuntu/ xenial main' | sudo tee /etc/apt/sources.list.d/gbt.list >/dev/null
sudo apt-get update
@easy-quest
easy-quest / vnc-stop.sh
Last active August 16, 2021 21:01
bash script kill vnc
#!/bin/bash
USER=$(whoami)
echo "Killing VNC Server"
echo -n "Enter port number which you want to kill (Example: 3): "
read pt
echo " "
echo "Killing port $pt"
vncserver -kill :$pt
rm -rf /tmp/.X$pt-lock
@easy-quest
easy-quest / vnc-start.sh
Last active August 16, 2021 20:59
bash script run vnc
#!/bin/bash
export USER=$(whoami)
HEIGHT=0
WIDTH=0
CHOICE_HEIGHT=5
BACKTITLE="EasyQuest Выбор разрешения"
TITLE="vncserver-start"
MENU="Выберите один из следующих вариантов:"
export PORT=1
@easy-quest
easy-quest / backupToZip.py
Created July 26, 2021 09:15
Резервное копирование всего содержимого в ZIP-файл
#! python3
# backupToZip.py
# Copies an entire folder and its contents into
# a zip file whose filename increments.
import zipfile, os
def backupToZip(folder):
# Резервное копирование всего содержимого в ZIP-файл.
@easy-quest
easy-quest / tutor.md
Created July 10, 2021 09:49
conda tutorial

‎‎​