Skip to content

Instantly share code, notes, and snippets.

@nemoinho
nemoinho / bash-prompt-for-git.sh
Last active November 21, 2016 23:41
Just my bash-prompt
#!/usr/bin/env bash
# debian, ubuntu and so on
GIT_PROMPT_SH=/usr/lib/git-core/git-sh-prompt
# newtons vegetable with brew installed
if [ ! -d $(dirname $GIT_PROMPT_SH) ]; then
GIT_PROMPT_SH=/usr/local/etc/bash_completion.d/git-prompt.sh
fi
@nemoinho
nemoinho / .gitconfig
Last active May 5, 2021 19:11
git configuration
[core]
# Use vim as commit-message editor
editor = vim
# Don't wrap lines on paged views such as diff or log
page = less -S
[diff]
# Use histogram to generate more readable diffs
algorithm = histogram
[pull]
@nemoinho
nemoinho / .bash_alias
Last active March 7, 2017 10:03
bash alias
alias lg='git lg'
alias co='git checkout'
alias push='git push'
alias commit='git commit'
alias st='git status'
alias gd='git diff'
alias gdc='gd --cached'
@nemoinho
nemoinho / inheritance.js
Last active May 24, 2017 13:08
Example of how to implement JS-Inhertiance
function BaseClass(param1) {
this.param1 = param1;
}
BaseClass.prototype.logParam1 = function(){
console.log(this.param1);
};
BaseClass.prototype.log = function () {
this.logParam1();
@nemoinho
nemoinho / README.md
Last active July 12, 2017 16:47
This script will provide an "on typing" search-filter for the zoho-vault. The script will only filter the displayed secrets by their names and descriptions and only for the few visible letters of these fields.

Intuitive Zoho-filter

This script will provide an "on typing" search-filter for the zoho-vault. The script will only filter the displayed secrets by their names and descriptions and only for the few visible letters of these fields.

Requirements

  • Tampermonkey (Chrome)
  • Greasemonkey (Firefox)

Installation

Just click the link to run the Installation.

@nemoinho
nemoinho / npm
Last active January 19, 2018 00:04
npm-client for IntelliJ
#!/usr/bin/env bash
# Replace everything before the actual command
# by replacing everything until we found a string with npm-cli.js inside
while [ $1 == ${1/npm-cli.js/} ]; do shift; done
shift
COMMAND="HOME=/user yarn $@"
case $(uname) in
Linux)
@nemoinho
nemoinho / jira-board-size.user.js
Last active February 6, 2021 23:57
This script will enable resizing of the details on a board in jira.The script only runs in the latest versions of jira and only on domains which start with "jira." or on the atlassian-domain. -- Please click on "Raw" to install it via greasemonkey or tampermonkey
// ==UserScript==
// @name Jira Board Size
// @namespace info.nehrke.jira
// @author Felix Nehrke
// @description This script will enable resizing of the details on a board in jira. The script only runs in the latest versions of jira and only on domains which start with "jira." or on the atlassian-domain.
// @include /^https?:\/\/jira.[^\/]+\/secure\/RapidBoard.jspa.*/
// @include /^https?:\/\/[^\/]+?\.atlassian\.net\/secure\/RapidBoard.jspa.*/
// @downloadURL https://gist.github.com/nemoinho/70a176e73e2cbf14315772cc4e618516/raw/jira-board-size.user.js
// @updateURL https://gist.github.com/nemoinho/70a176e73e2cbf14315772cc4e618516/raw/jira-board-size.user.js
// @version 1.1.1
@nemoinho
nemoinho / gitea-split-view-improvements.user.js
Last active August 10, 2018 13:37
Gitea Split-view-improvement
// ==UserScript==
// @name Gitea Split-view-improvement
// @description This script spreads the split-view of gitea to the whole available space to reduce the problems of too short lines.
// @version 1.0.0
// @author Felix Nehrke
// @include /^https:\/\/gitea\.[^\/]+\/.*\/pulls\/\d+\/files.*/
// @downloadURL https://gist.github.com/nemoinho/655f93745bba44cee7e91abe79628f2e/raw/gitea-split-view-improvements.user.js
// @updateURL https://gist.github.com/nemoinho/655f93745bba44cee7e91abe79628f2e/raw/gitea-split-view-improvements.user.js
// @grant none
// ==/UserScript==
#!/usr/bin/env sh
host=$1
port=$2
if [ -n "$port" ] && [ "$port" != "22" ]; then
ssh-keygen -F [$host]:$port 2>/dev/null >/dev/null || ssh-keyscan -p $port $host 2>/dev/null >> $HOME/.ssh/known_hosts
else
ssh-keygen -F $host 2>/dev/null >/dev/null || ssh-keyscan $host 2>/dev/null >> $HOME/.ssh/known_hosts
fi
@nemoinho
nemoinho / quick-docker-for-spring-and-angular.md
Last active November 4, 2022 19:04
A quick guide for spring+angular on docker

Docker für Spring und Angular

Docker für Spring (ich nehme gradle an, geht aber mit maven genauso) und Angular ist im Großen und Ganzen nicht schwer und kann easy-peasy mit Standard-Containern bewältigt werden.

Alles was man prinzipiell braucht sind 2 Dockerfiles für Frontend und Backend, sowie eine docker-compose um das alles zu organisieren.

Zum Verteilen kann man entweder eine Docker-Registry nutzen (docker-hub, quay.io, aws ecs), oder die Container packen und direkt auf die Server spielen.

Ich nehme hier an, dass das Projekt etwa so aufgebaut ist: