Skip to content

Instantly share code, notes, and snippets.

View ToxicMushroom's full-sized avatar
🐟
~blub

Merlijn ToxicMushroom

🐟
~blub
View GitHub Profile

Keybase proof

I hereby claim:

  • I am toxicmushroom on github.
  • I am toxicmushroom (https://keybase.io/toxicmushroom) on keybase.
  • I have a public key ASDUDkANzRPh9NEho5lhI-3vrqLkOrETv6DcOecJPxVHSAo

To claim this, I am signing this object:

@ToxicMushroom
ToxicMushroom / gist:945178edc02d6724570b02a784056632
Created May 17, 2021 19:42
com.fasterxml.jackson.databind.exc.MismatchedInputException stacktrace
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type `java.lang.String` from Object value (token `JsonToken.START_OBJECT`)
at [Source: (String)"{"title":"TicTacToe","type":null,"url":null,"description":"Respond with `x,y` to place a marker at that location\n``` ╭───┬───┬───╮\n │ 1 │ 2 │ 3 │\n╭───╆━━━╈━━━╈━━━┪\n│ 1 ┃ ┃ ┃ ┃\n├───╊━━━╋━━━╋━━━┫\n│ 2 ┃ ┃ ┃ ┃\n├───╊━━━╋━━━╋━━━┫\n│ 3 ┃ ┃ ┃ ┃\n╰───┺━━━┻━━━┻━━━┛```","timestamp":null,"color":null,"footer":{"text":"You are ○ | Please wait for your opponent.","icon_url":null,"proxy_icon_url":null},"image":null,"thumbnail":null,"video":null,"provider":null,"author":null,"fiel"[truncated 7 chars]; line: 1, column: 331] (through reference chain: me.melijn.melijnbot.internals.models.EmbedEditor["footer"])
at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)
at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java
@ToxicMushroom
ToxicMushroom / embededitor.json
Created May 17, 2021 19:46
EmbedEditor deserlialized, failing to serialize when using jackson in this case
{"title":"TicTacToe","type":null,"url":null,"description":"Respond with `x,y` to place a marker at that location\n``` ╭───┬───┬───╮\n │ 1 │ 2 │ 3 │\n╭───╆━━━╈━━━╈━━━┪\n│ 1 ┃ ┃ ┃ ┃\n├───╊━━━╋━━━╋━━━┫\n│ 2 ┃ ┃ ┃ ┃\n├───╊━━━╋━━━╋━━━┫\n│ 3 ┃ ┃ ┃ ┃\n╰───┺━━━┻━━━┻━━━┛```","timestamp":null,"color":null,"footer":{"text":"You are ○ | Please wait for your opponent.","icon_url":null,"proxy_icon_url":null},"image":null,"thumbnail":null,"video":null,"provider":null,"author":null,"fields":[]}
F:\Coding\Kotlin\melijn-bot>gradlew -Dkotlin.daemon.jvm.options="-agentlib:jdwp=transport=dt_socket,address=*:5005,server=y,suspend=n" clean assemble
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
The Kotlin Gradle plugin was loaded multiple times in different subprojects, which is not supported and may break the build.
This might happen in subprojects that apply the Kotlin plugins with the Gradle 'plugins { ... }' DSL if they specify explicit versions, even if the versions are equal.
Please add the Kotlin plugin to the common parent project or the root project, then remove the versions in the subprojects.
If the parent project does not need the plugin, add 'apply false' to the plugin line.
See: https://docs.gradle.org/current/userguide/plugins.html#sec:subprojects_plugins_dsl
The Kotlin plugin was loaded in the following projects: ':annotation-processors', ':bot'
```kt
fun getMelijnTracksInPlaylist(playlist: PlaylistData, requester: PartialUser): List<Track> {
val sortableTracks = mutableListOf<Triple<UUID, LocalDateTime, Track>>()
scopedTransaction {
PlaylistTrack.join(me.melijn.bot.database.model.Track, JoinType.INNER) {
me.melijn.bot.database.model.Track.trackType.eq(TrackType.FETCHED)
.and(PlaylistTrack.trackId.eq(me.melijn.bot.database.model.Track.trackId))
.and(PlaylistTrack.playlistId.eq(playlist.playlistId))
}.join(me.melijn.bot.database.model.FetchedTrack, JoinType.INNER) {
me.melijn.bot.database.model.Track.trackId.eq(me.melijn.bot.database.model.FetchedTrack.trackId)
val commonClientConfig: HttpClientConfig<OkHttpConfig>.() -> Unit = {
expectSuccess = false
install(ContentNegotiation) {
jackson {
disable(DeserializationFeature.FAIL_ON_IGNORED_PROPERTIES)
disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES)
}
}
install(UserAgent) {
agent = "Melijn / 3.0.0 Discord bot"
time="2022-06-16T14:50:43Z" level=debug msg="vulcand/oxy/roundrobin/rr: begin ServeHttp on request" Request="{\"Method\":\"GET\",\"URL\":{\"Scheme\":\"\",\"Opaque\":\"\",\"User\":null,\"Host\":\"\",\"Path\":\"/\",\"RawPath\":\"\",\"ForceQuery\":false,\"RawQuery\":\"\",\"Fragment\":\"\",\"RawFragment\":\"\"},\"Proto\":\"HTTP/2.0\",\"ProtoMajor\":2,\"ProtoMinor\":0,\"Header\":{\"Accept\":[\"*/*\"],\"User-Agent\":[\"curl/7.68.0\"],\"X-Forwarded-Host\":[\"xmpp.melijn.com\"],\"X-Forwarded-Port\":[\"443\"],\"X-Forwarded-Proto\":[\"https\"],\"X-Forwarded-Server\":[\"a134fb5d79c6\"],\"X-Real-Ip\":[\"45.136.28.63\"]},\"ContentLength\":0,\"TransferEncoding\":null,\"Host\":\"xmpp.melijn.com\",\"Form\":null,\"PostForm\":null,\"MultipartForm\":null,\"Trailer\":null,\"RemoteAddr\":\"45.136.28.63:52418\",\"RequestURI\":\"/\",\"TLS\":null}"
time="2022-06-16T14:50:43Z" level=debug msg="vulcand/oxy/roundrobin/rr: Forwarding this request to URL" ForwardURL="http://172.18.0.20:80" Request="{\"Method\":\"GET\",\"URL\":{\"Scheme\"
15:51:32] [merlijn]@[bever] [/opt/mastodon]
>> docker compose logs -f
mastodon-web-1 | [custom-init] No custom services found, skipping...
mastodon-web-1 | s6-rc: info: service s6rc-oneshot-runner: starting
mastodon-web-1 | s6-rc: info: service s6rc-oneshot-runner successfully started
mastodon-web-1 | s6-rc: info: service fix-attrs: starting
mastodon-web-1 | s6-rc: info: service 00-legacy: starting
mastodon-web-1 | s6-rc: info: service fix-attrs successfully started
mastodon-web-1 | s6-rc: info: service legacy-cont-init: starting
mastodon-redis-1 | 1:C 02 Jan 2023 15:51:32.355 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
>> cat docker-compose.yml
version: '3'
services:
db:
restart: always
image: postgres:14-alpine
shm_size: 256mb
healthcheck:
test: ['CMD', 'pg_isready', '-d', 'mastodon', '-U', 'mastodon_user']
networks:
02:16:32.513 [DEBUG] [wlr] [xwayland/selection/outgoing.c:375] XCB_SELECTION_REQUEST (time=11270442 owner=2097153, requestor=6291461 selection=267, target=273, property=317)
02:16:32.513 [DEBUG] [wlr] [xwayland/selection/outgoing.c:26] SendEvent destination=6291461 SelectionNotify(31) time=11270442 requestor=6291461 selection=267 target=273 property=317
02:16:32.513 [DEBUG] [wlr] [xwayland/xwm.c:816] unhandled X11 property 317 (_QT_SELECTION) for window 6291461
02:16:32.513 [DEBUG] [wlr] [xwayland/xwm.c:816] unhandled X11 property 317 (_QT_SELECTION) for window 6291461
02:16:32.513 [DEBUG] [wlr] [xwayland/xwm.c:816] unhandled X11 property 317 (_QT_SELECTION) for window 6291461
02:16:32.513 [DEBUG] [wlr] [xwayland/xwm.c:816] unhandled X11 property 317 (_QT_SELECTION) for window 6291461
02:16:32.519 [DEBUG] [wlr] [backend/drm/renderer.c:340] Buffer format 0x34325241 with modifier 0x20000001876BB03 cannot be scanned out
02:16:32.519 [DEBUG] [wlr] [backend/drm/drm.c:423] connector DP-2: Failed to import buffer fo