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
[root@sdurnqde ~]# yum install -y curl vim unzip |
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
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
proxy_cache_path /var/cache/nginx/misskey levels=1:2 keys_zone=CACHE-MSKY:10m inactive=7d max_size=1g; | |
server { | |
listen 80; | |
listen [::]:80; |
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 | |
pushd /home/matrix/riot > /dev/null | |
LATEST=$(curl -sSL https://api.github.com/repos/vector-im/riot-web/releases | grep "browser_download_url" | grep -o -E "https://github.com/(.+)\.\w+" | grep -E "\.tar\.gz$" | head -n 1) | |
curl -sSL -o latest $LATEST.asc && diff current latest | |
if [[ $? -eq 0 ]]; then | |
rm latest | |
else | |
curl -sSL -o riot.tar.gz $LATEST |
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
# If you have any doubts about what a setting does, | |
# check https://docs.funkwhale.audio/configuration.html#configuration-reference | |
FUNKWHALE_API_IP=127.0.0.1 | |
FUNKWHALE_API_PORT=5001 | |
FUNKWHALE_WEB_WORKERS=2 | |
FUNKWHALE_HOSTNAME=sound.iro.moe | |
FUNKWHALE_PROTOCOL=https | |
EMAIL_CONFIG=smtp+tls://funkwhale%40iro.moe:***@smtp.mailgun.com:587 |
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
(http.user_agent contains "Mozilla/1.") or | |
(http.user_agent contains "Mozilla/2.") or | |
(http.user_agent contains "Mozilla/3.") or | |
(http.user_agent contains "Mozilla/4.") or | |
(http.user_agent contains "Safari/1") or | |
(http.user_agent contains "Safari/2") or | |
(http.user_agent contains "Safari/3") or | |
(http.user_agent contains "Safari/4") or | |
(http.user_agent contains "Safari/50") or | |
(http.user_agent contains "Safari/51") or |
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
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
# Misskey configuration | |
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
# ┌─────┐ | |
#───┘ URL └───────────────────────────────────────────────────── | |
# Final accessible URL seen by a user. | |
url: https://alice.local |
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
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
# Misskey configuration | |
#━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | |
# ┌─────┐ | |
#───┘ URL └───────────────────────────────────────────────────── | |
# Final accessible URL seen by a user. | |
url: https://127.0.0.1:8001 |
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
[Unit] | |
Description=Cleanup Meilisearch Tasks Database | |
After=meilisearch.service | |
[Service] | |
Type=oneshot | |
ExecStart=curl -v -H 'Authorization: Bearer MASTER_KEY' -X DELETE 'http://127.0.0.1:7700/tasks?statuses=failed,canceled,succeeded' | |
User=meilisearch | |
Group=meilisearch |
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
private static final DateTimeFormatter universalDateTimePattern = DateTimeFormatter.ofPattern("[y-M-d[[' ']['T'][H[:m[:s[.SSSSSS][.SSS][.S]]]][' '][VV][zzz][OOOO][XXXXX]]][H[:m[:s[.SSSSSS][.SSS][.S]]]]"); | |
public static ZonedDateTime parseDateTime(String dateTime) { | |
try { | |
TemporalAccessor temporal = universalDateTimePattern.parseBest(dateTime, ZonedDateTime::from, OffsetDateTime::from, LocalDateTime::from, LocalDate::from, LocalTime::from); | |
if (temporal instanceof ZonedDateTime) return (ZonedDateTime) temporal; | |
else if (temporal instanceof OffsetDateTime) return ((OffsetDateTime) temporal).atZoneSameInstant(ZoneId.systemDefault()); | |
else if (temporal instanceof LocalDateTime) return ((LocalDateTime) temporal).atZone(ZoneId.systemDefault()); | |
else if (temporal instanceof LocalDate) return ((LocalDate) temporal).atStartOfDay(ZoneId.systemDefault()); | |
else if (temporal instanceof LocalTime) return ((LocalTime) temporal).atDate(LocalDate.now()).atZone(ZoneId.systemDefault()); |
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 | |
apt-get update | |
dpkg --get-selections | grep deinstall | awk '{print $1}' | xargs apt-get --yes purge | |
apt-get --yes --ignore-hold --with-new-pkgs --allow-change-held-packages upgrade | |
apt-get --yes --ignore-hold --allow-change-held-packages dist-upgrade | |
apt-get --yes --purge autoremove | |
dpkg --get-selections | grep deinstall | awk '{print $1}' | xargs apt-get --yes purge | |
# vmware-modconfig --console --install-all |