Skip to content

Instantly share code, notes, and snippets.

Dominic Cleal domcleal

Block or report user

Report or block domcleal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@domcleal
domcleal / README.md
Last active May 8, 2017
Resolve simple git merge/rebase conflicts
View README.md

Setup

  1. git clone https://gist.github.com/abef31ca104ecffa2d99fb904aadcf59.git git-merging
  2. cd git-merging

Merging

Merge the change-value branch into master, to bring in the change of value:

  1. git merge origin/change-value will fail with "Automatic merge failed; fix
View nslcd.aug
module Nslcd =
let eol = Util.eol
let map_names = /passwd/
let key_name = /[^ #\n\t\/][^ #\n\t\/]+/
let spc = del /[ \t]+/ " "
let map_entry =
[ key /map/ . spc . [ key map_names . spc . [ key key_name . spc . store Rx.no_spaces] ] .eol ]+
@domcleal
domcleal / .gitignore
Last active Apr 20, 2017
Copy part of an Augeas XML tree into another file
View -
diff --git a/spec/fixtures/modules/relationships/manifests/titles.pp b/spec/fixtures/modules/relationships/manifests/titles.pp
index 5342aab..3951b88 100644
--- a/spec/fixtures/modules/relationships/manifests/titles.pp
+++ b/spec/fixtures/modules/relationships/manifests/titles.pp
@@ -8,4 +8,11 @@ class relationships::titles {
ensure => running,
name => "svc-name",
}
+
+ exec { 'foo_bar_1':
View move_types_to_parameters.rb
fail("Usage: move_types_to_parameters.rb MANIFEST_PP CLASS_NAME") if ARGV.length != 2
original_params = File.read(ARGV[0]).lines.map do |line|
$1 if line =~ /\A \$(\w+)\s+=.*,$/
end.compact
require 'kafo_parsers/puppet_strings_module_parser'
hash = KafoParsers::PuppetStringsModuleParser.parse(ARGV.first)
original_params.each do |param|
View locale.log
make: Entering directory '/home/dcleal/code/foreman/hammer_cli_foreman_bootdisk/locale'
bundle exec rake gettext:find
(in /home/dcleal/code/foreman/hammer_cli_foreman_bootdisk)
rm -f /home/dcleal/code/foreman/hammer_cli_foreman_bootdisk/lib/hammer_cli_foreman_bootdisk/../../locale/en_GB/hammer_cli_foreman_bootdisk.edit.po
cp /home/dcleal/code/foreman/hammer_cli_foreman_bootdisk/lib/hammer_cli_foreman_bootdisk/../../locale/en_GB/hammer_cli_foreman_bootdisk.po /home/dcleal/code/foreman/hammer_cli_foreman_bootdisk/lib/hammer_cli_foreman_bootdisk/../../locale/en_GB/hammer_cli_foreman_bootdisk.edit.po
touch /home/dcleal/code/foreman/hammer_cli_foreman_bootdisk/lib/hammer_cli_foreman_bootdisk/../../locale/en_GB/hammer_cli_foreman_bootdisk.po.time_stamp
rm -f /home/dcleal/code/foreman/hammer_cli_foreman_bootdisk/lib/hammer_cli_foreman_bootdisk/../../locale/ru/hammer_cli_foreman_bootdisk.edit.po
cp /home/dcleal/code/foreman/hammer_cli_foreman_bootdisk/lib/hammer_cli_foreman_bootdisk/../../locale/ru/hammer_cli_foreman
View case_spec.rb
require 'spec_helper'
PuppetLint.new_check(:case_spec) do
def check
resource_indexes.each do |resource|
notify :error,
message: 'No resources should be in the manifest',
line: resource[:tokens][0].line,
column: resource[:tokens][0].column,
token: resource[:tokens][0]
View catch_parseerror.rb
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
gem "rails", github: "rails/rails"
View catch_parseerror.rb
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
gem "rails", github: "rails/rails"
View parameters_each.rb
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
gem "rails", github: "rails/rails"
You can’t perform that action at this time.