Skip to content

Instantly share code, notes, and snippets.

@kradalby
kradalby / uwsgi
Last active August 29, 2015 14:02 — forked from mariuz/emperor.sh
#!/usr/bin/env bash
### BEGIN INIT INFO
# Provides: emperor
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the uwsgi emperor app server
# Description: starts uwsgi emperor app server using start-stop-daemon
@kradalby
kradalby / gist:078b44efd6e136762571
Created January 20, 2015 16:42
ssh Protocol mismatch
kradalby at kramacbook in ~/git/plays (master)
$ ssh root@abra -W 192.168.1.10:21337 -v
OpenSSH_6.7p1, OpenSSL 1.0.1k 8 Jan 2015
debug1: Reading configuration data /Users/kradalby/.ssh/config
debug1: /Users/kradalby/.ssh/config line 88: Applying options for abra
debug1: Reading configuration data /usr/local/etc/ssh/ssh_config
debug1: Hostname has changed; re-reading configuration
debug1: Reading configuration data /Users/kradalby/.ssh/config
debug1: Reading configuration data /usr/local/etc/ssh/ssh_config
debug1: Connecting to tw.fap.no [89.9.174.120] port 22.
@kradalby
kradalby / gist:1ea8e17d2c0c32dcaa33
Created February 22, 2015 21:07
observium_onyx
server {
listen 80;
listen [::]:80;
server_name observium.kradalby.no;
access_log /var/log/nginx/observium.access.log;
error_log /var/log/nginx/observium.error.log;
root /opt/observium/html;
@kradalby
kradalby / keybase.md
Created October 23, 2017 14:29
keybase.md

Keybase proof

I hereby claim:

  • I am kradalby on github.
  • I am kradalby (https://keybase.io/kradalby) on keybase.
  • I have a public key ASA4nMgD3tcZtJ-69WtffUCLMhbYxdHXEIWlU3kGRwoRcgo

To claim this, I am signing this object:

@kradalby
kradalby / ssh.ps1
Last active May 2, 2020 19:46
Install SSH on Windows
# Run with:
# iex ((New-Object System.Net.WebClient).DownloadString('URL'))
# Install the OpenSSH Client
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
# Install the OpenSSH Server
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Start-Service sshd
@kradalby
kradalby / photos_exporter.py
Created August 3, 2020 19:05
Export Photos from Photos.app
""" Export all photos to specified directory using album names as folders
If file has been edited, also export the edited version,
otherwise, export the original version
This will result in duplicate photos if photo is in more than album """
import os.path
import pathlib
import sys
from click import echo as print
@kradalby
kradalby / output.log
Created August 29, 2020 07:22
importing vSphere virtual machine with SATA
2020/08/29 08:21:32 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2020/08/29 08:21:33 [INFO] Terraform version: 0.13.1
2020/08/29 08:21:33 [INFO] Go runtime version: go1.14.7
2020/08/29 08:21:33 [INFO] CLI args: []string{"/usr/local/bin/terraform", "import", "vsphere_virtual_machine.vmac_terra", "/terra/vm/vmac"}
2020/08/29 08:21:33 [DEBUG] Attempting to open CLI config file: /Users/kradalby/.terraformrc
2020/08/29 08:21:33 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/08/29 08:21:33 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
@kradalby
kradalby / debug.log
Created March 12, 2021 09:12
terraform-provider-kubernetes-alpha v0.3.1 PrometheusRule CRD
2021/03/12 09:11:18 [WARN] Log levels other than TRACE are currently unreliable, and are supported only for backward compatibility.
Use TF_LOG=TRACE to see Terraform's internal logs.
----
2021/03/12 09:11:18 [INFO] Terraform version: 0.14.8
2021/03/12 09:11:18 [INFO] Go runtime version: go1.16
2021/03/12 09:11:18 [INFO] CLI args: []string{"/usr/local/bin/terraform", "plan"}
2021/03/12 09:11:18 [DEBUG] Attempting to open CLI config file: /Users/kradalby/.terraformrc
2021/03/12 09:11:18 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2021/03/12 09:11:18 [DEBUG] checking for credentials in "/Users/kradalby/.terraform.d/plugins"
@kradalby
kradalby / crash.log
Created March 18, 2021 13:53
v0.3.1 panic
This file has been truncated, but you can view the full file.
2021/03/18 13:49:15 [INFO] Terraform version: 0.14.8
2021/03/18 13:49:15 [INFO] Go runtime version: go1.16
2021/03/18 13:49:15 [INFO] CLI args: []string{"/usr/local/bin/terraform", "apply"}
2021/03/18 13:49:15 [DEBUG] Attempting to open CLI config file: /Users/kradalby/.terraformrc
2021/03/18 13:49:15 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2021/03/18 13:49:15 [DEBUG] checking for credentials in "/Users/kradalby/.terraform.d/plugins"
2021/03/18 13:49:15 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2021/03/18 13:49:15 [DEBUG] will search for provider plugins in /Users/kradalby/.terraform.d/plugins
2021/03/18 13:49:15 [TRACE] getproviders.SearchLocalDirectory: /Users/kradalby/.terraform.d/plugins is a symlink to /Users/kradalby/.terraform.d/plugins
2021/03/18 13:49:15 [TRACE] getproviders.SearchLocalDirectory: found registry.terraform.io/dmacvicar/libvirt v0.6.3 for darwin_amd64 at /Users/kradalby/.terraform.d/plugins/registry.terraform.io/dmacvicar/libvirt/0.
@kradalby
kradalby / alerts.yaml
Created March 24, 2021 20:09
Prometheus rules for v0.3.2 terraform provider
groups:
- name: alertmanager.rules
rules:
- alert: AlertmanagerFailedReload
annotations:
description: Configuration has failed to load for {{$labels.instance}}.
runbook_url: https://github.com/thanos-io/thanos/tree/main/mixin/runbook.md#alert-name-alertmanagerfailedreload
summary: Reloading an Alertmanager configuration has failed.
expr: |
# Without max_over_time, failed scrapes could create false negatives, see