Skip to content

Instantly share code, notes, and snippets.

@knowuh
knowuh / gist:11062679
Created April 18, 2014 20:21
Example of long 'data:image' urls breaking css highlighting.
.activity-nav .prev{
@extend .cf;
padding: 8px;
float: right;
float: right;
background-image: url('/assets/prev.png');
background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpGQzdGMTE3NDA3MjA2ODExODA4M0IxODUyNUFENjlEMCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo2QjAzQjM4NDlFREExMUUyOUJENUJFNkJGMTFGNjQ4RiIg
@knowuh
knowuh / mexii.py
Created May 22, 2014 22:02
Blender MultiExtrude from Blender Artists Liero
################################################################################
# Repeats extrusion + rotation + scale for one or more faces #
################################################################################
bl_info = {
"name": "MExtrude",
"version": (1, 3, 0),
"blender": (2, 6, 8),
"location": "View3D > Tool Shelf",
"description": "Repeat extrusions from faces to create organic shapes",
ENV['CONCORD_CONFIGURED_PORTALS'] ||= 'LOCALHOST'
ENV['CONCORD_LOCALHOST_URL'] ||= 'http://localhost:9000/'
ENV['CONCORD_LOCALHOST_CLIENT_ID'] ||= 'localhost'
ENV['CONCORD_LOCALHOST_CLIENT_SECRET'] ||= '1f0cde4b-b32e-4eac-be51-xxxxxxxxx'
<html><head>
<link rel="stylesheet" type="text/css" href="../../shared/riteslightweightonly.css" />
<script type="text/javascript" src="http://static.ritesproject.net/investigations/shared/file/d3.v2.min.js"></script>
<script type="text/javascript" src="https://c328740.ssl.cf1.rackcdn.com/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="../../shared/file/shutterbug.js"></script>
<script>new Shutterbug('#table');</script>
<script type="text/javascript">
function prettify() {
if ($('#simulation').css('display') == "inline")
@knowuh
knowuh / gist:30c11efd0d17c925bbcf
Last active August 29, 2015 14:04
Extra slashes in CORS requests causes rack/cors errors on Heroku as of 07/25
Last night CORS requests stopped working for us on Heroku. We are using rack-cors (0.2.8) middleware.
It rurns out our request paths didn't match our rackup configuration.
The real question might be: why were these requests returning correct HTTP headers in the past?
One hypothesis is that some other processes was cleaning up requests with redundant slashes.
The configuration:
#…
require 'rack/cors'
@knowuh
knowuh / SassMeister-input-HTML.html
Created August 27, 2014 22:23
Generated by SassMeister.com.
<div class="example-block">
<!-- START RIBBON -->
<div class="ribbon ribbon-red">
<div class="banner">
<div class="text">30 Day Free Trial</div>
</div>
</div>
<!-- END RIBBON -->
<div class="headline">Professional</div>
<div class="tagline">Perfect for business growth.</div>
@knowuh
knowuh / SassMeister-input-HTML.html
Created August 27, 2014 22:24
Generated by SassMeister.com.
<div class="example-block">
<!-- START RIBBON -->
<div class="ribbon ribbon-red">
<div class="banner">
<div class="text">30 Day Free Trial</div>
</div>
</div>
<!-- END RIBBON -->
<div class="headline">Professional</div>
<div class="tagline">Perfect for business growth.</div>
@knowuh
knowuh / video_embed.html
Created August 29, 2014 10:46
video embed for has home-page (first pass)
<h3> Testing </h3>
<div>
The has project video:
</div>
<div style="border: 1px solid black; padding: 2em;">
<video controls="" autoplay="true" width="500" preload="auto" name="media">
<source src="https://has-production.s3.amazonaws.com/resources/HASPortalGuide/Resources/PortalGuideMovie-Broadband/Resources/PortalGuideMovie-Broadband%20-%20Broadband.m4v" type="video/mp4">
</video>
</div>
ssh deploy@learn.concord.org
deploy@ip-10-30-155-89:~$ cd /web/portal/current
deploy@ip-10-30-155-89:/web/portal/current$ git log --pretty=oneline -10
cac87bea8fea23984101611962de5df0be34c0f6 fixes: "Preview" doesn't work when editing "Home Page Content " [#77842658]
8a35e2e5204d3032947029341e22cf411fbff245 Add genigames_data feature to learn portal
ef36bb660ee8c69b0d5bfc25a7575b508ecdff98 Add genigame_connector gem; bump json gem
c056e16d086a85aeddb821f48830985435f0660c Add geniverse_remote_auth feature to learn portal
@knowuh
knowuh / -
Created October 31, 2014 18:20
def run_report(key)
r = Run.find_by_key(key)
r.sequence_run.runs.each do |r|
puts [r.id, r.activity_id, r.remote_endpoint, r.collaboration_run||"none", run.dirty?].join(", “)
end
end