Skip to content

Instantly share code, notes, and snippets.

@breedx2
breedx2 / split-page.py
Created January 3, 2024 20:05
Split a PDF vertically, used for scanned double sided PDF pages
# Source http://stackoverflow.com/a/15741856/1301753
# Source https://gist.github.com/breedx2/60409d2179508dba28c4159b81f26fc2
import copy
import sys
import math
import pypdf
def split_pages(src, dst):
src_f = open(src, 'r+b')
var winston = require('winston');
setInterval(function () {
console.log("Making new logger and writing 1 line");
var logger = configure('FHTEST');
logger.info("Any ordinary log message will do");
logger.remove(winston.transports.DailyRotateFile);
logger.close();
}, 2000);
diff --git a/src/json-encode.c b/src/json-encode.c
index 9eff646..d166a1c 100644
--- a/src/json-encode.c
+++ b/src/json-encode.c
@@ -33,7 +33,7 @@ THE SOFTWARE.
#include <stdio.h>
#include <math.h>
-#include "uthash/src/uthash.h"
+#include <uthash.h>
@breedx2
breedx2 / gist:b86075d810dcad26ccf0
Created April 26, 2015 22:05
uthash include for external dep
diff --git a/Makefile b/Makefile
index e84074c..3cd0a7d 100644
--- a/Makefile
+++ b/Makefile
@@ -33,7 +33,7 @@ HELPPATCHES = json-help.pd urlparams-help.pd rest-help.pd
#
#------------------------------------------------------------------------------#
-ALL_CFLAGS = -I"$(PD_INCLUDE)" -std=c99
+ALL_CFLAGS = -I"/usr/include" -I"$(PD_INCLUDE)" -std=c99
import spark.*;
public class Issue107 {
public static void main(String[] args) {
Spark.before(new Filter("/issue") {
@Override
public void handle(Request request, Response response) {
System.out.println("Filter sees sees body: '" + request.body() + "'");
}