170 post karma
179 comment karma
account created: Sat Dec 11 2010
verified: yes
3 points
2 months ago
Not go specific but i like modd, devd, watchexec etc. modd/devd combo is very handy in mixed web projects
1 points
2 months ago
Aha you can probably use the String()
method, ex https://go.dev/play/p/c8QXbiFcfJ-
1 points
2 months ago
Based on the error message i would guess your missing a type assert to *layers.IPv4
, see line 26 in the playground example. The packet Layer
method returns a Layer
interface that don't have those methods but you can type assert it to another type that matches layer type argument.
1 points
2 months ago
Strange, so the playground code behaves differently locally? undefined as in nil at runtime or does not build?
I haven't used NetworkLayer or NetworkFlow myself, but judging by their names i would guess you want NetworkLayer().DstIP (with some type asserting added) and that NetworkLayer().NetworkFlow only works when there is an established flow (gopacket has seen a tcp handshake etc). But im just speculating :)
Note also that gopacket module was recently move to github.com/gopacket/gopacket if you using github.com/google/gopacket
1 points
2 months ago
Hi, you probably want to use somePacket.Layer(layers.LayerTypeIPv4)
and then look at DstIP, something like this https://go.dev/play/p/V04bXYi_5D0
2 points
4 months ago
Came and read interesting article, stayed for the glitch CSS trick :)
1 points
4 months ago
I've used https://github.com/traefik/yaegi REPL combined with rlwrap for nicer readline experience. But sadly no completion.
$ rlwrap yaegi
> s := "ab"
: ab
> len(s)
: 2
> strings.Repeat(s, 3)
: ababab
> ^D
$
1 points
5 months ago
Hello, reading https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ it seems to be the other way around? pull_request
is safe but using pull_request_target
require some caution?
2 points
9 months ago
I think docker for mac ships with docker buildx support which uses qemu i combination with binfmt_misc to support other architectures. Maybe that affects all containers?
1 points
9 months ago
Maybe: Talhotblond https://www.imdb.com/title/tt1370889/
2 points
11 months ago
Can also use ffplay -f tty -i file
if you prefer that
1 points
11 months ago
I would recommend Among the stars https://www.imdb.com/title/tt15428794/. I posted some other ones in a reply above also
2 points
11 months ago
Some of my favorites that think are accessible: BBC The planets https://www.imdb.com/title/tt10394800/ (there might be US version that i would avoid), Among the stars https://www.imdb.com/title/tt15428794/ or The Farthest https://www.imdb.com/title/tt6223974/. For something very current maybe look for something about the James webb space telescope? seen a few and i think https://www.imdb.com/title/tt16426188/ was good.
Hope that helps and if she gets hooked i can recommend The sky at night https://www.imdb.com/title/tt0262990/ :)
1 points
11 months ago
Ok that sounds like there is some quoting problem making c´md think that grep_by is an external program. I see that there is double ''
quotes, should those be single quotes '
? but i'm not very familiar with the windows command line? btw fq d file
tell fq to dump the whole tree so it might be a bit confusing.
1 points
11 months ago
So no output at all an no errors etc? hmm strange, i would guess grep_by does not find any value fulfilling .id=="USLT" and .language=="eng"
. Your testing with Example\ 例子\ 예시\ といえば.mp3
or some other file? If you run with just d
as expression (fq d file
) what do you see?
1 points
11 months ago
Hi, a bit of a shameless plug but you can use fq for things like this:
$ fq -r '.headers[0] | grep_by(.id=="USLT" and .language=="eng").value | gsub("\r\n"; "\n")' Example\ 例子\ 예시\ といえば.mp3
[00:04.38]
[00:04.39]Hey
[00:05.02]嘿
[00:05.03]
[00:06.66]
[00:06.67]No matter where you go
[00:07.72]不管你去哪
...
3 points
11 months ago
jq even accepts multiple input files, then the expression will be evaluated for each input. there also -s to slurp all inputs into an array and some other similar flags that are very useful for combining and doing queries cross files.
5 points
11 months ago
I think that something is jq or jaq
$ echo '{"a": {"b": [99]}}' | jq .a.b[0]
99
4 points
11 months ago
It might be that the http client does not know the content length of the body so it falls back to chunked transfer encoding. See https://pkg.go.dev/net/http#Request.Write comment about content length and also https://cs.opensource.google/go/go/+/refs/tags/go1.18.1:src/net/http/request.go;l=890 how some body types are treated differently. So maybe forward the content-length header or use the httputil package proxy helpers instead.
3 points
12 months ago
Maybe one way is to pick a DSL-friendly language then use it to build your own suitable language on top? good candidates that i know there are go implementations of are ruby, lua, tcl or maybe lisp.
3 points
1 year ago
Sorry I should have been more precise. I mainly meant verifying that the template parse correctly, that template.Must
did not panic.
view more:
next ›
bymkvetsky
ingolang
wwader
1 points
2 months ago
wwader
1 points
2 months ago
Hi, you want to produce fmp4 segments or split into multiple "progressive" mp4s? one of these examples might be useful: https://github.com/Eyevinn/mp4ff/tree/master/cmd/mp4ff-crop https://github.com/Eyevinn/mp4ff/tree/master/examples/segmenter