Skip to content

Instantly share code, notes, and snippets.

Jean-Louis Rigau jlrigau

Block or report user

Report or block jlrigau

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jlrigau / ssh-port-mapping
Created Jan 7, 2016
How to map a port on localhost through ssh?
View ssh-port-mapping
ssh -Nf user@hostanme -L 8080:localhost:8080
jlrigau /
Created Sep 29, 2015
How to install Gnu sed on Mac OS X
brew install --with-default-names gnu-sed
jlrigau /
Created Sep 3, 2015
How to restart a mesos slave instance getting stuck?
sudo rm -f /tmp/mesos/meta/slaves/latest
sudo systemctl restart mesos-slave.service
jlrigau /
Last active Aug 29, 2015
How to update service configuration and restart a service on Marathon?
VERSION=$(curl -X PUT -H "Content-Type: application/json" $MARATHON_BASE_URL/v2/apps/dashboard?force=true -d@dashboard.json | jq '.version' | tr -d '"')
if [ $(curl -sL -w "%{http_code}" $MARATHON_BASE_URL/v2/apps/dashboard/versions/$VERSION -o /dev/null) != 200 ]; then
curl -X POST $MARATHON_BASE_URL/v2/apps/dashboard/restart?force=true
jlrigau /
Last active Aug 29, 2015
How to synchronise directory through ssh tunneling
rsync -avz --delete -e 'ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o ProxyCommand="ssh -W %h:%p USER@PROXY -p 2222"' --progress /data USER@DESTINATION:/backup
jlrigau / disk-usage
Created May 19, 2015
How to check disk usage in current directory
jlrigau / remove-ds-store-files
Created Apr 1, 2015
How to remove .DS_Store files on Mac OS X
View remove-ds-store-files
sudo find / -name ".DS_Store" -depth -exec rm {} \;
jlrigau / remove-docker-none-images
Last active Aug 29, 2015
How to remove Docker <non> images
View remove-docker-none-images
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
jlrigau / configure-jenkins-slave-with-jnlp
Created Feb 13, 2015
How to configure a new Jenkins slave with JNLP
View configure-jenkins-slave-with-jnlp
curl -s -o slave.jar http://${JENKINS_HOST}:${JENKINS_PORT}/jnlpJars/slave.jar && \
java -jar slave.jar -jnlpUrl http://${JENKINS_HOST}:${JENKINS_PORT}/computer/test/slave-agent.jnlp
jlrigau / check-mesos-jenkins-scheduler
Created Feb 11, 2015
How to check Mesos Jenkins Scheduler
View check-mesos-jenkins-scheduler
import org.jenkinsci.plugins.mesos.*;
import org.apache.mesos.*;
JenkinsScheduler scheduler = (JenkinsScheduler) Mesos.getInstance()
You can’t perform that action at this time.