Skip to content

Instantly share code, notes, and snippets.

@DJCordhose
DJCordhose / Google App Engine Java.java
Last active December 11, 2015 13:08
Ultradox simple file download
import static com.google.appengine.api.urlfetch.FetchOptions.Builder.withDefaults;
import java.io.IOException;
import java.net.URL;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.google.appengine.api.urlfetch.HTTPMethod;
@DJCordhose
DJCordhose / Google App Engine Java.java
Last active January 14, 2019 10:09
Ultradox static trigger
import static com.google.appengine.api.urlfetch.FetchOptions.Builder.withDefaults;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@DJCordhose
DJCordhose / Google App Engine Java.java
Last active July 22, 2019 00:22
Ultradox POST parameters
package com.floreysoft.sandbox;
import static com.google.appengine.api.urlfetch.FetchOptions.Builder.withDefaults;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
@DJCordhose
DJCordhose / Plain Java.java
Last active August 26, 2020 18:18
Ultradox GET parameters
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
public class DownloadGET {
public static void main(String[] args) throws Exception {
@DJCordhose
DJCordhose / Google Apps Script.js
Last active April 9, 2018 14:39
Ultradox complex POST parameters
function postComplex() {
// to show that stringifying real dates does work as well
var date = new Date();
var events = {
name: "Olli",
events: [
{
title: "Strategy Meeting",
startTime: "Fri Feb 01 10:00:00 CET 2013",
endTime: "Fri Feb 01 11:30:00 CET 2013",
@DJCordhose
DJCordhose / server-side-react-redux-router.js
Created September 20, 2015 11:58
React-redux-router: How to wait until all required actions have finished before rendering on the server side
export default function renderRoute(request, reply) {
const store = configureStore();
store.dispatch(match(request.path, (error, redirectLocation, routerState) => {
if (redirectLocation) {
reply.redirect(redirectLocation.pathname + redirectLocation.search);
} else if (error) {
reply(error.message).code(500);
} else if (!routerState) {
reply('Not found').code(404);
} else {