Skip to content

Instantly share code, notes, and snippets.

Avatar

Oliver Zeigermann DJCordhose

View GitHub Profile
@DJCordhose
DJCordhose / server-side-react-redux-router.js
Created Sep 20, 2015
React-redux-router: How to wait until all required actions have finished before rendering on the server side
View server-side-react-redux-router.js
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 {
@DJCordhose
DJCordhose / Google Apps Script.js
Last active Apr 9, 2018
Ultradox complex POST parameters
View Google Apps Script.js
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 / Plain Java.java
Last active Aug 26, 2020
Ultradox GET parameters
View Plain Java.java
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 {
View Google App Engine Java.java
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 / Google App Engine Java.java
Last active Jan 14, 2019
Ultradox static trigger
View Google App Engine Java.java
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 Dec 11, 2015
Ultradox simple file download
View Google App Engine Java.java
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;
You can’t perform that action at this time.