Skip to content

Instantly share code, notes, and snippets.

@rotaris
rotaris / gist:3365617
Created August 16, 2012 02:02
Styling not applied
<h1>Internships and Opportunities</h1>
@rotaris
rotaris / form.html
Created September 13, 2011 08:47
Sample Upload Form for PHPMailer-FE v4.0.6
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset="iso-8859-1" />
<html>
<head>
<title>Sample form from WorxWare.com</title>
<style>
body, p, table, th, td, div {
font-family: Arial, Helvetica, sans-serif;
@rotaris
rotaris / quickfeel.wsdl
Created May 17, 2011 07:46
ITEC833: The WSDL File for the QuickFeel Web Service
<?xml version="1.0" encoding="UTF-8"?>
<!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Metro/2.1 (branches/2.1-6728; 2011-02-03T14:14:58+0000) JAXWS-RI/2.2.3 JAXWS/2.2. -->
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is Metro/2.1 (branches/2.1-6728; 2011-02-03T14:14:58+0000) JAXWS-RI/2.2.3 JAXWS/2.2. -->
<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://soap.quickfeel.itec833.org/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://soap.quickfeel.itec833.org/" name="QuickFeelWS">
<wsp:Policy xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:ssp="http://schemas.sun.com/2006/03/wss/server
participant "«actor»\nTravel Coordinator" as TC
participant "«boundary»\nUI" as UI
participant "«controller»\nTFS" as TFS
note left of TFS
Travel Forms System
(administrative backend)
end note
participant "«actor»\nDatabase" as DB
participant "«actor»\nTraveller" as T
@rotaris
rotaris / tfs_models.sql
Created May 2, 2011 06:46
The SQL code generated by the TFS models
BEGIN;
CREATE TABLE "tfsapp_trip" (
"id" integer NOT NULL PRIMARY KEY,
"name" varchar(100) NOT NULL,
"status" varchar(100) NOT NULL,
"admin_comments_for_traveller" text NOT NULL,
"date_created" datetime NOT NULL,
"date_modified" datetime NOT NULL,
"author_id" integer NOT NULL REFERENCES "auth_user" ("id")
)
@rotaris
rotaris / urls.py
Created April 22, 2011 01:05
Django-soaplib Hello World Web Service urls.py
# See also: https://gist.github.com/935809
from django.conf.urls.defaults import *
urlpatterns = patterns(
'',
(r'^books/', 'books.views.hello_world_service'),
)
@rotaris
rotaris / views.py
Created April 22, 2011 01:04
Django-soaplib Hello World Web Service View
# soaplib v2.0.0beta2 (from memory)
# Django v1.3 (stable)
# NOTE: CSRF middleware has been turned off!
# For urls.py, see: https://gist.github.com/935812
import soaplib
from soaplib.core.service import rpc, DefinitionBase
from soaplib.core.model.primitive import String, Integer
from soaplib.core.model.clazz import Array
@rotaris
rotaris / gist:925142
Created April 18, 2011 11:07
For Darius
# --- OneID LDAP Authentication --- #
import ldap
from django_auth_ldap.config import LDAPSearch, GroupOfNamesType
AUTH_LDAP_SERVER_URI = "..." # [censored] same as moodle
AUTH_LDAP_BIND_DN = "CN=sci.Search-LDAP,OU=SCI-Misc,OU=SCI,OU=MQ-BusUnit-Res,DC=mqauth,DC=uni,DC=mq,DC=edu,DC=au"
AUTH_LDAP_BIND_PASSWORD = "..." # censored
AUTH_LDAP_USER_SEARCH = LDAPSearch("OU=sSCI,OU=Students,OU=Active,OU=MQ-Users,DC=mqauth,DC=uni,DC=mq,DC=edu,DC=au",
ldap.SCOPE_SUBTREE, "(cn=*)")
@rotaris
rotaris / gist:904810
Created April 5, 2011 23:36
ITEC800: D2: Sequence Diagram: Submit (Trip) for Approval
participant "«actor»\nTraveller" as T
participant "«boundary»\nUI" as UI
participant "«entity»\nTrip" as Trip
participant "«entity»\nUser" as User
participant "«actor»\nEmailer" as Emailer
participant "«entity»\nAbsenceOnDuty" as AoD
participant "«entity»\nTravelBudget" as TB
participant "«entity»\nTravelDiary" as TD
participant "«entity»\nChecklist" as Checklist
@rotaris
rotaris / gist:903084
Created April 5, 2011 05:25
YQL query to get geographical information from Wikipedia
select * from html where url="http://en.wikipedia.org/wiki/Epping,_New_South_Wales" and
xpath='//table[@class="infobox geography vcard"]'