Skip to content

Instantly share code, notes, and snippets.

View file_sync.rb
# frozen_string_literal: true
require 'bolt/error'
# Quick and dirty implementation of a file sync (instead of simple file upload) using rsync under the hood for puppet bolt.
# Use it the same was as file_upload, ex. sync_file("profiles/lb01/", "/etc/keepalived/", ["lb01-1", "lb01-2"]).
# Most of the code is just copied from the original upload_file method and adjusted as needed.
# This function does nothing if the list of targets is empty.
# > **Note:** Not available in apply block
gucki / .irbrc
Created Sep 11, 2013
irb history per rails project
View .irbrc
# ~/.irbrc
require 'irb/completion'
require 'irb/ext/save-history'
IRB.conf[:SAVE_HISTORY] = 1000
if defined?(::Rails)
IRB.conf[:HISTORY_FILE] = File.join(ENV['PWD'], '.irb-history')