Skip to content

Instantly share code, notes, and snippets.

View tom-spalding's full-sized avatar
🐊

Tom Spalding tom-spalding

🐊
View GitHub Profile
@tom-spalding
tom-spalding / planets.ipynb
Created April 4, 2014 06:25
To test the Pelican Liquid Tags plugin.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tom-spalding
tom-spalding / image
Created January 14, 2014 04:24
image snippet for Jekyll
{% comment %}
update image path to your rel path
usage:
{% include image src="post.images[0]" %}
{% include image src="whatnot.jpg" %}
{% endcomment %}
{% assign imgpath="/images/" %}
{% if include.src %}
<img src="{{ imgpath }}{{include.src}}">
{% elsif post.images[0] != NULL %}
@tom-spalding
tom-spalding / algebraic.scad
Last active December 27, 2015 17:59
Beemo from Adventure Time
//Beemo by Antivapor
$fn=50;//number of fragments for arcs
//triangle button parameters
a=-5;//x
b=2;//z
c=-3.5;//y, use diffence of abs(a-c) for scaling
d=b+2;//z-thickness
p1=[a,b,c];
p2=[a,d,c];
p3=[a,d,a];
@tom-spalding
tom-spalding / piratebay.user.js
Last active December 24, 2015 13:29
Sort TPB by seeds.
// ==UserScript==
// @name piratebay
// @match https://thepiratebay.se/*
// @match http://thepiratebay.se/*
// @run-at document-end
// @grant none
// @version 1
// ==/UserScript==
document.getElementsByName("orderby").item(0).setAttribute("value","7");
@tom-spalding
tom-spalding / sfsu.user.js
Created July 30, 2013 21:16
SFSU user script to re-log yourself back in.
// ==UserScript==
// @name SFSU
// @namespace namethisspace
// @description Personal user script for SFSU
// @include https://idp.sfsu.edu/idp/Authn/UserPassword
// @require http://code.jquery.com/jquery-latest.min.js
// @version 1
// ==/UserScript==
// This user script auto-logs you into SFSU. I suggest that you do not save your password OR username in this. Instead, make a quick script to save your username and password in Greasemonkey's persistent data. I made this because I was continually annoyed at how many times I have to log back in. Be safe with your information.
// Example of such a script:
@tom-spalding
tom-spalding / github.html
Last active December 18, 2015 01:19
A Gist to forkify any jekyll page with pure css. See http://antivapor.github.io/code/2013/06/03/fork-me/
{% if {{page.github}} == NULL %}
<div class='fork_this'><a href='https://github.com/antivapor'></a></div>
{% else %}
<div class='fork_this'><a href='{{page.github}}'></a></div>
{% endif %}