Skip to content

Instantly share code, notes, and snippets.

@RainerAtSpirit
RainerAtSpirit / JekyllApps.js
Created July 9, 2012 12:18
Adding AngularJS search in Jekyll blog
/**
* Setup Module with `highlight` filter
*/
var JekyllApp = angular.module('JekyllApp', [], function ($routeProvider, $locationProvider) {
$locationProvider.html5Mode(false);
});
JekyllApp.filter('highlight', function () {
return function (text, filter) {
@jarib
jarib / gist:1218879
Created September 15, 2011 09:16
SVG with watir-webdriver
require 'watir-webdriver'
browser = Watir::Browser.new :firefox
begin
browser.goto "data:text/html;content-type=utf-8,#{URI.escape DATA.read}"
rect = browser.element(:tag_name => "rect")
p :x => rect.attribute_value(:x), :y => rect.attribute_value(:y)
ensure