Skip to content

Instantly share code, notes, and snippets.

View viktor02's full-sized avatar
☄️
typing a code...

Viktor Karpov viktor02

☄️
typing a code...
View GitHub Profile
@al-ivanov
al-ivanov / PageLoadAcceleration.js
Created February 19, 2019 20:11
Ускорение загрузки страницы за счет последовательной загрузки картинок, вместо параллельной
(async ()=>{
for (let node of document.getElementsByTagName('img')) {
await new Promise(res=>{
node.src=node.dataset.src;
node.onload = ()=>res();
})
}
})()
//Используется data-src вместо src
@rodnaxel
rodnaxel / install_kivy.sh
Last active August 18, 2020 20:38
Install Kivy on Ubuntu 18.04 (python 3.6)
apt-get install python3-pip
apt-get install cython3 python3-dev
apt-get install libsdl2-dev libsdl2-ttf-dev libsdl2-image-dev libsdl2-mixer-dev
python3.6 -m pip3 install git+https://github.com/kivy/kivy.git@master
apt-get install python3-kivy-examples
@Ayms
Ayms / gist:077b114a27450f773939
Last active August 12, 2024 14:30
Monitoring and blocking the bittorrent monitoring spies

##Target

Protecting the privacy of the bittorrent users and protecting them from the monitoring spies making their activity much less visible by changing the way they connect to a torrent and setting a method to establish dynamic blocklists and maintain them.

##Abstract

Previous research has focused mainly on discovering monitors using trackers, this study focuses on tracking and blocking the monitors using the bittorrent peers and content discovery system only (called the DHT).

The global result is that the spies are organized to monitor automatically whatever exists in the bittorrent network, they are easy to find but difficult to follow since they might change their IP addresses and are polluting the DHT.

@mplewis
mplewis / flask-uwsgi-nginx-primer.md
Last active August 3, 2025 16:54
Flask + uWSGI + nginx Primer. I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.

Flask + uWSGI + nginx Primer

I've been having trouble with serving a Flask app via uWSGI and nginx, so I thought I'd put together some of the basics to help out others.

How this shit works

  • Flask is managed by uWSGI.
  • uWSGI talks to nginx.
@pklaus
pklaus / ping.py
Created March 5, 2011 09:50
A pure python ping implementation using raw socket.
#!/usr/bin/env python2
"""
Other Repositories of python-ping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* https://github.com/l4m3rx/python-ping supports Python2 and Python3
* https://bitbucket.org/delroth/python-ping