Skip to content

Instantly share code, notes, and snippets.

View keenahn's full-sized avatar
🧙

Keenahn Tiberius Jung keenahn

🧙
View GitHub Profile
@keenahn
keenahn / youtube_iframe.js.coffee
Created July 18, 2012 22:30
Create a youtube iframe using jQuery
jQuery ->
window.youtube_iframe = (video_id, args) ->
default_options = {
width: 853
height: 480
autoplay: 0
rel: 0
class: "youtube-video"
frameborder: "0"
allowfullscreen: true
@keenahn
keenahn / wgets.sh
Created July 8, 2012 06:56
wget a list of files
#!/bin/bash
while read line
do
echo $line
wget $line > /dev/null 2>&1
done < $1
# USAGE: wgets.sh a.txt
# Where a.txt is a list of URLs
# Pretttty simple. TODO: accept redirected input as well
@keenahn
keenahn / rotator_builder.js
Created July 6, 2012 19:23
Simple collection rotator for slideshows, quotes, etc.
(function() {
jQuery(function() {
var looper, rotator_builder;
rotator_builder = function(selector, args) {
var $items, cur, loop_fn, num_items, prev, show_dur, trans_in, trans_in_dur, trans_out, trans_out_dur;
trans_in = args.trans_in || "fadeIn";
trans_out = args.trans_out || "fadeOut";
trans_in_dur = args.trans_in_dur || 1000;
trans_out_dur = args.trans_out_dur || 400;
@keenahn
keenahn / rotator_builder.js.coffee
Created July 6, 2012 19:21
Simple collection rotator for slideshows, quotes
jQuery ->
# rotate items
rotator_builder = (selector, args) ->
trans_in = args.trans_in || "fadeIn"
trans_out = args.trans_out || "fadeOut"
trans_in_dur = args.trans_in_dur || 1000
trans_out_dur = args.trans_out_dur || 400
show_dur = args.show_dur || 7000