Skip to content

Instantly share code, notes, and snippets.

@mullnerz
mullnerz / gitlab-ci-cancel-redundant-running-pipelines.sh
Created July 24, 2018 19:17
GitLab CI - cancel redundant running pipelines for branches
#!/usr/bin/env bash
set -euo pipefail
# Get GitLab API URL from project URL
GITLAB_API_URL="$(echo $CI_PROJECT_URL | cut -d'/' -f1,2,3)/api/v4"
# Query running pipelines for the same branch,
# process + filter them,
# finally cancel them with another API call
@bsingr
bsingr / list-queues.sh
Last active October 19, 2023 12:16
rabbitmq remove amq.gen queues
#!/bin/sh
USER=admin
PASS=a
rabbitmqadmin -u "$USER" -p "$PASS" list queues | grep -oP "amq.gen-[\w\-]+"
@Shellbye
Shellbye / basic_squid3
Created February 9, 2015 08:28
squid3 basic authentication
# ref http://stackoverflow.com/questions/3297196/how-to-set-up-a-squid-proxy-with-basic-username-and-password-authentication
# first install apache:
# $ sudo apt-get install -y apache2-utils
# add these five lines to /etc/squid3/squid.conf
auth_param basic program /usr/lib/squid3/basic_ncsa_auth /etc/squid3/passwords
auth_param basic realm proxy
acl authenticated proxy_auth REQUIRED
http_access allow authenticated
http_port 3128 # or whatever you like