Kubernetes CPU limits are percentages of 100ms(most likely) CPU time of 1 core.
"0.2m" CPU limit means the container can use 1 core for 20ms tops every 100ms. If it tries to use more CPU time, it'll be throttled: the container will have to wait for the next 100ms period.
Google about CFS and the CPU throttling bug in Kubernetes to learn more about these topics.
Around a year ago, my at-the-time manager asked me to write a utility executable that other developers could run on their Windows machine. I was on my notice period and I didn’t have much time.
Bash would have been my language of choice, but no one in the team had…
It makes no sense. bash is easy to write and you’re already using it everyday (interactively) for your manual testing.
For unit tests the language your unit is written in is perfect: you import the function, you call it, check the result. Calling an unexported Go function from bash is definitely not straightforward.
But for integration tests/end-to-end tests… Well, at that level you’re most likely working with docker containers and HTTP.
Leverage this and forget about your very type-safe but verbose language or about complex bindings to call stupid CLI programs and just write a couple of commands to pipe together.
Too hard to maintain? Put them in the trash: they’re very easy to write.
EDIT: Unless you’re writing a library. In that case integration tests don’t make much sense at all
Before jumping in improving the performance of your build system or of a slow piece of code, take the time to setup some metrics that you expect to change after your efforts.
Any metric. On any support. Even on some paper equipped with a piece of paper.
Working on those kind of tasks is exhausting: you feel the pressure you’re not adding value to the product, as long as you’re not implementing new features.
But if you can show others you actually improved the system I guess you’ll feel better.
I knew keeping migrations is something you wanna do when managing databases. But I’ve always had an hard time justifying their importance with other fellow engineers.
Even I wasn’t 100% sure on why they’re valuable.
Answer: You need migrations as soon as you have more than one database instance.
ProblemGooglers are very interested in cubes, but they are bored with normal three-dimensional cubes and also want to think about other kinds of cubes! A “D-dimensional cube” has D dimensions, all of equal length. (D may be any positive integer; for example, a 1-dimensional cube is a line segment…
I stumbled across this programming challenge. I thought it was easy but spent some hours on it instead! You can find the problem description and the output checker at https://code.google.com/codejam/contest/4284486/dashboard
ProblemA “0/1 string” is a string in which every character is either 0 or 1. …
Read the flag from
writesyscall are allowed to use.
nc chall.pwnable.tw 10001
Binary seems a bit more complex than the previous one,
Our attention is easily caught by
mov eax, obj.shellcode; call eax. Basically it lets us inject some code that gets executed…