This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
'''Basic XSLT previewer''' | |
__author__ = 'Ryan Blunden' | |
__copyright__ = 'Copyright 2010, Ryan Blunden' | |
__license__ = 'GPL' | |
__email__ = '[email protected]' | |
__status__ = 'Development' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* HandleBars remote template loader | |
* | |
* Allows for direct insertion into dom if jQuery selector string is passed (el). | |
* Returns $.ajax promise regardless so code can attach callbacks externally. | |
* | |
* @example | |
* // Direct insertion into dom | |
* Handlebars.renderFromRemote('/media/templates/hello.handlebars', { name: 'Ryan' }, '#content'); | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
/** | |
* Create a random password of variable length and copy it to the clipboard | |
* Usage: 'random_password 4' produces a 4 character password | |
*/ | |
var pass = ''; | |
while(pass.length < process.argv[2]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Experimenting with no frills BDD to write a simple addClass method | |
*/ | |
function TestSuite(name, setup, teardown) { | |
var leftPadding = 60; | |
this.name = name || ''; | |
this.tests = []; | |
this.setup = setup || function() {}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=Edge;chrome=1" > | |
<title>Slide Up using CSS3 Transitions</title> | |
<meta name="generator" content="TextMate http://macromates.com/"> | |
<meta name="author" content="Ryan Blunden"> | |
<style type="text/css"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Timer for Rhino, original functions from http://stackoverflow.com/questions/2261705/how-to-run-a-javascript-function-asynchronously-without-using-settimeout#answer-5767884 | |
* written by Weston C. | |
* Packaged by Ryan Blunden | |
*/ | |
(function () { | |
var root = this, // global context | |
timer = new java.util.Timer(), | |
counter = 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Valgrind install - inspired by http://c.learncodethehardway.org/book/learn-c-the-hard-waych5.html | |
# Ryan Blunden, 2012 | |
# Update as Valgrind is updated | |
version="3.7.0" | |
verified_checksum="a855fda56edf05614f099dca316d1775" | |
# 1) Change into tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Upgrade pip, virtualenv, virtualenvwrapper to the latest versions for the current version of python | |
# Ryan Blunden | |
site_packages=`python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())"` | |
sudo rm -fr $site_packages/pip-* | |
sudo rm -fr $site_packages/virtualenv-* | |
sudo rm -fr $site_packages/virtualenvwrapper-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
'''Transform a Blinksale XML document into list of invoices in CSV format''' | |
__author__ = 'Ryan Blunden' | |
__copyright__ = 'Copyright 2012, Ryan Blunden' | |
__license__ = 'GPL' | |
import sys | |
import csv |
OlderNewer