Skip to content

Instantly share code, notes, and snippets.

View radiantly's full-sized avatar
😏
Wizarding!

Joshua T. radiantly

😏
Wizarding!
View GitHub Profile
@radiantly
radiantly / GoogleMapDownloader.py
Created October 4, 2022 17:25 — forked from sebastianleonte/GoogleMapDownloader.py
A python script to download high resolution Google map images given a longitude, latitude and zoom level. (Works with Python 3)
#!/usr/bin/python
# GoogleMapDownloader.py
# Created by Hayden Eskriett [http://eskriett.com]
#
# A script which when given a longitude, latitude and zoom level downloads a
# high resolution google map
# Find the associated blog post at: http://blog.eskriett.com/2013/07/19/downloading-google-maps/
import urllib.request
from PIL import Image
@radiantly
radiantly / noMangleGoogle.user.js
Last active December 28, 2023 04:31
Prevent Google from mangling links on the search results when clicking or copying on Firefox
// ==UserScript==
// @name Prevent link mangling on Google
// @namespace LordBusiness.LMG
// @match https://www.google.com/search
// @grant none
// @version 1.1
// @author radiantly
// @description Prevent google from mangling the link when copying or clicking the link on Firefox
// ==/UserScript==
@radiantly
radiantly / scanPages.gif
Last active November 13, 2021 11:33
A simple script that allows you to scan and trim multiple pages into a pdf straight from the commandline on Linux using utsushi and imagemagick
scanPages.gif
@radiantly
radiantly / reverselinkedlist.cpp
Last active March 23, 2021 20:16
Reversing a linked list (stack) consisting of only unique pointers
#include<iostream>
#include<memory>
#include<functional>
struct Node {
int val;
std::unique_ptr<Node> next;
Node(int value) : val{value} {}
};
@radiantly
radiantly / README.md
Last active November 12, 2021 23:24 — forked from lifehome/README.md
Cloudflare API v4 Dynamic DNS Update in Bash

Cloudflare DDNS bash client with systemd

This is a bash script to act as a Cloudflare DDNS client, useful replacement for ddclient.

How to use?

  1. Put the cfupdater files to /usr/local/bin
  2. chmod +x /usr/local/bin/cfupdater
  3. Create a systemd service unit at /etc/systemd/system/, the cfupdate.service is shown as an example.
  4. Create a systemd timer unit at the same location of the service unit, the cfupdate.timer is shown as an example.
  5. sudo systemctl enable cfupdate.timer
  6. sudo systemctl start cfupdate.timer
@radiantly
radiantly / zimdump.sh
Last active January 30, 2023 20:22
Installing zimdump
# UPDATE: zim-tools is now available in Alpine linux Edge respository, so can be installed directly.
# See below https://gist.github.com/radiantly/34b7ec5d4750c5718b2e3db6a6818ecd#gistcomment-3236401 for more info
# Installing zimdump on ubuntu (in a Docker container, so that we don't clutter our ecosystem)
# If you need help installing docker, look here: https://gist.github.com/radiantly/0090d6cc65dc3d4b8eb4ce847050ed80
# Navigate to the folder where your zim file is located.
docker run –rm -it -v $(pwd):/workdir -w /workdir ubuntu:18.04 bash
# Installing dependencies
@radiantly
radiantly / docker.sh
Last active December 14, 2018 16:00
Install Docker and Docker-compose on Ubuntu 18.04
# To run:
# chmod +x docker.sh
# sudo ./docker.sh
echo "################# INSTALLING DOCKER #################"
sudo apt update
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"