A Pen by Rafaela Lucas on CodePen.
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
| server { | |
| listen 80; | |
| server_name xxxx.com; | |
| access_log /var/log/nginx/xxxx.php-access.log backend; | |
| error_log /var/log/nginx/xxxx.php-error.log error; | |
| set $root /var/www/xxxx; | |
| location ~ .*\.(gif|jpg|jpeg|bmp|png|ico|txt|js|css)$ | |
| { | |
| root $root; | |
| } |
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
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
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
| #coding:utf8 | |
| import random | |
| import math | |
| WIN = 1 | |
| LOSE = 0 | |
| def gambling_50_percent(pocket, pay): | |
| result = random.randint(0, 1) | |
| if result == WIN: |
The IBM Kubernetes service free clusters consist of a single worker node with 2 CPU and 4 GB of memory for experimenting with Kubernetes. Unlike the fee-based service, these clusters do not include capabilities for application load balancing using ingress out-of-the-box. However, if you manage a DNS domain (any provider will suffice) and can add an A record, it's possible for you to configure your own ingress that can provide http and https session termination for your containerized applications. Getting a TLS-enabled website or simply an external REST API couldn't be easier!
- Free IBM Kubernetes Cluster (IKS) - upgrade your account from Lite plan to create one. In the example commands, we'll assume that this cluster is named
mycluster - kubectl - match your cluster API version (as of 5/17/20 - this is ~1.16.9)
- helm v3
- DNS domain that you can edit to configure
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
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
| const inputs = { tenkan: -9, kijun: -26, senkou: -52, chikou: -26 }; | |
| main['ichimoku_' + pair] = generateIchimoku(pair, false); | |
| main['chikou_' + pair] = generateIchimoku(pair, true); | |
| const generateIchimoku = (pair, isChikou) => { | |
| const high = isChikou ? main.high[pair].slice(0, inputs.chikou) : main.high[pair]; | |
| const low = isChikou ? main.low[pair].slice(0, inputs.chikou) : main.low[pair]; |
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
| # Ackknowledgement | |
| # https://www.wikigain.com/install-macos-catalina-on-virtualbox-on-windows/ | |
| VBoxManage modifyvm "Catalina" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff | |
| VBoxManage setextradata "Catalina" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3" | |
| VBoxManage setextradata "Catalina" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0" | |
| VBoxManage setextradata "Catalina" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple" | |
| VBoxManage setextradata "Catalina" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" | |
| VBoxManage setextradata "Catalina" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1 |
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
| /data/home /home none bind | |
| /data/usr/src /usr/src none bind |
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
| lynx -listonly -nonumbers -dump http://tyo.com.au/web/themes/business/ > links.txt | |
| grep jpg links.txt > images.txt | |
| cat images.txt | |
| grep jpg ../business/css/style.css | cut -f 3 -d "." | while read line; do echo http://tyo.com.au/web/themes/business$line.jpg ; done > images2.txt | |
| grep png ../business/css/style.css | cut -f 3 -d "." | while read line; do echo http://tyo.com.au/web/themes/business$line.png ; done > images3.txt | |
| cat images3.txt | |
| cat image*.txt > allimages.txt | |
| cat allimages.txt | |
| mkdir images |
NewerOlder