Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

101 to using Time in Ruby

// 101 to using Time in Ruby
Buy Iv lasix in Mesa. Lasix online consultation overnight. Buy Lasix for canine onlin Buy Propranolol 20mg online cheap. Buy cheap cod online Propranolol. Propranolol buy
#Find out the Current Time
t = Time.now

#Find out the Month, Day, or Year individually
puts t.mon.to_s + "/" + t.day.to_s + "/" + t.year.to_s

#Find out the UTC
puts t.utc

###########################
#User Formatted Characters
###########################
#the String For Time function allows you to mix text with data
puts t.strftime("The Document print data is %m/%d/%Y")

#Another way to Display the Month Day, Year
puts t.strftime("%b %d, %Y")

Buy cheap cod online Lexapro 20. Cheape Lexapro online. Buy Lexapro prescriptions. Buy Periactin cyproheptadine no visa. Purchasing Periactin for migraines quick delive

Get Taxonomy Terms for a Vocabulary

// Get Taxonomy Terms for a Vocabulary
Lipitor niacin buy in UK. Pfizer lipitor no script overnight. Buy Drug lipitor in Hou Buy Nexium coupons mail order. Buy cheapest Esomeprazole nexium. Buy Nexium cost mast
<?php if (count($taxonomy)): ?>
<?php 
$terms = taxonomy_node_get_terms_by_vocabulary($node->nid, 1);
foreach ($terms as $term) {
  $tags[] = l($term->name, taxonomy_term_path($term));
	}
if ($tags){
 print t("Professional Areas") . ": " . implode(' | ', $tags);
} ?>
<br />
<?php
$terms = taxonomy_node_get_terms_by_vocabulary($node->nid, 2);
foreach ($terms as $term) {
  $tagsTwo[] = l($term->name, taxonomy_term_path($term));
	}
	if ($tagsTwo){
 print t("Focus Areas") . ": " . implode(' | ', $tagsTwo);
}?>
<?php endif; ?>

Next day Orlistat xenical. No script Xenical 120 roche. Xenical 120 roche without pre Collect on delivery Antabuse no rx. Online overnight shipping Antabuse. Side effects

Converting an array into YAML, Loading YAML into an array

// Converting an array into YAML, Loading YAML into an array
Order Ventolin inhaler salbutamol online. Ventolin inhalers 3 days delivery. Buy no p No prescripton Bactrim for strep. Who can prescribe Bactrim for strep online. Bactrim
#A. Import the YAML Library
require 'yaml'
#B. Create an array
names = %w[chris sandy josie billy suzie]

#Example 1 : Converting an array into YAML using: to_yaml
yaml_example1 = names.to_yaml
puts yaml_example1

#Example 2: Converting an array into YAML using: dump()
yaml_example2 = YAML::dump(names)
puts yaml_example2

#Example 3: Loading YAML back into an array using: load()
array_example = YAML::load(yamloutput2)
puts array_example

Order Zovirax topical cod overnight delivery. Best buy bestbuy drugs Zovirax 400 mg. Buy Levaquin 500mg no prescription cod. Buy Levaquin cash on delivery. Buy Levaquin c