This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Run Heartbleed for virtual servers | |
for ip in $(sl vm list --format="json" | jq -r .[].primary_ip) | |
do | |
Heartbleed $ip:443 & | |
done | |
# Run Heartbleed for hardware servers | |
for ip in $(sl server list --format="json" | jq -r .[].primary_ip) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on https://gobyexample.com/rate-limiting | |
package limiters | |
import ( | |
"time" | |
) | |
func NewRateLimiter(rate time.Duration, burst uint) chan time.Time { | |
burstyLimiter := make(chan time.Time, burst) | |
for i := uint(0); i < burst; i++ { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> python -m timeit '["%s" % n for n in range(10000)]' -n 100 | |
100 loops, best of 3: 1.91 msec per loop | |
> python -m timeit '["{}".format(n) for n in range(10000)]' -n 100 | |
100 loops, best of 3: 3.08 msec per loop |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am sudorandom on github. | |
* I am sudorandom (https://keybase.io/sudorandom) on keybase. | |
* I have a public key ASDYGS5yzBiuY_yTUAPT_vU-PWXPLIPFraUMgmnyvUvyugo | |
To claim this, I am signing this object: |
OlderNewer