Skip to content

Instantly share code, notes, and snippets.

View Aricg's full-sized avatar

Aric Gardner Aricg

View GitHub Profile
@cjbarker
cjbarker / vglciyml.sh
Created February 8, 2018 22:45
Validate GitLab YAML via Linting API
#!/bin/bash
# ##########################################################################
# Validate GitLab CI YAML (VGLCIYML) file via GL linter API
#
# Usage: vglciyml <yaml-file>
#
# echo $?
#
# Exit code of 0 denotes success. Non zero exit code denotes failure.

How to trigger a Jenkins job when merging to master on GitHub

Sometimes you want be able to trigger a jenkins job whevever you merge to master.
Fortunately there is a very useful Jenkins Plugin called Generic Webhook Trigger Plugin to help. This plugin is not specific to GitHub. It should work with any service that can post to a webhook.

The plugin let's you parse the JSON payload using either JSONPath or XPath; it even let's you set up key values based on the POST Headers or URL arguments.

@dfletcher
dfletcher / tsws
Last active July 21, 2018 12:47
Totally simple web server using Bash and netcat (nc)
Moved to a proprer repositoy, TSWS is a real boy now!
https://github.com/dfletcher/tsws
PRs welcomed.
@unhammer
unhammer / progress.sh
Last active April 13, 2023 14:41
Show progress of some command you forgot to pipe through pv
#!/bin/bash
### Save as "/usr/local/bin/progress" and chmod +x, then:
#
# $ progress ~/huge-file.tar.bz2
# $ progress -p $(pidof bzcat)
# $ progress # progress of all open files, shows e.g. how far mpd is through your song :P
#
# source: http://stackoverflow.com/a/238140/69663
@sheerun
sheerun / certgen.rb
Last active April 10, 2022 15:39
Docker TLS certificate generator
# Generates necessary certificates to ~/.docker
#
# Usage:
# bundle install
# ruby certgen.rb <domain>
require 'certificate_authority'
require 'fileutils'
if ARGV.empty?
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active July 4, 2024 13:00
Backend Architectures Keywords and References

Installation

FreeBSD

portmaster irc/irssi
portmaster irc/irssi-xmpp

OS X

brew install irssi

@bols-blue
bols-blue / jenkins-slave
Created November 23, 2011 09:45
jenkisn daemon sclipt./etc/init.d/jenkins-slave and /etc/default/jenkins-slave
# defaults for jenkins continuous integration server
JENKINS_ARGS="-jnlpUrl http://test.lnc.jp:8080/computer/wock/slave-agent.jnlp"
# jenkins home location
JENKINS_HOME=/opt/jenkins-slave
# location of the jenkins war file
JENKINS_WAR=$JENKINS_HOME/slave.jar
# pulled in from the init script; makes things easier.
NAME=jenkins
@rowan-m
rowan-m / gist:1026918
Created June 15, 2011 11:34 — forked from jedi4ever/gist:898114
update jenkins Updatecenter from CLI
$ java -jar jenkins-cli.jar -s http://localhost:9000 install-plugin findbugs
findbugs is neither a valid file, URL, nor a plugin artifact name in the update center
No update center data is retrieved yet from: http://updates.jenkins-ci.org/update-center.json
findbugs looks like a short plugin name. Did you mean 'null'?
# Specifying a full URL works!
$ java -jar jenkins-cli.jar -s http://localhost:9020 install-plugin http://updates.jenkins-ci.org/download/plugins/AdaptivePlugin/0.1/AdaptivePlugin.hpi
# Get the update center ourself
@jedi4ever
jedi4ever / gist:898114
Created April 1, 2011 13:06
update jenkins Updatecenter from CLI
$ java -jar jenkins-cli.jar -s http://localhost:9000 install-plugin findbugs
findbugs is neither a valid file, URL, nor a plugin artifact name in the update center
No update center data is retrieved yet from: http://updates.jenkins-ci.org/update-center.json
findbugs looks like a short plugin name. Did you mean 'null'?
# Specifying a full URL works!
$ java -jar jenkins-cli.jar -s http://localhost:9020 install-plugin http://updates.jenkins-ci.org/download/plugins/AdaptivePlugin/0.1/AdaptivePlugin.hpi
# Get the update center ourself