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
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
jlrigau / install-gnu-sed-on-mac-osx.sh
Created Sep 29, 2015
How to install Gnu sed on Mac OS X
View install-gnu-sed-on-mac-osx.sh
brew install --with-default-names gnu-sed
@jlrigau
jlrigau / restart-mesos-slave.sh
Created Sep 3, 2015
How to restart a mesos slave instance getting stuck?
View restart-mesos-slave.sh
sudo rm -f /tmp/mesos/meta/slaves/latest
sudo systemctl restart mesos-slave.service
@jlrigau
jlrigau / restart-service.sh
Last active Aug 29, 2015
How to update service configuration and restart a service on Marathon?
View restart-service.sh
MARATHON_BASE_URL=http://[REPLACE_IT]:8080
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
fi
@jlrigau
jlrigau / rsync-through-ssh-tunneling.sh
Last active Aug 29, 2015
How to synchronise directory through ssh tunneling
View rsync-through-ssh-tunneling.sh
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
jlrigau / disk-usage
Created May 19, 2015
How to check disk usage in current directory
@jlrigau
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
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
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
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()
.getScheduler();
scheduler.isRunning();
You can’t perform that action at this time.