Skip to content

Instantly share code, notes, and snippets.

View fawkesley's full-sized avatar

Paul Fawkesley fawkesley

View GitHub Profile
@fawkesley
fawkesley / smtp_notes.md
Last active September 25, 2017 08:07
Notes on SMTP from LivLUG September 2017
@fawkesley
fawkesley / readonly_pi.markdown
Last active March 28, 2020 06:47
Mount raspberry pi filesystems as readonly
#
# 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 / 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
@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 / 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 / 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).

*PPD-Adobe: "4.3"
*% Adobe Systems PostScript(R) Printer Description File
*% Copyright 2009 Xerox Corporation.
*% PPD File Info
*FileVersion: "5.371.0.0"
*FormatVersion: "4.3"
*LanguageEncoding: ISOLatin1
@fawkesley
fawkesley / gist:6596fe4166ef7b67ab8e
Created November 20, 2015 13:44 — forked from methane/gist:2185380
Tornado Example: Delegating an blocking task to a worker thread pool from an asynchronous request handler
from time import sleep
from tornado.httpserver import HTTPServer
from tornado.ioloop import IOLoop
from tornado.web import Application, asynchronous, RequestHandler
from multiprocessing.pool import ThreadPool
_workers = ThreadPool(10)
def run_background(func, callback, args=(), kwds={}):
def _callback(result):

Keybase proof

I hereby claim:

  • I am paulfurley on github.
  • I am paulfurley (https://keybase.io/paulfurley) on keybase.
  • I have a public key whose fingerprint is A999 B749 8D1A 8DC4 73E5 3C92 309F 635D AD1B 5517

To claim this, I am signing this object: