Skip to content

Instantly share code, notes, and snippets.

View b1zzu's full-sized avatar

Davide Bizzarri b1zzu

  • Willhaben
  • Vienna, Austria
View GitHub Profile
# ~/.bash_logout: executed by bash(1) when login shell exits.
# when leaving the console clear the screen to increase privacy
if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi
@b1zzu
b1zzu / setup-perl-debug-environment.sh
Last active November 2, 2016 16:49
Setup a debug environment for perl and IntelliJ IDEA
#!/bin/sh
export PERL_MM_USE_DEFAULT=1
cpan install YAML
cpan install Devel::Camelcadedb
echo -e "\n\
export PERL5_DEBUG_ROLE=\"server\"\n\
export PERL5_DEBUG_HOST=\"0.0.0.0\"\n\
export PERL5_DEBUG_PORT=\"7755\"\n\
# Set the container you want to skip
$Skip = "centos","ID"
docker ps -a | foreach {
$rows = [regex]::Split($_, "\s+");
if ( $rows[1] -notin $Skip ) {
docker rm $rows[0]
}
}
# Inline
@b1zzu
b1zzu / .bash_theme
Last active November 27, 2017 17:19
Bash Theme
# davbizz prompt script
# vim:set syntax=sh:
# Inspired by https://github.com/demure/dotfiles/blob/master/subbash/prompt
# Install:
# 1. Copy/Checkout this file in your home directory
# 2. Install powerline fonts and set a powerline font for your terminal ( https://github.com/powerline/fonts )
# 3. Include this file from the .bashrc ( . $HOME/.bash_theme )
#
# Depending on the additional PROMPT_COMMAND you have the include of the .bash_theme could
@b1zzu
b1zzu / main.rs
Created April 19, 2018 15:04
A simple piece of rust :-)
fn main() {
let name = String::from("World");
let test = Test::new(&name);
test.run().unwrap();
}
struct Test<'a> {
name: &'a String
}
#!/bin/bash
set -e
DATABASE="icinga"
CHARSET="latin1"
COLLATE="latin1_swedish_ci"
echo "Attention!!: Converting database '$DATABASE' and all tables in it to '$CHARSET'"
@b1zzu
b1zzu / integreatly.sh
Last active September 3, 2019 17:26
All in one script to install and uninstall integreatly
#!/usr/bin/env bash
set -e
SCRIPT=$0
# Default arguments
#
OC_USER="[email protected]"
OC_PASSWORD=
2019-10-03 13:15:05:622 - [HTTP] --> POST /wd/hub/session
2019-10-03 13:15:05:622 - [HTTP] {"desiredCapabilities":{"os_version":"9.0","device":"google pixel 3","real_mobile":true,"browserstack.debug":"true","browserstack.networkLogs":"true","browserstack.appium_version":"1.9.1","acceptSslCert":true,"detected_language":"webdriver/5.13.1","osVersion":"9.0","deviceName":"google pixel 3","browserstack.appiumVersion":"1.9.1","sessionName":"Showcase","projectName":"AeroGear Test Suit","browserstack.tunnelIdentifier":"","platform":"ANDROID","browserstack.appiumLogs":"true","browserstack.minOSVersion":"4.4","appPackage":"org.aerogear.ionic.showcase","appActivity":"org.aerogear.ionic.showcase.MainActivity","bundleID":"org.aerogear.ionic.showcase","browserstack.deviceLogs":"true","nativeWebScreenshot":true,"version":"","mobile":{"browser":"mobile","version":"Google Pixel 3-9.0"},"orig_os":"android","64bit":false,"browserstack.video":"true","browserstack.video.disableWaterMark":"false","proxy_type":"node","realMobile":"
{
"meta": {
"type": "db",
"canSave": false,
"canEdit": false,
"canAdmin": false,
"canStar": false,
"slug": "syndesis-infra-api",
"url": "/d/YPnPk0lik/syndesis-infra-api",
"expires": "0001-01-01T00:00:00Z",
@b1zzu
b1zzu / elastic-kibana-deployment.yml
Created April 24, 2020 09:28
Kubernetes deployment template to deploy Elasticsearch and Kibana to Kubernetes or OpenShift
apiVersion: apps/v1
kind: Deployment
metadata:
name: elastic-kibana-deployment
labels:
app: elastic-kibana
spec:
replicas: 1
selector:
matchLabels: