This is a Ruby codeblock

    def fav_foods
    food_array = []	# code for this method goes in here, instead of brackets you can also use array.new to make a new empty array
    3.times do
    puts "Name a favorite food."
    food_array << gets.chomp
    food _array.each do food
    puts "I like #{food} too"
    end

    p food_array
    puts "Your favorite foods are #{food_array.join(", ")}."
    end

    fav_foods

This is a Python codeblock

    class A(object):
    def __init__(self):
    self.foo = 'foofoo'

    def print_foo(self):
    print self.foo

    pf = A().print_foo
    pf()

    # output: foofoo

This is a Javascript codeblock

    function move_to_block(block, control) {
    var $block = $(block),
    $control = $(control);

    $control.on('click', function () {
    var $block_pos = $block.offset();

    $('body,html').animate({
    scrollTop: $block_pos.top - 80
    }, 800);
    return false;
    })
    }

Here is the Github gist if anyone feels like using on their own site.