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
#!/bin/bash | |
openssl rsa -in account.key -pubout 2>&1 | grep -v "writing" | |
echo "press enter..." >&2 | |
read enter | |
openssl req -new -sha256 -key domain.key -subj "/" \ | |
-reqexts SAN -config <(cat /etc/ssl/openssl.cnf \ | |
<(printf "[SAN]\nsubjectAltName=DNS:$1")) |
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 flask import * | |
from subprocess import check_output, CalledProcessError | |
app = Flask(__name__) | |
@app.route('/') | |
def index(): | |
if request.args.get("pw", None) and request.args["pw"] == "somepassword": | |
if "start" in request.args: | |
try: |
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 | |
# reqs: requests, beautifulsoup4 | |
from bs4 import BeautifulSoup as Soup | |
from requests import get | |
from argparse import ArgumentParser | |
import sys | |
CLIENT_ACCESS_TOKEN = "" # generate at https://genius.com/api-clients | |
def main(): |
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
// javascript:(prompt("Your shortened URL is", "http://www.ebay.com/itm/" + document.getElementsByClassName('sw_email')[0].getAttribute("data-itemid")))() | |
prompt("Your shortened URL is", | |
"http://www.ebay.com/itm/" + document.getElementsByClassName('sw_email')[0].getAttribute("data-itemid") | |
) |
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 | |
from requests import get | |
from os import environ | |
from sys import exit, stderr, stdout | |
STDOUT = stdout | |
# http://stackoverflow.com/a/1094933 | |
def sizeof_fmt(num, suffix='B'): | |
for unit in ['','Ki','Mi','Gi','Ti','Pi','Ei','Zi']: |
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 requests | |
from flask import * | |
import random | |
from apscheduler.schedulers.background import BackgroundScheduler | |
app = Flask(__name__) | |
scheduler = BackgroundScheduler() | |
url = "https://reddit.com/r/gonewild/comments.json?limit=200" |
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
<?php | |
if (isset($_GET['print'])) { | |
highlight_file(__FILE__); | |
die(); | |
} | |
function load_addon($filename) { | |
if (file_exists($filename)) { | |
include $filename; | |
} | |
} |
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 argparse | |
import sys | |
SYMBOLS = ('kilo', 'mega', 'giga', 'tera', 'peta', 'exa', 'zetta', 'iotta') | |
def get_bytes(data_queue): | |
"""Parses list of strings, ints or floats representing data amounts (e.g 1MB, 2mb, 3M) to a list of bytes. Parses all types listed in SYMBOLS. |