Skip to content

Instantly share code, notes, and snippets.

View vool's full-sized avatar

Keith Phelan vool

View GitHub Profile
@vool
vool / radio.xml
Created March 24, 2012 14:05
Radio Stations
<entry type="iradio">
<title>Radio Kerry</title>
<genre>Varied</genre>
<artist></artist>
<album></album>
<location>http://www.radiokerry.ie/RK_MP3HQ1.asx</location>
<play-count>46</play-count>
<last-played>1330551764</last-played>
<bitrate>128</bitrate>
<date>0</date>
//Strip out the generator meta
function remove_generator() {
return '';
}
add_filter('the_generator', 'remove_generator');
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vool
vool / ajaxify-html5.js
Last active December 10, 2015 22:59 — forked from balupton/README.md
// History.js It!
// v1.0.1 - 30 September, 2012
//
// fork of https://gist.github.com/854622 with the scrollto functionality removed
(function(window,undefined){
// Prepare our Variables
var
History = window.History,
@vool
vool / prevent-script-execution.htaccess
Last active December 11, 2015 06:08
.htaccess rules
#########################################
prevent script execution in directory
useful when access permissions and to be lax
IndexIgnore *
Options All -Indexes
# Secure directory by disabling script execution, add any extentions required
AddHandler cgi-script .php .php2 .php3 .php4 .php5 .php6 .php7 .php8 .pl .py .jsp .asp .htm .html .shtml .sh .cgi
<html contenteditable spellcheck="true" id="f" style="font-size:2rem;line-height:1.4;max-width:60rem;margin:0 auto;padding:4rem;"><title>Skratch Pad</title><script>window.onload=function(){var f=document.getElementById('f');f.innerHTML=r(localStorage.f)};onkeyup=function(){localStorage.f=f.innerHTML};function r(f){var e =/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/ig;return f.replace(e,"<a href='$1' style='cursor:pointer' onclick='window.open(this.href);return false'>$1</a>")}</script><style>body{color:#242424; background-color:#fffff2; padding:10px;border-radius:4px;box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.2);} #f{background-color:#eee;}</style>
@vool
vool / handy_js_functions.js
Last active December 19, 2015 21:59
Handy js functions
function map_range(value, low1, high1, low2, high2) {
return low2 + (high2 - low2) * (value - low1) / (high1 - low1);
}
@vool
vool / benday.html
Created October 27, 2013 07:46
A happy birthday message for Ben.
<!DOCTYPE html>
<html>
<head>
<title>Ben Day ?</title>
</head>
<body>
<script>
var b = 4;
var who;
var tday = new Date();
@vool
vool / handy_linux_pdf_cmds.txt
Last active December 28, 2015 05:49
handy linux commands for working with pdf's
# compress a pdf with ghostscript
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/screen -dNOPAUSE -dQUIET -dBATCH -sOutputFile=out.pdf in.pdf
#concatenate docs
pdftk 1.pdf 2.pdf 3.pdf support_docs/TCA_support.pdf cat output out.pdf
@vool
vool / coisceim
Last active January 6, 2017 22:07
quick step
http://lab.vool.ie/coisceim/