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
Installation | |
$ sudo apt-get update | |
$ sudo apt-get install build-essential | |
$ sudo apt-get install tcl8.5 | |
$ cd /opt | |
$ sudo wget http://download.redis.io/releases/redis-stable.tar.gz | |
$ sudo tar xzf redis-stable.tar.gz | |
$ cd redis-stable | |
$ make | |
$ make test |
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
Blog post: https://josephscott.org/archives/2011/10/timing-details-with-curl/ | |
Checkout repo: https://github.com/leocelis/python3buildingblocks | |
Then run: | |
$ curl -w "@curl-format.txt" -o /dev/null -s -X GET "http://www.google.com" | |
You will get an output like this: | |
time_namelookup: 0.031 |
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
# check visibility | |
$ nosetests -vv --collect-only | |
# remove executable permission from the file | |
$ chmod -R -x+X <filename> | |
# verify nosetests has visibility on the file | |
$ nosetests -vv --collect-only |
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
List active processes: | |
$ docker ps | |
Grab the CONTAINER ID and use it in the next command | |
$ docker exec -it <CONTAINER ID> bash |
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://github.com/awslabs/aws-python-sample.git | |
pip3 install boto3 | |
vim ~/.aws/credentials | |
-- | |
Add the following: | |
[default] | |
aws_access_key_id = YOUR_ACCESS_KEY_ID | |
aws_secret_access_key = YOUR_SECRET_ACCESS_KEY | |
-- | |
cd aws-python-sample |
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
aws kinesis create-stream --stream-name Foo --shard-count 1 | |
aws kinesis describe-stream --stream-name Foo | |
aws kinesis list-streams | |
aws kinesis put-record --stream-name Foo --partition-key 123 --data testdata | |
SHARD_ITERATOR=$(aws kinesis get-shard-iterator --shard-id shardId-000000000000 --shard-iterator-type TRIM_HORIZON --stream-name Foo --query 'ShardIterator') | |
aws kinesis get-records --shard-iterator $SHARD_ITERATOR | |
Copy the value from Records > Data | |
Decode it here: https://www.base64decode.org | |
aws kinesis delete-stream --stream-name Foo | |
aws kinesis describe-stream --stream-name Foo |
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
curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py" | |
sudo python get-pip.py | |
sudo pip install awscli | |
aws configure |