Skip to content

Instantly share code, notes, and snippets.

View hanleybrand's full-sized avatar

Peter Hanley hanleybrand

View GitHub Profile
@hanleybrand
hanleybrand / gist:8e88211bda55f1d165b7efa791d763b5
Created May 19, 2017 19:07 — forked from brent20/gist:3692482
BLTI Navigation External tool- External Link inside of Instructure Canvas - Brent Saltzman, Creighton University
<cartridge_basiclti_link xmlns="http://www.imsglobal.org/xsd/imslticc_v1p0"
xmlns:blti="http://www.imsglobal.org/xsd/imsbasiclti_v1p0"
xmlns:lticm="http://www.imsglobal.org/xsd/imslticm_v1p0"
xmlns:lticp="http://www.imsglobal.org/xsd/imslticp_v1p0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.imsglobal.org/xsd/imslticc_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticc_v1p0.xsd http://www.imsglobal.org/xsd/imsbasiclti_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imsbasiclti_v1p0.xsd http://www.imsglobal.org/xsd/imslticm_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticm_v1p0.xsd http://www.imsglobal.org/xsd/imslticp_v1p0 http://www.imsglobal.org/xsd/lti/ltiv1p0/imslticp_v1p0.xsd">
<blti:title>External non-BLTI URL</blti:title>
<blti:description>This tool adds a Course Navigation item to a URL specified in the URL tag, after configuration it can be found under the navigation settings</blti:description>
<blti:launch_url>https://lti-examples.heroku.com/tool_r
@hanleybrand
hanleybrand / users_notenrolled_notlog.sql
Last active May 9, 2017 14:57 — forked from enriquemanuel/users_notenrolled_notlog.sql
Oracle SQL - Bb Learn - Finding Users that have not logged in to the System and are not enrolled in any course
-- Finding Users that have not logged in to the System and are not enrolled in any course
SELECT u.user_id, u.last_login_date
FROM BBLEARN.users u WHERE NOT EXISTS (SELECT pk1 FROM BBLEARN.course_users WHERE users_pk1=u.pk1 )
and u.last_login_date is null
-- and u.system_role = 'N' -- if we want to limit by the system role
order by user_id asc;
@hanleybrand
hanleybrand / osx_pdf_join.sh
Last active August 29, 2015 14:13 — forked from anthonywu/osx_pdf_join.sh
Mac OS X bash alias for concatenating pdf files - usage: pdf_join output_file.pdf [list of files]
function pdf_join {
join_py="/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py"
read -p "Name of output file > " output_file && "$join_py" -o $output_file $@ && open $output_file
}
@hanleybrand
hanleybrand / 0_reuse_code.js
Last active August 29, 2015 14:06
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@hanleybrand
hanleybrand / webapp_vpat
Last active August 29, 2015 14:02 — forked from anonymous/webapp_vpat
Section 1194.22 Web-based Internet information and applications – Detail VPAT™ Voluntary Product Accessibility Template® source: http://www.itic.org/public-policy/accessibility
(a) A text equivalent for every non-text element shall be provided (e.g., via "alt", "longdesc", or in element content).
(b) Equivalent alternatives for any multimedia presentation shall be synchronized with the presentation.
(c) Web pages shall be designed so that all information conveyed with color is also available without color, for example from context or markup.
(d) Documents shall be organized so they are readable without requiring an associated style sheet.
(e) Redundant text links shall be provided for each active region of a server-side image map.
(f) Client-side image maps shall be provided instead of server-side image maps except where the regions cannot be defined with an available geometric shape.
(g) Row and column headers shall be identified for data tables.
(h) Markup shall be used to associate data cells and header cells for data tables that have two or more logical levels of row or column headers.
(i) Frames shall be titled with text that facilitates frame identification and navigation
(j)
@hanleybrand
hanleybrand / copy_db.py
Created May 31, 2014 13:45
Django [copy database] - management command
from optparse import make_option
from django.core import serializers
from django.db.models import get_app, get_models
__author__ = 'mikhailturilin'
from django.core.management.base import BaseCommand
"""
Exports Issues from a specified repository to a CSV file
Uses basic authentication (Github username + password) to retrieve Issues
from a repository that username has access to. Supports Github API v3.
"""
import csv
import requests
(function() {
var s=document.createElement('script');
s.setAttribute('src','https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js');
if(typeof jQuery!='undefined') {
var msg='This page already using jQuery v' + jQuery.fn.jquery;
} else {
document.getElementsByTagName('head')[0].appendChild(s);
var msg='This page is now jQuerified'
}
#!/usr/bin/env python
"""Command line script to convert a file, usually an image, into a data URI
for use on the web."""
import base64
import mimetypes
import os
import sys
@hanleybrand
hanleybrand / loggedin.html
Created October 12, 2012 20:18 — forked from Miserlou/loggedin.py
Django Filter By Users Last Logged In
{%for u in users%}
{{u}} - {{u.last_login}}<br />
{% endfor %}