Skip to content

Instantly share code, notes, and snippets.

View arBmind's full-sized avatar
🎯
Focusing

Andreas Reischuck arBmind

🎯
Focusing
View GitHub Profile
@arBmind
arBmind / gist:65dc9043f0bd819a6a6c
Last active March 30, 2021 23:29
Elixir implementation of split line feed aware
defp split_lf_aware(str, 0, "", line), do: { line, to_string(str) }
defp split_lf_aware(str, 0, acc, line), do: { acc, line <> to_string(str) }
defp split_lf_aware("", _, acc, line), do: { acc + line, "" }
defp split_lf_aware("\n" <> str, pos, acc, line) do
split_lf_aware(str, pos-1, acc <> line <> "\n", "")
end
defp split_lf_aware(<<chr :: utf8>> <> str, pos, acc, line) do
split_lf_aware(str, pos-1, acc, line <> <<chr :: utf8>>)
@arBmind
arBmind / command
Created August 1, 2016 17:20
LKV373a V3 streaming issue
ffplay.exe -hide_banner -i "udp://192.168.1.123:5004" -analyzeduration 6M -probesize 32M -fflags nobuffer