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
View Jeroo.java
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) {}
@jbasdf
jbasdf / canvas_lti_variables
Created Nov 11, 2017
All Canvas LTI Variables for substitution
View canvas_lti_variables
context_title: "$Context.title",
com_instructure_post_message_token: "$com.instructure.PostMessageToken",
com_instructure_assignment_lti_id: "$com.instructure.Assignment.lti.id",
com_instructure_originality_report_id: "$com.instructure.OriginalityReport.id",
com_instructure_submission_id: "$com.instructure.Submission.id",
com_instructure_file_id: "$com.instructure.File.id",
course_offering_sourced_id: "$CourseOffering.sourcedId",
context_id: "$Context.id",
context_sourced_id: "$Context.sourcedId",
message_document_target: "$Message.documentTarget",
@M165437
M165437 / ScheduleList.php
Last active Aug 29, 2019
PHP Artisan command that lists all scheduled tasks: php artisan schedule:list (Credit: https://stackoverflow.com/a/35559970/2714126)
View ScheduleList.php
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Console\Scheduling\Schedule;
class ScheduleList extends Command
{
/**
@cfebs
cfebs / vboxhostonlyssh.md
Last active Aug 19, 2019
setup a vbox ubuntu server with host only adapter
View vboxhostonlyssh.md

Virtualbox dev environment w/ static IP

I can never find a great guide on this stuff, so these are more like notes to myself.

The goal here is to have a virtualbox running more or less headless. An ssh client is used separately to actually use the machine. I've found it to be fantastic for a quick dev setup.

lets go

Assumes you have a vbox setup with Ubuntu server (this will work for 16.04) ready to go.

@nickcernis
nickcernis / mailchimp-popup-for-wordpress.md
Last active Apr 25, 2019
MailChimp Popup Script that works with WordPress sites
View mailchimp-popup-for-wordpress.md

MailChimp's default popup scripts can break on WordPress sites that use jQuery/jQuery UI unless you include their embed code as the final elements before the closing body tag.

Including them in this way isn't always possible or easy with WordPress.

The code below is an alternative implementation of the loader that forces MailChimp's popup scripts to appear below all other scripts upon page load.

To use it, modify the baseUrl, uuid, and lid attributes with the ones from the original popup script that MailChimp supplies.

<script>
View gist:122907e95956602e5c09
<?
/////////////////////
// slack2html
// by @levelsio
/////////////////////
//
/////////////////////
// WHAT DOES THIS DO?
/////////////////////
//
@jchamb
jchamb / gist:fdf7d12b0191cb852056
Last active Mar 7, 2019
Woocommerce Free Downloads without checkout
View gist:fdf7d12b0191cb852056
function direct_free_downloads_button($button)
{
global $product;
if( $product->is_downloadable() AND $product->get_price() == 0 )
{
$files = $product->get_files();
$files = array_keys($files);
$download_url = home_url('?download_file='.$product->id.'&key='.$files[0].'&free=1' );
View fake_smtp.py
#!/usr/bin/env python
"""A noddy fake smtp server."""
import smtpd
import asyncore
class FakeSMTPServer(smtpd.SMTPServer):
"""A Fake smtp server"""
def __init__(*args, **kwargs):
@gbertb
gbertb / font-awesome.js
Created Mar 12, 2014
How to load Font Awesome asynchronously
View font-awesome.js
<!--
How to load Font Awesome asynchronously
Use: Just put this script on the bottom/footer of your web
-->
<script type="text/javascript">
(function() {
var css = document.createElement('link');
css.href = '//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css';
@solderjs
solderjs / email to text.md
Last active May 6, 2018
List of free email to text services
View email to text.md
You can’t perform that action at this time.