Skip to content

Instantly share code, notes, and snippets.

View MikeMitterer's full-sized avatar
🎯
Focusing

Mike Mitterer MikeMitterer

🎯
Focusing
View GitHub Profile
@MikeMitterer
MikeMitterer / gist:4f45c67751f7e9f0b3c6cb23eeb12b4a
Last active September 11, 2024 00:34
Prompt for Bash (.bashrc) + ZSH (.zshrc)
# ZSH -------------------------------------------------------------------------
# https://zsh.sourceforge.io/Doc/Release/Prompt-Expansion.html
#
# ZSH default colors:
# black, red, green, yellow, blue, magenta, cyan and white
_USER_COLOR="%{$fg_bold[blue]%}"
PROMPT="${_USER_COLOR}%n%f@%{$fg_bold[green]%}%M%f:"
PROMPT+=' %{$fg[yellow]%}%c%{$reset_color%} $(git_prompt_info)'
# --------------------------------------------------------------------------------
# Skin for Midnight-Commander
#
# HowoTo install:
# cd ~/.local/share/mc
# mkdir skins && cd skins
#. curl https://gist.githubusercontent.com/MikeMitterer/0fa8f0ab6d5ee8b56cfa4e76a02de955/raw -o ajnasz-blue.ini
#. ln -s ajnasz-blue.ini default.ini
#
# Start mcedit - you should see your new Color-Scheme
@MikeMitterer
MikeMitterer / build.gradle.kts
Last active May 11, 2020 07:52
Change src and resources root for Kotlin/Java project
// ...
kotlin {
sourceSets {
getByName("main") {
kotlin.srcDirs("src")
}
getByName("test") {
kotlin.srcDirs("test/unit")
}
@MikeMitterer
MikeMitterer / gradle
Created February 7, 2018 22:29
Gradle wrapper script / Mac friendly
#!/bin/bash
# PURPOSE
#
# The Gradle wrapper[1] is a simple and convenient way of making Gradle
# builds self-contained and reproducible. However, in multi-project
# builds, it can be cumbersome to type in relative paths e.g.:
# ./gradlew # when in root
# ../gradlew # when in subdir
#
@MikeMitterer
MikeMitterer / build.gradle
Created December 19, 2017 15:47
Build Dart with Gradle
apply plugin: 'base'
//-------------------------------------------------------------------------------------------------
// Analyze
task update() {
doLast {
exec { executable = 'pub'; args = [ "update" ] }
}
}
@MikeMitterer
MikeMitterer / FromToDate.kt
Last active December 5, 2017 04:08
Compare Dart -> Kotlin -> Java
/**
* Definiert einen Zeitrahmen
*
* User: mikemitterer, Date: 16.10.13, Time: 10:29
*/
@DartClass(library = "mobiad_rest_ui.model", classname = "FromToDate")
data class FromToDate(
val from: DateTime,
val to: DateTime)
{
@MikeMitterer
MikeMitterer / autopgsqlbackup
Created July 27, 2017 17:12 — forked from matthewlehner/autopgsqlbackup
Auto PostgreSQL backup script.
#!/bin/bash
#
# PostgreSQL Backup Script Ver 1.0
# http://autopgsqlbackup.frozenpc.net
# Copyright (c) 2005 Aaron Axelsen <[email protected]>
#
# This script is based of the AutoMySQLBackup Script Ver 2.2
# It can be found at http://sourceforge.net/projects/automysqlbackup/
#
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9
@MikeMitterer
MikeMitterer / custom-darcula.css
Last active November 2, 2023 11:34
Markdown Styles for all IDEA products
/*
Adapted from https://github.com/sindresorhus/github-markdown-css
The MIT License (MIT)
Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
/*
Im reseting this style for optimal view using Eric Meyer's CSS Reset - http://meyerweb.com/eric/tools/css/reset/
------------------------------------------------------------------ */
body, html { height: 100%; }
html, body, div, span, applet, object, iframe,
/*h1, h2, h3, h4, h5, h6,*/ p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, font, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
@MikeMitterer
MikeMitterer / gist:87d9d68d07caeac14781
Created August 12, 2014 15:39
Test instance creation with Dart, Angular + DI
part of integration.test;
@angular.Injectable()
class Proxy {
final Logger _logger = new Logger("integration.test.Angular.Proxy");
final Completer<bool> _completer = new Completer<bool>();
static int _pcounter = 0;