Skip to content

Instantly share code, notes, and snippets.

View MCF's full-sized avatar

Mike Fellows MCF

  • Vancouver, B.C. Canada
View GitHub Profile
@MCF
MCF / sqlsrv_test.php
Last active July 24, 2023 03:05
PDO sqlsrv PHP driver, connect and query SQL Server database - reduced test case.
<?php
$serverName = "sqlserver.example.com";
$database = "myDbName";
$uid = 'sqlserver_username';
$pwd = 'password';
try {
$conn = new PDO(
"sqlsrv:server=$serverName;Database=$database",
$uid,
@MCF
MCF / flash_test.html
Created September 23, 2011 00:00
A plupload test of the flash runtime only.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Plupload - Queue widget example</title>
<style type="text/css">
body {
font-family:Verdana, Geneva, sans-serif;
@MCF
MCF / index-xhrupload.html
Created August 25, 2011 01:04
A reduced test case for uploading files indvidually via an XMLHttpRequest
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Upload Files via XHR Test App</title>
<script type="text/javascript">
window.onload = function()
{
var uploadURL = "/file_upload";
@MCF
MCF / basic-index.html
Created February 8, 2011 02:05
Very Basic plupload test
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>The most "basic" plupload test</title>
<!-- Load source versions of the plupload script files -->
<script type="text/javascript" src="plupload.js"></script>
<script type="text/javascript" src="plupload.html4.js"></script>
@MCF
MCF / gist:795979
Created January 26, 2011 00:13
AppController.j for example of tableview editing bug
/*
* AppController.j
* TableViewBug
*
* Created by You on January 25, 2011.
* Copyright 2011, Your Company All rights reserved.
*/
@import <Foundation/CPObject.j>
@import <AppKit/CPTableView.j>