Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View martymcguire's full-sized avatar

Marty McGuire martymcguire

View GitHub Profile
@martymcguire
martymcguire / attributes.rb
Created May 16, 2019 20:53 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'
@martymcguire
martymcguire / shutdown-handler.php
Created February 18, 2019 18:13 — forked from westonruter/shutdown-handler.php
Disable WSOD detection on WordPress 5.1 so that fatal errors during development don't constantly cause plugins to suspend
<?php // phpcs:disable WordPress.Files.FileName.InvalidClassFileName
/*
* Plugin Name: Non-Handling Shutdown Handler
* Description: Disable WSOD protection so that plugins will not auto-suspend during development while errors often occur.
* Plugin URI: https://gist.github.com/westonruter/583a42392a0b8684dc268b40d44eb7f1
* Plugin Author: Weston Ruter
*/
/**
@martymcguire
martymcguire / episode_discussion.html
Created May 7, 2018 16:19
Rendering webmentions with Morris on wehavetoask.com
<div id="mentions" class="mentions">
{{ $paths := union (slice .URL) .Params.aliases }}
{{ range $paths }}
{{ $mentions_for_path := index $.Site.Data.webmention_io.index . }}
{{ if $mentions_for_path }}
{{ $.Scratch.Add "mention_ids" $mentions_for_path }}
{{ end }}
{{ end }}
{{ $mention_ids := $.Scratch.Get "mention_ids" }}
{{ $mentions := apply $mention_ids "index" $.Site.Data.webmention_io.mentions "." }}
@martymcguire
martymcguire / .block
Last active April 23, 2018 15:08
Loading dataset WWW18
license: mit
@martymcguire
martymcguire / _plugins_podcast_rss.rb
Last active August 29, 2023 07:46
A Jekyll layout for a podcast RSS feed. Each podcast has an entry in `_podcasts/` with metadata. Items are `_posts/` entries with episode content that match a specified tag.
module Jekyll
class PodcastRssPage < Page
def initialize(site, base, dir, post)
@site = site
@base = base
@dir = dir
@name = 'feed.rss'
self.process(@name)
@martymcguire
martymcguire / _includes_facepile.html
Created June 20, 2017 18:39
Plugin and templates to make Webmention.io data available to a Jekyll site
{% unless include.faces == empty %}
<div class="row" style="margin-bottom: 1em"><div class="col-xs-12">
<h4>{{ include.name }}</h4>
<div class="facepile">
{% for face in include.faces %}
{% assign author = face.data.author %}
{% if author.photo %}
{% assign photo = author.photo | imageproxy: 60 %}
{% endif %}
{% case include.mftype %}

Keybase proof

I hereby claim:

  • I am martymcguire on github.
  • I am schmarty (https://keybase.io/schmarty) on keybase.
  • I have a public key whose fingerprint is DD7F 6B41 4E54 F883 93F2 F546 B36C 9A5E 8F7A 6619

To claim this, I am signing this object:

# generated by Slic3r 1.1.7 on Mon Sep 8 12:38:43 2014
avoid_crossing_perimeters = 1
bed_size = 200,200
bed_temperature = 60
bottom_solid_layers = 3
bridge_acceleration = 0
bridge_fan_speed = 100
bridge_flow_ratio = 1
bridge_speed = 60
brim_width = 0
#!/usr/bin/perl -i
use strict;
use warnings;
# Slic3r 0.9.8 Post Processing Script to make it work with MakerWare 2.0 and Firmware 7 (only tested on a Rep1)
# Dualstrusion works
# Support on secondary extruder works
# Save this file somewhere, then under Print Settings, Output Options, Post-processing scripts, enter path to this file
# Under Printer Settings, General, set G-code flavor to MakerBot, extruders 2, bedsize 225 x 145, etc...
@martymcguire
martymcguire / sticky_notes.py
Created January 9, 2011 20:12
Generate Post-It banners for plotting with your MakerBot Unicorn
#! /usr/bin/env python
# Usage: python sticky_notes.py 'Your Message Here!' > out.gcode
import cairo
import sys
import re
### BEGIN CONFIGURATION ###
feedrate = 3500