Skip to content

Instantly share code, notes, and snippets.

Avatar

Dustin Getz dustingetz

View GitHub Profile
View gist:559317
void Win32DownloadUrl(const TString& url, std::vector<char>& out_responsePayload)
{
OutputDebugString(boost::str(boost::wformat(L"Win32DownloadUrl(inner)\r\n")).c_str());
HINTERNET hINet = InternetOpen(TEXT("InetURL/1.0"), INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0 ); //INTERNET_OPEN_TYPE_DIRECT INTERNET_OPEN_TYPE_PRECONFIG
if (!hINet)
{
OutputDebugString(boost::str(boost::wformat(L"Win32DownloadUrl(inner): couldn't fetch URL\r\n")).c_str());
DWORD lastError = GetLastError();
OutputDebugString(boost::str(boost::wformat(L"...GetLastError=%1%\r\n")%lastError).c_str());
View gist:580948
wspt.getDhtmlClient().registerLoadHandler(function() {
wspt.getDhtmlClient().getEventManager().subscribeSystemEvents(processTicketReceipt${ns});
},'importfiles subscribe sys events, processTicketReceipt');
function doCheckin (oCtx)
{
window.processTicketReceipt${ns} = function(sEventID, sRecipientID, oEventData)
{
if (sRecipientID !== "importfiles${ns}") return;
var oTicket = oEventData.transferUrl;
View cpp_mem.cpp
void* malloc(unsigned int numBytes)
{
void* pointer; //will point to the allocated buffer after its allocated
//request virtual memory from OS -- this is a real win32 function
pointer = VirtualAlloc(
NULL,
numBytes,
MEM_COMMIT | MEM_RESERVE, //allocate virtual memory, AND put it in real memory right now (virtual memory can return a virtual pointer to the hard drive, and then swap it into memory on demand)
PAGE_READWRITE //can't execute code here. e.g. to prevent buffer overflows from being able to execute malicious code
View gist:595467
function startCheckin (oCtx)
{
var processTicketReceipt${ns} = function(sEventID, sRecipientID, oEventData)
{
if ((sRecipientID !== "checkin${ns}") ||
(sEventID !== docway.SYSTEM_EVENT_TICKET_RECEIPT)) return;
finishCheckin(oCtx, oEventData);
}
wspt.getDhtmlClient().getEventManager().subscribeSystemEvents(processTicketReceipt${ns});
View gist:595517
function processTicketReceipt(sEventID, sRecipientID, oEventData)
{
if ((sRecipientID !== "checkin${ns}") ||
(sEventID !== docway.SYSTEM_EVENT_TICKET_RECEIPT)) return;
finishCheckin(oCtx, oEventData);
}
function startCheckin (oCtx)
{
oQueryString = wspt.getDhtmlClient().createQueryString();
View gist:637619
docway.Transfer.requestContentOperation = function(oObject, sCmd, sFormat, nPage, sPageModifier, oWindow)
{
//we used to "defer" the content operation here, and hit the UI to get tickets and an ajax payload.
//now we do everything inline, because reentrant setTimeout blows everything up
if (wsptIsNull(docway.TransferManager.getSharedControl()))
{
if (docway.TransferManager.MustHaveControl)
{
wspt.alertWarning("${transfer.js.operationdisallowed}");
return;
View gist:637620
public class Component extends RawComponent
{
public void render(IComponentRequest request, IComponentResponse response) throws Exception
{
JSONObjectBuilder responseBuilder = new JSONObjectBuilder();
JSONObjectBuilder ticketBuilder = new JSONObjectBuilder();
{
boolean needTicket = Boolean.parseBoolean(request.getParameterValue("needTicket"));
if (needTicket)
View gist:652175
var index=0;
var i=0;
var foundTag = true;
while(foundTag)
{
var foundTag = !isNull(document.getElementById('attr' + i + 'type_'));
if (!foundTag)
{
break;
View gist:740693
this.tbar = new Ext.Toolbar({
//height:70,
boxMinHeight:100,
items:[
{text:'Functional View'}
,'->'
,{
xtype:'superboxselect',
width:275,
displayField:'description',
View gist:749188
Multiple Positions at all experience levels
You will work on the DocWay Suite, a series of products that integrate Documentum with many portals (such as SharePoint, WebLogic). Familiarity with our stack is great, but it's more important that you're smart and versatile.
As we write enterprise software, we do client support, including software installation and significant code customization. We're picky with our hires, you will work with smart people and highly technical leadership. Relaxed work environment—many of us have families and kids.
Our architecture:
Java server talking to a proprietary document database (Documentum)
Java middle tier, cross-compiled to .NET (we support both Java and .NET portals)
You can’t perform that action at this time.