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
# Source: http://stackoverflow.com/questions/2572521/extract-the-sha1-hash-from-a-torrent-file | |
import sys, os, hashlib, StringIO, bencode | |
def pieces_generator(info): | |
"""Yield pieces from download file(s).""" | |
piece_length = info['piece length'] | |
if 'files' in info: # yield pieces from a multi-file torrent | |
piece = "" | |
for file_info in info['files']: |
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
#!/usr/bin/env python | |
# | |
# Extracts email addresses from one or more plain text files. | |
# | |
# Notes: | |
# - Does not save to file (pipe the output to a file if you want it saved). | |
# - Does not check for duplicates (which can easily be done in the terminal). | |
# | |
# (c) 2013 Dennis Ideler <[email protected]> |
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
# Preguntas para el trivial de IRCap que se usaron en el canal #hip-hop_trivial en el IRC-Hispano. | |
# Se conserva este archivo a modo de histórico, no tiene gran utilidad hoy en día. | |
# noviembre 2000. | |
¿De quien es el disco "indepleis tú vy"?*Payo malo | |
¿De que ciudad española es "El SEIS"?*lugo | |
¿Cual es el verdadero nombre de Frank-T?*Tshimini Nsombolay | |
¿Que baile esta dentro del movimiento del hip-hop?*breakdance | |
¿Quien pincha en el nuevo disco de "Mala Rodriguez"?*jotamayuscula | |
¿Quienes son los "cuñaos del Fonk"*la puta opp |
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
date +%FT%T%z |
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/bash | |
# Descomprimir todos los .zip y .rar del directorio actual y borra | |
# el archivo original tras la estracción. Se usa 7z ya que facilita la | |
# extracción a un directorio independiente. | |
# Es necesario tener soprote para .rar en 7z: | |
# apt install p7zip-rar | |
for filename in *.zip *.rar; do |
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
#!/usr/bin/env python3 | |
# Tras descargar todas las imágenes de un blog en blogstop, algunas miniaturas de | |
# dichas imágenes tenían como sufijo "_2". En otros casos era la propia imagen | |
# la que tenía "_2" y la miniatura no tenía ningún sufijo. Como quiero borrar | |
# las miniaturas, hay que comprarar los dos archivos y borrar el de menor tamaño. | |
import os | |
from pathlib import Path |