Skip to content

Instantly share code, notes, and snippets.

@skwirrel
skwirrel / findPis.sh
Created August 21, 2020 23:35
A simple bash script to find the IP addresses of any Raspberry Pi's on the network
#!/bin/bash
# Copyright Ben Jefferson 2020
# License: GPLv3 https://www.gnu.org/licenses/gpl-3.0.html
# A simple bash script to find the IP addresses of any Raspberry Pi's on the network
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root e.g. sudo $0" 1>&2
exit 1
fi
@skwirrel
skwirrel / README.md
Last active May 23, 2022 13:11
Javascript Console Hack for Getting NonVerbal Communication In a Zoom Meeting

Getting A Summary of Nonverbal Communication In a Zoom Meeting

For the background to this gist see here: https://devforum.zoom.us/t/getting-meeting-participants-with-raised-hand/10718/9

Here is the solution I had to resort to for getting a list of nonverbal communication from a Zoom meeting.

I have a meeting with 100’s of participants and we wanted to run a simple impromptu “show of hands” poll without using the specific polling feature. All I needed was a list of all the attendees with their hand raised at a certain point in time…

@skwirrel
skwirrel / zoomLogger.php
Created May 14, 2020 07:44
This is a simple script to create a log of Zoom activity on a Linux machine
#!/usr/bin/php
<?php
/*
MIT License
Copyright (c) Ben Jefferson 2020
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@skwirrel
skwirrel / zoomLogger.php
Created May 14, 2020 07:44
This is a simple script to create a log of Zoom activity on a Linux machine
#!/usr/bin/php
<?php
/*
MIT License
Copyright (c) Ben Jefferson 2020
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@skwirrel
skwirrel / README.md
Last active June 25, 2020 07:26
A simple API request maker and validator with HMAC based authentication.

Introduction

This Gist defines a mechanism for authenticating and signing API requests.

The authentication is passed from client to server via an "Authentication" HTTP Header. This includes a Hashed Message Authentication Code (HMAC). The HMAC is computed from all of the message parameters (request type, request URL, GET string, POST Parameters and/or POST body).

Secret key

The data is signed with a pre-shared secret key provided to the client via some secure channel. In the case of server-to-server communication the secret key is likely to be hard-coded into a configuration file. In the case of browser-to-server communication the key ID and secret key would be passed to the client at the end of a successful login process.

The key ID enables the server to communicate with and identify a number of different client accounts. The server must have some mechanism for storing the keys of a number of client accounts and retrieving these based on the key ID. In the code below this is achieved by the secretKey

<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@skwirrel
skwirrel / AV.php
Last active November 2, 2015 10:04
An implementation of Alternate Vote with Borda count to break elimination ties. WARNING: This comes with no warranty whatsoever
<?
/*
An implementation of alternate Vote voting in PHP
Copyright (C) 2016 Benjamin Jefferson <skwirrel@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.