Skip to content

Instantly share code, notes, and snippets.

View KITSAlexBrown's full-sized avatar

Alex Brown KITSAlexBrown

  • @KITSGitHubAdmin @stump201
  • London
View GitHub Profile
@KITSAlexBrown
KITSAlexBrown / install_webdriver.sh
Created April 8, 2019 11:42 — forked from devisnotnull/install_webdriver.sh
REHL/CentOS install chrome driver binary
#!/bin/sh
yum update -y
yum install -y wget unzip openjdk-8-jre-headless xvfb libxi6 libgconf-2-4
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
yum install -y ./google-chrome-stable_current_*.rpm
curl https://chromedriver.storage.googleapis.com/73.0.3683.20/chromedriver_linux64.zip > ~/chromedriver.zip
unzip -o ~/chromedriver.zip -d /usr/local/bin/chromedriver
@KITSAlexBrown
KITSAlexBrown / install.txt
Created April 5, 2019 09:01 — forked from xiaol825/install.txt
How to install Chrome, ChromeDriver and Selenium on CentOS. Plus a sample scraping script.
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`
@KITSAlexBrown
KITSAlexBrown / Jenkinsfile
Created February 20, 2019 10:26 — forked from jonico/Jenkinsfile
Example for a full blown Jenkins pipeline script with multiple stages, input steps, injected credentials, heroku deploy, sonarqube and artifactory integration, multiple Git commit statuses, PR merge vs branch build detection, REST API calls to GitHub deployment API, stage timeouts, stage concurrency constraints, ...
#!groovy
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
/*
Please make sure to add the following environment variables:
HEROKU_PREVIEW=<your heroku preview app>
HEROKU_PREPRODUCTION=<your heroku pre-production app>
HEROKU_PRODUCTION=<your heroku production app>
@KITSAlexBrown
KITSAlexBrown / delete-from-v2-docker-registry.md
Created September 3, 2018 14:09 — forked from jaytaylor/delete-from-v2-docker-registry.md
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
@KITSAlexBrown
KITSAlexBrown / cleanup.sh
Created September 3, 2018 10:55 — forked from paulrobello/cleanup.sh
Docker registry v2 cleanup script
#!/bin/bash
### your registry must have the following environment var set
# REGISTRY_STORAGE_DELETE_ENABLED=true
### replace YOUR_SERVER with corect info
REGISTRY_URL=https://YOUR_SERVER:5000
### host registry volume folder
REGISTRY_ROOT=/registry
### container to execute garbage-collect
CONTAINER_NAME=services_registry.1
@KITSAlexBrown
KITSAlexBrown / delete_git_submodule.md
Created July 18, 2018 13:56 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@KITSAlexBrown
KITSAlexBrown / README.md
Created June 13, 2018 10:52 — forked from joyrexus/README.md
File upload POST with curl

Extracted from this excellent curl tutorial


Back in late 1995 they defined an additional way to post data over HTTP. It is documented in the RFC 1867, why this method sometimes is referred to as RFC1867-posting.

This method is mainly designed to better support file uploads. A form that allows a user to upload a file could be written like this in HTML: