Skip to content

Instantly share code, notes, and snippets.

@youribonnaffe
youribonnaffe / workflow.xml
Last active August 29, 2015 13:57
Bash script task
<?xml version="1.0" encoding="UTF-8"?>
<job xmlns="urn:proactive:jobdescriptor:dev" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:proactive:jobdescriptor:dev http://www.activeeon.com/public_content/schemas/proactive/jobdescriptor/dev/schedulerjob.xsd"
name="BashHelloWorld" priority="normal" cancelJobOnError="false">
<taskFlow>
<task name="BashScript">
<scriptExecutable>
<script>
<code language="bash">
echo "Hello World"
@youribonnaffe
youribonnaffe / build.sh
Last active August 29, 2015 13:57
Build jsr223 nativeshell
git clone https://github.com/youribonnaffe/jsr223-nativeshell.git
cd jsr223-nativeshell
./gradlew
java -cp build/libs/jsr223-nativeshell-0.1.jar jsr223.nativeshell.Main bash echo Hello World
@youribonnaffe
youribonnaffe / gist:10016567
Created April 7, 2014 08:20
Resize images from size in HTML
@Grab(group='org.ccil.cowan.tagsoup',
module='tagsoup', version='1.2' )
def tagsoupParser = new org.ccil.cowan.tagsoup.Parser()
def slurper = new XmlSlurper(tagsoupParser)
def htmlParser = slurper.parseText(new File('file.html').text)
htmlParser.'**'.findAll{ it.name() == 'img'}.each {
if(it.@width != "") {
println "Resizing ${it.@src} to width ${it.@width}"
@youribonnaffe
youribonnaffe / gist:76dfab1c2b4fa1319ce9
Created June 11, 2014 08:38
Run the ProActive Scheduler with Docker
unzip ProActiveScheduling-3.4.4_bin_full.zip
cd ProActiveScheduling-3.4.4_bin_full
./bin/unix/scheduler-start-gui -Dproactive.useIPaddress=true -Dproactive.net.interface=docker0
<?xml version="1.0" encoding="UTF-8"?>
<job xmlns="urn:proactive:jobdescriptor:dev" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:proactive:jobdescriptor:dev ../../src/scheduler/src/org/ow2/proactive/scheduler/common/xml/schemas/jobdescriptor/dev/schedulerjob.xsd"
name="docker" priority="normal" cancelJobOnError="false">
<taskFlow>
<task name="run">
<scriptExecutable>
<script>
<code language="groovy">
println "ps -e".execute().text
@youribonnaffe
youribonnaffe / Dockerfile
Created June 11, 2014 08:50
Dockerfile for ProActive
# ProActive
#
# VERSION 3.4.4
FROM dockerfile/java
MAINTAINER Youri Bonnaffé <youri.bonnaffe@activeeon.com>
COPY ./ProActiveScheduling-3.4.4_bin_full /opt/proactive
COPY rm-start-docker-node /opt/proactive/
@youribonnaffe
youribonnaffe / rm-start-docker-node
Created June 11, 2014 08:57
rm-start-docker-node
#!/bin/sh
export JAVA_HOME=/usr/lib/jvm/java-7-oracle/
/opt/proactive/bin/unix/rm-start-node -r $1 -f /opt/proactive/config/authentication/rm.cred -Dproactive.useIPaddress=true -n docker_$HOSTNAME
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v Hidden /t REG_DWORD /d 1 /f
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v SuperHidden /t REG_DWORD /d 1 /f
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v ShowSuperHidden /t REG_DWORD /d 1 /f
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v TaskbarGlomming /t REG_DWORD /d 0 /f
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v TaskbarGlomLevel /t REG_DWORD /d 2 /f
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v TaskbarSmallIcons /t REG_DWORD /d 1 /f
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v HideFileExt /t REG_DWORD /d 0 /f
reg add HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced\ /v FriendlyTree /t REG_DWORD /d 1 /f
reg add HKEY_CURRENT_USER
@youribonnaffe
youribonnaffe / gist:6375515
Created August 29, 2013 08:20
Gradle wrapper
task wrapper(type: Wrapper) {
gradleVersion = '1.7'
jarFile "${project.projectDir}/.gradle/wrapper/gradle-wrapper.jar"
}
https://tbnm9.app.goo.gl/?link=https%3a%2f%2fboogi.fr%2fbordeaux%3fsearch%3d104&apn=com.is.android.boogibordeaux&al=https://www.boogi.fr&ibi=com.instantsystem.boogi-bordeaux&d=0