type: PIN
Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
type: PIN
Consumer key: IQKbtAYlXLripLGPWd0HUA
| #!/bin/bash | |
| id=$(docker inspect $1|jq ".[]|.Id" -r) | |
| mhz=$(cat /proc/cpuinfo |grep MHz|awk '{print $4}'|paste -d "+" -s|bc -l) | |
| while true;do | |
| allpre=$(cat /proc/stat |head -n 1|cut -d " " -f 3-9|sed s#" "#+#g|awk '{print "("$1")*1000000000/100"}'|bc) | |
| acctpre=$(cat /sys/fs/cgroup/cpu,cpuacct/system.slice/docker-$id.scope/cpuacct.usage) | |
| sleep 1 | |
| all=$(cat /proc/stat |head -n 1|cut -d " " -f 3-9|sed s#" "#+#g|awk '{print "("$1")*1000000000/100"}'|bc) | |
| acct=$(cat /sys/fs/cgroup/cpu,cpuacct/system.slice/docker-$id.scope/cpuacct.usage) | |
| echo "($acct-$acctpre)/($all-$allpre)*$mhz"|bc -l |
| - go language spec: https://golang.org/ref/spec | |
| - effective go: https://golang.org/doc/effective_go.html | |
| - go by example: https://gobyexample.com/ | |
| - tour of go: https://tour.golang.org/welcome/1 | |
| "leader key is , | |
| let mapleader = "," | |
| let g:mapleader = "," | |
| set nocompatible | |
| set rtp+=~/.nvim | |
| call plug#begin('~/.nvim/plugged') | |
| Plug 'fatih/vim-go' | |
| Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } | |
| Plug 'Shougo/neosnippet.vim' |
| @echo off | |
| cd C:\workdir\myapps\scoop\apps\googlechrome-portable | |
| FOR /F "tokens=*" %%g IN ('dir /AD /B /O-d ^| find /V "current" ^|findstr/n . ^|findstr "^1:"') do (SET VAR=%%g) | |
| set VAR=%VAR:1:=% | |
| start %VAR%\chrome %* |
| # options for analysis running | |
| run: | |
| deadline: 2m | |
| issues-exit-code: 1 | |
| tests: true | |
| # modules-download-mode: vendor | |
| skip-files: | |
| - rice-box.go | |
| # output configuration options |
| [[gateway]] | |
| name="gw1" | |
| enable=true | |
| [[gateway.inout]] | |
| account="discord.account" | |
| channel="channel1" | |
| [[gateway.inout]] | |
| account="irc.account" |
| $ vault write -f transit/keys/akey type=rsa-4096 | |
| Success! Data written to: transit/keys/akey | |
| $ vault read -field=keys -format=json transit/keys/akey | jq -r '.[]|.public_key' > pub.pem | |
| $ cat pub.pem | |
| -----BEGIN PUBLIC KEY----- | |
| MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAyKC+YwNfucFi0qadwnjw | |
| s3yPvGNbYN/RvTMokeFBSP+k1H5wdrC27SNYpiqhCfXqR5D0jvUUG/KUqLYQ8oLu | |
| anQSH9RgUUKQn6YUuJfAYXTuNtoVaez+ONIqXJkyCuwa5s+z0PvGxKMOwl+mr+hw | |
| 1f1nP53kM0momAqMSlMiJCMpcPWu1RJEbhlTc/EE/rlghzU2dTKFwd3gMUFlEbzL |
| function maintenance() | |
| res = blockingGetAddrInfo(newDNSName('mydns.service.consul')) | |
| active = getPoolServers("apool") | |
| local match = {} | |
| local match2 = {} | |
| for k,v in pairs(res) do | |
| match[v:toString()]=false | |
| end | |
| for a,b in pairs(active) do | |
| match2[a]=false |
| [[trigger]] | |
| file="t/audit_db.log" | |
| record-delimiter="^#" | |
| [trigger.pwdlock] | |
| match-regex="uwe regex" | |
| actions.showmatch.type="local" | |
| actions.showmatch.runtemplate="logger -t INFO {{ .dn }} {{ .datetime }}" | |
| actions.remoteserver1.type="rest" | |
| actions.remoteserver1.urltemplate="blah" |