- Create a new non-root user, follow the prompts:
# adduser <new-username>
- Give sudo permissions to the new user:
# usermod -aG sudo <new-username>
- Ensure that sudo is installed (
which sudo
; if none, install it:apt install sudo
) - Check groups for new user:
# groups <new-username>
- Edit sshd_config settings:
# vim /etc/ssh/sshd_config
- Under "Authentication", change
PermitRootLogin
from yes to no:"PermitRootLogin no"
- (Optional) Change "MaxAuthTries" to a lower value to limit login attempts for any user:
"MaxAuthTries 4"
- Save the changes:
:wq
(save and exit vim)
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 pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter | |
from pdfminer.converter import TextConverter | |
from pdfminer.layout import LAParams | |
from pdfminer.pdfpage import PDFPage | |
from io import StringIO | |
import os | |
def convert_pdf_to_txt(path, pages=None): | |
if not pages: | |
pagenums = set() |
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
import requests | |
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter | |
from pdfminer.converter import TextConverter | |
from pdfminer.layout import LAParams | |
from pdfminer.pdfpage import PDFPage | |
from io import StringIO, BytesIO | |
def convert_pdf_to_txt(url, pages=None): | |
if not pages: | |
pagenums = set() |
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
# convert_xyz_pub.py | |
# requirements: python3; base58 (`pip install base58`) | |
import base58 | |
def convert_xyz_pub(in_key, out_key_type): | |
""" | |
Based on: https://gist.github.com/freenancial/d82fec076c13158fd34d1c4300b2b300 | |
""" | |
xpub = b'\x04\x88\xb2\x1e' # mainnet P2PKH or P2SH |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.1"> | |
<head> | |
<title> | |
Feeder | |
</title> | |
</head> | |
<body> | |
<outline title="Stacker+News" text="Stacker+News" type="rss" xmlUrl="https://stacker.news/rss"/> | |
<outline title="ππππππ" text="ππππππ" type="rss" xmlUrl="https://bc1984.com/rss/"/> |
I hereby claim:
- I am 84adam on github.
- I am bc1984adam (https://keybase.io/bc1984adam) on keybase.
- I have a public key ASDrUT8jKjB08T4GWNscufRGcL8f3n_OwmDxfHfcK8LLRgo
To claim this, I am signing this object:
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
import requests | |
import io | |
import pandas as pd | |
# SEE: https://fred.stlouisfed.org/series/T5YIFR/#0 | |
url = """https://fred.stlouisfed.org/graph/fredgraph.csv?bgcolor=%23e1e9f0&chart_type=line&drp=0&fo=open%20sans&graph_bgcolor=%23ffffff&height=450&mode=fred&recession_bars=on&txtcolor=%23444444&ts=12&tts=12&width=1168&nt=0&thu=0&trc=0&show_legend=yes&show_axis_titles=yes&show_tooltip=yes&id=T5YIFR&scale=left&cosd=2003-01-02&line_color=%234572a7&link_values=false&line_style=solid&mark_type=none&mw=3&lw=2&ost=-99999&oet=99999&mma=0&fml=a&fq=Daily&fam=avg&fgst=lin&fgsnd=2020-02-01&line_index=1&transformation=lin&nd=2003-01-02 | |
""" | |
s = requests.get(url).content |
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
import pandas as pd | |
# MAKE UP SOME DATA | |
data = {'id': [1, 2, 3, 4, 5], | |
'First Name': ['Mary', 'Harry', 'Larry', 'Fairy', 'Dairy',], | |
'Birth Year': [1930,1940,1950,1960,1970], | |
'Favorite Color': ['Blue', 'Red', 'Green', 'Pink', 'Orange']} | |
# CREATE A DATAFRAME | |
df = pd.DataFrame.from_dict(data) |
[Application Options]
feeurl=https://nodes.lightning.computer/fees/v1/btc-fee-estimates.json
[Bitcoin]
bitcoin.active=1
bitcoin.mainnet=1
bitcoin.node=neutrino
[neutrino]