Skip to content

Instantly share code, notes, and snippets.

Ryan Nutt RyanNutt

Block or report user

Report or block RyanNutt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
RyanNutt / extra-style.css
Created Feb 12, 2019
Extra CSS styling for WordPress TwentyNineteen theme that changes archive pages into grid layouts without changing the underlying theme files. You can see what it looks like at
View extra-style.css #main,
body.archive #main {
display: grid;
grid-template-columns: 32% 32% 32%;
@media (max-width: 400px) { #main,
body.archive #main {
grid-template-columns: 100%;
RyanNutt /
Created Jan 20, 2019
WP-CLI command to test WordPress actions from the command line
wp eval "do_action('action_name');" --path=/path/to/htdocs --url=https://website.domain
View functions.php
add_shortcode('permalink', function() {
return get_permalink();
View RemoveWPEmoji.php
remove_action('wp_head', 'print_emoji_detection_script', 7);
remove_action('wp_print_styles', 'print_emoji_styles');
remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
remove_action( 'admin_print_styles', 'print_emoji_styles' );
RyanNutt / !
Last active Nov 2, 2018
Move Canvas files from download package to individual folders for each student and keep original filenames .
View !

Move Canvas Files

Canvas is good for a lot of things, but turning in source code in a computer science class is not one of them.

Our district requires us to use Canvas, and for the most part that's a good thing. But when students need to turn in Java files there's a pretty significant issue. When you download submitted files they've all been renamed and stored in the root of the zip file.

Since they're Java files, they need to be named the same thing as the class which breaks by renaming the files

A Bit of Python

RyanNutt / md2docx.bat
Last active Sep 3, 2018
Convert all markdown files in a folder to docx with MathJax rendered as image instead of as Microsoft equations.
View md2docx.bat
@echo off
for %%f in (*.md) do (
echo Converting to %%~nf.docx
pandoc "" --webtex -t html | pandoc -f html -o "%%~nf.docx"
RyanNutt / pandoc.cmd
Last active Sep 2, 2018
Pandoc command that's supposed to take a markdown file with embedded MathJax and create a Word file with the equations rendered as images. From!topic/pandoc-discuss/CvnPIiWUc-Q
View pandoc.cmd
pandoc --webtex -t html | pandoc -f html -o filename.docx
public class Jeroo {
private int row;
private int column;
private int flowers;
public Jeroo() {}
public Jeroo(int flowers) {}
public Jeroo(int row, int col) {}
public Jeroo(int row, int col, int flowers) {}
RyanNutt /
Last active May 10, 2018
Monkeys banging on a keyboard to solve Hello World -
public class MonkeyHelloWorld {
public static void main( String[] args ) {
String target = "Hello World";
String discovered = "";
long counted = 0l;
do {
discovered = randomString();
RyanNutt / hide-cursor.css
Created Apr 28, 2018
Hide Ace editor cursor when editor is not active
View hide-cursor.css
.ace_hidden-cursors {
You can’t perform that action at this time.