This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Original xmlhttpRequest using the Greasemonkey object. | |
// | |
GM_xmlhttpRequest({ | |
'method': 'GET', | |
'url': url, | |
'onload': function (xhr) { | |
parseGetLength(queueIdx, xhr.responseText); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var httpRequest = new XMLHttpRequest(); | |
httpRequest.open('GET',url,true); | |
httpRequest.setRequestHeader("Method", "GET " + url + " HTTP/1.1"); | |
httpRequest.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); | |
httpRequest.send(null); | |
// Register the callback to parseGetLength() when the request is done. | |
httpRequest.onreadystatechange = function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function expandCollapse(id){ | |
var imgId = 'img_'+ id; | |
if(document.getElementById(id).className == 'hide'){ | |
document.getElementById(id).className='show'; | |
// This will allow the window to scroll to the expanded text | |
// | |
window.location.href = "#"+id; | |
document.getElementById(imgId).src='http://scripting.com/mktree/minus.gif'; | |
} | |
else{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Colin Faulkingham 10/5/2010 | |
# Below is the replacement code fixes a XSS vulnerability with Apache Server errors using CGI::Application::Plus | |
; sub _run_runmode # __STEP must be 2 or 3 to run this | |
{ my ($s, $RM, @args) = @_ | |
; $s->__STEP < 2 && croak qq(Too early to call this method) | |
; $s->__STEP > 3 && croak qq(Too late to call this method) | |
; defined $RM && length $RM || croak qq(No run mode passed) | |
; $s->runmode = $RM # switch RM allowed just from here | |
; my $rm = $s->run_modes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Hacked together from http://utahjs.com/2010/09/22/nodejs-and-mysql-introduction/ | |
// Colin Faulkingham | |
// This example shows how to setup up a web server on port 8000 | |
// and fetch 10 results from a mysql database and outputting those results to HTML | |
// | |
// Version 2.0 | |
// I cleaned up the code to be more readable. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Colin Faulkingham Drawbot Image Processing Code 2011 | |
* | |
*/ | |
import java.awt.*; | |
import java.awt.image.*; | |
import java.io.*; | |
import javax.imageio.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright (C) 2011 Colin Faulkingham, http://3a2d29.com/ | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation, either version 3 of the License, or | |
(at your option) any later version. | |
This program is distributed in the hope that it will be useful, | |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
settings = { | |
password: 'your_password', | |
user: 'your_user', | |
hostdb: 'your.server.address', | |
couchdbhttp: 'http://your_server_address', | |
couchdbhttpport: '5984' // couchdb default port | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boolean VC0706::setColorCtrl(uint8_t showMode, uint8_t controlMode) { | |
uint8_t args[] = {0x02,controlMode,showMode}; | |
return runCommand(VC0706_COLOR_CTRL, args, 3, 5); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define VC0706_COLOR_CTRL 0x3C | |
// I also added the following under | |
//class VC0706 { | |
// public: | |
boolean setColorCtrl(uint8_t,uint8_t); |
OlderNewer