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
| # basically re-encode with 10-years old encoding | |
| for f | |
| do | |
| /usr/local/bin/ffmpeg -i "$f" -vf scale=704:384 -aspect 16:9 -maxrate 1800k -qscale 2 -trellis 1 -vtag DX50 -qmax 16 "$f.avi" | |
| 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
| #!/bin/sh | |
| COMPUTER_NAME=$(/usr/sbin/scutil --get ComputerName) | |
| NBACKUPS=$(/usr/bin/tmutil listbackups | | |
| /usr/bin/grep "$COMPUTER_NAME" | | |
| /usr/bin/wc -l) | |
| OLDEST_BACKUP=$(/usr/bin/tmutil listbackups | | |
| /usr/bin/grep "$COMPUTER_NAME" | | |
| /usr/bin/head -n1) | |
| LATEST_BACKUP=$(/usr/bin/tmutil latestbackup) | |
| echo Latest backup: $LATEST_BACKUP |
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/sh | |
| java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui |
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 | |
| # Script that frees up docker-related diskspace, by removing old images and dangling resources. | |
| echo Removing all but the latest app image... | |
| docker images --format '{{.Repository}}:{{.Tag}}' | grep 'product-sigtran' | sort -r | tail -n +2 | xargs docker rmi | |
| echo Removing exited containers... | |
| docker ps --filter status=dead --filter status=exited -aq | xargs docker rm -v | |
| echo Removing unused images... |
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
| import Foundation | |
| public protocol JSONStringConvertible: Codable, CustomStringConvertible { } | |
| extension JSONStringConvertible { | |
| public var description: String { | |
| let encoder = JSONEncoder() | |
| do { | |
| let data = try encoder.encode(self) | |
| return String(data: data, encoding: .utf8)! |