View trigger_pipeline.p
This file contains 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
import requests | |
from subprocess import call | |
params = (('status', 'running'),) | |
params2 = (('status', 'pending'),) | |
headers = {'PRIVATE-TOKEN': '$TOKEN'} | |
url = 'https://gitlab.com/api/v4/projects/......................./pipelines' | |
r = requests.get(url, params=params,headers=headers) | |
print r.text | |
r2 = requests.get(url, params=params2,headers=headers) | |
print r2.text |
View upload_json_elasticsearch.sh
This file contains 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 | |
# Author: Samy Coenen | |
# Company: Gluo NV | |
list="$(find . -type f)" | |
for i in list | |
do | |
curl -XPOST 'https://......................eu-central-1.es.amazonaws.com/_bulk' -d @$i | |
done |
View checkyaml.py
This file contains 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
#!/usr/bin/env python3 | |
# Author: Samy Coenen | |
# Company: Gluo NV | |
import yaml | |
import sys | |
import os, glob | |
from argparse import ArgumentParser | |
def get_args(): |
View backup_kibana.sh
This file contains 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 | |
# Author: Samy Coenen | |
# Company: Gluo NV | |
elasticdump \ | |
--input=https://....................eu-central-1.es.amazonaws.com/.kibana-4 \ | |
--output=$ \ | |
--type=data \ | |
--searchBody='{"filter": { "or": [ {"type": {"value": "dashboard"}}, {"type" : {"value":"visualization"}}] }}' \ | |
> kibana-exported.json |
View backup_entire_elasticsearch.sh
This file contains 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 | |
# Author: Samy Coenen | |
# Company: Gluo NV | |
SOURCE=https://............es.amazonaws.com | |
indice_list="$(curl -XGET $SOURCE/_cat/indices?pretty=true -v | cut -d $' ' -f3)" | |
for item in $indice_list | |
do | |
elasticdump \ | |
--input=$SOURCE/$item \ | |
--output=$ \ |
View gist:11067126071248c7e41756e6a9fb2931
This file contains 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
# show disks | |
lsblk | |
# Read Test | |
sudo hdparm -Tt /dev/sdb | |
# Write Test | |
dd if=/dev/zero of=/tmp/output conv=fdatasync bs=384k count=1k; rm -f /tmp/output | |
# Gui Benchmark | |
gnome-disks | |
# select disk and do benchmark |
View gist:33c9b61c7774b1caabf466b73be3cab6
This file contains 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 | |
# maak een kopie van de huidige instellingen en certificaten | |
mv /home/student/backup/letsencrypt /home/student/backup/letsencrypt.old2 | |
# zet de reverse_proxy_nginx uit, deze luisterd al reeds op poort 80, letsencrypt heeft deze poort nodig voor certificaten aan te vragen. | |
cd /home/student && docker-compose down | |
# Nu vragen we nieuwe certificaten aan. Deze komen op de locatie van /etc/letsencrypt | |
letsencrypt certonly --standalone -d vikingco.me -d www.vikingco.me -d kanban.vikingco.me -d jenkins.vikingco.me -d gitlab.vikingco.me -d api.vikingco.me -d test.vikingco.me -d testapi.vikingco.me -d php.vikingco.me -d testphp.vikingco.me |
View gist:c002d549a3053b2055afa9168fd735a4
This file contains 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
sudo su | |
# make interface available to everyone | |
chmod a+rw /dev/vmnet2 | |
# put interface in promiscuous mode | |
ifconfig vmnet2 promisc |
NewerOlder