Skip to content

Instantly share code, notes, and snippets.

@sblask
sblask / setup_show_diagnostics.lua
Created October 20, 2022 03:16
Run this in on_attach to show diagnostics in a floating window
local setup_show_diagnostics = function(buffer)
local opts = {
border = 'rounded',
close_events = {
'BufLeave',
'CursorMoved',
'DiagnosticChanged',
'FocusLost',
'InsertEnter',
},
This file has been truncated, but you can view the full file.
2022-04-06T16:59:30.743+1200 [INFO] Terraform version: 1.1.7
2022-04-06T16:59:30.743+1200 [INFO] Go runtime version: go1.17.2
2022-04-06T16:59:30.743+1200 [INFO] CLI args: []string{"terraform", "plan", "-out", "plan", "-target", "module.cloudfront.module.logging_lambda.aws_lambda_function.lambda"}
2022-04-06T16:59:30.743+1200 [DEBUG] Attempting to open CLI config file: /Users/sebastian/.terraformrc
2022-04-06T16:59:30.743+1200 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2022-04-06T16:59:30.744+1200 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2022-04-06T16:59:30.744+1200 [DEBUG] ignoring non-existing provider search directory /Users/sebastian/.terraform.d/plugins
2022-04-06T16:59:30.744+1200 [DEBUG] ignoring non-existing provider search directory /Users/sebastian/Library/Application Support/io.terraform/plugins
2022-04-06T16:59:30.744+1200 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
@sblask
sblask / gist:5c1140a3e00e9fa6555cc92a924cdd32
Created July 21, 2021 00:25
terraform debug output 210721 1225
$ TF_LOG=trace terp
2021-07-21T12:23:42.996+1200 [DEBUG] Adding temp file log sink: /var/folders/qy/wfckskrd51l41bfk_ddbx9f40000gn/T/terraform-log219492604
2021-07-21T12:23:42.996+1200 [INFO] Terraform version: 1.0.2
2021-07-21T12:23:42.996+1200 [INFO] Go runtime version: go1.16.4
2021-07-21T12:23:42.996+1200 [INFO] CLI args: []string{"/Users/sebastian/.bin/terraform", "plan", "-out", "plan"}
2021-07-21T12:23:42.996+1200 [TRACE] Stdout is a terminal of width 362
2021-07-21T12:23:42.996+1200 [TRACE] Stderr is a terminal of width 362
2021-07-21T12:23:42.996+1200 [TRACE] Stdin is a terminal
2021-07-21T12:23:42.996+1200 [DEBUG] Attempting to open CLI config file: /Users/sebastian/.terraformrc
2021-07-21T12:23:42.996+1200 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
~/Clones/sandpit $ TF_LOG=TRACE terraform_0_15_0 plan -out plan
2021-04-15T21:45:35.458+1200 [DEBUG] Adding temp file log sink: /var/folders/qy/wfckskrd51l41bfk_ddbx9f40000gn/T/terraform-log231794640
2021-04-15T21:45:35.458+1200 [INFO] Terraform version: 0.15.0
2021-04-15T21:45:35.458+1200 [INFO] Go runtime version: go1.16.2
2021-04-15T21:45:35.458+1200 [INFO] CLI args: []string{"/Users/sebastian/.bin/terraform_0_15_0", "plan", "-out", "plan"}
2021-04-15T21:45:35.458+1200 [TRACE] Stdout is a terminal of width 275
2021-04-15T21:45:35.458+1200 [TRACE] Stderr is a terminal of width 275
2021-04-15T21:45:35.458+1200 [TRACE] Stdin is a terminal
2021-04-15T21:45:35.458+1200 [DEBUG] Attempting to open CLI config file: /Users/sebastian/.terraformrc
2021-04-15T21:45:35.458+1200 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
~/Clones/sandpit $ TF_LOG=TRACE terraform_0_15_0 plan -out plan
2021-04-15T20:18:05.888+1200 [DEBUG] Adding temp file log sink: /var/folders/qy/wfckskrd51l41bfk_ddbx9f40000gn/T/terraform-log369535931
2021-04-15T20:18:05.888+1200 [INFO] Terraform version: 0.15.0
2021-04-15T20:18:05.888+1200 [INFO] Go runtime version: go1.16.2
2021-04-15T20:18:05.888+1200 [INFO] CLI args: []string{"/Users/sebastian/.bin/terraform_0_15_0", "plan", "-out", "plan"}
2021-04-15T20:18:05.889+1200 [TRACE] Stdout is a terminal of width 137
2021-04-15T20:18:05.889+1200 [TRACE] Stderr is a terminal of width 137
2021-04-15T20:18:05.889+1200 [TRACE] Stdin is a terminal
2021-04-15T20:18:05.889+1200 [DEBUG] Attempting to open CLI config file: /Users/sebastian/.terraformrc
2021-04-15T20:18:05.889+1200 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
From: http://web.archive.org/web/20160904174444/http://andreafrancia.it/2010/03/understanding-the-output-of-rsync-itemize-changes.html
As you may know the rsync's --delete options if misused could make severe damage.
To prevent this you can use the --itemize-change and the --dry-run options to figure out how the command will behave before launching the real one.
The output will be something like that:
.d..t..g... ./
.f...p.g... Something.pdf
import json
import socket
import ssl
ssl_socket = ssl.wrap_socket(socket.socket(), cert_reqs=ssl.CERT_REQUIRED, ca_certs='/etc/ssl/certs/ca-certificates.crt')
ssl_socket.connect(('google.com', 443))
print json.dumps(ssl_socket.getpeercert(), indent=4)
http://redir.xing.com/link/*
https://slack-redir.net/link*
https://*.facebook.com/l.php*
https://deref-gmx.net/mail/client/*
https://outgoing.prod.mozaws.net/*
https://www.google.com/url*
# decrease speed
xinput set-prop "AlpsPS/2 ALPS DualPoint Stick" "Device Accel Profile" 6
xinput set-prop "AlpsPS/2 ALPS DualPoint Stick" "Device Accel Velocity Scaling" 1
xinput set-prop "AlpsPS/2 ALPS DualPoint Stick" "Device Accel Constant Deceleration" 7
xinput set-prop "AlpsPS/2 ALPS DualPoint Stick" "Device Accel Adaptive Deceleration" 60
# set mouse scroll speed
xinput set-prop "AlpsPS/2 ALPS DualPoint Stick" "Evdev Wheel Emulation Inertia" 100
@sblask
sblask / clone_init
Last active February 22, 2016 00:46
curl --silent https://api.github.com/users/sblask/repos | jq --raw-output ".[] | .ssh_url" | xargs -L 1 git clone