Skip to content

Instantly share code, notes, and snippets.

View TimJDFletcher's full-sized avatar

Tim Fletcher TimJDFletcher

View GitHub Profile

Keybase proof

I hereby claim:

  • I am timjdfletcher on github.
  • I am timjdfletcher (https://keybase.io/timjdfletcher) on keybase.
  • I have a public key ASDBi_hcNLfIsNlQGMUvA0ScSR9WKd38IJcww3j5sCvUOAo

To claim this, I am signing this object:

@TimJDFletcher
TimJDFletcher / OSXRoamingKnobs
Created October 30, 2016 15:51 — forked from donalod/OSXRoamingKnobs
OSXRoamingKnobs
# Via @srynearson tweet https://twitter.com/Srynearson/status/534421250261942272 #kudos Bill Mullady
# Re: http://community.arubanetworks.com/t5/Unified-Wired-Wireless-Access/Mac-OS-X-Lion-MacBook-Air-issue/m-p/113885#M24396
sudo defaults read /Library/Preferences/com.apple.airport.opproam
Password:
{
deltaRSSI = 10;
disabled = 0;
useBonjour = 0;
useBroadcastBSSID = 1;
@TimJDFletcher
TimJDFletcher / ARMDebianUbuntu.md
Created November 20, 2016 21:34 — forked from Liryna/ARMDebianUbuntu.md
Emulating ARM on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

@TimJDFletcher
TimJDFletcher / appify.sh
Created January 2, 2017 11:45 — forked from oubiwann/appify.sh
appify — create the simplest possible Mac app from a shell script (adds an application icon)
#!/usr/bin/env bash
VERSION=4.0.1
SCRIPT=`basename "$0"`
APPNAME="My App"
APPICONS="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns"
OSX_VERSION=`sw_vers -productVersion`
PWD=`pwd`
function usage {
@TimJDFletcher
TimJDFletcher / ssh-keygen.service
Created May 13, 2017 15:54
Systemd unit to generate missing ssh keys on boot
[Unit]
Description=Generate sshd keys
Before=ssh.server
[Service]
Type=oneshot
ExecStart=/usr/bin/ssh-keygen -A
RemainAfterExit=true
StandardOutput=journal
@TimJDFletcher
TimJDFletcher / multi-gunzip.sh
Last active June 23, 2017 10:28
Simple bash script to loop over a multi layered gzip file
#!/bin/bash
set -e
maxloop=100
loop=0
file="$1"
while file "${file}" | grep -q "gzip compressed data" ; do
temp=$(mktemp)
gzip -dc "${file}" > ${temp}
mv ${temp} "${file}"
loop=$((loop+1))
@TimJDFletcher
TimJDFletcher / ipv6-check.yml
Created September 3, 2017 20:30
Check IPv6 connections with ansible
---
- hosts: all
gather_facts: false
tasks:
- name: Get information from ds.testmyipv6.com
raw: curl http://ds.testmyipv6.com/
changed_when: false
register: connection_test
- debug:
@TimJDFletcher
TimJDFletcher / GNUPG_agent_forwarding.md
Last active April 29, 2024 12:48 — forked from surhudm/GNUPG_agent_forwarding.md
GnuPG agent forwarding

Forward GnuPG agent from macOS to Linux

On the remote machine

Run gpg once as your to create the directory structure

gpg --list-keys

For headless systemd based hosts

@TimJDFletcher
TimJDFletcher / packer-permissions.json
Last active December 9, 2019 21:23 — forked from ogrodnek/packer-permissions.json
packer IAM permissions
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "NonResourceBasedReadOnlyPermissions",
"Action": [
"ec2:DescribeSubnets",
"ec2:DescribeSecurityGroups",
"ec2:DescribeSnapshots",
"ec2:DescribeImages",
@TimJDFletcher
TimJDFletcher / stretch-to-buster.sh
Last active August 22, 2019 21:09
Upgrade from Stretch to Buster
#!/bin/bash
set -eux -o pipefail
# Bug fixes
sudo rm -f /etc/apt/apt.conf.d/99rpimonitor
# Replace stretch with buster in all source lists
sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/* /etc/apt/sources.list
# Run the upgrade