Skip to content

Instantly share code, notes, and snippets.

menuentry "Arch"{
set root='(hd0,4)'
search --no-floppy --fs-uuid --set=root f3hah48h-34j1-4hf8-a7sh-fh392ngfj29j
linux /vmlinuz-linux root=UUID=f3hah48h-34j1-4hf8-a7sh-fh392ngfj29j
initrd /initramfs-linux.img
}
#!/bin/bash
# Убедись, что скрипт запускается с правами root
if [ "$(id -u)" -ne 0 ]; then
echo "Этот скрипт должен запускаться от root!" >&2
exit 1
fi
# Разметка диска (пример для /dev/vda)
mkfs.ext4 -L nixos /dev/sda3
@miptivan
miptivan / sh
Created July 23, 2025 14:46
install
#!/bin/bash
# Убедись, что скрипт запускается с правами root
if [ "$(id -u)" -ne 0 ]; then
echo "Этот скрипт должен запускаться от root!" >&2
exit 1
fi
# Разметка диска (пример для /dev/vda)
mkfs.ext4 -L nixos /dev/vda3
@miptivan
miptivan / gist:0972b63eb380146f1b0472b01b08f55f
Created September 22, 2024 09:43
gentoo /usr/lib64 # ls |& grep Qt
gentoo /usr/lib64 # ls |& grep Qt
libAppStreamQt.so
libAppStreamQt.so.0.16.4
libAppStreamQt.so.2
libQt5AccessibilitySupport.a
libQt5AccessibilitySupport.prl
libQt5Bluetooth.prl
libQt5Bluetooth.so
libQt5Bluetooth.so.5
libQt5Bluetooth.so.5.15
@miptivan
miptivan / emerge yandex-browser-stable
Created September 22, 2024 09:35
emerge -av --autounmask www-client/yandex-browser-stable
gentoo /home/ivan # emerge -av --autounmask www-client/yandex-browser-stable
WARNING: One or more repositories have missing repo_name entries:
/usr/local/portage/layman/sunrise/profiles/repo_name
NOTE: Each repo_name entry should be a plain text file containing a
unique name for the repository on the first line.
Traceback (most recent call last):
File "/home/ivan/EDS/test.py", line 31, in <module>
conn.request("POST", "/gpbapi/test/file-service/v1/files?preserve_filename=true&chunks_allow=false", payload, headers)
File "/usr/lib/python3.10/http/client.py", line 1283, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1329, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
import http.client
import mimetypes
import ssl
from codecs import encode
# ---------- СЕРТИФИКАТ И КОННЕКТ ----------
crt_path = "/certificate/testapi.crt"
key_path = "/certificate/testapi.key"
context = ssl.create_default_context()
Debugger entered--Lisp error: (error "Package ‘compat-29.1.4.5’ is unavailable")
signal(error ("Package ‘compat-29.1.4.5’ is unavailable"))
error("Package `%s-%s' is unavailable" compat "29.1.4.5")
package-compute-transaction((#s(package-desc :name doom-modeline :version (20240624 1057) :summary "A minimal and modern mode-line" :reqs ((emacs (25 1)) (compat (29 1 4 5)) (nerd-icons (0 1 0)) (shrink-path (0 3 1))) :kind tar :archive "melpa" :dir nil :extras ((:commit . "836944c16d5d6b05e112e4781f5acab813f53022") (:authors ("Vincent Zhang" . "seagle0128@gmail.com")) (:maintainers ("Vincent Zhang" . "seagle0128@gmail.com")) (:maintainer "Vincent Zhang" . "seagle0128@gmail.com") (:keywords "faces" "mode-line") (:url . "https://github.com/seagle0128/doom-modeline")) :signed nil)) ((emacs (25 1)) (compat (29 1 4 5)) (nerd-icons (0 1 0)) (shrink-path (0 3 1))) (#s(package-desc :name doom-modeline :version (20240624 1057) :summary "A minimal and modern mode-line" :reqs ((emacs (25 1)) (compat (29 1 4 5)) (nerd-i
@miptivan
miptivan / bash
Created May 28, 2024 21:23
alembic revision --autogenerate -m "Initial migration"
Traceback (most recent call last):
File "/home/ivan/PycharmProjects/hotels/.venv/bin/alembic", line 8, in <module>
sys.exit(main())
File "/home/ivan/PycharmProjects/hotels/.venv/lib/python3.10/site-packages/alembic/config.py", line 641, in main
CommandLine(prog=prog).main(argv=argv)
File "/home/ivan/PycharmProjects/hotels/.venv/lib/python3.10/site-packages/alembic/config.py", line 631, in main
self.run_cmd(cfg, options)
File "/home/ivan/PycharmProjects/hotels/.venv/lib/python3.10/site-packages/alembic/config.py", line 608, in run_cmd
fn(
File "/home/ivan/PycharmProjects/hotels/.venv/lib/python3.10/site-packages/alembic/command.py", line 236, in revision
import math
def alignment(s, t, match_score, mismatch_score, rho, sigma):
m = len(s) + 1
n = len(t) + 1
main = [[0] * m for _ in range(n)]
upper = [[0] * m for _ in range(n)]
lower = [[0] * m for _ in range(n)]