Skip to content

Instantly share code, notes, and snippets.

@adamruzicka
adamruzicka / prepare.sh
Created September 3, 2017 21:45
Deploy async-ssh onto a fresh satellite 6.3
#!/bin/bash
set -x
function store_repository_state() {
if [ -d '.git' ]; then
report ".git is already present, skipping"
else
report "Saving repository state"
git init
git add .

Keybase proof

I hereby claim:

  • I am adamruzicka on github.
  • I am aruzicka (https://keybase.io/aruzicka) on keybase.
  • I have a public key ASAxRdjMH4mViDTlkC2ppCB5oS8RCTq8Pt2-O7uLRE9WcAo

To claim this, I am signing this object:

#!/bin/bash
PROGNAME="$0"
EXECUTE=0
RAKE_COMMAND="${RAKE_COMMAND:-"forman-rake"}"
function die() {
local code="$1"
local message="$2"
echo "$message" >&2
@adamruzicka
adamruzicka / kickstart.toml
Created August 9, 2018 12:11
Files used for lorax-composer and Satellite 6 integration
name = "rhel-7-server-kickstart"
url = "http://satellite63.internal.lan/pulp/repos/Default_Organization/Library/content/dist/rhel/server/7/7.5/x86_64/kickstart/"
check_gpg = true
system = false
gpgkey_urls = ["file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release"]
check_ssl = true
type = "yum-baseurl"
@adamruzicka
adamruzicka / dynflow-csv
Last active November 7, 2018 07:41 — forked from iNecas/dynflow-csv
#!/usr/bin/env bash
PROGNAME="$(basename "$0")"
WITHOUT_DYNFLOW=0
DB=dynflow-import
DB_USER=postgres
# DB_PASSWORD=
DB_HOST=""
PSQL_FLAGS=""
#!/usr/bin/env ruby
require_relative 'example_helper'
class Stuck < Dynflow::Action
def plan
puts "Getting stuck"
Kernel.exit!
end
;; in dotspacemacs/user-config
(seq visual-fill-column-center-text t)
(add-to-list 'org-journal-mode-hook 'visual-fill-column-mode)
# app/lib/actions/my_action.rb
module Actions
class FailAction < Actions::EntryAction
def run
error! "This is an error"
end
def troubleshooting_info
ForemanTasks::TroubleshootingHelpGenerator::Info.new.tap do |i|
i.add_line _('This task requires special handling.')
From 8f229a0a92ff5e490a1dc30e79477bcfb9a1b6ba Mon Sep 17 00:00:00 2001
From: Adam Ruzicka <aruzicka@redhat.com>
Date: Tue, 9 Apr 2019 16:46:26 +0200
Subject: [PATCH] example
---
lib/smart_proxy_dynflow_core/log.rb | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/lib/smart_proxy_dynflow_core/log.rb b/lib/smart_proxy_dynflow_core/log.rb
diff --git a/lib/smart_proxy_dynflow_core/middleware/keep_current_request_id.rb b/lib/smart_proxy_dynflow_core/middleware/keep_current_request_id.rb
index 887725d..3c59a22 100644
--- a/lib/smart_proxy_dynflow_core/middleware/keep_current_request_id.rb
+++ b/lib/smart_proxy_dynflow_core/middleware/keep_current_request_id.rb
@@ -42,7 +42,7 @@ module Actions
unless (restored_id = action.input[:current_request_id]).nil?
old_id = ::Logging.mdc['request']
if !old_id.nil? && old_id != restored_id
- action.action_logger.warn(_('Changing request id %{request_id} to saved id %{saved_id}') % { :saved_id => restored_id, :request_id => old_id })
+ action.action_logger.warn('Changing request id %{request_id} to saved id %{saved_id}' % { :saved_id => restored_id, :request_id => old_id })