Add something to the end of a line
1,$ s/$/",/g
Add something to the start of a line
1,$ s/^/"/g
Turn on/off line numbers
Add something to the end of a line
1,$ s/$/",/g
Add something to the start of a line
1,$ s/^/"/g
Turn on/off line numbers
!#/usr/env ruby | |
require 'json' | |
require 'uri' | |
# Removes repeated USER records from one of the AMQP queues. | |
# | |
# USAGE: ruby queue_fix.rb "queue_name" "email_address" | |
# | |
# This will dump the whole queue to a temp file. (In case anything goes wrong) | |
# it will strip out the user messages containing the email provided then |
def user_with_highest_kilometers | |
highest = User.new | |
users.each do |user| | |
highest = user if user_distance_sum(user) > user_distance_sum(highest) | |
end | |
highest | |
end | |
def user_with_highest_ascent | |
highest = User.new |
https://github.com/everydayhero/mycharity
git clone https://github.com/everydayhero/mycharity.git
Create fullname.txt and add "justin hennessy" to it
To see the changes that have been made from the last commit
Introducing Hiera!
Hiera allows us to define data structures that can then be accessed in a class and passed to a template.
This PR shows how it can be used to pass in different URLs for apache rewrites dependant on the environments domain.
Hiera's main config lives in /etc/puppet/hiera.yaml
---
heira.yaml
---
:backends:
- yaml
:yaml:
:datadir: '/etc/puppet/hieradata'
:hierarchy: