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
import os | |
import re | |
import subprocess | |
from bs4 import BeautifulSoup | |
import rules | |
def replacer(url, html): | |
new = html | |
reload(rules) |
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/sh | |
echo "# 24-bit (true-color)" | |
# based on: https://gist.github.com/XVilka/8346728 | |
term_cols="$(tput cols || echo 80)" | |
cols=$(echo "2^((l($term_cols)/l(2))-1)" | bc -l 2> /dev/null) | |
rows=$(( cols / 2 )) | |
awk -v cols="$cols" -v rows="$rows" 'BEGIN{ | |
s=" "; | |
m=cols+rows; |