Skip to content

Instantly share code, notes, and snippets.

View Ultrabenosaurus's full-sized avatar

Dan Bennett Ultrabenosaurus

  • UK
View GitHub Profile
@Ultrabenosaurus
Ultrabenosaurus / standard_ebooks_opds_downloader.py
Last active May 9, 2024 21:10 — forked from AnalogJ/download_opds.py
Download all ebooks from the Standard eBooks OPDS catalogue, organised into subfolders by author and book title.
#####
#
# Download all of the Standard eBooks catalogue from their OPDS feed.
#
# https://standardebooks.org/
#
# Modified to download all files for each book except the SVG cover and to
# organise the files in subfolders by Author > Book Title.
# The original script downloads only the EPUB file for each book into the
# working directory with no subfolders.
@Ultrabenosaurus
Ultrabenosaurus / MotionEye-IFTTT-Webhook.sh
Last active December 1, 2022 04:51
A script to trigger IFTTT webhook applets from MotionEye software
#!/bin/bash
##
#
# MotionEye-IFTTT-Webhook.sh
# A script to trigger IFTTT webhook applets from MotionEye software
#
# author: Ultrabenosaurus
# license: BSD 3-Clause
# source: https://gist.github.com/Ultrabenosaurus/5916101463f5d00732f901e7a3d8a2c2
@Ultrabenosaurus
Ultrabenosaurus / set-dns.bat
Last active June 29, 2022 21:49
A quick and dirty Windows CMD batch script to quickly and easily swap between pre-configured DNS addresses on the main WiFi adaptor, designed for laptop users who have a Raspberry Pi or similar device as a DNS filter on their home network which can't be reached when away from home. Must be run with admin priviledges.
@echo off
:: ==========
:: Code to automatically request UAC elevation via PowerShell if launched without admin priviledges.
::
:: source: https://stackoverflow.com/a/24665214
:: license: https://creativecommons.org/licenses/by-sa/4.0/
:: changes: none
:: ==========
@Ultrabenosaurus
Ultrabenosaurus / mp4-to-gif.sh
Last active October 4, 2021 13:42
Simple bash script to convert MP4 videos to GIF
#!/bin/bash
#############################################
#
# mp4-to-gif
#
# Convert MP4 videos to GIF images
# Requires ffmpeg and imagemagick
#
# -g and --gifsicle options create a second optimised GIF for your consideration
@Ultrabenosaurus
Ultrabenosaurus / clock.css
Created September 18, 2012 14:01
CSS Animations clock with seconds, minutes and hours
.loader{
color: #555;
font-family: sans-serif;
font-size: 3em;
text-align: center;
-webkit-border-radius: 50%;
border-radius: 50%;
border: 5px solid #555;
width:100px;
height:100px;
@Ultrabenosaurus
Ultrabenosaurus / ytsearch.sh
Last active December 20, 2020 23:33
ytsearch - search and launch YouTube videos from bash!
#!/bin/bash
# ytsearch
# original: https://coderwall.com/p/jvuzdg
# created by: Balazs Nadasdi <http://about.me/yitsushi>
# this version: https://gist.github.com/Ultrabenosaurus/8974206b2cba0f1c615a
# edited by: Dan Bennett <http://about.me/d.bennett>
# license: BSD 3-Clause <http://opensource.org/licenses/BSD-3-Clause>
#
# converted to a script for easier redistribution and development
@Ultrabenosaurus
Ultrabenosaurus / manifest.json
Last active April 10, 2020 22:43
Proof-of-Concept Firefox Add-On to Redirect Before Page Loads
{
"description": "Redirect AMP addresses to their non-AMP sources",
"manifest_version": 2,
"name": "AMP Redirect",
"version": "0.1",
"author": "Ultrabenosaurus",
"_comments_": {
"signed_xpi": "https://drive.google.com/file/d/1Pg19uXregtxfENnKO3tcvR2SiTu01IYf/view?usp=sharing",
"source:": "https://gist.github.com/Ultrabenosaurus/b94d373f3a32d2b5d6ae5256e04784a7",

Keybase proof

I hereby claim:

  • I am ultrabenosaurus on github.
  • I am ultrabenosaurus (https://keybase.io/ultrabenosaurus) on keybase.
  • I have a public key whose fingerprint is CD4A DCC2 EE8C 56D5 EAD6 2EB5 0BFA 5929 871C C7DB

To claim this, I am signing this object:

@Ultrabenosaurus
Ultrabenosaurus / README.md
Last active September 14, 2017 21:50
githash - get the short or full SHA for any commit in your current branch's history

githash

Easily get the short or full SHA for any commit in your current branch's history, useful for reverting and sharing specific code states with others.

Why?

Because typing out git rev-list --max-count=1 --abbrev-commit --skip=# HEAD takes far too much effort.

Installation

@Ultrabenosaurus
Ultrabenosaurus / chrome-colours.php
Last active February 26, 2016 12:17
A quick demo of the "theme-color" meta tag that can be used to colour the UI of Chrome for Android.
<?php
$colour = "#" . ( ( isset( $_GET['colour'] ) ) ? $_GET['colour'] : "000000" );
?>
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>