Skip to content

Instantly share code, notes, and snippets.

View mentiflectax's full-sized avatar

Mentiflectax mentiflectax

View GitHub Profile
@mentiflectax
mentiflectax / wft.g
Last active February 8, 2019 10:52
WFT Grammar starting point
grammar wft;
@header {
}
@lexer::header {
}
@members {
}
wftFile:
{
@mentiflectax
mentiflectax / emacs
Created November 23, 2019 21:17
Emacs config v. 1
;; Evil mode (start)
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(add-to-list 'load-path "~/.emacs.d/evil")
(require 'evil)
[ 6.462]
X.Org X Server 1.20.5
X Protocol Version 11, Revision 0
[ 6.462] Build Operating System: Linux 4.4.0-170-generic x86_64 Ubuntu
[ 6.462] Current Operating System: Linux DP118M-Mint 5.3.0-26-generic #28~18.04.1-Ubuntu SMP Wed Dec 18 16:40:14 UTC 2019 x86_64
[ 6.462] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.3.0-26-generic root=UUID=4314f310-54e1-4bee-a885-5373e2f15581 ro quiet splash vt.handoff=1
[ 6.462] Build Date: 18 December 2019 08:15:29AM
[ 6.462] xorg-server-hwe-18.04 2:1.20.5+git20191008-0ubuntu1~18.04.1 (For technical support please see http://www.ubuntu.com/support)
[ 6.462] Current version of pixman: 0.34.0
[ 6.462] Before reporting problems, check http://wiki.x.org
@mentiflectax
mentiflectax / gist:dfbcbce6dc6c92d90b7823ce803cfacb
Created February 25, 2020 11:35
Spring Boot app's database connetion failure
org.postgresql.util.PSQLException: The connection attempt failed.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:292) ~[postgresql-42.2.9.jar!/:42.2.9]
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:49) ~[postgresql-42.2.9.jar!/:42.2.9]
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:211) ~[postgresql-42.2.9.jar!/:42.2.9]
at org.postgresql.Driver.makeConnection(Driver.java:458) ~[postgresql-42.2.9.jar!/:42.2.9]
at org.postgresql.Driver.connect(Driver.java:260) ~[postgresql-42.2.9.jar!/:42.2.9]
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:138) ~[HikariCP-3.4.1.jar!/:na]
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:353) ~[HikariCP-3.4.1.jar!/:na]
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201) ~[HikariCP-3.4.1.jar!/:na]
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:473) ~[HikariCP-3.4.1.jar!/:na]
@mentiflectax
mentiflectax / test01.toml
Created March 11, 2020 07:47
TOML problems
title = "Austrohungarian troops vented their anger on civilians because they could not win the war"
# Possible types
# TA - Thalerhof Almanac
# AS - Austrian source
type = "TA"
[english]
translation_type = "Gist"
content = '''
Austrohungarian military felt that it would lose the war, and therefore vented their anger by abusing inhabitants of Galicia in most curel ways.
exec(open("py/cm.py").read())
import toml
import sys
# toml_file_name = sys.argv[1]
def add_text_fragment(toml_file_name):
f = open(toml_file_name, "r")
pt = toml.load(f)
@mentiflectax
mentiflectax / process.py
Created March 17, 2020 15:20
process.py
import os
exec(open("py/addTextFragment.py").read())
input_dir = "input"
processed_dir = "processed"
# Find all files in the input directory
files = [f for f in listdir(input_dir) if isfile(join(input_dir, f))]
@mentiflectax
mentiflectax / bpmn-viewer.js
Created September 16, 2020 08:01
Browserified File
This file has been truncated, but you can view the full file.
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({"f/h4Bg":[function(require,module,exports){
var BpmnJS = require('bpmn-js/lib/Viewer');
BpmnJS.prototype._modules = BpmnJS.prototype._modules.concat([
require('bpmn-js/lib/features/movecanvas'),
require('bpmn-js/lib/features/zoomscroll')
]);
module.exports = BpmnJS;
},{"bpmn-js/lib/Viewer":7,"bpmn-js/lib/features/movecanvas":14,"bpmn-js/lib/features/zoomscroll":16}],"bpmn-js":[function(require,module,exports){
@mentiflectax
mentiflectax / bpmn-viewer.js
Created September 21, 2020 10:03
bpmn-viewer.js
This file has been truncated, but you can view the full file.
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({"f/h4Bg":[function(require,module,exports){
var BpmnJS = require('bpmn-js/lib/Viewer');
BpmnJS.prototype._modules = BpmnJS.prototype._modules.concat([
require('bpmn-js/lib/features/movecanvas'),
require('bpmn-js/lib/features/zoomscroll')
]);
module.exports = BpmnJS;
},{"bpmn-js/lib/Viewer":7,"bpmn-js/lib/features/movecanvas":14,"bpmn-js/lib/features/zoomscroll":16}],"bpmn-js":[function(require,module,exports){
@mentiflectax
mentiflectax / bpmn-viewer.browser-unpacked.js
Created October 1, 2020 10:16
Result of `browser-unpack < bpmn-viewer.js > bpmn-viewer.browser-unpacked.js`
This file has been truncated, but you can view the full file.
[
{"id":"f/h4Bg","source":"var BpmnJS = require('bpmn-js/lib/Viewer');\n\nBpmnJS.prototype._modules = BpmnJS.prototype._modules.concat([\n require('bpmn-js/lib/features/movecanvas'),\n require('bpmn-js/lib/features/zoomscroll')\n]);\n\nmodule.exports = BpmnJS;","deps":{"bpmn-js/lib/Viewer":7,"bpmn-js/lib/features/movecanvas":14,"bpmn-js/lib/features/zoomscroll":16},"entry":true}
,
{"id":"bpmn-js","source":"module.exports=require('f/h4Bg');","deps":{}}
,
{"id":"Focm2+","source":"module.exports = require('./lib/differ');","deps":{"./lib/differ":6},"entry":true}
,
{"id":"bpmn-js-diffing","source":"module.exports=require('Focm2+');","deps":{}}
,
{"id":5,"source":"'use strict';\n\n\nfunction isTracked(element) {\n if (element.$type === 'camunda:in') {\n return true;\n }\n\n return element.$instanceOf('bpmn:FlowElement') ||\n element.$instanceOf('bpmn:MessageFlow') ||\n element.$instanceOf('bpmn:Participant') ||\n element.$instanceOf('bpmn:TextAnnotation') ||\n element.$ins