Skip to content

Instantly share code, notes, and snippets.

View telegram-instance-x.desktop
[Desktop Entry]
Version=1.0
Name=Telegram Instance X
Comment=Official desktop version of Telegram messaging service
TryExec=/opt/Telegram/Telegram
Exec=/opt/Telegram/Telegram -workdir /home/kali/.local/share/TelegramDesktop/instance_X -- %u
Icon=telegram
Terminal=false
StartupWMClass=TelegramDesktop
Type=Application
@Nachtalb
Nachtalb / pihole_to_hosts.py
Last active Jan 24, 2022
Pihole addlists (and custom blacklist) to hosts file (also removes duplicates)
View pihole_to_hosts.py
#!/usr/bin/env python
#
# Convert pihole domain blacklists to hosts file format.
#
# Usage:
# Create folder ./export
# Create pihole export and extract it to ./export
# Backup can be created in "Settings" > "Teleporter" > "Backup"
# Install requirements with "pip install aiohttp[speedups] tqdm"
# Run script "python pihole_to_hosts.py"
@Nachtalb
Nachtalb / channel_vids_to_csv.py
Last active Nov 1, 2021
Get all videos of a youtube channel and print url, title and publish date as CSV
View channel_vids_to_csv.py
# Ya need to install "yarl" and "requests" cuz I was too lazy to use the standard libs
from yarl import URL
from requests import Session
key = "YOUTUBE_API_KEY"
channel_id = "CHANNEL_ID"
url = f"https://www.googleapis.com/youtube/v3/search"
query = {
@Nachtalb
Nachtalb / danbooru.py
Last active Oct 25, 2021
IRC ZNC module for posting danbooru pics on demand by any user with configurable commands for each IRC channel
View danbooru.py
from contextlib import contextmanager
from datetime import datetime
from random import choice
from requests import Session
from yarl import URL
import inspect
import json
import os
import pprint
import sys
@Nachtalb
Nachtalb / quick_ffmpeg_explorer.py
Last active Nov 1, 2021
Create windows explorer ffmpeg context menu entries
View quick_ffmpeg_explorer.py
# 1. Change paths in the "template" variable, be sure to have to correct number of backslashes
# 2. python quick_ffmpeg_explorer.py > quick_ffmpeg_explorer.reg
# 3. Double click the "quick_ffmpeg_explorer.reg" file
import re
structure = {
'00_FFMPEG': {
'keys': { 'SubCommands': '', 'MUIVerb': 'FFMPEG' },
'folders': {
@Nachtalb
Nachtalb / AB-one-million-count.js
Last active May 17, 2021
One Million Count thread Assistant script for AB. It auto adds correct number with meta, fixes wrong numbers when getting sniped, shows number context list with meta and more.
View AB-one-million-count.js
// ==UserScript==
// @name One Million Count - animebytes.tv
// @namespace Violentmonkey Scripts
// @include https://animebytes.tv/forums.php*threadid=556*
// @version 2.6.2
// @author Nachtalb
// @description One Million Count thread Assistant script for AB. It auto adds correct number with meta, fixes wrong numbers when getting sniped, shows number context list with meta and more.
// @updateURL https://gist.githubusercontent.com/Nachtalb/8ae5ff116bb294d018b5b1d28deae8fc/raw/AB-one-million-count.js
// @downloadURL https://gist.githubusercontent.com/Nachtalb/8ae5ff116bb294d018b5b1d28deae8fc/raw/AB-one-million-count.js
// @supportURL https://gist.github.com/Nachtalb/8ae5ff116bb294d018b5b1d28deae8fc
View setup_mosh_centos_6.sh
#!/bin/sh
# Update latest epel
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm -Uvh epel-release-6-8.noarch.rpm
# Install forenscis tools repository for protobuf-compiler and protobuf-devel
wget https://forensics.cert.org/cert-forensics-tools-release-el6.rpm
rpm -Uvh cert-forensics-tools-release-el6.rpm
# Install openfusion repository for perl-IO-Socket-IP
wget http://repo.openfusion.net/centos6-i386/openfusion-release-0.7-1.of.el6.noarch.rpm
@Nachtalb
Nachtalb / check_torrent_size.py
Created Jul 26, 2019
Check total size of all torrents recursively in a dir
View check_torrent_size.py
from pathlib import Path
# Install https://pypi.org/project/bencode.py/
# $ pip install bencode.py
import bencode
total_bytes = 0
files = list(Path().rglob('*.torrent'))
total_files = len(files)
print('Getting file sizes')
@Nachtalb
Nachtalb / install.sh
Last active Jun 30, 2019
Centos 6 - Init.d - Install Sonarr / Radarr / Lidarr + mono + sqlite
View install.sh
#!/bin/sh
# # # # # # # # # # # # # # #
# Install yum prerequisites #
# # # # # # # # # # # # # # #
echo "--------------------------------------------------------------------------------------------"
echo "Starting the installation of Sonarr + Mono + SQLitee."
echo "--------------------------------------------------------------------------------------------"
sleep 5
# Install EPEL & OpenSuse repository
@Nachtalb
Nachtalb / telegram-desktop-multiple-accounts.rst
Last active Sep 30, 2022
Add multiple accounts in Telegram Desktop [Linux | MacOSX | Windows]
View telegram-desktop-multiple-accounts.rst