Skip to content

Instantly share code, notes, and snippets.

View jonashackt's full-sized avatar
:octocat:
TDD & CI for IaC FTW!

Jonas Hecht jonashackt

:octocat:
TDD & CI for IaC FTW!
View GitHub Profile
@HoussemNasri
HoussemNasri / BalsamiqForever.py
Last active May 8, 2024 04:03
Extend your trial period for Balsamiq Wireframes on Windows and macOS Forever!
import json
import os
import time
import webbrowser
import sys
import re
def handleWindows(extra_seconds):
print("OS : Windows")
@jonashackt
jonashackt / mac-cheatsheet.sh
Last active November 4, 2020 09:11
Collecting some Mac related terminal commands I regularly need
# Show all processes that use a port
lsof -i 4tcp
# or
netstat -anvp tcp | awk 'NR<3 || /LISTEN/'
@jonashackt
jonashackt / release-maven-central-manual-local.md
Last active September 9, 2020 06:50
Local manual Maven release to Maven Central

Check you're settings.xml (/Users/username/.m2/settings.xml), should look like this:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0                           http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository>${user.home}/.m2/repository</localRepository>
  <interactiveMode>true</interactiveMode>
  <usePluginRegistry>false</usePluginRegistry>
  <offline>false</offline>
  <profiles>
    ...
@jonashackt
jonashackt / dockercheatsheet.md
Last active July 13, 2021 15:12
Docker cheatsheet

Docker container, images, networks management is easy with the prune command which is available for all types of Docker artifacts (see https://stackoverflow.com/a/32723127/4964553 & https://docs.docker.com/config/pruning/#prune-images & https://docs.docker.com/engine/reference/commandline/system_prune/#filtering).

remove all local Docker containers, that are older than

docker container prune --filter "until=48h"

remove all local Docker images, that are older than

docker image prune -a --filter "until=2020-10-25"

run multiple commands with only one single docker run

@jonashackt
jonashackt / NanoCheatsheet.sh
Created December 7, 2018 08:36
Nano cheatsheet
# Go to last line
Crtl + Shift + _
Crtl V
# Delete whole line
Crtl + K
@jonashackt
jonashackt / Jekyll-GitHub-Pages-Cheatsheet.sh
Last active November 25, 2019 16:09
Jekyll with GitHub-Pages Cheatsheet
# Update Jekyll GitHub-Pages site
https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/#keeping-your-site-up-to-date-with-the-github-pages-gem
bundle update github-pages
# Test Jekyll with GitHub-Pages locally
https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/#step-4-build-your-local-jekyll-site
bundle exec jekyll serve
@jonashackt
jonashackt / kubernetes-cheatsheet.md
Last active March 13, 2024 13:36
Kubernetes cheat sheet
@jonashackt
jonashackt / Linux-cheatsheet.sh
Last active January 29, 2021 18:47
Linux cheatsheet (Ubuntu)
# 0. need root access to system
#### Show environment variables
printenv
#### Set env var
export FOO=BAR
#### Set env var for root
# sudo export FOO=BAR doesnt work! (see https://askubuntu.com/questions/272637/i-have-a-problem-when-using-export-command)
@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active May 11, 2024 12:06
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@jonashackt
jonashackt / powershell.md
Last active February 27, 2018 13:59
Powershell cheatsheet

Start Powershell from cmd

start powershell

Resolve a DNS name:

Resolve-DnsName

Get PortMapping (e.g. if HNS error - object already exists occurs)

Get-NetNatStaticMapping

...and remove the failing PortMapping with (but LOOK, it goes through all mapping with the same NatName

- so if you only want to remove one, then just say Yes there)