Skip to content

Instantly share code, notes, and snippets.

Avatar

Frédéric Pierret fepitre

  • France
View GitHub Profile
@fepitre
fepitre / qvm-portfwd-iptables
Last active May 1, 2021 — forked from Joeviocoe/qvm-portfwd-iptables
Qubes-os port forwarding to allow external connections
View qvm-portfwd-iptables
#!/bin/bash
# Frédéric Pierret <frederic.pierret@qubes-os.org>
# Adapted from previous work:
# - https://gist.github.com/daktak/f887352d564b54f9e529404cc0eb60d5
# - https://gist.github.com/jpouellet/d8cd0eb8589a5b9bf0c53a28fc530369
# - https://gist.github.com/Joeviocoe/6c4dc0c283f6d6c5b1a3f5af8793292b
[ "$DEBUG" = 1 ] && set -x
@fepitre
fepitre / jenkins-api-examples
Created Jan 20, 2018 — forked from marshyski/jenkins-api-examples
Jenkins trigger, create and remove jobs and folders
View jenkins-api-examples
# check if job exists
curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken
# with folder plugin
curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# without folder plugin
curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# create folder
@fepitre
fepitre / CreateJob.sh
Created Jan 20, 2018 — forked from stuart-warren/CreateJob.sh
Create a job in Jenkins (or folder) using the HTTP API
View CreateJob.sh
# check if job exists
curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken
# with folder plugin
curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# without folder plugin
curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken
# create folder