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 |