๐
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
CREATE OR REPLACE FUNCTION base36_decode(IN base36 varchar) | |
RETURNS bigint AS $$ | |
DECLARE | |
a char[]; | |
ret bigint; | |
i int; | |
val int; | |
chars varchar; | |
BEGIN | |
chars := '0123456789abcdefghijklmnopqrstuvwxyz'; |
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 | |
# https://unix.stackexchange.com/a/522127 | |
cat /proc/net/fib_trie | awk '/32 host/ { print f } {f=$2}' | sort | uniq | grep -v 127.0.0.1 |
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
#Requires -RunAsAdministrator | |
Write-Output "Update DoH settings ..." | |
$baseRegistryPath = "HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\InterfaceSpecificParameters" | |
if (Test-Path $baseRegistryPath) { | |
Remove-Item -Path $baseRegistryPath -Recurse -Force 2>&1 | Out-Null | |
} | |
$adapters = Get-NetAdapter -IncludeHidden | Where-Object {$_.Status -ne 'Not Present'} |
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 |
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
[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
#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
# 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
#โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ | |
# 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
(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
# 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 |
NewerOlder