This file contains 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/bash | |
cat $1 | base64 -d > result.zlib | |
printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" | cat - result.zlib | gzip -dc | jq | |
rm result.zlib | |
# source https://groups.google.com/forum/#!msg/cloud-custodian/z67zuVApHp0/xX81toqVAgAJ |
This file contains 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/bash | |
queue="" | |
for i in {1..1000} | |
do | |
aws sqs receive-message --queue-url $queue --visibility-timeout 600 --max-number-of-messages 10 | jq ".Messages[].Body | fromjson" > $i.json | |
done |
This file contains 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
git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git | |
sudo apt-get install sudo apt-get install flex bison libelf-dev libaudit-dev libdw-dev libunwind* python-dev binutils-dev libnuma-dev libgtk2.0-dev libbfd-dev libelf1 libperl-dev libnuma-dev libslang2 libslang2-dev libunwind8 libunwind8-dev binutils-multiarch-dev elfutils libiberty-dev systemtap-sdt-dev libbabeltrace-ctf-dev libbabeltrace-dev -y | |
cd linux/tools/perf | |
make |
This file contains 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
compile and profile memory // -p for profiling performance | |
stack build --profile --ghc-options=-fprof-auto-top && stack exec -- ui-interactions +RTS -h | |
generate postscript file from memory dump | |
~/.stack/programs/x86_64-osx/ghc-8.6.3/bin/hp2ps -e8in -c ui-interactions.hp | |
limit max heapsize | |
stack build --ghc-options=-rtsopts | |
.stack-work/install/x86_64-osx/lts-13.10/8.6.3/bin/ui-interactions -M1G |
This file contains 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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
) | |
type Message struct { | |
Error error |