This file contains hidden or 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 | |
| # Recursively generate index.html files for | |
| # all subdirectories in a directory tree | |
| ########################################################################## | |
| ## ❗️❗️❗️ WARNING: This version is outdated and unmaintained! | |
| ## For an up-to-date version with cleaner CSS styling see: | |
| ## https://gist.github.com/glowinthedark/625eb4caeca12c5aa52778a3b4b0adb4 | |
| ########################################################################## |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| # | |
| # Copyright © 2012 Thomas TEMPÉ, <thomas.tempe@alysse.org> | |
| # Copyright © 2014 Alex Griffin, <alex@alexjgriffin.com> | |
| # | |
| # DWTFYW license. | |
| # Do what the fuck you want with this file. | |
| import string |
This file contains hidden or 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
| from selenium import webdriver | |
| profile = webdriver.FirefoxProfile() | |
| # Set proxy settings to manual | |
| profile.set_preference('network.proxy.type', 1) | |
| # Set proxy to Tor client on localhost | |
| profile.set_preference('network.proxy.socks', '127.0.0.1') | |
| profile.set_preference('network.proxy.socks_port', 9050) | |
| # Disable all images from loading, speeds page loading | |
| # http://kb.mozillazine.org/Permissions.default.image |
This file contains hidden or 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
| <div id="swipezone"> | |
| Swipe me | |
| </div> | |
| // credit: http://www.javascriptkit.com/javatutors/touchevents2.shtml | |
| function swipedetect(el, callback){ | |
| var touchsurface = el, | |
| swipedir, | |
| startX, |
This file contains hidden or 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 | |
| import sys, os, socket | |
| from socketserver import ThreadingMixIn | |
| from http.server import SimpleHTTPRequestHandler, HTTPServer | |
| HOST = socket.gethostname() | |
| class ThreadingSimpleServer(ThreadingMixIn, HTTPServer): | |
| pass |
This file contains hidden or 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
| cd /tmp | |
| fileName='go1.20.5.linux-armv6l.tar.gz' | |
| wget -c https://go.dev/dl/$fileName && sudo rm -rfv /usr/local/go && sudo tar -C /usr/local -xvf $fileName | |
| grep -q 'GOPATH=' ~/.bashrc || cat >> ~/.bashrc << 'EOF' | |
| export GOPATH=$HOME/go | |
| export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin | |
| EOF | |
| source ~/.bashrc |
This file contains hidden or 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
| cd $HOME | |
| file='go1.14.2.linux-armv6l.tar.gz' | |
| wget "https://dl.google.com/go/$file" | |
| sudo tar -C /usr/local -xvf "$file" | |
| cat >> ~/.bashrc << 'EOF' | |
| export GOPATH=$HOME/go | |
| export PATH=/usr/local/go/bin:$PATH:$GOPATH/bin | |
| EOF | |
| source ~/.bashrc |
This file contains hidden or 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
| from selenium import webdriver | |
| from selenium.webdriver.chrome.options import Options | |
| import os | |
| # function to take care of downloading file | |
| def enable_download_headless(browser,download_dir): | |
| browser.command_executor._commands["send_command"] = ("POST", '/session/$sessionId/chromium/send_command') | |
| params = {'cmd':'Page.setDownloadBehavior', 'params': {'behavior': 'allow', 'downloadPath': download_dir}} | |
| browser.execute("send_command", params) |
This file contains hidden or 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 | |
| import json | |
| import os | |
| import signal | |
| import sqlite3 | |
| import sys | |
| import threading | |
| import time | |
| from urllib.parse import urlparse |
This file contains hidden or 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 | |
| import json | |
| import os | |
| import signal | |
| import sqlite3 | |
| import sys | |
| import threading | |
| import time | |
| from urllib.parse import urlparse |