Skip to content

Instantly share code, notes, and snippets.

View blues-man's full-sized avatar
😎

Natale Vinto blues-man

😎
View GitHub Profile
@blues-man
blues-man / gis_to_coords.py
Created December 7, 2020 10:32
protectedplanet.net CSV GIS data conversion to Coordinates (lat,lng) with Google Geodecode API
#!/usr/bin/python
import csv
import country_converter
import json
import requests
file = []
API_KEY = ''
@blues-man
blues-man / nationalparks-devfile.yaml
Created October 21, 2020 11:59
nationalparks-devfile.yaml
metadata:
name: spring-boot-nationalparks-
projects:
- name: spring-boot-nationalparks
source:
location: 'https://github.com/openshift-roadshow/nationalparks.git'
type: git
components:
- id: redhat/java8/latest
type: chePlugin
@blues-man
blues-man / prepuller-daemonset.yaml
Created September 7, 2020 13:17
Prepull Container Images in Kubernetes cluster via a Dameonset and Pause containers
kind: DaemonSet
apiVersion: apps/v1
metadata:
name: images-prepull
namespace: foo
spec:
selector:
matchLabels:
app: images-prepull
template:
@blues-man
blues-man / petclinic-pipeline-bc.yaml
Created September 2, 2020 23:27
OpenShift BuildConfig Jenkins Pipeline for Spring boot Petclinic with image promotion
apiVersion: v1
kind: BuildConfig
metadata:
annotations:
pipeline.alpha.openshift.io/uses: '[{"name": "jenkins", "namespace": "", "kind": "DeploymentConfig"}]'
labels:
app: petclinic
name: petclinic
name: petclinic-pipeline
spec:
#!/bin/bash
# Run this in your katacoda scenario git repo: https://www.katacoda.community/
# Requires setup of Incoming Webhook on Slack: https://api.slack.com/messaging/webhooks
SCENARIO_URL='https://katacoda.com/<USER>/courses/<NAME>'
SLACK_WEBHOOK_URL='https://hooks.slack.com/services/<YOUR_INCOMING_WEBHOOK_PATH'
commit_id=`git log --pretty=format:'%H' -n 1`
echo "Checking if scenario has been updated on Katacoda.."
#!/bin/bash
# Run this in your katacoda scenario git repo
# Requires setup of Incoming Webhook on Slack
SCENARIO_URL='https://katacoda.com/<USER>/courses/<NAME>'
SLACK_WEBHOOK_URL='https://hooks.slack.com/services/<YOUR_INCOMING_WEBHOOK_PATH'
commit_id=`git log --pretty=format:'%H' -n 1`
until curl -s $SCENARIO_URL | grep $commit_id > /dev/null 2>&1
@blues-man
blues-man / ignition
Last active September 3, 2019 15:10
{
"ignition":{
"config":{
"append":[
{
"source":"https://api-int.test.net:22623/config/master",
"verification":{
}
}
parameters:
pool: default
domain: mine.domain.tld
template: ''
iso: /var/lib/libvirt/images/rhcos-4.1.0-x86_64-installer.iso
controller: 3
worker: 3
reservedns: true
reserveip: false
#---------------------------------------------------------------------
# Example configuration for a possible web application. See the
# full configuration options online.
#
# http://haproxy.1wt.eu/download/1.4/doc/configuration.txt
#
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# Global settings
# Generated by iptables-save v1.4.21 on Fri Aug 9 11:37:31 2019
*filter
:INPUT ACCEPT [92033804:78962211183]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [100931247:79608484195]
-A INPUT -i virbr0 -p udp -m udp --dport 53 -j ACCEPT
-A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT
-A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT
-A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT
-A FORWARD -d 192.168.122.0/24 -o virbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT