Skip to content

Instantly share code, notes, and snippets.

View anton-petrov's full-sized avatar
:octocat:
🥷

Anton Petrov anton-petrov

:octocat:
🥷
View GitHub Profile
@anton-petrov
anton-petrov / neovim_install.sh
Created November 29, 2023 12:36
Install neovim
sudo apt install unzip gettext cmake gcc g++ make
git clone --depth=1 https://github.com/neovim/neovim --branch=release-0.9 /tmp/neovim
cd /tmp/neovim
make CMAKE_BUILD_TYPE=RelWithDebInfo
sudo make install
@anton-petrov
anton-petrov / Dockerfile
Created September 22, 2023 08:21
Go docker example
FROM golang:1.21 AS builder
ARG VERSION
ARG BUILD_TIME
RUN git config --global url."git@github.com:".insteadOf "https://github.com/"
ENV GOPRIVATE=github.com/company/private-repo
RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts
@anton-petrov
anton-petrov / osm-server.sh
Last active August 26, 2023 13:14
OSM server
# скачать карту
# Россия
wget https://download.geofabrik.de/russia-latest.osm.pbf
# Республика Белорусь
wget https://download.geofabrik.de/europe/belarus-latest.osm.pbf
# импорт карты
docker run -d \
-e THREADS=12 \
--shm-size=4g \
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
@anton-petrov
anton-petrov / 0-go-os-arch.md
Created July 17, 2023 17:29 — 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

Keybase proof

I hereby claim:

  • I am anton-petrov on github.
  • I am antonpetrov (https://keybase.io/antonpetrov) on keybase.
  • I have a public key ASA_OIsuTA3sXxk1yEE1sVVEOD0_m3xFWGV_9WzLenkq2Ao

To claim this, I am signing this object:

@anton-petrov
anton-petrov / ssh-copy-id.ps
Created April 10, 2023 10:56
Windows 10/11 ssh-copy-id
type $env:USERPROFILE\.ssh\id_rsa.pub | ssh {IP-ADDRESS} "cat >> .ssh/authorized_keys"
@anton-petrov
anton-petrov / launchctl_man.md
Created April 4, 2023 18:22 — forked from stevekm/launchctl_man.md
macOS OS X login items

[source]

This manual page is for Mac OS X version 10.9

If you are running a different version of Mac OS X, view the documentation locally:

    In Terminal, using the man(1) command

Reading manual pages
@anton-petrov
anton-petrov / parser.py
Created March 23, 2023 11:51 — forked from ashmigelski/parser.py
Python server for Wialon Retranslator 1.0
# -*- coding: utf-8 -*-
import binascii
import struct
def parse(fmt, binary, offset=0):
'''
Unpack the string
@anton-petrov
anton-petrov / pritunl.yaml
Created March 23, 2023 02:54
Pritunl vpn docker-compose
version: '3'
services:
mongo:
image: mongo:latest
restart: always
container_name: pritunldb
hostname: pritunldb
network_mode: bridge
volumes: