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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta content="text/html;charset=utf-8" http-equiv="Content-Type"> | |
<meta content="utf-8" http-equiv="encoding"> | |
<title></title> | |
<style> | |
</style> | |
</head> |
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
package main | |
import ( | |
"fmt" | |
"os" | |
"time" | |
"github.com/gdamore/tcell/v2" | |
"github.com/ltcsuite/lnd/ticker" | |
"github.com/mattn/go-runewidth" |
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
[style.description] | |
underline = false | |
bold = false | |
italic = false | |
[style.command_name] | |
foreground = { rgb = { r = 255, g = 255, b = 255 } } | |
underline = false | |
bold = false | |
italic = false |
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
#!/usr/bin/env python3 | |
# Similar to the unix tool comm. | |
# Does not require input to be in sorted order. | |
# Defaults to finding the intersection of two lists. | |
import argparse | |
def slurp(fname): | |
f = open(fname) |
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
#!/usr/bin/env python3 | |
# depends on: | |
# https://github.com/sharkdp/bat | |
# https://github.com/tldr-pages/tldr | |
from glob import glob | |
from os import listdir, environ | |
import subprocess | |
from sys import argv |
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
#!/usr/bin/env python3 | |
import argparse | |
from sys import argv, stderr | |
parser = argparse.ArgumentParser(description='zip together lists') | |
parser.add_argument("-s", "--separator", default=" ", help='character to separate items', required=False) | |
parser.add_argument("lists", nargs="+") | |
args = parser.parse_args() |
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
package portchecker | |
/* A Google cloud function that takes an address and a TCP port. | |
It scans the port and tells you whether its open or not. | |
If "addr" is not supplied, then it scan the requestor. | |
Example usage: | |
$ curl --header "Api-Key: $API_KEY" --data "port=443&addr=142.250.65.174" https://us-region-projectname.cloudfunctions.net/portchecker | |
*/ |
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
#!/usr/bin/env bash | |
USAGE=$(cat <<-END | |
Error: no argument supplied. | |
This program prints the template once for each line of stdin. It only substitutes one variable in the printf format string. | |
Usage: | |
$0 <printf_format> < data |
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
#!/usr/bin/env python | |
import sys | |
if len(sys.argv) == 1: | |
text = "{text}" | |
message = '''\ | |
Error: no argument supplied. | |
This program prints the template once for each line of stdin. {text} in the template is replaced with the line from stdin. |
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
#!/usr/bin/env python3 | |
# argv[1] is the path to a configuration file | |
# the config file is a CSV file of the form date,path,message. EG: | |
# 03-03-2022,/home/user/py/remind/f,remember to do a backup | |
# 10-22-2021,/home/user/.motd,get tickets for Dune | |
from datetime import datetime | |
import os | |
import re |
NewerOlder