Skip to content

Instantly share code, notes, and snippets.

@timofey
timofey / gist:c4123759fcd45a4d90c053f18f2d25e8
Created January 4, 2024 14:45 — forked from Fusl/gist:3a708b8c32c9d5264fa0
Streaming audio output from Linux (Pulseaudio) to Windows
# Windows (receiver) side:
.\ffplay.exe -nodisp -ac 2 -acodec pcm_u8 -ar 48000 -analyzeduration 0 -probesize 32 -f u8 -i udp://0.0.0.0:18181?listen=1
# Linux (transmitter) side:
pactl load-module module-null-sink sink_name=remote
ffmpeg -f pulse -i "remote.monitor" -ac 2 -acodec pcm_u8 -ar 48000 -f u8 "udp://RECEIVER:18181"
pavucontrol # Change the default output to the Null sink or move single applications to this "output" device.
@timofey
timofey / eToken-5.sh
Created October 20, 2018 20:07 — forked from zerkalica/eToken-5.sh
eToken
# installation
sudo apt-get install pcscd opensc openct libhal1
sudo apt-get install libnss3-tools
sudo apt-get install p11-kit
# unpacking pkiclient-5.00.28-0.i386.rpm
sudo cp libeToken.so.5.00 /usr/local/lib
sudo ldconfig
# fixing pcscd
#!/usr/bin/env bash
REPORT_FILE="$1"
TMP_FILE=/tmp/__tmp.html
sed -e ':a;N;$!ba;s/\(<head>\).*\(<\/head>\)/\1\2/g' < "$REPORT_FILE" > "$TMP_FILE"
OVERALL_TEXT=`/opt/exist/saxon-lint/saxon-lint.pl --html --xpath '//*[@id="summaryContainer"]/table/tr[2]/td[1]/text()' "$TMP_FILE" | sed ':a;N;$!ba;s/\n/ /g'`
BUGS_COUNT=`/opt/exist/saxon-lint/saxon-lint.pl --html --xpath '//*[@id="summaryContainer"]/table/tr[2]/td[3]/text()' "$TMP_FILE"`
<?xml version="1.0" encoding="UTF-8"?>
<FindBugsFilter>
<Match>
<Class name="~.*\.Generated.*" />
</Match>
</FindBugsFilter>
@timofey
timofey / Dockerfile
Created May 3, 2017 12:28
Hybris Static Analysis
# dockerfile for findbugs static analysis
#
FROM openjdk:8-jdk
ENV ANT_HOME /opt/ant
ENV MAVEN_HOME /opt/maven
ENV FINDBUGS_HOME /opt/findbugs
ENV ANT_VERSION 1.9.1
ENV MAVEN_VERSION 3.0.5
# Install ant and maven
RUN \
#!/usr/bin/env python3
XML_HEAD = '<Project projectName="Hybris">'
XML_TAIL = '</Project>\n'
XML_JAR_OPEN = '<Jar>'
XML_JAR_CLOSE = '</Jar>\n'
XML_AUX_OPEN = '<AuxClasspathEntry>'
XML_AUX_CLOSE = '</AuxClasspathEntry>\n'
@timofey
timofey / PropertiesAwareProcessDefinitionResource.java
Last active April 11, 2019 15:45
Adds support for properties in business process definitions
package ru.teamidea.utils.process;
import de.hybris.platform.processengine.definition.ProcessDefinitionResource;
import de.hybris.platform.util.Config;
import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.core.io.InputStreamResource;
import org.springframework.core.io.Resource;