db.currentOp().inprog.forEach(
function (op) {
if (op.secs_running > 5) {
print("host: " + op.host
+ " secs_running: " + op.secs_running
+ " op: " + op.op
+ " ns: " + op.ns
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 { ArgumentsHost, Catch, HttpException } from '@nestjs/common'; | |
import { BaseExceptionFilter } from '@nestjs/core'; | |
import { Constants } from '../constants.utils'; | |
import { LoggingService } from '../logging/logging.service'; | |
@Catch() | |
export class ExceptionsLoggerFilter extends BaseExceptionFilter { | |
private readonly log; | |
constructor(logger: LoggingService, httpAdapter: any) { |
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
#!/usr/bin/env sh | |
# Get the list of all containers | |
containers=$(docker ps -a | grep "Created" | awk '{print $1}') | |
# Get length of the list | |
length=$(echo "$containers" | awk '{print NF}') | |
echo "Gonna kill ${length} containers" | |
# Kill the stuck containers |
Pulled from https://stackoverflow.com/a/64948301
To unlock a docker service failing to start with this error:
network sandbox join failed: subnet sandbox join failed for "10.0.0.0/24": error creating vxlan interface: file exists
You can try to the [following steps][1].
- Check each node for any vx-* interfaces in
/sys/class/net
ls -l /sys/class/net/ | grep vx
find ./ -name "docker.log" -type f -exec rm {} \;
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
# Inspired from https://github.com/github/gitignore/blob/master/Node.gitignore | |
# Logs | |
logs | |
*.log | |
npm-debug.log* | |
yarn-debug.log* | |
yarn-error.log* | |
lerna-debug.log* |
I hereby claim:
- I am mualig on github.
- I am mualig (https://keybase.io/mualig) on keybase.
- I have a public key ASDfUcGM5uMv3esPI-xgaZtO_IGQtZXCoHswjtzgh2fnYQo
To claim this, I am signing this object:
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
db.getCollection("raws").remove({ | |
$where: function() { | |
return this._id.getTimestamp() <= new Date("2018-08-12"); | |
} | |
}) |