Skip to content

Instantly share code, notes, and snippets.

View blndev's full-sized avatar

Daniel Bedarf blndev

View GitHub Profile
@blndev
blndev / ~∕.gitconfig
Last active April 3, 2023 06:43
Git Configuration for Multiple Accounts at one User
[includeIf "gitdir:~/code/company.io/"]
path = ~/code/company.io/.gitconfig
[includeIf "gitdir:~/code/github.com/"]
path = ~/code/github.com/.gitconfig
[includeIf "gitdir:~/code/local/"]
path = ~/code/local/.gitconfig
@blndev
blndev / pythonui.py
Created January 8, 2019 17:15
Simple "Hello World" Dialog for Python
import tkinter #in python 3.x: tkinter wird kleingeschrieben
window = tkinter.Tk()
window.title("TK Sample")
window.geometry("400x100")
frame = tkinter.Frame(window, relief="ridge", borderwidth=2)
frame.pack(fill="both",expand=1)
label = tkinter.Label(frame, text="Hello World!")
label.pack(expand=1)
button = tkinter.Button(frame,text="OK",command=window.destroy)
@blndev
blndev / semantic_version_extractor.sh
Created June 11, 2018 08:09
Pure BASH based Version extractor
#could be injected by ci pipeline or extracted from git
tag=RELEASE#1.0.7-alpha
#Split by "#" to get Version substring
tagversion=( ${tag//#/ } )
product_version="${tagversion[1]}"
echo "${product_version}"
#Split by "."
semver=( ${product_version//./ } )
@blndev
blndev / ssh.config
Created May 18, 2018 14:41
Useful configuration for ~/.ssh/config File
# github is separated from company and other logins
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_github
# dont have to remember the username
Host git-codecommit.*.amazonaws.com
User awscodecommitusername
IdentityFile ~/.ssh/id_rsa_aws
@blndev
blndev / getVMs.py
Last active August 21, 2017 20:03
List all VMs in a Subscription of the German Azure Cloud
#!/usr/bin/env python
# requirements: pip install azure msrestazure
import os
'''
AZURE_PUBLIC_CLOUD
AZURE_CHINA_CLOUD
AZURE_US_GOV_CLOUD
@blndev
blndev / .bash_profile
Last active June 2, 2017 11:37
Advanced bash_profile for Mac with nice color highlighting for git and ssh
# Shell prompt based on the Solarized Dark theme.
# Screenshot: http://i.imgur.com/EkEtphC.png
# Heavily inspired by @necolas’s prompt: https://github.com/necolas/dotfiles
# iTerm → Profiles → Text → use 13pt Monaco with 1.1 vertical spacing.
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM='gnome-256color';
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM='xterm-256color';
fi;
@blndev
blndev / .gitignore
Created July 6, 2012 08:42
My Personal GitIgnore - File for VisualStudio, C#, Silverlight, Metro, C++ ATL
#OS junk files
[Tt]humbs.db
*.DS_Store
#Visual Studio files
*.[Oo]bj
*.user
*.aps
*.vspscc
*.vssscc
@blndev
blndev / SolidColorBrushExtension.cs
Created May 24, 2012 17:43
Extension to serialize a SolidColorBrush in Silverlight or WindowsPhone 7x the easy way
using System;
using System.Windows.Media;
namespace blndev.GitHub.Extensions
{
/// <summary>
/// Use this Extension to convert your SolidColorBrush in Format which is storable
/// </summary>
/// <example>
/// SolidColorBrush scb = new SolidColorBrush(Colors.White);