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
| You should be able to download the latest python version and follow the README file. The steps should be simple enough. | |
| ./configure | |
| make | |
| make install | |
| Note that you don't have to remove python-2.7.3 from your system to install an other version. | |
| You can switch between different versions using | |
| sudo update-alternatives --config python |
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
| Create a directory for storm and enter it | |
| mkdir storm | |
| cd storm | |
| Create a data directory | |
| mkdir -p datadir/zookeeper | |
| Download ZooKeeper and unzip it | |
| https://zookeeper.apache.org/releases.html(or the appropriate version) | |
| tar -xvf zookeeper*** |
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
| #Publish | |
| import json | |
| import boto3 | |
| message = {"foo": "bar"} | |
| client = boto3.client('sns') | |
| response = client.publish( | |
| TargetArn=arn, | |
| Message=json.dumps({'default': json.dumps(message)}), |
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
| PIP Upgrade all | |
| pip freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip install -U |
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
| import http.client | |
| import xmlrpc.client | |
| class TimedTransport(xmlrpc.client.Transport): | |
| timeout = 30 | |
| def set_timeout(self, timeout): | |
| self.timeout = timeout |
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
| files: | |
| "/opt/elasticbeanstalk/hooks/appdeploy/post/99_run_supervised_celeryd.sh": | |
| mode: "000755" | |
| owner: root | |
| group: root | |
| content: | | |
| #!/usr/bin/env bash | |
| # Get django environment variables | |
| celeryenv=`cat /opt/python/current/env | tr '\n' ',' | sed 's/export //g' | sed 's/%/%%/g' | sed 's/$PATH/%(ENV_PATH)s/g' | sed 's/$PYTHONPATH//g' | sed 's/$LD_LIBRARY_PATH//g'` | |
| celeryenv=${celeryenv%?} |
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
| select * from INFORMATION_SCHEMA.INNODB_TRX; | |
| select * from INFORMATION_SCHEMA.INNODB_LOCKS; | |
| SELECT CONCAT('KILL ', trx.trx_mysql_thread_id) kill_statement, trx.trx_mysql_thread_id thd_id, ps.user, ps.host, trx.trx_query FROM INFORMATION_SCHEMA.INNODB_TRX trx JOIN INFORMATION_SCHEMA.PROCESSLIST ps ON trx.trx_mysql_thread_id = ps.id WHERE user != 'system_user'; | |
| KILL 17333; | |
| -- http://www.markleith.co.uk/2011/05/31/finding-and-killing-long-running-innodb-transactions-with-events/ |
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
| php artisan make:controller -r -m=Post | |
| AWS Composer update issue | |
| https://getcomposer.org/doc/articles/troubleshooting.md#operation-timed-out-ipv6-issues- | |
| https://github.com/composer/composer/issues/4247 | |
| run on deploy | |
| php artisan config:cache | |
| https://github.com/alexeymezenin/laravel-best-practices |
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
| #list the disk you attached to your instance. | |
| lsblk | |
| #Check if the volume has any data using the following command. | |
| sudo file -s /dev/xvdf | |
| #Format the volume to ext4 filesystem using the following command. | |
| sudo mkfs -t ext4 /dev/xvdf | |
| #Create a directory of your choice to mount our new ext4 volume. I am using the name “newvolume” | |
| sudo mkdir /newvolume | |
| #Mount the volume to “newvolume” directory using the following command. | |
| sudo mount /dev/xvdf /newvolume/ |
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
| https://ramhiser.com/post/2018-05-20-setting-up-a-kubernetes-cluster-on-aws-in-5-minutes/ | |
| https://aws.amazon.com/blogs/aws/amazon-elastic-container-service-for-kubernetes/ | |
| https://docs.aws.amazon.com/eks/latest/userguide/getting-started.html#eks-guestbook | |
| https://kubernetes.io/docs/setup/turnkey/aws/ | |
| https://medium.com/containermind/how-to-create-a-kubernetes-cluster-on-aws-in-few-minutes-89dda10354f4 | |
| https://www.weave.works/technologies/kubernetes-on-aws/ | |
| https://kubernetes.io/docs/tutorials/online-training/overview/ | |
| https://www.udacity.com/course/scalable-microservices-with-kubernetes--ud615 |