Skip to content

Instantly share code, notes, and snippets.

@gilliek
gilliek / html_parser.go
Created May 26, 2014 11:30
HTML parser example based on the Go XML package. To keep things simple, it only unserializes the <head> node.
// "THE BEER-WARE LICENSE" (Revision 42):
// <[email protected]> wrote this file. As long as you retain
// this notice you can do whatever you want with this stuff. If we meet some
// day, and you think this stuff is worth it, you can buy me a beer in return
// Kevin Gillieron
package main
import (
"encoding/xml"
@gilliek
gilliek / jquery-plugin-template.js
Created May 1, 2014 10:45
Just a basic template for jQuery plugins.
/* ========================================================================
* jQuery Plugin Template: <+FILENAME+>.js v<+MAJOR+>.<+MINOR+>.<+PATH+>
* ========================================================================
* Copyright <+YEAR+> <+AUTHOR+>
* Licensed under <+LICENSE+>
* (<+LICENSE_URL+>)
* ======================================================================== */
(function($) {
$.jQueryPluginTemplate = function(element, options) {
@gilliek
gilliek / ghmd.go
Last active August 29, 2015 14:00
Go CLI tool that renders GitHub Markdown files using the GitHub API.
// "THE BEER-WARE LICENSE" (Revision 42):
// <[email protected]> wrote this file. As long as you retain
// this notice you can do whatever you want with this stuff. If we meet some
// day, and you think this stuff is worth it, you can buy me a beer in return
// Kevin Gillieron
package main
import (
"bytes"
@gilliek
gilliek / lay2act.rb
Last active August 29, 2015 13:58
Simple (and not very robust) script that maps the View items of an Android activity layout to an Activity class.
#!/usr/bin/env ruby
=begin
_ ____ _
| | __ _ _ _|___ \ __ _ ___| |_
| |/ _` | | | | __) / _` |/ __| __|
| | (_| | |_| |/ __/ (_| | (__| |_
|_|\__,_|\__, |_____\__,_|\___|\__|
|___/
lay2act aims to be a very simple (and not very robust) script that maps the View