Source SSH from A through B to C, using private key on A
ssh -o ProxyCommand="ssh -i path_to_private_key -W %h:%p A" -i path_to_private_key B
Source SSH from A through B to C, using private key on A
ssh -o ProxyCommand="ssh -i path_to_private_key -W %h:%p A" -i path_to_private_key B
''' | |
Generated by ChatGPT using the prompt | |
fastapi crud using orm sqlalchemy | |
''' | |
from fastapi import FastAPI | |
from sqlalchemy import create_engine, Column, Integer, String | |
from sqlalchemy.orm import sessionmaker | |
app = FastAPI() | |
engine = create_engine("<database_url>") |
''' | |
Generated by ChatGPT using the prompt | |
fastapi crud mongo with logging to file | |
''' | |
from fastapi import FastAPI | |
from pymongo import MongoClient | |
import logging | |
app = FastAPI() |
#import config | |
openvpn3 config-import --config myvpnfile.ovpn | |
#show list of reusable configs | |
openvpn3 configs-list | |
#list active connection | |
openvpn3 sessions-list | |
#connect using config already imported |
[Unit] | |
Description=Remote desktop service (VNC) for :0 display | |
Requires=display-manager.service | |
After=network-online.target | |
After=display-manager.service | |
[Service] | |
Type=simple | |
ExecStartPre=/usr/bin/bash -c "/usr/bin/systemctl set-environment XAUTHORITY=$(find /var/run/sddm/ -type f)" | |
Environment=HOME=/root |
import requests | |
import socket | |
URL='http://dynv6.com/api/update' | |
HOSTNAME='your_dynv6_hostname' | |
TOKEN='your_dyn_v6_token' | |
''' | |
You can use Task scheduler to run this on windows and cron on linux | |
''' |
#!/usr/bin/env bash | |
PHP_VERSION=7.4 | |
IONCUBE_VERSION=12.0.2 | |
TESTRAIL_DB_NAME=testrail | |
TESTRAIL_DB_USER=testrail | |
TESTRAIL_DB_PASSWORD=testrail | |
DEBIAN_FRONTEND=noninteractive | |
echo "Updating Software" |
''' | |
src: https://stackoverflow.com/a/46098711/2433866 | |
''' | |
import sys | |
import logging | |
import logging.handlers | |
logging.basicConfig( | |
level=logging.INFO, | |
format="[%(asctime)s] %(levelname)s in %(module)s: %(message)s", |
from aiohttp import ClientSession, TCPConnector | |
import asyncio | |
import sys | |
import pypeln as pl | |
import csv | |
limit = 1000 | |
def csv2list(file): | |
results = [] | |
with open(file, newline='') as inputfile: |
sudo su | |
cd && | |
apt-get update -y && | |
apt-get install gcc -y && | |
apt-get install unzip -y && | |
apt-get install lua5.2 -y && | |
apt-get install liblua5.2 -y && | |
apt-get install luarocks -y && | |
luarocks install basexx && |