Skip to content

Instantly share code, notes, and snippets.

View MatthewCroughan's full-sized avatar
❄️
Nix is not real life

Matthew Croughan MatthewCroughan

❄️
Nix is not real life
View GitHub Profile

Keybase proof

I hereby claim:

  • I am matthewcroughan on github.
  • I am matthewcroughan (https://keybase.io/matthewcroughan) on keybase.
  • I have a public key whose fingerprint is 8653 5E71 5A82 B01B 5F9E 8B7D 97BB 1FE3 87FD C63F

To claim this, I am signing this object:

@MatthewCroughan
MatthewCroughan / flake.nix
Created September 24, 2021 00:58
Flake.nix for OpenShot with Openshot with Libopenshot 0.2.7
{
description = "Openshot with Libopenshot at 0.2.7";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
libopenshot-source = {
url = "github:openshot/libopenshot/v0.2.7";
flake = false;
};
libopenshot-audio-source = {
@MatthewCroughan
MatthewCroughan / install-balena-cli.sh
Last active August 15, 2022 08:33
Installs balena-cli into ~/balena-cli and adds it to ~/.bashrc $PATH
#!/bin/bash
if [[ $USER == "root" ]]
then
echo "This script must not be run as root!"
exit 1
fi
cd ~
mkdir balena-cli
cd balena-cli
@MatthewCroughan
MatthewCroughan / get-docker-pi.sh
Created October 12, 2019 16:05
Installs docker and docker-compose on a pi.
# Install some required packages first
sudo apt update
sudo apt install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
# Get the Docker signing key for packages
@MatthewCroughan
MatthewCroughan / ptt.py
Last active April 21, 2019 19:26
Push to talk for Seren using alsa
import os
import time
import subprocess
import RPi.GPIO as GPIO # Import Raspberry Pi GPIO library
hostname = 'intercom1' # Hostname or IP of device to call
GPIO.setwarnings(False) # Ignore warning for now
GPIO.setmode(GPIO.BOARD) # Use physical pin numbering
GPIO.setup(40, GPIO.IN, pull_up_down=GPIO.PUD_UP) # Set pin 40 to be an input pin and set initial value to be pulled high (on)
xfreerdp /size:1920x1080 /f \
/smart-sizing \
/rfx \
/rfx-mode:video \
/gfx:RFX \
/codec-cache:rfx \
+fonts +aero +window-drag +menu-anims +compression +auto-reconnect \
/heartbeat \
/u:doesuser /v:10.0.31.27:3389
sed --posix 's/<polyline\([^>]*\)points="/<path\1d="M/g' <musescore-exported.svg >to-be-processed-by-inkscape.svg
#!/bin/bash
sheetinput=${1?Error: no file given}
outputdir=${2?Error: no output directory given}
sheetoutput=final.svg
launchdir="$(pwd)"
ls $outputdir
mkdir /tmp/sheetfix
cp $sheetinput /tmp/sheetfix
@MatthewCroughan
MatthewCroughan / gamecube-intro-animation.markdown
Created December 18, 2018 08:07
Gamecube Intro Animation

Gamecube Intro Animation

Trying to recreate the Gamecube intro animation using SASS and a little bit of jQuery.

You can play with the size of the logo (multiple of 3) and the speed of the animation. Just make sure you have the same values in the JS and the CSS.

A Pen by Marc Malignan on CodePen.

License.

@MatthewCroughan
MatthewCroughan / Masari Fork Log
Created April 19, 2018 20:08
Masari fork appearing in daemon
2018-04-18 19:13:51.591 [P2P8] WARN global src/cryptonote_protocol/cryptonote_protocol_handler.inl:273 [184.64.165.199:54870 INC] peer claims higher version that we think - we may be forked from the network and a software upgrade may be needed
2018-04-18 19:13:54.323 [P2P4] INFO global src/cryptonote_protocol/cryptonote_protocol_handler.inl:1152 [86.147.102.134:38080 OUT] Synced 161048/161059
2018-04-18 19:13:56.604 [P2P4] INFO global src/cryptonote_protocol/cryptonote_protocol_handler.inl:1152 [86.147.102.134:38080 OUT] Synced 161049/161059
2018-04-18 19:13:57.331 [P2P4] INFO global src/cryptonote_protocol/cryptonote_protocol_handler.inl:1152 [86.147.102.134:38080 OUT] Synced 161050/161059
2018-04-18 19:13:58.059 [P2P4] INFO global src/cryptonote_protocol/cryptonote_protocol_handler.inl:1152 [86.147.102.134:38080 OUT] Synced 161051/161059
2018-04-18 19:13:58.756 [P2P4] INFO global src/cryptonote_protocol/cryptonote_protocol_handler.inl:1152 [