Skip to content

Instantly share code, notes, and snippets.

View andrewboni's full-sized avatar

Andrew Boni andrewboni

  • San Francisco, CA
View GitHub Profile
@andrewboni
andrewboni / soundcloud.coffee
Created June 11, 2014 08:00
A Hexo blog plugin for embedding Soundcloud songs.
hexo.extend.tag.register "soundcloud", (args) ->
songUrl = args[0] # Required
type = args[1] or "default" # Optional
soundcloudUrl = "https://w.soundcloud.com/player/?url=#{encodeURIComponent(songUrl)}"
if type is "visual"
options = "visual=true"
else if type is "default"
options = "color=ff5500&show_artwork=true"
else
return "Error: Soundcloud player type option needs to be either <b>visual</b> or <b>default</b>."
@andrewboni
andrewboni / soundcloud.js
Created June 11, 2014 07:59
A Hexo blog plugin for embedding Soundcloud songs.
/**
* Soundcloud tag plugin
*
* Author: Andrew Boni
*
* Syntax:
* {% soundcloud <soundcloud song url> [type of player] %}
*
* Description:
* Embeds Soundcloud songs from a URL. Comes with an option to use the visual player or the default player. Possible

Keybase proof

I hereby claim:

  • I am andrewboni on github.
  • I am boni (https://keybase.io/boni) on keybase.
  • I have a public key whose fingerprint is 0B49 4946 6E72 530F 7ED3 E1E7 1E79 8BD5 2161 06D5

To claim this, I am signing this object:

$('*').hover(
function(e){
$(this).css('border', '1px solid black');
e.preventDefault();
e.stopPropagation();
return false;
},function(e){
$(this).css('border', 'none');
e.preventDefault();
e.stopPropagation();