- Clean images
docker rmi -f `docker images -a --format {{.ID}}`
- Clean container
docker rm `docker ps -a --format {{.ID}}`
# ## Usage | |
# | |
# Update file `~/.gitconfig` like: | |
# | |
# [alias] | |
# br = branch | |
# ci = commit | |
br = branch | |
changelog = log \\$(./git describe --abbr=0)..HEAD --pretty=format:" * %h %s" |
##Input -> abc | |
##Output-> | |
## acb | |
## abc | |
## cab | |
## cba | |
## bac | |
## bca | |
##Note: This wont give correct result for aabc or abbc like strings having repeating chars |
#A string is considered balanced when every letter in the string appears both in uppercase and lowercase. For example, | |
#CATattac is balanced (a, c, t occur in both cases). Madam is not (a, d only appear in lowercase). Write a function | |
#that given #a string returns the shortest balanced substring of that string. I have tried using below approaches as | |
#described in the #answer by @CodeHunter. Can anyone suggest any better time or space complexity solution? | |
#Update: More examples "azABaabza" returns "ABaab" "TacoCat" returns -1 (not balanced) "AcZCbaBz" returns the entire string | |
def doInvert(letter): | |
if(letter.isupper()): | |
return letter.lower() | |
else: |
docker rmi -f `docker images -a --format {{.ID}}`
docker rm `docker ps -a --format {{.ID}}`
public class PreIncrement{ | |
public static void main(String[] args){ | |
int a; | |
int b = 3; | |
a = ++b; //4 | |
} | |
} | |
/* | |
Classfile /Users/avichakrabormac0s/Desktop/PreIncrement.class |
#start and stop jenkins | |
sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist #Stop | |
sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist # Start | |
#to delete all helm release | |
helm ls --all --short | xargs -L1 helm delete --purge | |
#to run a ubuntu pod in k8s | |
kubectl run my-shell --rm -i --tty --image ubuntu -- bash | |
apt update |
docker stop $(docker ps -a -q) | |
docker rm `docker ps -a --format {{.ID}}` | |
docker rmi -f $(docker images -a -q) |
web: java $JAVA_OPTS -jar target/dependency/webapp-runner.jar --port $PORT target/*.war |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>MyHerokuTestApp01</groupId> | |
<artifactId>MyHerokuTestApp01</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<packaging>war</packaging> | |
<dependencies> | |
<dependency> | |
<groupId>javax.servlet</groupId> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="handlebars-v3.0.0.js"></script> | |
<script id="handlebar_template" type="text/x-handlebars-template"> | |
<h2> Welcome: {{person.name}} {{person.last}} </h2> | |
</script> | |
</head> | |
<body> | |