start minikube using hyperv driver
- assign 4 cpus
- enable ingress
minikube start --profile hello-world --cpus 4 --vm-driver hyperv --hyperv-virtual-switch "thinkpad-k8s" --addons=ingress --embed-certs
to enable metric server
start minikube using hyperv driver
minikube start --profile hello-world --cpus 4 --vm-driver hyperv --hyperv-virtual-switch "thinkpad-k8s" --addons=ingress --embed-certs
to enable metric server
const { test, expect } = require('@playwright/test'); | |
test('basic test', async ({ page }) => { | |
await page.goto('http://localhost:3000'); | |
await page.click('[name=login]'); | |
await page.fill('[name=email]', '<EMAIL>'); | |
await page.fill('[name=password]', '<PASSWORD>'); | |
await page.click('[name=submit]'); |
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
driver = webdriver.Chrome() | |
driver.implicitly_wait(10) # not a good practice; just for demo purpose | |
driver.get("http://localhost:3000") | |
# Landing page | |
login_button = driver.find_element(By.NAME, "login") | |
login_button.click() |
g:EasyMotion_override_acejump = 0 | |
map <space> <Plug>(easymotion-bd-w) | |
set easymotion |
from flask import current_app, Blueprint, render_template | |
from database import db_session | |
from model import Product | |
admin = Blueprint('admin', __name__, url_prefix='/admin') | |
@admin.route('/') | |
def index(): | |
product = db_session.query(Product).first() |
function pyvenv_enable () { | |
ENV_NAME=$(basename $PWD) | |
VENV_DIR="${HOME}/.venv/${ENV_NAME}" | |
if [ ! -d "${VENV_DIR}" ]; then | |
python3 -m venv ${VENV_DIR} | |
echo "Created venv: ${VENV_DIR}" | |
source ${VENV_DIR}/bin/activate | |
pip3 install --upgrade pip setuptools-scm | |
else | |
source ${VENV_DIR}/bin/activate |
git config --global alias.a "! git add . && git status" | |
git config --global alias.aa "! git add . && git add -u . && git status" | |
git config --global alias.ac "! git add . && git commit" | |
git config --global alias.acm "! git add . && git commit -m" | |
git config --global alias.alias "! git config --list | grep 'alias\.' | sed 's/alias\.\([^=]*\)=\(.*\)/\1\ => \2/' | sort" | |
git config --global alias.au "! git add -u . && git status" | |
git config --global alias.c "commit" | |
git config --global alias.ca "commit --amend" | |
git config --global alias.cm "commit -m" | |
git config --global alias.co checkout |
import javax.crypto.*; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
import java.io.ByteArrayInputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.security.*; |
ssh -fN -L 8888:10.1.2.151:80 ec2-user@52.62.11.59 -i PRIVATEKEY.pem | |
curl -i localhost:8888 |
#!/bin/bash | |
yum update -y | |
yum install httpd -y | |
service httpd start | |
chkconfig httpd on | |
cd /var/www/html | |
echo "<html><h1>Hello! Welcome To My Webpage @ $HOSTNAME</h1></html>" > index.html |