Skip to content

Instantly share code, notes, and snippets.

View ryankshaw's full-sized avatar

Ryan Shaw ryankshaw

  • Instructure
  • Utah
View GitHub Profile
/*
TypeError: can't convert nil into String
Backtrace:
/Users/ryan/.rvm/gems/ree/1.8.7%instructure/gems/haml-2.2.17/lib/sass/files.rb:96:in `join'
/Users/ryan/.rvm/gems/ree/1.8.7%instructure/gems/haml-2.2.17/lib/sass/files.rb:96:in `sassc_filename'
/Users/ryan/.rvm/gems/ree/1.8.7%instructure/gems/haml-2.2.17/lib/sass/files.rb:23:in `tree_for'
/Users/ryan/.rvm/gems/ree/1.8.7%instructure/gems/haml-2.2.17/lib/sass/plugin.rb:96:in `update_stylesheet'
/Users/ryan/.rvm/gems/ree/1.8.7%instructure/gems/haml-2.2.17/lib/sass/plugin.rb:82:in `update_stylesheets'
/Users/ryan/.rvm/gems/ree/1.8.7%instructure/gems/haml-2.2.17/lib/sass/plugin.rb:77:in `each'
// if you have node installed on your computer you can run this server by doing
// node path/to/this/file.js
// figure out how to install node-js at http://nodejs.org
var tcp = require('tcp');
var cons = [];
var chat = function(cons, socket, message){
for (var i=0; i < cons.length; i++) {
if (cons[i] != socket) {
#!/usr/bin/env ruby
#this script assumes you use jammit (jammit.documentcloud.com) to bundle and compress all of your javascripts
require 'yaml'
require 'rubygems'
require 'tempfile'
verbose = ARGV.include?("-v")
.mouse, #preview{
position: absolute;
background-repeat: no-repeat;
height: 22px;
min-width: 15px;
z-index: 100;
}
.mouse{
background-image: url('../images/cursor.png');
// ==UserScript==
// @name Zendesk Customizer to add functionality for instructure
// @namespace http://support.instructure.com
// @description enhance the functionality of zendesk for use for instructure peeps.
// @include http://support.instructure.com/*
// ==/UserScript==
(function(){
// Add jQuery
(function(){
@ryankshaw
ryankshaw / gist:745234
Created December 17, 2010 16:37 — forked from zwily/gist:745204
$(function() {
setInterval(function() {
$(".reloadable").each(function(i) {
var originalSrc = $(this).data('originalSrc');
if (!originalSrc) {
originalSrc = $(this).attr('src');
$(this).data('originalSrc', originalSrc);
}
$(this).attr('src', originalSrc + '&hack=' + (new Date().getTime()));
});
@ryankshaw
ryankshaw / inject_math.js
Created January 12, 2011 23:09
injects math into a canvas wiki page
(function(window){
// inside of here window is the iframe
var document = window.document;
function loadScriptWithCallback(url, callback) {
var head = document.getElementsByTagName("head")[0] || document.documentElement;
var script = document.createElement("script");
script.src = url;
script.onload = script.onreadystatechange = function() {
callback.call(window);
// I think we should standarize on one of these (or something you come up with) methods of managing our modules.
// Goals:
// 1. make as few global variables as possible
// 2. make it obvious what globals a certain module depends on.
// 3. do those two in the easiest to read, least ammout of boilerplate way as possible.
//
// suggestions:
var globalThing, OtherGlobalThing;
var myModule = (function() {
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1>This is from Iframe</h1>
<applet code="http://safefiles.instructure.com/courses/20587/files/390078/course%20files/hackerapplet.class?user_id=79&ts=1300731405&verifier=62fdab3e36cd01364037860af3150b19" name="myApplet" MAYSCRIPT height=200 width=200></applet>
</body>
</html>
test_html = "<table id=\"asdf\" style=\"border-color: #3bb0c3; border-width: 4px; background-color: #d3da24; ; width: 4px;\" lang=\"asdf\" summary=\"asfd\" border=\"4\" frame=\"above\" rules=\"all\" cellspacing=\"4\" cellpadding=\"4\">\r\n<tbody>\r\n<tr>\r\n<td>&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td>&nbsp;</td>\r\n</tr>\r\n<tr>\r\n<td>&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td>&nbsp;</td>\r\n</tr>\r\n<tr>\r\n<td>&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td>&nbsp;</td>\r\n</tr>\r\n<tr>\r\n<td>&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td>&nbsp;</td>\r\n<td>&nbsp;</td>\r\n</tr>\r\n</tbody>\r\n</table>"
page = WikiPage.new
page.body = test_html
page.save!
page.body