Skip to content

Instantly share code, notes, and snippets.

Avatar

Joel G Mathew droidzone

View GitHub Profile
@droidzone
droidzone / scrape_asterix.py
Created Jun 16, 2021
Web scraper to extract links from subpages and download files
View scrape_asterix.py
#!/usr/bin/python3
from selenium import webdriver
import os
from multithread import Downloader
my_url = 'https://readasterix.blogspot.com/2017/01/download-asterix-adventures-in-pdf-en.html'
chromedriver = "/usr/bin/chromedriver"
os.environ["webdriver.chrome.driver"] = chromedriver
driver = webdriver.Chrome(chromedriver)
# Get the initial page containing links to page containing the actual links to files.
View secure_server
#!/bin/bash
# Generate a random password
# = number of characters; defaults to 32
# = include special characters; 1 = yes, 0 = no; defaults to 1
function randpass() {
[ "" == "0" ] && CHAR="[:alnum:]" || CHAR="[:graph:]"
cat /dev/urandom | tr -cd "$CHAR" | head -c ${1:-32}
echo
}
View emq.js
$("span.correctAnswerBar").parent().addClass( "alert alert-success" );
$("span.incorrectAnswerBar").parent().addClass( "alert alert-warning" );
$("#ctl00_ctl00_Content_MasterContent_qaControl2532_explanationPanel").remove();
$("div[id$='_pnlCorrectAnswer']").prepend('<div><span class="alert alert-success col-xs-12 col-sm-12 col-md-12" style="display:block;">The correct answer is:</span></div>');
if ($("span[id$='_litYourAnswer']").hasClass("correctAnswerBar")) {
$("span[id$='_litYourAnswer']").addClass( "alert alert-success col-xs-12 col-sm-12 col-md-12" );
}
if ($("span[id$='_litYourAnswer']").hasClass("incorrectAnswerBar")) {
$("span[id$='_litYourAnswer']").addClass( "alert alert-warning col-xs-12 col-sm-12 col-md-12" );
}
View keybase.md

Keybase proof

I hereby claim:

  • I am droidzone on github.
  • I am droidzone (https://keybase.io/droidzone) on keybase.
  • I have a public key whose fingerprint is 1DFC D951 D5FF F4A8 8349 EA6E 169B B1E1 0B1D 134D

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am droidzone on github.
  • I am droidzone (https://keybase.io/droidzone) on keybase.
  • I have a public key whose fingerprint is 3553 F34C 10B7 CB22 CD7C D3AD 2C01 EC97 5B44 0D5B

To claim this, I am signing this object: