Skip to content

Instantly share code, notes, and snippets.

@elig0n
elig0n / clower.py
Created June 29, 2019 08:09
Print a file/stdin to terminal character-by-character at a given speed
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
import sys
if len(sys.argv) < 3:
sys.stderr.write("Need two arguments: file/- delay\n")
sys.exit(-1)
@elig0n
elig0n / magname.py
Created June 29, 2019 07:55
Fetch torrents names from magnet URLs
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Description- Fetch torrents names from magnet URLs
# Usage- Supply a filename argument containing magnet URLS or use '-' for stdin
import sys
import time
import libtorrent as lt
IFACE = "0.0.0.0"
@elig0n
elig0n / percent decode file
Last active February 20, 2019 00:36
Python script to percent decode a file
import sys
if (len(sys.argv) < 2):
print("Please specify filename")
sys.exit(1)
if (sys.version_info[0] == 3):
from urllib import parse as urllib
else:
import urllib
function! Browser ()
let line = getline (".")
let line = matchstr (line, "http\\=:.[^ ,;\t]*")
exec "!\"C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe\"\ " . line
endfunction
map <Leader>B :call Browser ()<CR>
@elig0n
elig0n / AndroidXMLDecompress.java
Created January 16, 2019 05:22
AndroidXMLDecompress
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
class AndroidXMLDecompress {
// decompressXML -- Parse the 'compressed' binary form of Android XML docs
// such as for AndroidManifest.xml in .apk files
@elig0n
elig0n / vlc.mrc
Last active September 5, 2022 01:06
mIRC VLC now playing
alias np {
sockclose vlc
sockopen vlc localhost 8080
}
on *:sockopen:vlc:{
if $sockerr > 0 { echo -at vlc not running | sockclose vlc }
sockwrite -n $sockname GET /requests/status.xml HTTP/1.1
sockwrite -n $sockname Host: localhost
sockwrite -n $sockname Authorization: Basic $encode(:XXX,m) ; password comes after colon
@elig0n
elig0n / ynet_disable_auto_refresh.user.js
Created December 16, 2018 14:19
Ynet Disable Auto Refresh
// Ynet Disable Auto Refresh by eligon
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the