Skip to content

Instantly share code, notes, and snippets.

View hauntedhost's full-sized avatar
💭
👻

Jules Omlor hauntedhost

💭
👻
View GitHub Profile
@hauntedhost
hauntedhost / raisin.js
Last active December 16, 2015 14:09
wordpress soundclip player for "raisin" the dog
<script type="text/javascript">
jQuery(document).ready(function(){
// soundclip player
<?php
$raisin_id = get_latest_raisin_id();
$mp3_id = get_post_meta($raisin_id, "raisin_mp3_id", true);
$mp3_url = wp_get_attachment_url($mp3_id);
$ogg_id = get_post_meta($raisin_id, "raisin_ogg_id", true);
$ogg_url = wp_get_attachment_url($ogg_id);
@hauntedhost
hauntedhost / fizzbuzz.rb
Last active October 13, 2015 22:28
Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz".
def fizz_buzz(rounds)
1.upto(rounds) do |num|
phrase = { fizz: 3, buzz: 5 }.select { |key, m| (num % m).zero? }.keys.join
puts phrase.empty? ? num : phrase
end
end