Skip to content

Instantly share code, notes, and snippets.

@sdellis
sdellis / gist:2911722
Created June 11, 2012 18:16 — forked from Lasha/gist:2389741
PHP mail() contact form script
<?php
if(isset($_POST['submit'])) {
if(trim($_POST['name']) == '') {
$hasError = true;
} else {
$name = trim($_POST['name']);
}
if(trim($_POST['subject']) == '') {
@sdellis
sdellis / sqlite3_backup.sh
Created October 4, 2012 17:27
sqlite3 database backup script with integrity checking
#!/bin/bash
#
# sqlite3_backup.sh
# Script for backing up sqlite3 database with integrity checking
# Intended for use with cron for regular automated backups
#
# @author <shaune@princeton.edu>
#
@sdellis
sdellis / info-for
Last active December 15, 2015 14:19
"Information For..." css for PUL Website
<style type="text/css">
foobar
#block-menu-menu-user-group-portals li a {
color: #F58026;
text-decoration: none;
display:block;
width: 220px;
height: 45px;
line-height: 45px;
margin: 0px;
@sdellis
sdellis / manifest-with-multiple-withins
Last active September 16, 2016 12:17
IIIF Manifest Sample with multiple 'within' values
{
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "http://iiif.io/api/presentation/2.0/example/fixtures/20/manifest.json",
"@type": "sc:Manifest",
"label": "Test 20 Manifest: Multiple Sequences",
"within": [{
"collection-a" : "http://iiif.io/api/presentation/2.0/example/fixtures/collection-a.json",
"collection-b" : "http://iiif.io/api/presentation/2.0/example/fixtures/collection-b.json"
}],
"sequences": [
@sdellis
sdellis / gist:8e16c57718a9b99cac53
Last active August 29, 2015 14:13
Demo.json file for Versailles Interactive Map View
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Section,LatLon
a,"91.25,-191.40625"
b,"83.5625, -188.125"
c,"97.09375, -195.84375"
d,"99.125, -188"
e,"107.125, -188"
f,"76.625, -175.5"
g,"91.25, -175.875"
h,"106.9375, -176"
i,"96.875, -153.375"
@sdellis
sdellis / manifest
Created February 2, 2015 14:34
Manifest JSON Sample
{
"@context":"http://iiif.io/api/presentation/2/context.json",
"@type":"sc:Manifest",
"@id":"http://www.example.org/iiif/book1/manifest",
"label":"Book 1",
"metadata": [
{"label":"Author", "value":"Anne Author"},
{"label":"Published", "value": [
{"@value": "Paris, circa 1400", "@language":"en"},
"""
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
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery.min.js"></script>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<link href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<meta charset="utf-8">
@sdellis
sdellis / index.html
Created April 7, 2015 15:10
Prospero Lite IIIF Manifest Editory- jQuery UI Widget // source http://jsbin.com/sokaju
<!DOCTYPE html>
<html>
<head>
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="http://code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" />
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="http://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>