To extract the changes that are in a specific commit and apply them in another project, run
git format-patch -1 commit_shaThat will generate a .patch file for the specific commit.
Then to apply it, just run:
To extract the changes that are in a specific commit and apply them in another project, run
git format-patch -1 commit_shaThat will generate a .patch file for the specific commit.
Then to apply it, just run:
| { | |
| "summary": "{{environment}} deployment {{status}} on {{project.name}}", | |
| "themeColor": "412888", | |
| "title": "The {{environment}} deployment is {{status}} on {{project.name}}", | |
| "sections": [ | |
| { | |
| "activityTitle": "{{user.name}}", | |
| "activitySubtitle": "{{deployment.finished_at}}", | |
| "activityImage": "{{user.avatar_url}}", | |
| "text": "The {{environment}} deployment is {{status}}." |
Sum size of binlog for a specific day
ls -lha binlog* | grep "Oct 20" | awk '{print $5}' | numfmt --from=iec | awk '{ sum += $1; } END { print sum; }' | numfmt --to=iec
Convert it to readable text file
mysqlbinlog -vv --base64-output=decode-rows binlog.190611 > binlog.190611.txt
| #!/usr/bin/env sh | |
| install_missing_dep() { | |
| if ! command -v "$1" > /dev/null 2>&1; then | |
| echo "Installing $1..." | |
| apk add "$1" | |
| fi | |
| } | |
| DEPS="curl jq" |
| printf " | |
| \e[1mDocker Network Usage\e[0m | |
| \e[3mRunning containers (I/O):\e[0m $(docker stats --format "table {{.NetIO}}" --no-stream | tail -n +2 | sed "s/kB/KB/g" | sed "s/B//g" | cut -d '/' -f1 | numfmt --from=iec | awk '{ sum += $1; } END { print sum; }' | numfmt --to=iec) / $(docker stats --format "table {{.NetIO}}" --no-stream | tail -n +2 | sed "s/kB/KB/g" | sed "s/B//g" | cut -d '/' -f2 | numfmt --from=iec | awk '{ sum += $1; } END { print sum; }' | numfmt --to=iec) | |
| \e[3mAll containers (I/O):\e[0m $(docker stats --all --format "table {{.NetIO}}" --no-stream | tail -n +2 | sed "s/kB/KB/g" | sed "s/B//g" | cut -d '/' -f1 | numfmt --from=iec | awk '{ sum += $1; } END { print sum; }' | numfmt --to=iec) / $(docker stats --all --format "table {{.NetIO}}" --no-stream | tail -n +2 | sed "s/kB/KB/g" | sed "s/B//g" | cut -d '/' -f2 | numfmt --from=iec | awk '{ sum += $1; } END { print sum; }' | numfmt --to=iec) | |
| " |