Skip to content

Instantly share code, notes, and snippets.

View StephanWagner's full-sized avatar

Stephan Wagner StephanWagner

View GitHub Profile
@StephanWagner
StephanWagner / gist:0e5f1173749365df9cf996d3ab82a99e
Last active September 21, 2022 16:49
Probability functions for dropchance calculations
function parseProbability(probability) {
return Math.min(100, Math.max(0, parseFloat(probability) || 0));
}
function probabilityToPercent(nr) {
return toFixed(nr * 100) + "%";
}
function probabilityByRuns(probability, runs) {
return 1 - Math.pow(1 - probability, runs);
@StephanWagner
StephanWagner / README.md
Last active May 18, 2020 08:27
Setting up Deployer on Debian with Plesk

Setting up Deployer on Debian with Plesk

Instructions of how to set up Deployer on a Server with Debian and Plesk.

More info at https://deployer.org


Install Deployer

@StephanWagner
StephanWagner / docker-cleanup.sh
Created September 12, 2019 09:02
Prune docker system and remove all containers, images, volumes with one command.
docker system prune
docker container stop $(docker container ls -aq)
docker container rm $(docker container ls -aq)
docker rmi $(docker images -aq)
docker volume prune
@StephanWagner
StephanWagner / bitbucket-pipelines.yml
Last active April 29, 2019 20:07
Deploy websites with Bitbucket pipelines and Git-ftp. More infos here: https://stephanwagner.me/deploy-websites-with-bitbucket-pipelines-and-git-ftp
image: wagnerstephan/bitbucket-git-ftp:latest
pipelines:
custom:
init:
- step:
caches:
- node
script:
- npm install