Skip to content

Instantly share code, notes, and snippets.

View natbat's full-sized avatar

Natalie Downe natbat

View GitHub Profile
@natbat
natbat / Bat+Sounds.ipynb
Last active October 22, 2023 02:24
Taking recordings from the EchoMeter Touch Bat detector and the KML file that is associated with it and uploading the sound files
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 April 7, 2016 19:18
Conversion script is for writing legacy data to a csv file suitable for wordpress import - by Matthew Antone
# TODO:
# . add alt tags to image links
# . image thumbnails? (featured image)
import psycopg2
import psycopg2.extras
import re
import lxml
@natbat
natbat / SVG animation experiment.markdown
Created January 29, 2016 22:37
SVG animation experiment
@natbat
natbat / spreadsheet-template.txt
Last active September 29, 2015 23:57
Template for videos and notes in spreadsheets to output docs code
=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 September 22, 2015 23:55
Person list component on Eventbrite
<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 September 1, 2015 00:14
Future proof console.log() code from breaking IE
// 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() {};
@natbat
natbat / gist:843506aeb110a6b8ca3b
Created May 18, 2015 22:24
Back to front text
Check this out... &#x202e;this is backwards&#x202c;
https://gist.github.com/natbat/b283b8fb6560dbc4ace2
@natbat
natbat / django dates
Created January 20, 2013 14:03
Better django date formatting eg "1:21pm, January 2nd, 2013"
{{object.date|date:"fA"|lower}}, {{object.date|date:"F jS, Y"}}