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 |
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 |
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(): |
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 |
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=$ \ |
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 |
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 |
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