Skip to content

Instantly share code, notes, and snippets.

View ymartin59's full-sized avatar

Yves Martin ymartin59

View GitHub Profile
@BenjaminPoncet
BenjaminPoncet / ffmpeg-wrapper
Last active February 19, 2024 17:18
Synology VideoStation ffmpeg wrapper with DTS, EAC3 and TrueHD support. This project is no longer maintained: Please see the following projects: https://github.com/darknebular/Wrapper_VideoStation/ - https://github.com/AlexPresso/VideoStation-FFMPEG-Patcher
#!/bin/bash
rev="12"
_log(){
echo "$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - $1" >> /tmp/ffmpeg.log
}
_log_para(){
echo "$1" | fold -w 120 | sed "s/^.*$/$(date '+%Y-%m-%d %H:%M:%S') - ${streamid} - = &/" >> /tmp/ffmpeg.log
@se35710
se35710 / find-java.ps1
Last active November 25, 2023 18:08
PowerShell script to locate Java on Windows, optionally sets JAVA_HOME and JRE_HOME.
<#
.SYNOPSIS
Locates Java versions and optionally sets JAVA_HOME and JRE_HOME.
.DESCRIPTION
The Find-Java function uses PATH, JAVA_HOME, JRE_HOME and Windows Registry to retrieve installed Java versions.
If run with no options, the first Java found is printed on the console.
.PARAMETER Vendor
Selects Java vendor, currently supports Oracle, OpenJDK and IBM. Defaults to Any.
.PARAMETER Architecture
What processor architecture to match. Valid options are 32, 64, Match and All. Match detects what integer size is used for the PowerShell process, and matches the architecture. If Wow64 is available, 64 bit versions of Java are selected first.
@tehranian
tehranian / gist:7123269
Created October 23, 2013 17:43
Jenkins SSH slave launcher for 10x faster data transfer rates when archiving/copying artifacts. Leverages the learnings from: http://www.damtp.cam.ac.uk/user/ejb48/sshspeedtests.html
#!/bin/bash
# High-performance, native SSH implementation for Jenkins SSH slaves. Jenkins'
# standard turn-key SSH slave implementation uses an embedded, "pure Java"
# implementation of SSH (https://github.com/jenkinsci/trilead-ssh2).
# That standard implementation combines all of the convenience of a pure Java
# implementation with all of the "performance" of a pure Java implementation :P
# If your distributed build process generates large build artifacts like ISOs,
# VM images, Vagrant boxes, etc, then you will see a substantial benefit from
package package.name.removed
import com.atlassian.crowd.directory.DelegatedAuthenticationDirectory;
import com.atlassian.crowd.directory.loader.DirectoryInstanceLoader;
import com.atlassian.crowd.embedded.api.Directory;
import com.atlassian.crowd.embedded.api.User;
import com.atlassian.crowd.exception.DirectoryInstantiationException;
import com.atlassian.crowd.exception.OperationFailedException;
import com.atlassian.crowd.exception.UserNotFoundException;
import com.atlassian.crowd.manager.directory.DirectoryManager;
@agaoglu
agaoglu / JaxWsExceptionCatcher.java
Created December 5, 2011 17:27
An example exception handler for JAX-WS without code generation
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.util.List;
import java.util.Set;
import javax.xml.namespace.QName;
import javax.xml.soap.DetailEntry;
import javax.xml.soap.Node;