Skip to content

Instantly share code, notes, and snippets.

View SimonXIX's full-sized avatar

Simon Bowie SimonXIX

View GitHub Profile
@SimonXIX
SimonXIX / Dockerfile_GoAccess
Created August 15, 2023 08:40
Dockerfile for building a GoAccess application container
ARG ALPINE_VERSION=3.10.2
# Builds a goaccess image from the current working directory:
FROM alpine:${ALPINE_VERSION}
ARG build_deps="build-base ncurses-dev autoconf automake git gettext-dev"
ARG runtime_deps="tini ncurses libintl gettext musl-utils libmaxminddb libmaxminddb-dev "
ARG geolib_path="/usr/local/share/GeoIP"
ARG geolib_filename="GeoCity.dat"
@SimonXIX
SimonXIX / create_onion_service.sh
Last active February 23, 2024 12:17
Copies the Copim Hugo site, finds the correct onion address, replaces the Onion-Location header in the original, and replaces the base_url with the onion service address in the onion mirror.
#! /bin/bash
# @name: create_onion_service.sh
# @creation_date: 2022-09-02
# @license: The MIT License <https://opensource.org/licenses/MIT>
# @author: Simon Bowie <ad7588@coventry.ac.uk>
# @purpose: Copies the Copim Hugo site, finds the correct onion address, replaces the Onion-Location header in the original, and replaces the base_url with the onion service address in the onion mirror.
# define variables
SOURCE_DIRECTORY='/home/[REDACTED]/website_inate/copim_website/public'
# @name: _quarto.yml
# @creation_date: 2023-03-13
# @license: The MIT License <https://opensource.org/licenses/MIT>
# @author: Simon Bowie <ad7588@coventry.ac.uk>
# @purpose: specifies Quarto book structure
project:
type: book
output-dir: docs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# @name: _quarto.yml
# @creation_date: 2023-03-07
# @license: The MIT License <https://opensource.org/licenses/MIT>
# @author: Simon Bowie <ad7588@coventry.ac.uk>
# @purpose: specifies Quarto book structure
project:
type: book
output-dir: docs
#!/bin/bash
# @name: render.sh
# @creation_date: 2023-03-07
# @license: The MIT License <https://opensource.org/licenses/MIT>
# @author: Simon Bowie <ad7588@coventry.ac.uk>
# @purpose: Runs Jupyter Notebook files and renders using Quarto
# @acknowledgements:
# https://www.redhat.com/sysadmin/arguments-options-bash-scripts
############################################################
@SimonXIX
SimonXIX / filter_and_save_to_new_workbook.bas
Last active February 18, 2021 13:49
Excel macro to filter a column and save filtered data to a new Excel file for each unique value
Option Explicit
Sub filter()
Application.ScreenUpdating = False
Dim x As Range
Dim rng As Range
Dim rng1 As Range
Dim last As Long
Dim sht As String
Dim newBook As Excel.Workbook
@SimonXIX
SimonXIX / eprints_rest.php
Created July 26, 2019 14:04
Testing the EPrints RESTful API for Users
<?php
# @name: eprints_rest.php
# @version: 0.1
# @creation_date: 2019-07-22
# @license: The MIT License <https://opensource.org/licenses/MIT>
# @author: Simon Bowie <sb174@soas.ac.uk>
# @purpose: Testing the EPrints RESTful API
?>
<?php
@SimonXIX
SimonXIX / crossref_doi_checker.php
Last active December 3, 2018 10:56
Script to check a text file of DOIs (one per line with Unix EOLs) against the Crossref API
<?php
# @name: crossref_doi_checker.php
# @version: 0.1
# @license: The MIT License (MIT) <https://mit-license.org/>
# @purpose: Checks a single text file of DOIs (one per line with Unix EOLs) against the Crossref API.
# Run as 'php crossref_doi_checker.php '$doi_file'' e.g. 'php crossref_doi_checker.php doi_file.txt'
# @author: Simon Bowie <simonxix@riseup.net>
# @acknowledgements:
# https://github.com/CrossRef/rest-api-doc
?>