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/bash | |
# Remove terminating namespaces | |
# Usage: ./remove-terminating-ns.sh | |
TERMINATING_NS=$(kubectl get ns | grep Terminating | awk '{print $1}') | |
kubectl proxy & | |
PROXY_PID=$! |
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
(async function () { | |
const response = await fetch('https://cors-anywhere.herokuapp.com/https://www.domainsfortherestofus.com/'); | |
const text = await response.text(); | |
const parser = new DOMParser(); | |
const document = parser.parseFromString(text, 'text/html'); | |
const domain = document.querySelector("body > div.content > div > div > div.left-side > div.domain > a").text; | |
console.log('domain', domain); | |
})(); |
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
/* | |
(c) by Thomas Konings | |
Random Name Generator for Javascript | |
*/ | |
function capFirst(string) { | |
return string.charAt(0).toUpperCase() + string.slice(1); | |
} | |
function getRandomInt(min, max) { |
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
// Allows random intervals that do not start with 1. So you can get a random number from 10 to 15 for example. | |
function randomIntFromInterval(min,max) | |
{ | |
return Math.floor( Math.random()* ( max - min + 1 ) + min ); | |
} |
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
function uuidv4() { | |
return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c => | |
(c ^ crypto.getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16) | |
) | |
} |
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
const axios = require('axios'); | |
function random(min, max) { | |
return (Math.random() * ((max ? max : min) - (max ? min : 0) + 1) + (max ? min : 0)) | 0; | |
} | |
function wait(promise) { | |
const seconds = random(300, 2000); | |
return new Promise((resolve, reject) => { | |
setTimeout(() => resolve(promise()), seconds); |