Skip to content

Instantly share code, notes, and snippets.

View jottley's full-sized avatar

Jared Ottley jottley

View GitHub Profile
@jottley
jottley / gist:108ff32cf377b28972f8
Created July 30, 2015 00:37
CMIS Browser Binding Raw HTTP File Upload
POST /ottleys.net/public/cmis/versions/1.1/browser/root/sites/jared-ottleys-net/documentlibrary/ HTTP/1.1
Authorization: Bearer <The OAuth Token>
Content-Type: multipart/form-data; boundary=__X_PAW_BOUNDARY__
Host: api.alfresco.com
Connection: close
User-Agent: Paw/2.2.2 (Macintosh; OS X/10.10.4) GCDHTTPRequest
Content-Length: 1358
--__X_PAW_BOUNDARY__
Content-Disposition: form-data; name="cmisaction"
@jottley
jottley / gist:31ba49d8429aaeef7219902957be49ec
Created July 16, 2016 05:28
Start XMPP Client investigation for alfresco-rumors
public void init()
{
final JobDetail jobDetail = new JobDetail(“StartXMPPClientsJob”, Scheduler.DEFAULT_GROUP, StartClientsJob.class);
jobDetail.getJobDataMap().put(“StartXMPPClients”, this);
long startTime = System.currentTimeMillis() + 60000L;
SimpleTrigger trigger = new SimpleTrigger(“StartXMPPClientsTrigger”, null, new Date(startTime), null, 0, 0L);
try
{
scheduler.scheduleJob(jobDetail, trigger);
}
@jottley
jottley / gist:45656327376d6946d50731c7c3ed3849
Created July 16, 2016 05:34
Page through file query (Drive API)
DriveFilesPage page = null;
do
{
if (page == null)
{
page = driveOperations.driveFileQuery().titleIs(folderName).isFolder().parentIs(parentId).getPage();
}
else
{
@jottley
jottley / gist:acc8825e7465f5704f0bd0ea3ab6735e
Last active July 16, 2016 16:48
Is Dropbox Node In Sync?
/**
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
@jottley
jottley / gist:f981ffbea7efff51918695208ffcda28
Created July 16, 2016 16:51
Dropbox Metadata Comparator
/**
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
@jottley
jottley / gist:23a93ac8f29e91db87379ccf14097d38
Created July 16, 2016 16:58
Rough Stub update action Dropbox
/**
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
/**
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
/**
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
@jottley
jottley / gist:925b44a86f0275178738c134e47b828a
Created July 16, 2016 17:16
Returns display path with the final content/folder node
/**
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
/**
* Copyright (C) 2005-2015 Alfresco Software Limited.
*
* This file is part of Alfresco
*
* Alfresco is free software: you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free
* Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*