Skip to content

Instantly share code, notes, and snippets.

View pbuckley4192's full-sized avatar
🏠
Working from home

Paul pbuckley4192

🏠
Working from home
  • Datarobot
View GitHub Profile
@pbuckley4192
pbuckley4192 / time.sh
Created December 6, 2016 20:26
Set Server time when there is no NTP available
sudo date -s "$(wget -qSO- --max-redirect=0 google.com 2>&1 | grep Date: | cut -d' ' -f5-8)Z"
@pbuckley4192
pbuckley4192 / mkvtomp4.sh
Last active October 2, 2017 14:43
Convert MKV to MP4
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get install ffmpeg
sudo apt-get install frei0r-plugins
for i in *mkv; do ffmpeg -i "$i" -vcodec copy -acodec copy "${i%.mkv}.mp4"; done
@pbuckley4192
pbuckley4192 / Remove 3D Objects folder Windows 10.txt
Created January 21, 2018 15:49
Remove 3D Objects folder Windows 10
Delete Key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}
If 64-Bit Windows, also delete:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A}
@pbuckley4192
pbuckley4192 / raw2jpg.sh
Created March 24, 2018 18:20 — forked from h0tw1r3/raw2jpg.sh
Parallel recursive RAW to JPEG + meta converter shell script
!/bin/env bash
#
# Parallel recursive RAW to JPEG + meta converter
#
# Output into relative JPEG directory
#
# Requires: dcraw, cjpeg, exiv2
# any argument means verbose...
if [ ${#} -ne 0 ]; then
- id: '1552465990326'
alias: Car Location
trigger:
- platform: mqtt
topic: homeassistant/sensor/android_pauls_phone_hfp/state
condition:
- condition: template
value_template: '{{ trigger.payload_json[''last_device_mac''] == ''10:08:C1:XX:XX:XX''
}}'
- condition: template
import requests
import json
import subprocess
r = requests.get('https://thepihut.com/products/raspberry-pi-4-model-b.js').json()
count = r["variants"][2]["inventory_quantity"]
available = r["variants"][2]["available"]
print("RPI Available:\t"+ str(count))
def sendmessage(message):

So I had problems install Docker on an RPI 4, using the usual routes caused hassle and issues, so I went on a mission to fix it!

Here are the steps:

It turns out the installed iptables is kind of broken, so it needs to be re-installed correctly.

sudo apt purge iptables
sudo apt install iptables -y

Once thats complete, we need to reboot the machine to load all the kernal modules.

#The mouse will suck on linux because of the programmable buttons.
#This script will change the button-delegation so that the mouse doesn't stuck.
#@link https://community.linuxmint.com/hardware/view/10217
#sudo mkdir /etc/X11/xorg.conf.d
sudo rm /etc/X11/xorg.conf.d/910-rat.conf
# add the following to the file
echo "Section \"InputClass\"" >> /etc/X11/xorg.conf.d/910-rat.conf
package paul.tools.eircomRecovery;
import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Formatter;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;