Skip to content

Instantly share code, notes, and snippets.

View fawkesley's full-sized avatar

Paul Fawkesley fawkesley

View GitHub Profile
@fawkesley
fawkesley / roman_numerals.md
Last active November 23, 2016 10:39
Roman numerals exercise

Roman numerals pairing exercise

  • Use whatever resources you'd usually use eg. The Internet
  • Do whichever exercise you fancy
  • Relax, pair as normal, and have fun!

Background

You've probably seen copyright notices which use roman numerals for their year, eg MMVII (2007).

@fawkesley
fawkesley / admin_config_urls.txt
Last active December 14, 2016 20:19
HTTP 404 logs for URLs containing `admin` or `config` on my site in period March-December 2016
241 /admin/config.php
68 /admin/i18n/readme.txt
30 /administrator/index.php
17 /phpmyadmin
14 /wp-admin/admin-ajax.php?action=revslider_show_image&img=../wp-config.php
9 /wp-content/plugins/google-mp3-audio-player/direct_download.php?file=../../../wp-config.php
9 /wp-content/plugins/db-backup/download.php?file=../../../wp-config.php
8 /wp-content/themes/mTheme-Unus/css/css.php?files=../../../../wp-config.php
7 /wp-content/force-download.php?file=../wp-config.php
7 /administrator/manifests/libraries/joomla.xml
@fawkesley
fawkesley / gist:c3a8a1af5a19b764891f08b3e9d89314
Last active December 16, 2016 14:48
ruby, rbenv, ruby-build, bundler (Gemfile) install reminder
# For example, installing a library / app with a specific `.ruby-version` and dependencies in a `Gemfile`
# update list of available ruby versions
pushd ~/.rbenv/plugins/ruby-build/ && git pull && popd
# install a specific ruby version
rbenv install 2.3.1
# install bundler for new ruby version
gem install bundle
@fawkesley
fawkesley / check_wifi.sh
Last active May 17, 2017 23:05
Raspberry Pi Wifi check / restart script
#!/bin/sh -eu
# Save this to /root/check_wifi.sh then run `sudo crontab -e` and paste the following line:
# * * * * * /root/check_wifi.sh >> /root/check_wifi.log
INTERFACE=wlan0
ROUTER_IP=192.168.0.1
# INTERNET_SITE_A=fake.example.com
#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Some options that are often worth tuning have been included as
@fawkesley
fawkesley / readonly_pi.markdown
Last active March 28, 2020 06:47
Mount raspberry pi filesystems as readonly
@fawkesley
fawkesley / smtp_notes.md
Last active September 25, 2017 08:07
Notes on SMTP from LivLUG September 2017
@fawkesley
fawkesley / samba.md
Last active October 30, 2017 22:34
Samba shares for CCTV server

Add this to the end of /etc/samba/smb.conf:

[camera-front]
   comment= Camera: Front
   path=/media/seagate_250gb/cameras/front
   browseable = yes
   writeable = yes
   write list = camera-front
 guest ok = yes
@fawkesley
fawkesley / 30-randomize-mac-address.conf
Last active May 22, 2022 21:42
MAC address randomization in Ubuntu 17+ (>= 1.4.1): save to /etc/NetworkManager/conf.d/
# /etc/NetworkManager/conf.d/30-randomize-mac-address.conf
# REQUIRES NETWORK MANAGER >= 1.4.1 (Ubuntu Zesty and above)
# Thanks to https://blogs.gnome.org/thaller/2016/08/26/mac-address-spoofing-in-networkmanager-1-4-0/
# This randomize your MAC address for *new* connections
# Be sure to change your existing (saved) connections in
# /etc/NetworkManager/system-connections/*
@fawkesley
fawkesley / randomize-mac-addresses.sh
Last active July 25, 2022 06:24
In Ubuntu 16.04, randomize WiFi MAC addresses with a daily rotation - /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
#!/bin/sh
# /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# INSTALL
#
# > curl -L 'https://gist.github.com/paulfurley/46e0547ce5c5ea7eabeaef50dbacef3f/raw/56ee5dd5f40dec93b8f7438cbdeda5475ea3b5d2/randomize-mac-addresses.sh' |sudo tee /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# > sudo chmod +x /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# Configure every saved WiFi connection in NetworkManager with a spoofed MAC