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 sys | |
import os | |
import base64 | |
from PIL import Image | |
import textract | |
import litellm | |
import csv | |
import io | |
from PyPDF2 import PdfReader |
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
# Tested on: | |
# - Ubuntu 20.04 LTS | |
# - Ubuntu 22.04.2 LTS | |
# | |
# Tested with https://github.com/Jigsaw-Code/outline-server/commit/9a3498112d5f7c59f7017e1666678e2921fad46f from May 16 2024 | |
# Install prerequirements | |
# 7zip to extract zip | |
apt install p7zip-full | |
# task to run app | |
sh -c "$(curl --location https://taskfile.dev/install.sh)" -- -d -b /usr/local/bin |
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/bash | |
PRINTER_IP={IP} | |
API=https://api.telegram.org/bot{TOKEN} | |
CHAT={CHAT} | |
STATE_FILE=/run/3d-printer-sate.mon | |
MESSAGE_ID_FILE=/run/3d-printer-msg-id.mon | |
# Status table | |
STATE_OFFLINE=f |
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
# Do not alter the commented lines | |
# They are used by wireguard-install | |
# ENDPOINT 123.32.1.123 | |
[Interface] | |
Address = 10.7.0.1/24 | |
PrivateKey = 6BHdTUCKVScVazHW7hlWHG02HP58qVbdS5UZ/UgZrHU= | |
#ListenPort = Commented line | |
ListenPort = 51820 | |
## One more comment for Address = PrivateKey = ListenPort = |
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
0 12 * * * find ~/tmp/1day -mtime +1 -exec rm -rf {} \; | |
0 13 * * * find ~/tmp/7days -mtime +7 -exec rm -rf {} \; |
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
# this is because Browser sent empty Accept-Language header | |
2020-09-21 22:05:10,214 ERROR SystemErrorController,http-nio-0.0.0.0-8080-exec-10:86 - Internal server error | |
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.StringIndexOutOfBoundsException: String index out of range: 2 | |
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:963) | |
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:842) | |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) | |
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:827) | |
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) | |
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) |
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
# Ignore everything | |
* |
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 | |
#set user or user list!!! | |
USERS="delfer user2 user3" | |
mkdir ~/.ssh || true | |
for USER in $USERS; do | |
URL=https://github.com/${USER}.keys | |
STORE=~/.ssh/authorized_keys |
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
#------------------------------------------------------------------------------ | |
# CUSTOMIZED OPTIONS | |
#------------------------------------------------------------------------------ | |
# Add settings for extensions here | |
wal_level = minimal | |
max_wal_senders = 0 | |
fsync = off | |
synchronous_commit = off | |
full_page_writes = off |
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
# Configure a default setup of Home Assistant (frontend, api, etc) | |
default_config: | |
# Uncomment this if you are using SSL/TLS, running in Docker container, etc. | |
# http: | |
# base_url: example.duckdns.org:8123 | |
# Text to speech | |
tts: |
NewerOlder