Skip to content

Instantly share code, notes, and snippets.

@steinarb
steinarb / emacs_desktop_load.profile
Created Jan 28, 2021
Emacs profiler capture from starting up from a .emacs.desktop file (maven projects managed by projectile)
View emacs_desktop_load.profile
[profiler-profile "24.3" cpu #s(hash-table size 1095 test equal rehash-size 1.5 rehash-threshold 0.8125 data ([emacs-lisp-mode lisp-interaction-mode command-line normal-top-level nil nil nil nil nil nil nil nil nil nil nil nil] 4 [require byte-code desktop-read progn eval command-line-1 command-line normal-top-level nil nil nil nil nil nil nil nil] 4 [require byte-code autoload-do-load desktop-load-file desktop-create-buffer eval-buffer load-with-code-conversion load desktop-read progn eval command-line-1 command-line normal-top-level nil nil] 36 [byte-code autoload-do-load desktop-load-file desktop-create-buffer eval-buffer load-with-code-conversion load desktop-read progn eval command-line-1 command-line normal-top-level nil nil nil] 15 [byte-code require byte-code autoload-do-load desktop-load-file desktop-create-buffer eval-buffer load-with-code-conversion load desktop-read progn eval command-line-1 command-line normal-top-level nil] 24 [require byte-code require byte-code autoload-do-load desktop-load-f
@steinarb
steinarb / docker_logs_429
Created Sep 9, 2020
docker logs from starting oldalbum on karaf 4.2.9
View docker_logs_429
sb@lorenzo:~/workspaces/ws06/oldalbum/docker$ docker logs d56ade30de95
karaf: Ignoring predefined value for KARAF_HOME
Sep 09, 2020 8:29:50 PM org.apache.karaf.main.Main launch
INFO: Installing and starting initial bundles
Sep 09, 2020 8:29:50 PM org.apache.karaf.main.Main launch
INFO: All initial bundles installed and set to start
Sep 09, 2020 8:29:50 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Trying to lock /opt/apache-karaf-4.2.9/lock
Sep 09, 2020 8:29:50 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Lock acquired
@steinarb
steinarb / docker_logs
Created Sep 9, 2020
docker logs from starting oldalbum on karaf 4.2.8
View docker_logs
sb@lorenzo:~/workspaces/ws06/oldalbum/docker$ docker logs 2b155a0f01e2
karaf: Ignoring predefined value for KARAF_HOME
Sep 09, 2020 8:20:10 PM org.apache.karaf.main.Main launch
INFO: Installing and starting initial bundles
Sep 09, 2020 8:20:10 PM org.apache.karaf.main.Main launch
INFO: All initial bundles installed and set to start
Sep 09, 2020 8:20:10 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Trying to lock /opt/apache-karaf-4.2.8/lock
Sep 09, 2020 8:20:10 PM org.apache.karaf.main.lock.SimpleFileLock lock
INFO: Lock acquired
@steinarb
steinarb / emptyalbum.sql
Created Sep 8, 2020
Oldalbum database containing just the root album
View emptyalbum.sql
--liquibase formatted sql
--changeset sb:empty_album
insert into albumentries (albumentry_id, parent, localpath, album, title, description, imageurl, thumbnailurl, sort, lastmodified, contenttype, contentlength) values (1, 0, '/', true, 'Pictures from the past', 'Old images 90, served up in a mobile friendly responsive layout and with OpenGraph-tags and twitter cards', '', '', 0, null, null, 0);
ALTER TABLE albumentries ALTER COLUMN albumentry_id RESTART WITH 2
@steinarb
steinarb / dumproutes.sql
Last active Sep 14, 2020
oldalbum demo database
View dumproutes.sql
--liquibase formatted sql
--changeset sb:saved_albumentries
insert into albumentries (albumentry_id, parent, localpath, album, title, description, imageurl, thumbnailurl, sort, lastmodified, contenttype, contentlength) values (1, 0, '/', true, 'Bilder fra 90-tallet', 'Gamle bilder fra 90-tallet, servert mobilvennlig (responsive layout) med OpenGraph-tagger og twitter cards', '', '', 0, null, null, 0);
insert into albumentries (albumentry_id, parent, localpath, album, title, description, imageurl, thumbnailurl, sort, lastmodified, contenttype, contentlength) values (2, 1, '/misc/', true, 'Miscellaneous unsorted pictures', 'Contains a lot of pictures, most of marginal interest, which will be thrown away or transferred to other directories in time', null, null, 1, null, null, 0);
insert into albumentries (albumentry_id, parent, localpath, album, title, description, imageurl, thumbnailurl, sort, lastmodified, contenttype, contentlength) values (3, 1, '/moto/', true, 'Motorcycle pictures', 'Here are some of my mot
@steinarb
steinarb / MANIFEST.MF
Created Jul 26, 2020
MANIFEST.MF of liquibase-core 3.10.1
View MANIFEST.MF
Manifest-Version: 1.0
Liquibase-Package: liquibase.change,liquibase.command,liquibase.change
log,liquibase.database,liquibase.parser,liquibase.precondition,liquib
ase.datatype,liquibase.serializer,liquibase.sqlgenerator,liquibase.ex
ecutor,liquibase.snapshot,liquibase.logging,liquibase.diff,liquibase.
structure,liquibase.structurecompare,liquibase.lockservice,liquibase.
sdk.database,liquibase.ext,liquibase.pro,com.datical.liquibase
Bundle-License: http://www.apache.org/licenses/LICENSE-2.0
Bundle-SymbolicName: org.liquibase.core
Build-Number: 17
@steinarb
steinarb / feature.xml
Created Jul 26, 2020
Feature repository for liquibase sample application
View feature.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" name="handlereg.db.liquibase.test">
<repository>mvn:no.priv.bang.karaf/liquibase-core-karaf/3.8.1-SNAPSHOT/xml/features</repository>
<feature name="liquibase-sample-hook" description="Sample bundle for liquibase" version="1.0.0.SNAPSHOT">
<feature>scr</feature>
<feature>pax-jdbc-derby</feature>
<feature version="3.10.1" prerequisite="false" dependency="false">liquibase-core</feature>
<bundle start-level="80">mvn:no.priv.bang.karaf.liquibase/liquibase.sample/1.0.0-SNAPSHOT</bundle>
</feature>
<feature name="liquibase-sample" description="liquibase-sample DataSource" version="1.0.0.SNAPSHOT">
@steinarb
steinarb / feature.xml
Created Jul 26, 2020
Feature repository for liquibase 3.10.1
View feature.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" name="ukelonn.bundle.db.liquibase">
<feature name="liquibase-core" start-level="40" version="3.10.1">
<bundle>mvn:org.yaml/snakeyaml/1.24</bundle>
<bundle>mvn:org.liquibase/liquibase-core/3.10.1</bundle>
<bundle start-level="35">mvn:no.priv.bang.karaf/liquibase-slf4j-osgi/3.8.1-SNAPSHOT</bundle>
<bundle start-level="30">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.activation-api-1.1/2.9.0</bundle>
</feature>
</features>
@steinarb
steinarb / karaf.log
Created Jul 25, 2020
karaf.log message when liquibase is unable to load javax.activation.DataSource
View karaf.log
2020-07-25T12:13:49,797 | ERROR | features-3-thread-1 | Felix | 5 - org.ops4j.pax.logging.pax-logging-api - 1.11.4 | Bundle org.ops4j.pax.jdbc.config [57] EventDispatcher: Error during dispatch. (java.lang.NoClassDefFoundError: javax/activation/DataSource)
java.lang.NoClassDefFoundError: javax/activation/DataSource
at java.lang.ClassLoader.defineClass1(Native Method) ~[?:?]
at java.lang.ClassLoader.defineClass(ClassLoader.java:1017) ~[?:?]
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2410) ~[?:?]
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2194) ~[?:?]
at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1607) ~[?:?]
at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80) ~[?:?]
at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053) ~[?:?]
at java.
View changelog01.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
<changeSet author="sb" id="oldalbum-1.0.0-albumentries">
<preConditions onFail="CONTINUE" >
<not>
<tableExists tableName="albumentries" />
</not>
</preConditions>