Installation Docs:
# Download
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
# Download
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
#!/usr/bin/env python | |
# coding: utf8 | |
# Script to create superset users | |
import pandas as pd | |
from sqlalchemy import create_engine | |
import datetime | |
import pexpect | |
import os |
const chai = require("chai"); | |
const chaiHttp = require("chai-http"); | |
const expect = chai.expect | |
const baseUrl = "https://store-ordering-api.herokuapp.com" | |
// const baseUrl = "localhost:3200/" | |
chai.use(chaiHttp); | |
describe("Food Ordering API Unit Test", function(){ | |
var token; |
/* Basic example of save cookie using axios in node.js and recreate session if it expired. | |
* Get/save cookie manually cause WithCredential axios param use XHR and not work in node.js | |
* Supports parallel request and send only one create session request. | |
* */ | |
const BASE_URL = "https://google.com"; | |
// Init instance of axios which works with BASE_URL | |
const axiosInstance = axios.create({ baseURL: BASE_URL }); |
lsblk
to list partitionssudo pvs
to list the free space in disksudo pvresize /dev/sda1
df -h
to get root logical volume name
/dev/mapper/ubuntu--vg-root
sudo lvextend -r -l +100%FREE /dev/mapper/ubuntu--vg-root
rm -rf lambda.zip | |
zip -r lambda.zip node_modules/ index.js package.json | |
aws s3 cp lambda.zip s3://<s3-bucket-name> --profile <aws-profile> | |
#aws lambda update-function-code --function-name contact-form-api --zip-file fileb://lambda.zip --profile cossist | |
#aws lambda create-function --function-name <function name or arn> --runtime <runtime> --role <role arn> --handler <handle> --code S3Bucket=your-bucket-name,S3Key=Lambda-Deployment.zip | |
aws lambda update-function-code \ | |
--function-name <lambda-api-name> \ | |
--s3-bucket <s3-bucket-name> \ |
{ | |
"apps": [ | |
{ | |
/* General */ | |
"name": "my-api", /* (string) application name (default to script filename without extension) */ | |
"script": "index.js", /* (string) script path relative to pm2 start */ | |
"cwd": "/var/www/", /* (string) the directory from which your app will be launched */ | |
"args": "-a 13 -b 12", /* (string) string containing all arguments passed via CLI to script */ | |
"interpreter": "/usr/bin/python", /* (string) interpreter absolute path (default to node) */ | |
"interpreter_args": "--harmony", /* (string) option to pass to the interpreter */ |
const file = document.getElementById('upload').files[0]; | |
const CHUNK_SIZE = 10000000; // 10MB | |
const fileSize = file.size; | |
const CHUNKS_COUNT = Math.floor(fileSize / CHUNK_SIZE) + 1; | |
let start, end, blob; | |
for (let index = 1; index < CHUNKS_COUNT + 1; index++) | |
{ | |
start = (index - 1) * CHUNK_SIZE; | |
end = (index) * CHUNK_SIZE; |