minikube stop; minikube delete
docker stop $(docker ps -aq)
rm -r ~/.kube ~/.minikube
sudo rm /usr/local/bin/localkube /usr/local/bin/minikube
systemctl stop '*kubelet*.mount'
sudo rm -rf /etc/kubernetes/
docker system prune -af --volumes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.molecues; | |
import java.util.Collections; | |
import java.util.HashSet; | |
import java.util.Objects; | |
import java.util.Set; | |
import java.util.concurrent.atomic.AtomicLong; | |
import java.util.function.Supplier; | |
import org.springframework.boot.CommandLineRunner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.syntaxcorrect.articles.smallhttpservers; | |
import com.sun.net.httpserver.HttpServer; | |
import java.io.OutputStream; | |
import java.net.InetSocketAddress; | |
public class TheComSunNetHttpServer{ | |
static final int port=8080; | |
public static void main(String args[]){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Injectable} from '@angular/core'; | |
import {Cache} from '../utils/storage.provider'; // Decorator to access local storage | |
let OneSignal; | |
const url = ''; | |
@Injectable() | |
export class OneSignalService { | |
@Cache({pool: 'OneSignal'}) oneSignalInit; // to check if OneSignal is already initialized. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Stop all running containers | |
docker kill $(docker ps -aq) | |
//Remove all containers | |
docker rm $(docker ps -aq) | |
//Remove all images | |
docker rmi $(docker images -q) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
lib_dir="$1" | |
if [ "$lib_dir" == "" ]; then | |
echo Please specifiy the directory for the jars | |
exit 1 | |
fi | |
cat <<EOF | tee pom.xml | |
<project xmlns="http://maven.apache.org/POM/4.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static String maskCreditCard(String sentenceThatMightContainACreditCard) { | |
String maskedSentence = null; | |
// Find sequence of numbers between 13-16. | |
// Numbers can have dashes, spaces, or no dashes / no spaces. | |
Pattern regex = Pattern.compile("\\b(?:\\d[ -]*?){13,16}\\b"); | |
Matcher regexMatcher = regex.matcher(sentenceThatMightContainACreditCard); | |
if (regexMatcher.find()) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maven | |
target | |
# Eclipse IDE | |
.project | |
.classpath | |
.settings | |