Skip to content

Instantly share code, notes, and snippets.

View b1zzu's full-sized avatar

Davide Bizzarri b1zzu

  • Willhaben
  • Vienna, Austria
View GitHub Profile
@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=
#!/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 / 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
}
@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
# 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 / 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\
# ~/.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