A Pen by Rafaela Lucas on CodePen.
| 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; | |
| } |
| # 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 | |
| #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
| 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]; |
| function exportSpreadsheet() { | |
| //All requests must include id in the path and a format parameter | |
| //https://docs.google.com/spreadsheets/d/{SpreadsheetId}/export | |
| //FORMATS WITH NO ADDITIONAL OPTIONS | |
| //format=xlsx //excel | |
| //format=ods //Open Document Spreadsheet | |
| //format=zip //html zipped | |
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com, example2.com, and example1.com/images on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
| # see https://github.com/cmaessen/docker-php-sendmail for more information | |
| FROM php:5-fpm | |
| RUN apt-get update && apt-get install -q -y ssmtp mailutils && rm -rf /var/lib/apt/lists/* | |
| RUN docker-php-ext-install mysql mysqli sysvsem | |
| RUN pecl install xdebug-2.5.5 \ | |
| && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \ |