Skip to content

Instantly share code, notes, and snippets.

// For this, I have a bunch of playlists that contain videos
playlists = [
{
id: 1
name: "Some playlist",
videos: [
{
id: 1,
Scenario: Viewing recipes
Given I the following users exist:
| Username |
| Donna |
| Ken |
When I go to the home page
Then I should see recipes by user Donna
And I should see recipes by user Ken
<h2>
<%= @page_heading %>
<%= yield :heading %>
</h2>
var sys = require('sys');
var http = require('http');
var time = (new Date).getTime();
var ep = http.createClient(80, "localhost");
http.createServer(function(ureq, ures) {
var request = ep.request('get', '/help/', {'host': "localhost"});
request.addListener('response', function(resp) {
var body = "";
# I'm working on a gem locally in /Users/kyle/viddler/riddler, which has the
# following Gemfile:
source "http://rubygems.org"
gem "httparty"
group :test do
gem "rspec"
gem "ZenTest"
module Viddler
class Request
private
def parse_response(raw_response)
raise EmptyResponseError if raw_response.blank?
response_hash = Hash.from_xml(raw_response.to_s)
if response_error = response_hash['error']
raise ResponseError.new(viddler_error_message(response_error))
end
response_hash
require 'rubygems'
require 'activesupport'
require 'viddler'
@viddler = Viddler::Base.new('kw6iwwfj1gyo12n3ajgg','kyledevtest','K792n89L')
@viddler_video = @viddler.find_video_by_id('d7d7da7c')
puts @viddler_video.title
$(document).ready(function(){
// All links with class delete
$('.delete').click(function(event){
// This should work--if cancel is pressed, it returns false, canceling
// the click. I haven't tested it out myself, though.
return confirm("Are you sure you want to delete this item?");
});
});
require 'rubygems'
require 'httparty'
FEED_URL = 'http://cdevroe.com/category/mobile-photos/feed/'
CACHE_FILE = './rss2twitter.cache'
TWITTER_USER = 'user'
TWITTER_PASS = 'pass'
TIMEOUT = 12*60*60 # 12 hours in seconds
class WP; include HTTParty; format :xml; end
# Pretty sure you can't do a range of numbers like ([01-31])
# Instead, you'll have to do ([0-3]?[0-9]):
# I also condensed the separate years into one rule
#RewriteEngine On
#RedirectMatch 301 /(2006|2007|2008|2009)/([0-1]?[0-9])/([0-3]?[0-9]))/(.*)$ http://old.bleikamp.com/$1/$2/$3/$4
#Ok, here's an updated one:
RewriteEngine On