Skip to content

Instantly share code, notes, and snippets.

View leereilly's full-sized avatar

Lee Reilly leereilly

View GitHub Profile
@leereilly
leereilly / heroku-add-on-template.md
Created August 29, 2014 21:35
Heroku Add On Template

ADDON-NAME is an add-on for providing functionality X.

Adding functionality X to an application provides benefits X, Y and Z. [[Sell the benefits here! Don't skimp - developers have many options these days.]]

ADDON-NAME is accessible via an API and has supported client libraries for [[Java|Ruby|Python|Node.js|Clojure|Scala]]*.

Provisioning the add-on

ADDON-NAME can be attached to a Heroku application via the CLI:

@leereilly
leereilly / 2legit2quit.txt
Created November 22, 2014 20:35
Too Legit To Quit
<html><head><title>2legit2quit</title></head><body><img src="http://rob.nu/wp-content/uploads/2011/04/memes-u-mad.gif?5cc5fd" width="100%" height="100%"></body></html>
@leereilly
leereilly / Three legit three quit
Last active August 29, 2015 14:10
3legit3quit.html
<h1>3legit3quit</h1>
@leereilly
leereilly / NormalSequenceExample.n3
Created April 6, 2011 16:55
What I'm trying to get my serialized RDF graph to look like
@prefix dms: <http://example.stanford.edu/ns/> .
@prefix ore: <http://www.openarchives.org/ore/terms/> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
<http://dmstech.groups.stanford.edu/ccc001/manifest/NormalSequence> a dms:Sequence,
ore:Aggregation,
rdf:List;
ore:aggregates <http://example.stanford.edu/item/DOC001/1V>,
<http://example.stanford.edu/item/DOC001/1R>,
<http://example.stanford.edu/item/DOC001/2V>,
@leereilly
leereilly / gist:987094
Created May 23, 2011 17:21 — forked from oisin/gist:952572
API version checking using Sinatra's before filter; supports nested resources
require 'sinatra'
# Set the version of the API being run here
#
MAJOR_VERSION = 1
MINOR_VERSION = 0
helpers do
def version_compatible?(nums)
return MAJOR_VERSION == nums[0].to_i && MINOR_VERSION >= nums[1].to_i
@leereilly
leereilly / jquery.lifestream.js
Created July 8, 2011 00:34
JQuery Lifestream
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script src="https://raw.github.com/christianv/jquery-lifestream/master/jquery.lifestream-compiled.js"></script>
<script>
$("#lifestream").lifestream({
list:[
{
service: "github",
user: "leereilly"
},
{
@leereilly
leereilly / coderwall.html
Created July 8, 2011 03:39
Coderwall Badge Script for Blogs (or any other Web Page)
<script>
// This is a fork of https://gist.github.com/1005886
var coderwallJSONurl ="http://www.coderwall.com/hermanjunge.json?callback=?";
var height = 75;
var width = 75;
$(document).ready(function(){
$.getJSON(coderwallJSONurl, function(data) {
$.each(data.data.badges, function(i, item) {
@leereilly
leereilly / Questions.md
Created July 13, 2011 19:00
Magma Rails Give-away

Day Job: Software developer @ Stanford.

Open Source contribution (if any): Various code/documentations contributions verifiable via GitHub:

@leereilly
leereilly / Photovine_2011-07-25-122804_Stanford-Phone.crash
Created August 1, 2011 16:58
Photovine_2011-07-25-122804_Stanford-Phone.crash
Incident Identifier: B0163859-41C2-48C2-938F-FD4DF5629AE2
CrashReporter Key: ec72c2d4ebeb3b104166c025307b5380bc27b2bf
Hardware Model: iPhone3,1
Process: Photovine [1620]
Path: /var/mobile/Applications/98BB1F73-7452-48E8-A928-7E0C5605E085/Photovine.app/Photovine
Identifier: Photovine
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
@leereilly
leereilly / load-tests.md
Created August 8, 2011 19:16
Google vs. Parker Load vs. ImageStacks Load Tests

Simple load testing with ab -n [TOTAL_NUMBER_OF_REQUESTS] -c [NUMBER_OF_CONCURRENT_REQUESTS] [URI]

Summary

  • ImageStacks TEST can't can't handle more than 10 concurrent requests for large images (it will timeout for most users and be slow for a handful of users).
  • Tiled images are fine (fast response time and can handle over 50 concurrent requests), unless another ImageStacks request e.g. thumbnail view or large view is blocking.

Recommendation

  • Don't use thumbnails - this will reduce the load on ImageStacks. They're unnecessary if the training session is to demonstrate the ZPR viewer.