This file contains hidden or 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
| sudo docker ps -aq | while read line; do sudo docker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $line ; done |
This file contains hidden or 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
| var migrationsAssembly = context.GetService<IMigrationsAssembly>(); | |
| var historyRepository = context.GetService<IHistoryRepository>(); | |
| var all = migrationsAssembly.Migrations.Keys; | |
| var applied = historyRepository.GetAppliedMigrations().Select(r => r.MigrationId); | |
| var pending = all.Except(applied); |
This file contains hidden or 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 | |
| for NAME in $(docker ps --format {{.Names}}) | |
| do | |
| echo -n "$NAME:" | |
| docker inspect $NAME | grep -i "ip.*[12]*\.[0-9]*" | \ | |
| sed -e 's/^ *//g' -e 's/[",]//g' -e 's/[a-zA-Z: ]//g' | |
| done |
This file contains hidden or 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
| var duplicateKeys = model.TestCollection.GroupBy(x => x.Id) | |
| .Where(group => group.Count() > 1) | |
| .Select(group => group.Key); |
This file contains hidden or 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
| find *.tmp -type f ! -newer than_this_file |
This file contains hidden or 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
| find . -type f -print0 | xargs -0 dos2unix |
This file contains hidden or 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
| docker ps -a --format "{{.ID}} {{.Names}} {{.Size}}" |
This file contains hidden or 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 | |
| du -sh /var/lib/docker/containers/ | |
| for file in /var/lib/docker/containers/* | |
| do | |
| file_name="$(basename $file)" | |
| log_file="$file/$file_name-json.log" | |
| log_size="$(ls -lh $log_file|awk '{print $5}')" | |
| container_name=$(docker inspect --format='{{.Name}}' $file_name) |
This file contains hidden or 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
| cd /var/lib/docker/containers | |
| find ./ -type f -name *.log|xargs -i cp {} ~/docker-logs/ |
This file contains hidden or 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
| # or docker exec utmsp_gw_1 nginx -s reload | |
| docker kill --signal=HUP utmsp_gw_1 |