Skip to content

Instantly share code, notes, and snippets.

@troyready
troyready / README.md
Created April 14, 2021 16:25
Sway/Wayland Blockers

The following are my notes on todos/blockers before moving from X11->Wayland (possibly sway):

@troyready
troyready / podman.patch
Last active March 9, 2021 00:06
podman patches for debian bullseye (f4ece018 for images_push & #9589 for login)
diff -Naur libpod-3.0.1+dfsg1/pkg/api/handlers/compat/auth.go libpod-3.0.1+dfsg1-patched/pkg/api/handlers/compat/auth.go
--- libpod-3.0.1+dfsg1/pkg/api/handlers/compat/auth.go 1969-12-31 16:00:00.000000000 -0800
+++ libpod-3.0.1+dfsg1-patched/pkg/api/handlers/compat/auth.go 2021-03-08 15:59:36.566483940 -0800
@@ -0,0 +1,51 @@
+package compat
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
diff -ru evolution-3.38.3/src/calendar/gui/e-comp-editor.c evolution-3.38.3-patched/src/calendar/gui/e-comp-editor.c
--- evolution-3.38.3/src/calendar/gui/e-comp-editor.c 2021-01-08 02:49:31.000000000 -0800
+++ evolution-3.38.3-patched/src/calendar/gui/e-comp-editor.c 2021-02-23 17:39:13.623163055 -0800
@@ -968,6 +968,9 @@
gboolean close_after_save)
{
EActivity *activity;
+ ECalComponent *comp;
+ EShell *shell;
+ ESourceRegistry *registry;
@troyready
troyready / README.md
Created September 9, 2020 00:40
Runway module using locally stored lookups to get the current lambda function s3 key

Overview

.
├── dev-us-east-1.env
├── local_lookups
│   ├── awslambda.py
│   └── __init__.py
├── my_function
│   ├── index.py
@troyready
troyready / create_aws_lambda_function.sh
Created August 5, 2020 23:08
Creating Test AWS Lambda via awscli
#!/bin/bash
mkdir lambdatest && cd lambdatest
pip3 install elasticsearch requests_aws4auth -t ./
touch __init__.py
touch packages/__init__.py
cat << EOF > lambdatest.py
from packages.elasticsearch import Elasticsearch, RequestsHttpConnection
from packages.requests_aws4auth import AWS4Auth
---
driver:
name: ec2
instance_type: m3.medium
spot_price: "0.05"
provisioner:
name: chef_zero
platforms:
@troyready
troyready / kitchen.log
Created October 1, 2015 23:07
windows 7 powershellv2 test-kitchen file upload failure stacktrace
I, [2015-09-29T11:43:35.284721 #7051] INFO -- Kitchen: -----> Starting Kitchen (v1.4.2)
I, [2015-09-29T11:43:36.569206 #7051] INFO -- Kitchen: -----> Creating <winsrvr-windows7>...
I, [2015-09-29T11:51:46.488762 #7051] INFO -- Kitchen: -----> Converging <winsrvr-windows7>...
E, [2015-09-29T11:54:41.999419 #7051] ERROR -- Kitchen: ------Exception-------
E, [2015-09-29T11:54:41.999453 #7051] ERROR -- Kitchen: Class: Kitchen::ActionFailed
E, [2015-09-29T11:54:41.999472 #7051] ERROR -- Kitchen: Message: Failed to complete #converge action: [[WinRM::Transport::FileTransporter] Upload failed (exitcode: 2147943401)
]
E, [2015-09-29T11:54:41.999489 #7051] ERROR -- Kitchen: ---Nested Exception---
E, [2015-09-29T11:54:41.999512 #7051] ERROR -- Kitchen: Class: WinRM::Transport::FileTransporterFailed
E, [2015-09-29T11:54:41.999535 #7051] ERROR -- Kitchen: Message: [WinRM::Transport::FileTransporter] Upload failed (exitcode: 2147943401)
@troyready
troyready / snap_all_nimble_vols.rb
Last active August 29, 2015 14:18
Script to snapshot (or purge) snapshots for all Nimble storage volumes
#!/bin/env ruby
require 'net/http'
if ARGV[0].nil?
puts 'Nimble hostname required, e.g.:'
puts 'snap_all_nimble_vols mysan.local'
puts ''
fail
else
@troyready
troyready / gist:8481b641d98ec37f9efb
Created March 24, 2015 21:53
chef-client 12.1 rbenv gem chef client recipe
include_recipe 'ruby_build'
include_recipe 'rbenv::user_install'
# Setup rbenv for app owner
git_url = node['rbenv']['git_url']
git_ref = node['rbenv']['git_ref']
home_dir = "/home/#{params[:owner]}"
rbenv_prefix = ::File.join(home_dir, '.rbenv')
install_or_upgrade_rbenv :rbenv_prefix => rbenv_prefix,
:home_dir => home_dir,
@troyready
troyready / gist:b732eb4835f53f528dea
Created March 24, 2015 21:51
chef-client 12.1 rbenv gem chef client stacktrace
Generated at 2015-03-24 21:43:45 +0000
Chef::Exceptions::ValidationFailed: rbenv_gem[2.1.4::bundler (roz)] (roz) (apps-deployment::roz line 75) had an error: Chef::Exceptions::ValidationFailed: Option name must be a kind of String! You passed <rbenv_gem[2.1.4::bundler (roz)] (roz) @name: "bundler (roz)" @noop: nil @before: nil @params: {:app_source=>"https://github.com/biola/roz.git", :app_rev=>"37d3038a9c7bb715df2809bb85493cbdc51156c0", :app_name=>"roz", :app_dir=>"/srv/rack/roz", :owner=>"roz", :ruby_ver=>"2.1.4", :name=>"https://github.com/biola/roz.git"} @provider: Chef::Provider::Package::RbenvRubygems @allowed_actions: [:nothing, :install, :upgrade, :remove, :purge] @action: :install @updated: false @updated_by_last_action: false @supports: {} @ignore_failure: false @retries: 0 @retry_delay: 2 @source_line: "/tmp/kitchen/cache/cookbooks/blitzkrieg/definitions/app.rb:75:in `block (2 levels) in from_file'" @guard_interpreter: nil @default_guard_interpreter: :default @elapsed_time: 0 @sensitive: false @re