Skip to content

Instantly share code, notes, and snippets.

@ward
ward / google-plus-one-bookmarklet.js
Created November 26, 2011 21:01
Google +1 Bookmarklet
(function() {
var a,b;
a=document.createElement('script');
a.type='text/javascript';
a.async=true;
a.src='https://apis.google.com/js/plusone.js';
b=document.createElement('div');
b.id='ward_plusone';
b.style.position='fixed';
b.style.top='10px';
Detail top: H 0 - S 7 - L 41
Background top: H 0 - S 0 - L 0
Detail bottom: H 0 - S 7 - L 41
Background bottom: H 12 - S 7 - L 83
@ward
ward / cursify
Created September 29, 2011 19:48
[Not mine] Takes ASCII from stdin, shows it in fancy mathematical symbols
#!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
#
# Copyright (c) 2010, Jonas Häggqvist <rasher@rasher.dk>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# Counts lines from all files in this directory and below it
# Ignores hidden files (to make it include hidden files, change
# the * wildcard to a .
line_ctr=0; for file in `find * -type f`; do echo $file `cat $file | wc -l`; line_ctr=$line_ctr+`cat $file | wc -l`; done; echo $((line_ctr))