Skip to content

Instantly share code, notes, and snippets.

View rufinus's full-sized avatar

Ludwig Ruderstaller rufinus

View GitHub Profile
import serial
import time
from cryptography.hazmat.primitives.ciphers.aead import AESGCM
from binascii import unhexlify
import sys
import string
import paho.mqtt.client as mqtt
import xml.etree.ElementTree as ET
from gurux_dlms.GXDLMSTranslator import GXDLMSTranslator
from bs4 import BeautifulSoup
- platform: rest
name: voron24_sensor
resource: "http://192.168.8.25:7125/printer/objects/query?heater_bed&extruder&print_stats&toolhead&display_status&virtual_sdcard&temperature_sensor%20raspberry_pi&temperature_sensor%20MCU&temperature_sensor%20chamber_temp"
json_attributes_path: "$.result.status"
json_attributes:
- heater_bed
- extruder
- print_stats
- toolhead
- display_status
@rufinus
rufinus / json card
Last active September 1, 2022 17:53
"CWD Card Template": {
"Column_height_order": "3",
"Column_spacing": "1.26",
"Column_step": "1",
"Custom_material_type": "",
"First_layer_height": "0.2",
"Horizontal_padding": "2.48",
"Label_alignment": "0",
"Label_corner_radius": "0",
"Label_depth": "3",
ServerRoot "/usr/local/apache2"
#Listen 12.34.56.78:80
Listen 80
LoadModule authn_file_module modules/mod_authn_file.so
#LoadModule authn_dbm_module modules/mod_authn_dbm.so
#LoadModule authn_anon_module modules/mod_authn_anon.so
#LoadModule authn_dbd_module modules/mod_authn_dbd.so
#LoadModule authn_socache_module modules/mod_authn_socache.so
LoadModule authn_core_module modules/mod_authn_core.so
@rufinus
rufinus / .gitlab-ci.yml
Last active June 14, 2017 23:10
Symfony DockerCompose
stages:
- test
- build
- deploy
cache:
key: 'mailingowl-composer-cache'
paths:
- .composer-cache
@rufinus
rufinus / .gitlab-ci.yml
Created May 31, 2017 05:33
gitlab ci selenium.yml
'E2E tests':
before_script:
- yarn install --force >/dev/null
- /bin/bash -c '/usr/bin/killall -q lite-server; exit 0'
- export DOCKERHOST=$(ifconfig | grep -E "([0-9]{1,3}\\.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d ':' | head -n1)
- export E2E_BASE_URL="http://$DOCKERHOST:8000/#."
- lite-server -c bs-config.js >/dev/null &
script:
- node_modules/.bin/protractor ./protractor.conf.js --seleniumAddress="http://localhost:4444/wd/hub" --baseUrl="http://$DOCKERHOST:8000" --browser chrome
- killall lite-server >/dev/null
@rufinus
rufinus / MandatorType <2.6
Last active August 29, 2015 14:12
Symfony FormType <2.6 what is the >=2.6 way? Without needing OptionsResolverInterface?
<?php
namespace Dpanel\Bundle\AdminBundle\Forms;
use Cwd\GenericBundle\Doctrine\EntityRepository;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use JMS\DiExtraBundle\Annotation as DI;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
<?php
namespace Cwd\GenericBundle\Repository;
use Doctrine\Common\Persistence\Mapping\ClassMetadata;
use Doctrine\Common\Persistence\ObjectManager;
use Gedmo\Exception\InvalidArgumentException;
use Gedmo\Tree\RepositoryUtils as GedmoRepositoryUtils;
class RepositoryUtils extends GedmoRepositoryUtils
cilex/cilex 1.1.0 The PHP micro-framework for Command line tools based on the Symfony2 Components
cilex/console-service-provider 1.0.0 Console Service Provider
doctrine/annotations v1.2.0 Docblock Annotations Parser
doctrine/lexer v1.0 Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.
dompdf/dompdf v0.6.1 DOMPDF is a CSS 2.1 compliant HTML to PDF converter
erusev/parsedown 1.0.1 Parser for Markdown.
jms/metadata 1.5.1 Class/method/property metadata management in PHP
jms/parser-lib 1.0.0 A library for easily creating recursive-descent parsers.
jms/serializer 0.16.0 Library for (de-)serializing data of any complexity; supports XML, JSON, and YAML.
knpla
1. In twig, what do you use if you want to optimize the size of the generated HTML content?
a. spaceless
b. gzip
c. operators
the spaceless tag
answer is b
really ?
twig supports gzip ?
don't look up