Skip to content

Instantly share code, notes, and snippets.

View simonbrunner's full-sized avatar

Simon Brunner simonbrunner

View GitHub Profile
@simonbrunner
simonbrunner / gist:5df3c334fb4a783ea1699dc05a6fffd5
Created September 14, 2022 12:11
Kubernetes NGINX Ingress Controller Logging
kubectl logs <nginx-ingress-pod> -n nginx-ingress
@simonbrunner
simonbrunner / gist:e97114fb37e46ca27a7cd881bdb8f647
Created February 8, 2019 17:01
Change the hostname of an ESXi server
# esxcli system hostname set --fqdn localhost.domain
@simonbrunner
simonbrunner / gist:ce027891feb04eb04919685292c54933
Created February 8, 2019 12:44
ESXi 6.7 upgrade using command line tools
# esxcli network firewall ruleset set -e true -r httpClient
# esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-6.7
# esxcli software profile update -p ESXi-6.7.0-20190104001-standard -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml
@simonbrunner
simonbrunner / gist:9827faf50915cba7f6dac57b334cc19c
Created January 24, 2019 14:01
git/bash-prompt without colors
__git_branch='`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`'
export PS1="\u@\h \w $__git_branch> "
@simonbrunner
simonbrunner / gist:2677057e98e44068cde99e2d396f5a27
Created July 6, 2016 11:41
Access a running docker instance via bash (requires Docker 1.3 or later)
docker exec -t -i mycontainer /bin/bash
@simonbrunner
simonbrunner / gist:533e84ffbaf671ef6566f467e518455a
Created July 3, 2016 20:35
Find the most recent release numbers for all your dependencies
mvn versions:display-dependency-updates
@simonbrunner
simonbrunner / add_user.sql
Last active July 5, 2016 09:11
Drop and create schema in Oracle database
DROP USER MYSCHEMA CASCADE;
CREATE USER MYSCHEMA IDENTIFIED BY MYPASSWORD DEFAULT TABLESPACE USERS;
GRANT CONNECT TO MYSCHEMA;
GRANT RESOURCE TO MYSCHEMA;
GRANT CREATE TABLE TO MYSCHEMA;
GRANT CREATE VIEW TO MYSCHEMA;
GRANT CREATE TRIGGER TO MYSCHEMA;
GRANT CREATE SEQUENCE TO MYSCHEMA;
@simonbrunner
simonbrunner / pom.xml
Last active June 8, 2016 07:00
maven-replacer-plugin configuration to remove timestamp from jaxb-episode file
<plugin>
<groupId>com.google.code.maven-replacer-plugin</groupId>
<artifactId>replacer</artifactId>
<configuration>
<file>src/generated/java/META-INF/sun-jaxb.episode</file>
</configuration>
<executions>
<execution>
<id>search-for-german-comment</id>
<phase>process-resources</phase>
@simonbrunner
simonbrunner / gist:8cf9111cf7e0dccec8b8
Created October 9, 2014 10:06
Pretty alias for 'git log'
git config --global alias.hist "log --graph --decorate --date=iso --abbrev-commit --all --pretty=format:'%C(red)%h%C(reset) - %C(yellow)%d%C(reset) %s - %C(white)%ad%C(reset) %C(cyan)<%an>%C(reset)'"
@simonbrunner
simonbrunner / gist:1dcf8dc70be17505c604
Created October 9, 2014 10:02
Branching with the maven-release-plugin
mvn release:branch -DbranchName=jsflib_migration_branch -DupdateBranchVersions=true -DupdateWorkingCopyVersions=false -DautoVersionSubmodules=true
# Parameters
# -DbranchName: The branch name to use
# -DupdateBranchVersions: Whether to update versions in the branch
# -DupdateWorkingCopyVersions: Whether to update versions in the working copy
# -DautoVersionSubmodules: Whether to automatically assign submodules the parent version. If set to false, the user will be prompted for the version of each submodules