Skip to content

Instantly share code, notes, and snippets.

View ptrxyz's full-sized avatar

ptrxyz ptrxyz

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>serif</family>
<prefer>
<family>Nimbus Roman</family>
</prefer>
</alias>
@ptrxyz
ptrxyz / Dockerfile
Created April 11, 2022 13:25
Docker Workshop, basic.
FROM ubuntu
RUN apt update -y && apt install -y python3 python3-pip && pip install flask
@ptrxyz
ptrxyz / Dockerfile
Created April 11, 2022 01:28
Docker Workshop 3
FROM python:3.7-alpine
RUN apk add --no-cache gcc musl-dev linux-headers
...add files, set env, install stuff, etc...
RUN pip install -r requirements.txt
...add files, set env, install stuff, etc...
CMD python app.py
@ptrxyz
ptrxyz / Dockerfile
Created April 11, 2022 01:20
Docker workshop 2
FROM ubuntu
RUN apt update -y && apt install -y python3 python3-pip && pip install flask
ENV APPCONFIG=/app/config.msg
ADD config.msg /app/config.msg
ADD app2.py /app/app.py
WORKDIR /app
@ptrxyz
ptrxyz / app.py
Last active April 11, 2022 01:04
Docker Workshop App1
#!/usr/bin/env python3
from flask import Flask
import os
app = Flask(__name__)
class EnvNotSetError(Exception):
def __repr__(self):
return "EnvNotSetException was raised."
pass
@link = if Rails.env.production?
"#{(ENV['URL_USE_SSL'] == 1 || ENV['URL_USE_SSL'] == 'true') && 'https' || 'http'}://#{ENV['URL_HOST'] || ENV['HOST'] || ENV['SMTP_DOMAIN']}/zip/#{job_id}.#{extname}"
else
"http://#{ENV['URL_HOST'] || ENV['HOST'] || 'localhost:3000'}/zip/#{job_id}.#{extname}"
end
production:
:name_abbreviation:
:reserved_list:
- 'CRR'
- 'CRS'
- 'CRD'
:length_group: [2, 5]
:length_device: [2, 6]
:length_default: [2, 8]
:format_abbr: !ruby/regexp '/\A[a-zA-Z][a-zA-Z0-9\-_]*[a-zA-Z0-9]\Z/'

Chemotion URI schema

Chemotion URI schema is meant to bridge the gap between browser and desktop applications. A common use case would be accessing and editing files stored in the ELN with desktop-installed applications. While one could simply download the files from the ELN and then open the file with a specific application the goal is to simplify the process to only require a single click.

The idea would be to install a URI schema handler on the client system and generating clickable links in the lab journal. The handler can then, for example, download data, launch the desired application, wait for changes and reupload the data afterwards. A simplified example can be seen here: {%youtube da_2mAzXj_Y %}

all
my
nice
buzz word
go here
session
midnight
paper
highway
possibility
efficiency
dad
idea
hat
meal