watch -n 0.5 "cat /proc/cpuinfo | grep MHz && echo && sensors"
watch cat /sys/devices/system/cpu/cpu{0..7}/cpufreq/cpuinfo_max_freq
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
watch -n 0.5 sudo tlp-stat -p
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Grafana | |
After=docker.service | |
Requires=docker.service | |
[Service] | |
TimeoutStartSec=0 | |
Restart=always | |
ExecStartPre=-/usr/bin/docker stop %n | |
ExecStartPre=-/usr/bin/docker rm %n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate a Packer var file | |
cat <<EOF > packer-ova.json | |
{ | |
"vcenter_server":"vcenter.example.com", | |
"username":"me", | |
"password":"mypass", | |
"datacenter": "DC", | |
"datastore":"Datastore", | |
"folder": "foo", | |
"cluster": "10.1.2.3", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -x | |
set -eou pipefail | |
gw=$(ip route | grep default | awk {'print $3'}) | |
echo Fixing DNS | |
chattr -i /etc/resolv.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Colors (Solarized Dark) | |
colors: | |
# Default colors | |
primary: | |
background: '#002b36' # base03 | |
foreground: '#839496' # base0 | |
# Cursor colors | |
cursor: | |
text: '#002b36' # base03 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const maxAttempts = 10 | |
const retryIntervalSeconds = 5 | |
var sshConnected bool | |
log.Printf("Connecting to VM using SSH") | |
for i := 0; i < maxAttempts; i++ { | |
if i > 0 { | |
time.Sleep(time.Second * retryIntervalSeconds) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch test function", | |
"type": "go", | |
"request": "launch", | |
"mode": "test", | |
"program": "${workspaceFolder}/bootstrap/kubeadm/internal/controllers", | |
"args": [ |
https://developers.google.com/calendar/api/quickstart/python#prerequisites
virtualenv venv
source venv/bin/activate
pip install --upgrade google-api-python-client google-auth-httplib2 google-auth-oauthlib
NewerOlder