Skip to content

Instantly share code, notes, and snippets.

View daniel-sc's full-sized avatar

Daniel Schreiber daniel-sc

  • ti&m
  • Offenbach, Germany
View GitHub Profile
@daniel-sc
daniel-sc / Main.java
Created November 30, 2015 15:44
Analyze MS-Project files - calculate delay from original plan
import net.sf.mpxj.MPXJException;
import net.sf.mpxj.ProjectFile;
import net.sf.mpxj.Task;
import net.sf.mpxj.mpp.MPPReader;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.*;
import java.util.logging.*;
@daniel-sc
daniel-sc / Dockerfile-php5-4
Last active November 10, 2015 08:15
Reproducing goaop classloading error in shutdown function
FROM php:5.4-cli
COPY . /
ENTRYPOINT ["php"]
CMD ["/shutdown-with-goaop.php"]
@daniel-sc
daniel-sc / flightphp stream file
Created November 3, 2014 09:59
Extend Flightphp to stream file
Flight::map('stream', function($resource){
Flight::response()->sendHeaders();
while ($buf = fread($resource, 1024)) {
echo $buf;
ob_flush();
flush();
}
exit(0);
});
@daniel-sc
daniel-sc / Item.java
Created October 2, 2014 13:31
Java toString() Parser - creates object/instance from toString() output (-string)
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.log4j.Logger;