Skip to content

Instantly share code, notes, and snippets.

View 65's full-sized avatar

Duncan Isaksen-Loxton 65

View GitHub Profile
@65
65 / gamselect.sh
Last active January 23, 2024 10:59
Helper file for for Google Workspace (GSuite) Resellers using GAMADV-XTD3 and need to swap between resold customers regularly
#!/bin/bash
#
#
# Author: Duncan Isaksen-Loxton
# Web: sixfive.com.au
#
# PREREQUISITES
@65
65 / userauth.cfm
Created March 10, 2012 18:22
cfldap and user authentication on Active Directory
<cfparam name="isAuthenticated" default="false">
<cfparam name="logindomain" default="domain">
<cfparam name="ldapServer" default="192.168.1.1">
<cfparam name="dcStart" default="DC=domain,DC=co,DC=uk">
<cfif IsDefined("form.username") AND form.username is not "" AND IsDefined("form.password") AND form.password is not "">
<cftry>
<cfldap action="QUERY"
name="auth"
attributes="samAccountName"
start="#dcStart#"
@65
65 / error.txt
Created February 26, 2012 22:59
Gist embed code, and Wordpress shortcode
Error when loading gists from http://gist.github.com/.
@65
65 / mailchimp-googlescript.txt
Last active January 15, 2022 17:15
On Google Spreadsheet / Google Form submission, push new entry to a MailChimp subscription list with an `onformsubmit` trigger. Uses the MailChimp 3.0 API and Google Apps Script.
/**
* Mailchimp API v3
* Add a subscriber to a list with interests on Google Form submit
*
* Updated to 3.0 from https://gist.github.com/acarrillo/5772508
*
* Edit the Google Sheet connected to your form
* Menu > Tools > Script Editor
* Copy and paste this into the file, remove anything there already
* Update the variables in the top section
@65
65 / icon.html
Created June 18, 2013 01:57
Apple touch icons
<link rel="apple-touch-icon" href="/media/pics/site/ios.png">
@65
65 / createtable.sql
Last active December 14, 2015 12:58
Create SQL server deadlock simulation
Create table vin_deadlock (id int, Name Varchar(30))
GO
Insert into vin_deadlock values (1, 'Vinod')
Insert into vin_deadlock values (2, 'Kumar')
Insert into vin_deadlock values (3, 'Saravana')
@65
65 / timer.js
Created March 12, 2012 08:17
Ajax suggest - bash your SQL server!
// set property timer to zero initially
var propertyTimerID = 0;
function timeProperty() {
// if property timer is set
if(propertyTimerID) {
// clear it
clearTimeout(propertyTimerID);
}
// set it to fire a second from now
propertyTimerID = self.setTimeout('getPropertyHelper()', 1000);
@65
65 / copy.sql
Created March 11, 2012 08:02
Copy tables between SQL databases
SELECT *
INTO NewTable
FROM existingdb.dbo.existingtable;
@65
65 / ajax.js
Created March 11, 2012 07:59
AJAX in IE7 and its so called native xmlhttp
var xml = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
@65
65 / XMPPConnection.cfm
Created March 11, 2012 08:29
Java Library for instant messaging over XMPP - Smack
<cfset XMPPConnection = createObject("java", "org.jivesoftware.smack.XMPPConnection").init("localhost")>