Skip to content

Instantly share code, notes, and snippets.

@sandipchitale
sandipchitale / JoApplication.java
Created June 15, 2021 06:36
fabric8 java client #kubernetes
package com.example.jo;
import io.fabric8.kubernetes.client.Config;
import io.fabric8.kubernetes.client.ConfigBuilder;
import io.fabric8.kubernetes.client.DefaultKubernetesClient;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.fabric8.kubernetes.client.KubernetesClientException;
public class JoApplication {
@sandipchitale
sandipchitale / enabledisable.ps1
Created June 18, 2021 21:31
Enabl, disable IPV6 on Windows 10 #windows #ipv6
‎‎​
@sandipchitale
sandipchitale / extension.ts
Last active June 19, 2021 22:02
Open extension's settings #vscode
vscode.commands.executeCommand('workbench.action.openSettings', `@ext:sandipchitale.extension.id`);
@sandipchitale
sandipchitale / config.ts
Last active August 6, 2021 07:33
Cucumberjs-tsflow-playwright #cucumberjs #cucumber-tsflow #playwright
import { LaunchOptions } from 'playwright';
export const browserOptions: LaunchOptions = {
headless: false,
slowMo: 0,
args: ['--use-fake-ui-for-media-stream', '--use-fake-device-for-media-stream'],
firefoxUserPrefs: {
'media.navigator.streams.fake': true,
'media.navigator.permission.disabled': true,
},
};
@sandipchitale
sandipchitale / settings.json
Created August 18, 2021 00:30
kubernetes settings #kubernetes
"vs-kubernetes": {
"vs-kubernetes.minikube-path": "C:\\Users\\schitale\\.vs-kubernetes\\tools\\minikube\\windows-amd64\\minikube.exe",
"disable-linters": [
"resource-limits"
],
"vs-kubernetes.knownKubeconfigs": [
"c:\\Users\\schitale\\.kube\\kind-config-kind",
"c:\\Users\\schitale\\.kube\\config",
"c:\\Users\\schitale\\.kube\\kind-config-infoarchive",
@sandipchitale
sandipchitale / build.gradle
Created August 20, 2021 05:23
gradle-kubernetes
try {
client = new DefaultKubernetesClient(config);
// client.nodes().list().getItems().forEach(
// n -> System.out.println(n.getKind() + "\t\t" + n.getMetadata().getName()));
// client.namespaces().list().getItems().forEach(
// n -> System.out.println(n.getKind() + "\t" + n.getMetadata().getName()));
client.pods().inAnyNamespace().list().getItems().forEach(
n -> System.out.println("Namespace\t" + n.getMetadata().getNamespace() + "\t" + n.getKind() + "\t" + n.getMetadata().getName()));
client.pods().watch(new Watcher() {
@sandipchitale
sandipchitale / build.gradle
Created August 20, 2021 05:25
Gradle farbick8 #gradle #kubernetes #fabrick8
buildscript {
repositories {
mavenCentral();
}
dependencies {
classpath group: 'io.fabric8', name: 'kubernetes-client', version: '4.10.3'
}
}
@sandipchitale
sandipchitale / angular-stability-check.js
Last active October 21, 2021 07:26 — forked from andreroggeri/angular-stability-check.js
Checks the Angular stability and logs on the console. Useful for debugging long protractor waits
/**
* Copy and paste the code below on your browser console
* It will log the stable changes and how long it took to become stable
*/
let currentStatus = undefined;
let root = $('ia-infoarchive-app'); // Change this selector to the component that you'll be watching (Usually the root component)
let startTime = new Date();
let stabilityChecker = setInterval(() => {
let newStatus = window.getAngularTestability(root).isStable();
if (currentStatus !== newStatus) {
@sandipchitale
sandipchitale / .teamcity-mappings.properties
Last active April 8, 2023 05:22
vscode-teamcity-remote-run #teamcity
./=perforce://%P4PORT%:////depot/InfoArchive/IA/Main/Clients
@sandipchitale
sandipchitale / custom-range-input-slider-with-labels.markdown
Created December 16, 2021 02:04
Custom range input slider with labels