Skip to content

Instantly share code, notes, and snippets.

View bwolf's full-sized avatar
💭
Gunky

Marcus Geiger bwolf

💭
Gunky
View GitHub Profile
@bwolf
bwolf / testsnprintf.c
Created February 17, 2012 07:45
snprintf error handling
int anint = 42;
char buf[42];
n = snprintf(lenbuf, sizeof(lenbuf), "%d:", anint);
if (!(n > -1 && n < sizeof(lenbuf))) {
perror("snprintf");
return -1;
}
@bwolf
bwolf / remove-gotomeeting.sh
Last active April 16, 2024 17:29
Remove GoToMeeting on macOS
#!/bin/sh
#
# GOTOMEETING IS SO ANOYING!
#
# It installs without question, a bunch of unwanted files, especially
# LaunchAgents and binaries. This scripts helps got get rid of them
# quickly. Note that this needs to be adjusted from time to time.
#
# BEWARE: Anything citrix related is deleted also.
#
@bwolf
bwolf / ResultExt.kt
Last active July 31, 2019 18:17
Kotlin Result flatMap
inline fun <R, T> Result<T>.flatMap(transform: (value: T) -> Result<R>): Result<R> {
return when {
isSuccess -> {
assert(this.getOrNull() != null)
transform(this.getOrNull()!!)
}
else -> {
assert(this.exceptionOrNull() != null)
Result.failure(this.exceptionOrNull()!!)
}
-- Reboot --
Nov 18 07:12:26 ito systemd[1]: Starting Jitsi Videobridge...
Nov 18 07:12:26 ito systemd[1]: Started Jitsi Videobridge.
Nov 18 07:12:27 ito jitsi-videobridge2-start[1071]: INFO: [1] NewConfig$1.invoke#88: Loaded NewConfig with origin: merge of system properties,/nix/store/0ab0n1aimgjz82yahi5l1pw4a2gapgq7-jvb.conf: 1,system properties,reference.conf @ jar:file:/nix/store/j7px6f92d7rgaj
mcljcqifmv664rm50x-jitsi-videobridge2-2.1-273-g072dd44b/share/jitsi-videobridge/jitsi-videobridge.jar!/reference.conf: 1,reference.conf @ jar:file:/nix/store/j7px6f92d7rgajmcljcqifmv664rm50x-jitsi-videobridge2-2.1-273-g072dd44b/share/jitsi-videobridge/lib/jitsi-media
-transform-1.0-164-g031788f.jar!/reference.conf: 1
Nov 18 07:12:27 ito jitsi-videobridge2-start[1071]: INFO: [1] LegacyConfigFileLoader$Companion.load#40: Attempting to load legacy config file at path /etc/jitsi, videobridge, sip-communicator.properties
Nov 18 07:12:27 ito jitsi-videobridge2-start[1071]: INFO: [1] LegacyConfigFileLoader$Companion.load#