View mapa.py
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
# credits https://blog.furas.pl/rysowanie-danych-na-mapie-w-Pythonie.html | |
#!/usr/bin/env python | |
#-*- coding: utf-8 -*- | |
# rozwiazanie na problem ze znalezieniem modulu `basemap` na moim komputerze | |
import mpl_toolkits | |
mpl_toolkits.__path__.insert(0, '/usr/lib/pymodules/python2.7/mpl_toolkits') | |
# na podstawie: BaseMap example by geophysique.be - tutorial 01 | |
# adres: http://www.geophysique.be/tutorials |
View poechecker.py
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 dataclasses import dataclass | |
from bs4 import BeautifulSoup as soup | |
import requests | |
from collections import Counter | |
import time | |
# python 3.7 | |
# installation: | |
# pip install bs4 lxml requests |
View looping.py
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 asyncio | |
import time | |
sema = asyncio.Semaphore(value=5) | |
async def worker(): | |
async with sema: | |
print("Start") | |
await asyncio.sleep(3) |
View .htaccess
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
# https://simonecarletti.com/blog/2016/08/redirect-domain-http-https-www-apache/ | |
RewriteEngine On | |
RewriteCond %{HTTPS} off [OR] | |
RewriteCond %{HTTP_HOST} ^www\. [NC] | |
RewriteCond %{HTTP_HOST} ^(?:www\.)?(.+)$ [NC] | |
RewriteRule ^ https://%1%{REQUEST_URI} [L,NE,R=301] |
View clipboard_script.py
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 ctypes | |
import time | |
from typing import Any | |
TABLE = { | |
'to_list': lambda txt: txt.decode('utf-8').splitlines(), | |
} | |
__doc__ = """ |
View parse_css.py
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 typing import List | |
import tinycss2 | |
import tinycss2.ast | |
def get_desired(filename): | |
""" | |
Read desired css line by line from a file. | |
""" |
View alpine.MD
on ntfs use ntfs-3g
- to get uuid blkid UUID=$UUID $DIR ntfs-3g defaults 0 0
View install.sh
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 | |
set -eu | |
IP=${1} | |
HOST=${2} | |
echo "${HOST}" > /etc/hostname | |
printf "127.0.0.1\tlocalhost\n::1\tlocalhost\n" > /etc/hosts | |
sed -i "s/address.*/address $IP/" /etc/network/interfaces |
View .env.sh
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 | |
export SERVER1="192.168.0.201" | |
export SERVER2="192.168.0.202" | |
export SERVER3="192.168.0.203" | |
export SERVER4="192.168.0.204" | |
export HOST1="g3w.dell.baza" | |
export HOST2="g50.dell.baza" | |
export HOST3="h3m.dell.baza" |
OlderNewer