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
xcrun simctl --help | |
# To create a new simulator, run the following command | |
xcrun simctl create “my first simulator” “iPhone X” com.apple.CoreSimulator.SimRuntime.iOS-14–5 | |
xcrun simctl boot 64B94C27-A5BB-4B2A-8E6B-C48B1AFEF298 | |
# inspect the content of a plist file using -p option. | |
plutil -p "[HOME]/Library/Developer/CoreSimulator/Devices/[DEVICE_NAME]/data/Library/Preferences/.GlobalPreferences.plist" | |
plutil -replace AppleLocale -string "en_AU" ”$HOME/Library/Developer/CoreSimulator/Devices/64B94C27-A5BB-4B2A-8E6B-C48B1AFEF298/data/Library/Preferences/.GlobalPreferences.plist |
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
datatables.net | |
.extract([ | |
'lodash', 'jquery', 'vue', 'query-string', | |
'datatables.net', 'datatables.net-buttons', 'datatables.net-bs4', 'datatables.net-buttons-bs4', 'datatables.net-buttons/js/buttons.html5.js', | |
'select2', 'axios', 'moment', 'popper.js', 'bootstrap', 'vue-chartjs', 'v-tooltip', 'moment/locale/es', 'vue-moment', | |
'jszip/dist/jszip', 'pdfmake/build/pdfmake.js', 'pdfmake/build/vfs_fonts.js', 'sweetalert', 'vue-strap', 'vue-strap/dist/vue-strap-lang', | |
'moment-array-dates', 'vue-toast', 'randomcolor', 'url', 'google-maps' | |
]) |
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
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 |
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 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 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 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 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 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 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 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)}), |
NewerOlder