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
# copied from https://stackoverflow.com/questions/73600496/heroku-node-js-app-allocation-failure-scavenge-might-not-succeed-with-memory-s | |
const v8 = require('v8'); | |
// added the code below to a route that caused a memory leak | |
const heapStats = v8.getHeapStatistics(); | |
const heapStatsMB = heapStats; | |
for (const key in heapStatsMB) { | |
heapStatsMB[key] = `${(((heapStatsMB[key] / 1024 / 1024) * 100) / 100).toFixed(2)} MB`; | |
} | |
console.table(heapStatsMB); |
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 | |
aws rds create-db-snapshot --db-instance-identifier db --db-snapshot-identifier snapshot | |
aws rds wait db-snapshot-completed --db-snapshot-identifier snapshot | |
aws rds delete-db-snapshot --db-snapshot-identifier snapshot |
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 | |
# Please give all credit to this stackoverflow post | |
# https://stackoverflow.com/questions/42950501/delete-node-modules-folder-recursively-from-a-specified-path-using-command-line | |
find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + |
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 | |
cat file | jq -sR . |
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
.renovate-template: | |
variables: | |
RENOVATE_GIT_AUTHOR: "${GITLAB_USER_NAME} <${GITLAB_USER_EMAIL}>" | |
RENOVATE_DRY_RUN: "false" | |
RENOVATE_LOG_LEVEL: "info" | |
image: | |
name: node:12 | |
entrypoint: [""] | |
only: | |
- schedules |
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 | |
# NON Distributed Denial of Service xD LOL | |
while true; do | |
for i in {1..1000} | |
do | |
curl -X GET "https://www.google.es" & | |
#echo "$i" |
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
general { | |
output_format = "i3bar" | |
colors = true | |
interval = 5 | |
} | |
order += "disk /" | |
disk "/" { | |
format = "%free" | |
} |
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 | |
# sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get clean | |
apt-get update | |
apt-get dist-upgrade | |
apt-get autoremove | |
apt-get autoclean | |
apt-get clean |
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 | |
# Originally written by Ralf Kistner <[email protected]>, but placed in the public domain | |
set +e | |
bootanim="" | |
failcounter=0 | |
timeout_in_sec=360 |
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 | |
# Please give credit to: https://gist.github.com/matthewmccullough/988077 | |
# and to: https://gist.github.com/matthewmccullough/988077#gistcomment-2928496 | |
# Go there and give a star there and not here. | |
# This is only a copy and paste for personal purposes | |
gitk --all $(git reflog --format=format:%h) |
NewerOlder