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
... | |
#if RCT_DEV | |
[bridge moduleForClass:[RCTDevLoadingView class]]; | |
+ | |
+ NSURL * jsCodeLocation = [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:nil]; | |
+ [[RCTBundleURLProvider sharedSettings] setJsLocation:jsCodeLocation.host]; | |
#endif | |
... |
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
# Random number game | |
from random import randint | |
minimum = 1 | |
maximum = 100 | |
guesses = 10 | |
print("Let's play a game!") | |
print("..but first...\n") |
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 | |
mysql -u root -pPASSWORD -e 'show databases' | tail -n +2 | while read DB | |
do | |
mysqldump -u root -pPASSWORD "$DB" > "/path/to/your/backup/$DB.sql" | |
done |
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
clear host | |
# | |
# Script to keep the PC alive, will prevent screen lock and sleep. | |
# | |
# Works by pressing Print Screen every 60 seconds | |
# side effect is that a screenshot will overwrite the clipboard contents | |
# | |
$opt = (Get-Host).PrivateData | |
$opt.WarningBackgroundColor = "DarkCyan" |
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
save = !sh -c 'export PREV=$(git symbolic-ref HEAD|cut -d/ -f3-) && git checkout -b "$1" && git commit -am "$1" && git checkout "$PREV"' - |
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
## Add the contents below to /etc/sysctl.conf | |
kern.ipc.maxsockbuf=4194304 | |
kern.ipc.somaxconn=2048 | |
kern.ipc.nmbclusters=2048 | |
net.inet.tcp.rfc1323=1 | |
net.inet.tcp.win_scale_factor=4 | |
net.inet.tcp.sockthreshold=16 | |
net.inet.tcp.sendspace=1042560 | |
net.inet.tcp.recvspace=1042560 |
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
find . -name "node_modules" -exec rm -rf '{}' + |
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
aws --profile {PROFILE} s3 ls s3://{BUCKET_NAME}/{PATH_NAME} --recursive | awk 'BEGIN {total=0}{total+=$3}END{print total/1024/1024/1024" GB"}' |
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
# Flush DNS Cache | |
alias flushdns="sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder && echo 'DNS Cache cleared!'" |
NewerOlder