Skip to content

Instantly share code, notes, and snippets.

@codedoneteam
codedoneteam / java
Created May 23, 2021 20:31
Java debug
#Show class file contents
javap -v My.class
# jstack
jstack -l <PID> > threads.txt
Generate Heap dump on EOM error
-XX:+HeapDumpOnOutOfMemoryError
#Heap
jmap -dump:file=DumpFile.dump <PID>
jhat DumpFile.dump
Eclipse MAT -> dominator tree
# .NET Core Function App to Windows on Azure
# Build a .NET Core function app and deploy it to Azure as a Windows function App.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/dotnet-core
trigger:
- main
variables:
# Azure Resource Manager connection created during pipeline creation
$allBranches = git branch -l
foreach($branch in $allBranches) {
Write-Output $branch.Replace("*", "").Trim()
}
git checkout tags/<tag> -b <branch>
git reset --hard <commit-hash>
git push -f origin master
git checkout $(git rev-list -n 1 tags/1.4.0)
git push origin --delete test
# Install Ingress
helm repo add stable https://kubernetes-charts.storage.googleapis.com/
helm install nginx-ingress stable/nginx-ingress --set controller.publishService.enabled=true
docker login
cat ~/.docker/config.json
kubectl create secret generic regcred --from-file=.dockerconfigjson=~/.docker/config.json --type=kubernetes.io/dockerconfigjson
apiVersion: v1
kind: Pod
metadata:
name: private-reg
kubectl get pod -o=custom-columns=NODE:.spec.nodeName,NAME:.metadata.name --all-namespaces