Skip to content

Instantly share code, notes, and snippets.

View benzkji's full-sized avatar
🐙
eight times a thing

Ben Stähli benzkji

🐙
eight times a thing
  • bnzk GmbH
  • Biel/Bienne Switzerland
View GitHub Profile
@benzkji
benzkji / gitea stack trace
Last active December 5, 2018 08:20
gitea git push
Counting objects: 4, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 362 bytes | 362.00 KiB/s, done.
Total 4 (delta 3), reused 0 (delta 0)
remote: runtime/cgo: pthread_create failed: Resource temporarily unavailable
remote: SIGABRT: abort
remote: PC=0x1261fd8 m=11 sigcode=18446744073709551610
remote:
remote: goroutine 0 [idle]:
@benzkji
benzkji / backboneView.js
Created January 17, 2019 12:50
cargo pixelate
define("text", ["module"], function(t) {
"use strict";
var e, a, i = ["Msxml2.XMLHTTP", "Microsoft.XMLHTTP", "Msxml2.XMLHTTP.4.0"], o = /^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im, s = /<body[^>]*>\s*([\s\S]+)\s*<\/body>/im, r = "undefined" != typeof location && location.href, n = r && location.protocol && location.protocol.replace(/\:/, ""), d = r && location.hostname, h = r && (location.port || void 0), m = [], l = t.config && t.config() || {};
return e = {
version: "2.0.1",
strip: function(t) {
if (t) {
t = t.replace(o, "");
var e = t.match(s);
e && (t = e[1])
@benzkji
benzkji / search_indexes.py
Last active June 20, 2019 08:02
filer haystack pdf integration
# full of prints, forgive me ;-)
# coding: utf-8
from __future__ import unicode_literals
import os
from pdfminer.pdfdocument import PDFEncryptionError
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from django.core.management.base import BaseCommand
from filer.models import Folder
class Command(BaseCommand):
def handle(self, *args, **options):
Folder._tree_manager.rebuild()