Skip to content

Instantly share code, notes, and snippets.

Avatar

Doug Logue douglogue

View GitHub Profile
View Blockstack
Verifying my Blockstack ID is secured with the address 1BUnQCnvJX6MQteB4JXq8rmcpFTj7TJtCX https://explorer.blockstack.org/address/1BUnQCnvJX6MQteB4JXq8rmcpFTj7TJtCX
View jquery-cdn.js
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
View jquery-vs.javascript-example-2.js
var d = document.getElementsByClassName("goodbye");
var i;
for (i = 0; i < d.length; i++) {
d[i].className = d[i].className + " selected";
}
View jquery-vs.javascript-example.js
$(".goodbye").addClass( "selected" );
View ruby-each-vs-map-8.rb
[
"I love pepperoni pizza!",
"I love mushroom pizza!",
"I love bacon pizza!",
"I love pineapple pizza!"
]
View ruby-each-vs-map-7.rb
def pizza(toppings)
pizza.map do |topping|
"I love #{topping} pizza!"
end
end
View ruby-each-vs-map-5.rb
I love pepperoni pizza!
I love mushroom pizza!
I love bacon pizza!
I love pineapple pizza!
View ruby-each-vs-map-4.rb
toppings = %w(pepperoni mushroom bacon pineapple)
def pizza(toppings)
pizza.map do |topping|
puts "I love #{topping} pizza!"
end
end
View ruby-each-vs-map-4.rb
[
"I love pepperoni pizza!",
"I love mushroom pizza!",
"I love bacon pizza!",
"I love pineapple pizza!"
]