https://github.com/lingsamuel/kubectl-life-saver/
Kubectl shortcuts general rule:
| starClick = setInterval(function() { $("#observeBtn").click(); }, 2 * 1000); | |
| autoCraft = setInterval(function() { | |
| craftable = res=>(res.value / res.maxValue) > 0.95; | |
| // ็ผๆจๆข | |
| resWood = gamePage.resPool.get('wood') | |
| if(craftable(resWood)) { | |
| gamePage.craftAll('beam'); |
| # $ErrorActionPreference= 'silentlycontinue' | |
| $procname = "eldenring" | |
| cls | |
| Function RBytes | |
| { | |
| Param ( | |
| $addr, | |
| $sizetoread |
| var a = Array.from(this.document.getElementsByClassName('wallet_table_row')); | |
| var buy = a.filter(x => {let t = x.children[1].textContent; return !(t.includes('่ดงๅธ่ฝฌๆข') || t.includes('็คพๅบๅธๅบ') || t.includes('้ฑๅ ่ต้'));}) | |
| var result = {}; buy.forEach(x=>{let price = x.children[3].textContent.trim().split(' '); let refundFactor = x.children[1].textContent.includes('้ๆฌพ') ? -1 : 1; if(price[0] in result) {result[price[0]] += refundFactor*parseFloat(price[1]);} else {result[price[0]] = refundFactor*parseFloat(price[1]);}}); | |
| result; |
| git log --shortstat --since "2020-10-08" | grep "files changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "; lines inserted:", inserted, "; lines deleted:", deleted}' |
| #!/bin/bash | |
| set -ex | |
| DIR="certs" # ่ฏไนฆๅญๆพ็ฎๅฝ | |
| DAYS=365 # ๆๆๆ | |
| ORG_NAME=${ORG_NAME:-"ORG_NAME"} | |
| ORG_UNIT=${ORG_UNIT:-"ORG_UNIT"} | |
| CA_CN=${CA_CN:-"CA_CN"} | |
| USER_CN=${USER_CN:-"USER_CN"} |
| console.log(Array.from(document.querySelectorAll('.wallet_table_row')) | |
| .filter(x => !(x.children[2].textContent.includes('้ๆฌพ') || x.children[2].textContent.includes('่ฝฌๆข') || x.children[1].textContent.includes('้ฑๅ ่ต้'))) | |
| .map(x => { return { | |
| date: x.children[0].innerText, | |
| cost: x.children[3].innerText, | |
| item: x.children[1].innerText.split("\n").join(' ๅ ') } | |
| }) | |
| .filter(x => x.cost.startsWith("ยฅ")) | |
| .map(x => { return { | |
| date: x.date, |
| Markdown 3 hrs 43 mins โโโโโโโโโโโโโโโโโโโโโ 29.3% | |
| Go 3 hrs 8 mins โโโโโโโโโโโโโโโโโโโโโ 24.7% | |
| Bash 2 hrs 22 mins โโโโโโโโโโโโโโโโโโโโโ 18.6% | |
| HTML 58 mins โโโโโโโโโโโโโโโโโโโโโ 7.7% | |
| JavaScript 51 mins โโโโโโโโโโโโโโโโโโโโโ 6.7% |
| [Unit] | |
| Description=Change mac for %I | |
| Wants=network.target | |
| Before=network.target | |
| BindsTo=sys-subsystem-net-devices-%i.device | |
| After=sys-subsystem-net-devices-%i.device | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/usr/bin/macchanger --mac=aa:bb:cc:dd:ee:ff %I |
https://github.com/lingsamuel/kubectl-life-saver/
Kubectl shortcuts general rule:
| # https://github.com/zsh-users/zsh-autosuggestions/issues/238#issuecomment-389324292 | |
| # This speeds up pasting w/ autosuggest | |
| # https://github.com/zsh-users/zsh-autosuggestions/issues/238 | |
| pasteinit() { | |
| OLD_SELF_INSERT=${${(s.:.)widgets[self-insert]}[2,3]} | |
| zle -N self-insert url-quote-magic # I wonder if you'd need `.url-quote-magic`? | |
| } | |
| pastefinish() { | |
| zle -N self-insert $OLD_SELF_INSERT |