Skip to content

Instantly share code, notes, and snippets.

@justinkelly
justinkelly / source-_includes-custom-navigation.html
Created August 13, 2012 14:27
blog.justin.kelly.org.au octopress custom nav - source/_includes/custom/navigation.html
<ul class="main-navigation">
<li><a href="{{ root_url }}/">
<span class="blue_light">
{{ site.title }}
</span>
{% if site.subtitle %}
<h2></h2>
<span class="blue_dark">
{{ site.subtitle }}
</span>
@justinkelly
justinkelly / sass-custom-_style.scss
Created August 13, 2012 14:22
blog.justin.kelly.org.au octopress sass _style.scss
// This File is imported last, and will override other styles in the cascade
// Add styles here to make changes without digging in too much
$border-ep: #E0E0E0;
html {
background: url("http://i.minus.com/ibuElAZkI9CQ3Y.gif") repeat-x scroll center top $page-bg;
}
#main
{
@justinkelly
justinkelly / sass-custom-_colors.scss
Created August 13, 2012 14:20
blog.justin.kelly.org.au octopress sass colors.scss
$page-bg :#f7f7f7;
$main-bg :#fff;
$nav-color :#fff;
$nav-color-hover: #fff;
$visited: #fff;
@justinkelly
justinkelly / source-_includes-custom-after_footer.html
Created August 8, 2012 04:28
Octopress : Blog posts : Add links to the Google Plus post for comments
@justinkelly
justinkelly / php_mobile_detect.php
Created August 7, 2012 00:06
PHP mobile detect
<?php
$useragent=$_SERVER['HTTP_USER_AGENT'];
$mobile == false;
// do the mobile detection
if (
preg_match('/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|meego.+mobile|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$useragent)
||
preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac
@justinkelly
justinkelly / aleph.sh
Created August 2, 2012 04:43
Shell Script to Check if ExLibris Aleph Is Running OK
#!/bin/bash
SUBJECT='Aleph: alert'
TO='youremailaddress@you.com'
if [[ $ps =~ "ue_21_a_LIB30" ]]
then
        echo LIB30 ue_21 all OK
else
        message="LIB30 ue_21 is not running
@justinkelly
justinkelly / polaroid.html
Created August 2, 2012 04:37
Polaroid theme for Posterous
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{PageTitle}</title>
<link rel="icon" href="/images/favicon.png" type="image/x-png"/>
<style type="text/css">
* {border:0;padding:0;margin:0;}
img {border:0;}
@justinkelly
justinkelly / current-page.html
Created August 1, 2012 02:11
Current MyLibrary code
<tbody><tr class="main_text_black">
<th colspan="3" align="left" class="underline">Catalogues</th>
</tr>
<tr class="main_text_black" style="line-height:2.35em">
<td colspan="3"><label for="term">Search Swinburne Library</label></td>
</tr>
<tr class="main_text_black">
<td colspan="3" style="width:49.5%;vertical-align:middle">
<form name="searchForm" method="get" action="http://www.swinburne.edu.au/lib/scripts/search-resolver.php" target="newLibPage">
<input type="hidden" name="s" value="library">
@justinkelly
justinkelly / changed-code.html
Created August 1, 2012 02:11
New MyLibrary code
<tbody>
<tr class="main_text_black" style="line-height:2.35em">
<td colspan="3"><label for="term">Search the Library</label></td>
</tr>
<tr class="main_text_black">
<td colspan="3" style="width:49.5%;vertical-align:middle">
<form name="searchForm" method="get" action="http://www.swinburne.edu.au/lib/scripts/search-resolver.php" target="newLibPage">
<input type="hidden" name="s" value="library">
<input type="hidden" name="f" value="myswinburne">
<input id="search_field" name="q" accesskey="s" type="text" size="27" style="font-size: 10pt;">
@justinkelly
justinkelly / new-swin.html
Created July 31, 2012 23:45
New My.Swinburne search form
<form name="searchForm" method="get" action="http://www.swinburne.edu.au/lib/scripts/search-resolver.php">
<input type="hidden" name="s" value="library" />
<input type="hidden" name="f" value="myswinburne" />
<input id="search_field" name="q" accesskey="s" type="text" size="27" style="font-size: 10pt;">
<input style="vertical-align:middle" type="image" src="https://www.swin.edu.au/images/button_go.gif" value="Go" alt="Search Swinburne Catalogue" name="Submit now">
</form>