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
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
git clone https://gitlab.com/open-projects-group/projects/enhancement/mono-repo | |
git remote add -f media-Information-service https://gitlab.com/open-projects-group/projects/enhancement/media-Information-service.git | |
git merge -s ours --allow-unrelated-histories --no-commit media-Information-service/master | |
git read-tree --prefix=media-Information-service/ -u media-Information-service/master | |
git commit -m "Merge media-Information-service project as our subdirectory" | |
git pull -s subtree media-Information-service master | |
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 "@toverux/ngx-sweetalert2" has an incompatible peer dependency to "@angular/core" (requires "^5.0.0 || ^6.0.0" (extended), would install "9.1.12"). | |
Package "ng2-page-scroll" has an incompatible peer dependency to "@angular/platform-browser" (requires ">=4.2.6 <5.0.0" (extended), would install "9.1.12"). | |
Package "@ng-bootstrap/ng-bootstrap" has an incompatible peer dependency to "@angular/forms" (requires "^7.0.0" (extended), would install "9.1.12"). | |
Package "@toverux/ngx-sweetalert2" has an incompatible peer dependency to "@angular/common" (requires "^5.0.0 || ^6.0.0" (extended), would install "9.1.12"). | |
Package "ng2-img-cropper" has an incompatible peer dependency to "@angular/compiler" (requires "^4.0.0" (extended), would install "9.1.12"). | |
Package "ng2-page-scroll" has an incompatible peer dependency to "@angular/router" (requires ">=4.2.6 <5.0.0" (extended), would install "9.1.12"). |
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
processEngine().getRuntimeService().startProcessInstanceByKey("invoice-creation", | |
Variables.createVariables().putValueTyped("order", | |
Variables.objectValue(order).serializationDataFormat(SerializationDataFormats.JSON).create())); | |
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
public interface IAbstarctRepository<T,PK extends Serializable> { | |
List<T> getAll(); | |
T loadByEntityId(PK entityId); | |
boolean delete(T entity); | |
boolean deleteByEntityId(PK entityId); | |
void update(T entity); | |
PK saveOrUpdate(T entity); | |
boolean save(List<T> entities); | |
} |
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
sudo apt-get remove golang-docker-credential-helpers | |
docker login | |
<login as normal> | |
sudo apt-get install docker-compose | |
sudo chmod 666 /var/run/docker.sock | |
/etc/netplan/50-cloud-init.yaml |
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
networksetup -setdnsservers "iPhone USB" 8.8.8.8 | |
dscacheutil -flushcache |
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[]){ |
NewerOlder