This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% load static %} | |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<title>Markers Map</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" type="text/css" href="{% static 'map.css' %}"> | |
<link rel="stylesheet" type="text/css" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css"> | |
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script> | |
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## @section Global parameters | |
## Global Docker image parameters | |
## Please, note that this will override the image parameters, including dependencies, configured to use the global value | |
## Current available global Docker image parameters: imageRegistry, imagePullSecrets and storageClass | |
## @param global.imageRegistry Global Docker image registry | |
## @param global.imagePullSecrets Global Docker registry secret names as an array | |
## @param global.storageClass Global storage class for dynamic provisioning | |
## | |
global: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongodump --host localhost --port 27017 --username root --password XXXX --authenticationDatabase admin -d XXXX --gzip --archive > dump_`date "+%Y-%m-%d"`.gz | |
mongorestore --archive="mongodump-test-db" --nsFrom='test.*' --nsTo='examples.*' | |
#### build mongo dumper | |
git clone https://github.com/mongodb/mongo-tools | |
cd mongo-tools | |
sudo apt-get install -y libkrb5-dev | |
./make build -tools=mongodump,mongorestore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.PHONY: help | |
help: | |
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | |
.DEFAULT_GOAL := help | |
vpn: ## Запускает | |
@wg-quick up /etc/wireguard/wg0.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# https://askubuntu.com/questions/856460/using-a-digital-camera-canon-as-webcam | |
sudo modprobe v4l2loopback | |
gphoto2 --abilities | |
gphoto2 --stdout --capture-movie | ffmpeg -i - -vcodec rawvideo -pix_fmt yuv420p -threads 0 -f v4l2 /dev/video0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from fractions import Fraction | |
from pprint import pprint | |
from django.core import exceptions | |
from django.contrib.postgres.fields import JSONField | |
from psycopg2.extras import Json | |
import orjson | |
from pydantic.json import custom_pydantic_encoder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM traefik:v2.2 | |
RUN touch acme.json | |
RUN chmod 600 acme.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Removes old revisions of snaps | |
# CLOSE ALL SNAPS BEFORE RUNNING THIS | |
set -eu | |
snap list --all | awk '/disabled/{print $1, $3}' | | |
while read snapname revision; do | |
snap remove "$snapname" --revision="$revision" | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<svg width="100%" viewBox="-2000 -2000 4000 4000" | |
preserveAspectRatio="xMidYMin meet" | |
style='stroke-width: 0px; background-color: black;' | |
> | |
<g class="g-circles" fill="none" | |
stroke-width="40" | |
stroke="url(#paint1)" | |
stroke-linecap="round" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import requests | |
import os | |
import vk_api | |
# from vk_api import VkUpload | |
# from vk_api.utils import get_random_id | |
from vk_api.bot_longpoll import VkBotLongPoll, VkBotEventType | |
def get_random_id(): |
NewerOlder