Skip to content

Instantly share code, notes, and snippets.

@pkrusche
pkrusche / jquery.staticsearch.js
Last active Dec 11, 2015
Static site search using RSS in JQuery
View jquery.staticsearch.js
// Static site search using the RSS feed.
//
// Inspired by
// http://joevennix.com/2011/05/25/How-I-Implement-Static-Site-Search.html
//
// Extended to do match scoring by Peter Krusche
(function( $ ){
function htmlEscape(s) {
return $('<div/>').text(s).html();
@pkrusche
pkrusche / compile.sh
Last active Dec 16, 2015
A generic factory in C++
View compile.sh
#!/bin/bash
CC=g++
${CC} -o if_test main.cpp interface.cpp interface_impl_1.cpp interface_impl_2.cpp
@pkrusche
pkrusche / versioning.py
Created Nov 8, 2013
Git version in Python
View versioning.py
#!/usr/bin/env python
""" Git Versioning Script
Will transform stdin to expand some keywords with git version/author/date information.
Specify --clean to remove this information before commit.
Setup:
You can’t perform that action at this time.