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
function fib(num) { | |
let sequence = [0, 1] | |
function helper(sequence, num) { | |
const length = sequence.length | |
// get sum of last two numbers | |
let sum = sequence[length - 1] + sequence[length - 2] |
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
let resourceList = resources.getItemInfo | |
resourceList = resourceList | |
.concat(resources.getImagesPrimary) | |
api.getItemById(['B079JD7F7G'], { | |
parameters: resourceList, | |
condition: condition.Any | |
}).then((response) => { | |
console.log(' ===== find by Item ids =====') | |
console.log('data', response.data) |
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
myConfig.accessKey = '<ACCESS_KEY>' | |
myConfig.secretKey = '<SECRET_KEY>' | |
myConfig.partnerTag = '<PARTNER_TAG>' | |
const api = new Api(myConfig) |
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
// By Default all resources and will connect to United States | |
let myConfig = new Config(); | |
// if you want other country then united states. | |
let myConfig = new Config(undefined, country.UnitedKingdom); | |
// if you want custom resources. | |
// this custom `resources.Offers` will be set default to all of your search. You can customize the resources in your search specific function also. | |
let myConfig = new Config(resources.Offers); | |
// if you want custom resources with different country | |
let myConfig = new Config(resources.ItemInfo, country.Canada); |
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
const resources = require('amazon-pa-api50/lib/options').Resources // Optional for different resources | |
const condition = require('amazon-pa-api50/lib/options').Condition // for product condition | |
const country = require('amazon-pa-api50/lib/options').Country // Optional for different country | |
const searchIndex = require('amazon-pa-api50/lib/options').SearchIndex // for Search Index |
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
const Api = require('amazon-pa-api50') | |
const Config = require('amazon-pa-api50/lib/config') |
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
#!/bin/bash | |
sudo apt-get update | |
sudo apt-get install nginx -y | |
sudo apt-get install memcached -y | |
sudo apt install php7.2 php7.2-fpm php7.2-mysql php-common php7.2-cli php7.2-common php7.2-json php7.2-opcache php7.2-readline php7.2-mbstring php7.2-xml php7.2-gd php7.2-curl php-redis php-apcu php-memcached php-memcache -y | |
sudo apt-get install mysql-client -y |
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
server { | |
listen 80; | |
// @todo Change from localhost to blog.local | |
server_name localhost; | |
// @todo Change root from /var/www/html to /var/www/blog | |
root /var/www/html/; | |
index index.php index.html index.htm; |
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
nginx: | |
build: | |
context: ./images/nginx | |
dockerfile: Dockerfile | |
container_name: lempdock_nginx_1 | |
ports: | |
- "80:80" | |
- "443:443" | |
volumes: | |
- ./www:/var/www |
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
mysql: | |
volumes: | |
- ./data/mysql:/var/lib/mysql | |
redis: | |
volumes: | |
- ./data/redis:/data/redis |
NewerOlder