Skip to content

Instantly share code, notes, and snippets.

View Ultrabenosaurus's full-sized avatar

Dan Bennett Ultrabenosaurus

  • UK
View GitHub Profile
@robert-clayton
robert-clayton / standard_ebooks_opds_downloader.py
Last active September 2, 2019 18:15 — forked from Ultrabenosaurus/standard_ebooks_opds_downloader.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 / 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
@AnalogJ
AnalogJ / download_opds.py
Created August 29, 2017 01:54
download all books in OPDS catalog.
import urllib2
import os
import urllib, urlparse
import xml.etree.cElementTree as et
e = et.ElementTree(file=urllib2.urlopen('https://standardebooks.org/opds/all')).getroot()
print(e)
print("parsing")
for atype in e.iter('{http://www.w3.org/2005/Atom}link'):
@rauchg
rauchg / README.md
Last active April 13, 2025 04:29
require-from-twitter
@TimBlock
TimBlock / 4.5
Created January 15, 2016 12:00
// Your code here.
function every(array,predicate){
for(var i = 0; i<array.length; i++){
if (!predicate(array[i]))
return false;
}
return true;
}
function some(array,predicate){
@0xDE57
0xDE57 / config.md
Last active September 1, 2025 08:38
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable. I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere No longer required: Enable HTTPS-Only Mode, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@walkerstone
walkerstone / index.html
Created October 28, 2014 15:39
Single page template
<html>
<head>
<style>
html { height: 101%; }
body { margin: 0; padding: 0; font-family: sans-serif;}
h1, h2, h3 { margin: 0; }
a { font-weight: ; text-decoration: none; color: #586FB2;}
.active { background: #586FB2; color: white;}

ajax.x - The XMLHttpRequest object (or MS equivalent) used for communication

ajax.serialize(f) f = the form element you wish to be serialized This function serializes all the fields in a form so that they can be passed as a query string in the form 'arg1=val1&arg2=val2'.

ajax.get(url, func) url = the url to query (can contain arguments after a '?') func = the function to call once the response is returned This function uses a GET request to query the specified url and return a response to the specified function.

@dan-bennett
dan-bennett / aliases.sh
Last active August 29, 2015 14:05
my shell aliases
#!/bin/bash
# backup "<path>"
# create a new folder in the backups directory and dump the current directory's contents into it
backup(){
mkdir "/path/to/backups/$1";
cp -r . "/path/to/backups/$1";
}
# bs
@shamil
shamil / mount_qcow2.md
Last active August 30, 2025 00:07
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8