Skip to content

Instantly share code, notes, and snippets.

View sigreer's full-sized avatar
💭
Taming wilderbeast

Simon Greer sigreer

💭
Taming wilderbeast
View GitHub Profile
@sigreer
sigreer / rm-label-tool.sh
Last active October 19, 2024 15:14
Generate Royal Mail A4 label-invoice from 6x4 label
#!/bin/bash
## Royal Mail Click and Drop does not provide an option to print to combined label/invoice paper without a business account.
## This shell script uses PDFtk (PDFJam) to convert a downloaded 6x4" label to an A4 label/invoice combo document
input_file=$1
base_name=$(basename $input_file)
rotated_file="${base_name%.pdf}-rotated.pdf"
output_file="${base_name%.pdf}-complete.pdf"
@sigreer
sigreer / sharepoint-theme.ps1
Last active June 29, 2024 13:00
Update Sharepoint Online Theme using Powershell
$tenant=""
$AdminCenterURL = "https://admin-$tenant.sharepoint.com"
#User Name Password to connect
$AdminUserName = ""
$AdminPassword = "" #App Password
doLogin
@sigreer
sigreer / remote_bash.sh
Created January 4, 2023 22:59 — forked from n0ts/remote_bash.sh
execute bash script from remote site
# http://stackoverflow.com/questions/5735666/execute-bash-script-from-url
bash <(curl -s http://mywebsite.com/myscript.txt)
# http://stackoverflow.com/questions/4642915/passing-parameters-to-bash-when-executing-a-script-fetched-by-curl
curl http://foo.com/script.sh | bash -s arg1 arg2
@sigreer
sigreer / teams-chat-post.sh
Created January 4, 2023 17:52 — forked from chusiang/teams-chat-post-for-workflows.sh
Post a message to Microsoft Teams with bash script.
#!/bin/bash
# =============================================================================
# Author: Chu-Siang Lai / chusiang (at) drx.tw
# Filename: teams-chat-post.sh
# Modified: 2021-10-18 00:09
# Description: Post a message to Microsoft Teams.
# Reference:
#
# - https://gist.github.com/chusiang/895f6406fbf9285c58ad0a3ace13d025
#