Skip to content

Instantly share code, notes, and snippets.

Natalie Downe natbat

View GitHub Profile
@natbat
natbat / Bat+Sounds.ipynb
Last active Oct 29, 2017
Taking recordings from the EchoMeter Touch Bat detector and the KML file that is associated with it and uploading the sound files
View Bat+Sounds.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View addSizes.js
jQuery(function($){
// addSizes was written by Natalie Downe
// http://natbat.net/2008/Aug/27/addSizes/
// Copyright (c) 2008, Natalie Downe under the BSD license
// http://www.opensource.org/licenses/bsd-license.php
$('a[href$=".pdf"], a[href$=".doc"], a[href$=".mp3"], a[href$=".jpg"], a[href$=".png"], a[href$=".swf"], a[href$=".zip"], a[href$=".ogg"], a[href$=".m4u"]').each(function(){
// looking at the href of the link, if it contains pdf, doc, zip, mp3, ogg, m4u, jpg, png, swf
@natbat
natbat / legacy-db-conversion.py
Created Apr 7, 2016
Conversion script is for writing legacy data to a csv file suitable for wordpress import - by Matthew Antone
View legacy-db-conversion.py
# TODO:
# . add alt tags to image links
# . image thumbnails? (featured image)
import psycopg2
import psycopg2.extras
import re
import lxml
@natbat
natbat / spreadsheet-template.txt
Last active Sep 29, 2015
Template for videos and notes in spreadsheets to output docs code
View spreadsheet-template.txt
=IF(ISBLANK(F5),"", B5 & CHAR(10) & "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" & CHAR(10) & TEXT(A5, "mmmm d yyyy") & " a "& D5& " by " & E5 & CHAR(10) & CHAR(10) & IF(ISBLANK(F5),"", Concat("`Video <https://www.youtube.com/watch?v=", Concat(F5, ">`__, "))) & IF(ISBLANK(G5),"", Concat("`Author slides/docs <", Concat(G5, ">`__, "))) & IF(ISBLANK(H5),"", Concat("`Collective notes <", Concat(H5, ">`__, "))) & CHAR(10) & CHAR(10) & C5 & CHAR(10) & CHAR(10) & CHAR(10))
@natbat
natbat / person-list.html
Last active Sep 22, 2015
Person list component on Eventbrite
View person-list.html
<div class="list-person g-group">
<ul>
<li class="g-cell g-cell-1-1 g-cell-md-1-3 g-cell-lg-1-4">
<img src="http://dummyimage.com/320x320/000/fff.jpg" alt="" class="list-person--image">
<h3 class="list-person--name">Anthony Edward Stark</h3>
<p>Stark Industries</p>
<p>Iron man</p>
</li>
<li class="g-cell g-cell-1-1 g-cell-md-1-3 g-cell-lg-1-4">
<img src="http://dummyimage.com/320x320/000/fff.jpg" alt="" class="list-person--image">
@natbat
natbat / console.js
Created Sep 1, 2015
Future proof console.log() code from breaking IE
View console.js
// Console-polyfill. MIT license.
// https://github.com/paulmillr/console-polyfill
// Make it safe to do console.log() always.
(function(global) {
'use strict';
global.console = global.console || {};
var con = global.console;
var prop, method;
var empty = {};
var dummy = function() {};
View gist:843506aeb110a6b8ca3b
Check this out... &#x202e;this is backwards&#x202c;
View gist:e01446d68f1e1f6840f3
https://gist.github.com/natbat/b283b8fb6560dbc4ace2
@natbat
natbat / django dates
Created Jan 20, 2013
Better django date formatting eg "1:21pm, January 2nd, 2013"
View django dates
{{object.date|date:"fA"|lower}}, {{object.date|date:"F jS, Y"}}
You can’t perform that action at this time.