This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import absolute_import | |
from time import time | |
import jwt | |
ISSUER = '8eb12629d265493588af989decb91209' | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=GitLab Runner | |
[Service] | |
ExecStartPre=-/usr/bin/docker rm gitlab-runner-%i | |
ExecStartPre=-/usr/bin/docker pull gitlab/gitlab-runner:latest | |
ExecStart=/usr/bin/docker run --name gitlab-runner-%i \ | |
-v /var/run/docker.sock:/var/run/docker.sock \ | |
gitlab/gitlab-runner:latest | |
ExecStartPost=/opt/bin/runner-register.sh %i |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipi() { | |
REQ_FILE=requirements.txt | |
TMP_FILE=/tmp/tmp_req.txt | |
pip install "$@" | |
if [ $? -eq 0 ] && [ -f "${REQ_FILE}" ] | |
then | |
FREEZE="$(pip freeze)" | |
for arg in "$@" | |
do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function postData(url, data) { | |
var theDiv = document.createElement('div'); | |
theDiv.style.display = 'none'; | |
var theForm = document.createElement('form'); | |
theForm.action = url; | |
theForm.method = 'post'; | |
for (var key in data) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var arr = []; | |
var imgs = document.querySelectorAll('div.mvs a[ajaxify]'); | |
for (var i = 0; i < imgs.length; i++) { arr.push(imgs[i]); } | |
var a = document.createElement('a'); | |
var re = RegExp("[?&]src=[^&]+") | |
arr.forEach(function (img) { | |
ajaxify = img.getAttribute('ajaxify'); | |
encoded_img_url = re.exec(ajaxify)[0].substr(5); | |
decoded_img_url = decodeURIComponent(encoded_img_url); | |
a['href'] = decoded_img_url; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o errexit | |
echo "Removing exited docker containers..." | |
docker ps -a -f status=exited -q | xargs -r docker rm -v | |
echo "Removing dangling images..." | |
docker images --no-trunc -q -f dangling=true | xargs -r docker rmi |