Curl Examples
# with basic auth
curl -v -X GET --basic -u username:password "http://www.domainname.com"
# with cookie support
# -b and -c allow cookies to be written to a file and then presented on next request
# -L allows for following, ie if a 302 is sent, this makes another request to address in the redirect
curl -v -X GET --basic -u username:password "http://www.domainname.com" -b cookies.txt -c cookies.txt -L
# loop through all of humanity
humanity.each do |human|
# select out a set of presents for this human
presents = santas_bag.select do |gift|
good_enough = list.is_good_enough_for_this_gift?(human, gift)
if (!good_enough) # better check twice
good_enough = list.is_good_enough_for_this_gift?(human, gift)
return good_enough
end
santa.leave presents
end
:%s/searchterm/replaceterm/g
eg.
Search for the word "today" within the whole file and replace all occurrences of it with "tomorrow".
:%s/today/tomorrow/g