wmic memphysical get MaxCapacity, MemoryDevices
Divide value by 1048576
Divide by value of Memory Devices
function sum(...args) { | |
let total = 0; | |
let adjust = -1 | |
if (args.length && args[0] === 0) { | |
adjust = 0 | |
} | |
function inner(...innerArgs) { | |
if (innerArgs.length === 0) { | |
return total |
wmic memphysical get MaxCapacity, MemoryDevices
Divide value by 1048576
Divide by value of Memory Devices
#!/bin/python3 | |
import math | |
import os | |
import random | |
import re | |
import sys | |
BTBV1R0CZR-eyJsaWNlbnNlSWQiOiJCVEJWMVIwQ1pSIiwibGljZW5zZWVOYW1lIjoiTXVzaGZpcXVyIFJhaG1hbiIsImFzc2lnbmVlTmFtZSI6IiIsImFzc2lnbmVlRW1haWwiOiIiLCJsaWNlbnNlUmVzdHJpY3Rpb24iOiJGb3IgZWR1Y2F0aW9uYWwgdXNlIG9ubHkiLCJjaGVja0NvbmN1cnJlbnRVc2UiOmZhbHNlLCJwcm9kdWN0cyI6W3siY29kZSI6IklJIiwicGFpZFVwVG8iOiIyMDE5LTExLTI4In0seyJjb2RlIjoiQUMiLCJwYWlkVXBUbyI6IjIwMTktMTEtMjgifSx7ImNvZGUiOiJEUE4iLCJwYWlkVXBUbyI6IjIwMTktMTEtMjgifSx7ImNvZGUiOiJQUyIsInBhaWRVcFRvIjoiMjAxOS0xMS0yOCJ9LHsiY29kZSI6IkdPIiwicGFpZFVwVG8iOiIyMDE5LTExLTI4In0seyJjb2RlIjoiRE0iLCJwYWlkVXBUbyI6IjIwMTktMTEtMjgifSx7ImNvZGUiOiJDTCIsInBhaWRVcFRvIjoiMjAxOS0xMS0yOCJ9LHsiY29kZSI6IlJTMCIsInBhaWRVcFRvIjoiMjAxOS0xMS0yOCJ9LHsiY29kZSI6IlJDIiwicGFpZFVwVG8iOiIyMDE5LTExLTI4In0seyJjb2RlIjoiUkQiLCJwYWlkVXBUbyI6IjIwMTktMTEtMjgifSx7ImNvZGUiOiJQQyIsInBhaWRVcFRvIjoiMjAxOS0xMS0yOCJ9LHsiY29kZSI6IlJNIiwicGFpZFVwVG8iOiIyMDE5LTExLTI4In0seyJjb2RlIjoiV1MiLCJwYWlkVXBUbyI6IjIwMTktMTEtMjgifSx7ImNvZGUiOiJEQiIsInBhaWRVcFRvIjoiMjAxOS0xMS0yOCJ9LHsiY29kZSI6IkRDIiwicGFpZFVwVG8iOiIyMDE5LTExLTI4In0seyJjb
Add these lines in your ~/.bashrc file
# Show git branch name
force_color_prompt=yes
color_prompt=yes
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
kubectl exec -it gamma-wra-er-frappe-0 --namespace wrun --container frappe -- bash | |
kubectl exec -it gamma-wra-er-frappe-0 -n wrun -c frappe -- bash | |
kubectl exec -it <pod> --namespace <namespace> --container <container> -- bash |
git for-each-ref --format='%(committerdate) %09 %(authorname) %09 %(refname)' --sort=authorname | |
Customized: | |
git for-each-ref --format='%(color:cyan)%(authordate:format:%m/%d/%Y %I:%M %p) %(align:25,left)%(color:yellow)%(authorname)%(end) %(color:reset)%(refname:strip=3)' --sort=authorname refs/remotes | |
By Author Email: (Which makes more sense) | |
git for-each-ref --format='%(color:cyan)%(authordate:format:%m/%d/%Y %I:%M %p) %(align:25,left)%(color:yellow)%(authoremail)%(end) %(color:reset)%(refname:strip=3)' --sort=authoremail refs/remotes | |
# Customize BASH PS1 prompt to show current GIT repository and branch. | |
# by Mike Stewart - http://MediaDoneRight.com | |
# SETUP CONSTANTS | |
# Bunch-o-predefined colors. Makes reading code easier than escape sequences. | |
# I don't remember where I found this. o_O | |
# Reset | |
Color_Off="\[\033[0m\]" # Text Reset |
git config --global credential.helper 'cache --timeout=3600' | |
git config --global --unset credential.helper | |
git config --global credential.helper store | |
git config --global user.name "username" | |
git config --global user.password "password" |
tar xzOf dump.sql.tar.gz | mysql -u $user -p $database |