Skip to content

Instantly share code, notes, and snippets.

View mcrmonkey's full-sized avatar

ant Kenworthy mcrmonkey

  • Manchester, UK
  • 02:18 (UTC +01:00)
View GitHub Profile
@mcrmonkey
mcrmonkey / TF-DEBUG.log
Created June 26, 2020 20:19
tf-debug - google_appengineflex
2020/06/26 21:01:21 [INFO] Terraform version: 0.12.24
2020/06/26 21:01:21 [INFO] Go runtime version: go1.12.13
2020/06/26 21:01:21 [INFO] CLI args: []string{"/usr/bin/terraform_0.12.24", "apply"}
2020/06/26 21:01:21 [DEBUG] Attempting to open CLI config file: /home/USER/.terraformrc
2020/06/26 21:01:21 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/06/26 21:01:21 [INFO] CLI command args: []string{"apply"}
2020/06/26 21:01:21 [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/06/26 21:01:21 [DEBUG] New state was assigned lineage "9e8377ac-35da-d11c-31b5-6369f6f49407"
@mcrmonkey
mcrmonkey / usbreset.c
Created April 25, 2020 13:32
reset usb device
/* usbreset -- send a USB port reset to a USB device */
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <linux/usbdevice_fs.h>
@mcrmonkey
mcrmonkey / get-mail.pl
Last active April 25, 2020 13:12
perl script to login to a popbox and do stuff for mail from certain places
#!/usr/bin/perl
use Net::POP3;
use strict;
my %pop3 = (
"Usrname" => '',
"Passwd" => '',
#### Diagnostics:
@mcrmonkey
mcrmonkey / Apply
Created January 23, 2020 20:39
TF-gitlab_user
2020/01/23 20:31:34 [INFO] Terraform version: 0.12.20
2020/01/23 20:31:34 [INFO] Go runtime version: go1.12.13
2020/01/23 20:31:34 [INFO] CLI args: []string{"/usr/bin/terraform_0.12.20", "apply", "./terraform.plan"}
2020/01/23 20:31:34 [INFO] CLI command args: []string{"apply", "./terraform.plan"}
2020/01/23 20:31:34 [DEBUG] checking for provider in "."
2020/01/23 20:31:34 [DEBUG] checking for provider in "/usr/bin"
2020/01/23 20:31:34 [DEBUG] checking for provider in ".terraform/plugins/linux_amd64"
2020/01/23 20:31:34 [DEBUG] found provider "terraform-provider-gitlab_v2.5.0_x4"
2020/01/23 20:31:34 [DEBUG] found valid plugin: "gitlab", "2.5.0", "HIDDENPATHdebug/.terraform/plugins/linux_amd64/terraform-provider-gitlab_v2.5.0_x4"
2020/01/23 20:31:34 [DEBUG] checking for provisioner in "."
@mcrmonkey
mcrmonkey / service.target
Created October 27, 2019 01:08
systemd timer
[Unit]
Description=Description of service target
#Documentation=man:apt(8)
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
ExecStart=/path/to/thing
@mcrmonkey
mcrmonkey / user.js
Created March 30, 2018 15:09
Collected firefox settings
network.dns.disablePrefetch - set to true
network.prefetch-next - set to false
network.http.speculative-parallel-limit - set to 0
dom.battery.enabled - set to false
geo.enabled - set to false
keyword.enabled - set to false
network.allow-experiments - set to false
pdf.js.disabled - set to true
toolkit.telemetry.server - MANGLE
experiments.manifest.uri - MANGLE
#!/bin/bash
gsettings set org.gnome.desktop.screensaver user-switch-enabled 'false'
gsettings set org.gnome.desktop.screensaver show-full-name-in-top-bar 'false'
gsettings set org.gnome.desktop.search-providers disable-external 'true'
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-1 "['<Shift><Super>exclam']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-2 "['<Shift><Super>quotedbl']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-3 "['<Shift><Super>sterling']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-4 "['<Shift><Super>dollar']"
#!/usr/bin/python2
## from https://raw.githubusercontent.com/carlasouza/.i3/master/.i3/i3blocks/spotify
# All credits to http://blog.abhijeetr.com/2012/02/spotify-changing-and-displaying-song.html
import dbus
bus = dbus.SessionBus()
player = bus.get_object('com.spotify.qt', '/')
iface = dbus.Interface(player, 'org.freedesktop.MediaPlayer2')
info = iface.GetMetadata()
# OUT: [dbus.String(u'xesam:album'), dbus.String(u'xesam:title'), dbus.String(u'xesam:trackNumber'), dbus.String(u'xesam:artist'), dbus.String(u'xesam:discNumber'), dbus.String(u'mpris:trackid'), dbus.String(u'mpris:length'), dbus.String(u'mpris:artUrl'), dbus.String(u'xesam:autoRating'), dbus.String(u'xesam:contentCreated'), dbus.String(u'xesam:url')]
gsettings set org.gnome.desktop.interface scaling-factor 1
[Desktop Entry]
Name=Firefox
Comment=Firefox Browser
GenericName=firefox
Exec=/usr/local/firefox/firefox
Icon=/usr/local/firefox/browser/icons/mozicon128.png
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Network;WebBrowsing;
#Categories=GNOME;GTK;Network;EMail;