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 xml.dom.minidom | |
def feed_write(ctx, path, generator_name = 'minimapython', generator_uri = 'https://github.com/vadimkantorov/minima', generator_version = 'https://github.com/vadimkantorov/minimapython'): | |
site = ctx.get('site', {}) | |
site__lang = site.get('lang') | |
page__url__absolute_url = '' | |
root__absolute_url = '' | |
site__time__date_to_xml_schema = '' | |
page__url__absolute_url__xml_escape = '' |
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
# python -m pip install timezonefinder pytz --user | |
import timezonefinder | |
import pytz | |
import datetime | |
latlnglist = ''' | |
43.0010092,41.0208743 | |
42.9972303,41.0089412 | |
43.0125911,40.9705287 | |
42.9991332,41.0408331 |
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
<html><body> | |
<link href="https://tile.openstreetmap.org/{z}/{x}/{y}.png" id="link_tiles" /> | |
<!-- | |
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" | |
integrity="sha512-hoalWLoI8r4UszCkZ5kL8vayOGVae1oxXe/2A4AO6J9+580uKHDO3JdHb7NzwwzK5xr/Fs0W40kiNHxM9vyTtQ==" | |
crossorigin=""/> | |
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" |
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
# excel opens correctly only utf16 with BOM with tab separator or utf8 with bom with comma separator | |
sed '1s/^\(\xef\xbb\xbf\)\?/\xef\xbb\xbf/' will_prepend_bom_to_utf8_file_if_it_does_not_have_bom_yet.csv |
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
printf "Привет, bonjour, hello\nasdasd" > test.txt | |
sudo apt install hunspell hunspell-ru hunspell-fr | |
hunspell -l -d en_US,ru_RU,fr_FR text.txt | |
sudo apt install aspell aspell-ru | |
aspell list --lang=ru < README.md | |
aspell check README.md |
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
# python3 dataurifycss.py -i assets/main.3cfd67ba.css --delete > assets/main.css | |
import os | |
import argparse | |
import re | |
import sys | |
import base64 | |
parser = argparse.ArgumentParser() | |
parser.add_argument('--input-css-path', '-i') |
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
name: web | |
on: | |
workflow_dispatch: | |
inputs: | |
build_runid: | |
description: 'build_runid' | |
required: true | |
default: '7410445048' | |
permissions: write-all |
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
# print only attribute values for class="notion-color-gray" and similar | |
grep -o \"notion-color-[^\"]*\" test.html |
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
# cat all files not in .git directory | |
find -not -iwholename '*.git*' -type f -exec cat {} + | |
# cat all tsx files not in .git directory with file name section header | |
find -not -iwholename '*.git*' -type f -name '*.tsx' -exec tail --lines=+1 {} + | |
# unpack several downloaded tar files and then delete the original archives | |
find -name '*.tar.gz' -type f -exec tar -xf {} \; -delete | |
# search recursively in all CMakeLists.txt files a substring 1.78 |