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
# Prompts by https://gist.github.com/iamtalhaasghar | |
# Written by Chatgpt | |
# 25-Feb-2024 | |
curl -X POST \ | |
-H "Authorization: Bearer <your_access_token>" \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"user_id": "@<target_user>:<server_domain>", | |
"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
#!/usr/bin/env python | |
import os | |
from glob import glob | |
import time | |
import logging | |
import sys | |
import shutil | |
import requests | |
from sha256sum import sha256sum |
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 os | |
import time | |
import shutil | |
path = '/path/to/file' | |
dst = '/path/to/dst' | |
while True: | |
time.sleep(10/1000) # 10 milli seconds | |
if os.path.exists(path): | |
shutil.copy(path, dst) |
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
# the following two lines give a two-line status, with the current window highlighted | |
hardstatus alwayslastline | |
hardstatus string '%{= kG}[%{G}%H%? %1`%?%{g}][%= %{= kw}%-w%{+b yk} %n*%t%?(%u)%? %{-}%+w %=%{g}][%{B}%m/%d %{W}%C%A%{g}]' | |
# huge scrollback buffer | |
defscrollback 5000 | |
# no welcome message | |
startup_message off |
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 | |
# a script to check docker containers status and if anyone is stopped then start it | |
# Author: Talha Asghar <[email protected]> | |
# Co-author: chatgpt.com | |
# 13th-October-2024 | |
log_file='/var/log/dockerwatch.log' | |
log() { | |
local message="$1" | |
local timestamp=$(date "+%Y-%m-%d %H:%M:%S") |
OlderNewer