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
| <?php declare(strict_types=1); | |
| use Kirby\Cms\ModelWithContent; | |
| /** | |
| * This script assumes English is the default language and German is the translation. | |
| * The goal is to switch this and make German the default language and English the translation. | |
| * | |
| * We want to update all pages, files metadata and the site. | |
| * |
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 -delete |
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
| # https://joshhighland.com/2011/07/14/rename-all-files-names-in-a-directory-to-lower-case/ | |
| for i in *; do mv "$i" "$(echo $i|tr A-Z a-z)"; 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
| Route::get('img/{path}', function (League\Glide\Server $server, Illuminate\Http\Request $request) { | |
| $server->outputImage($request->getPathInfo(), $request->query->all()); | |
| })->where('path', '.+'); |
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
| // Alert | |
| // === | |
| .c-alert { | |
| padding: $unit | |
| // Success | |
| // --- |
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
| on run {input, parameters} | |
| set thefile to input | |
| try | |
| tell application "Finder" | |
| repeat with thefile in input | |
| -- create variable with path from file for shell command | |
| set tPath to quoted form of (POSIX path of thefile) | |
| -- extract the value for the metadata tag | |
| set command to "mdls -name kMDItemTitle " & tPath | |
| set output to do shell script command |