Verify Permissions
diskutil verifyPermissions /
Repair Permissions
diskutil repairPermissions /
| 1) Add this code to a new file in Script Editor | |
| 2) Export the script as "Application" and make sure it's code signed | |
| 3) Put "Startup.app" in the root folder of the test website (e.g. where index.html is located) | |
| 4) Make sure that "Startup.app" has Full Disk Access in System Preferences > Security & Privacy > Privacy |
| #!/bin/bash | |
| # by Matt Sephton @gingerbeardman | |
| # dependencies: p7zip, pipx, osxmetadata | |
| # $ brew install p7zip | |
| # $ brew install pipx | |
| # $ pipx install osxmetadata | |
| # check your PATH and confirm operation |
| <?php | |
| // Kirby site config file | |
| // site/config/config.php | |
| return [ | |
| 'routes' => [ | |
| [ | |
| // This sets up two different URLs as an array that will | |
| // return the JSON Feed representation of a page in Kirby | |
| 'pattern' => ['feed', 'some-other-path/feed'], | |
| 'action' => function() { |
| # Distribute all stickies evenly on the main screen, with optional padding | |
| # how many columns? | |
| set num_columns to 7 | |
| # how many pixels of padding between the stickies? | |
| set padding to 20 | |
| # Find the dimensions of the main screen | |
| # https://stackoverflow.com/questions/1866912/applescript-how-to-get-current-display-resolution |
| #!/bin/bash | |
| # | |
| # GitHub Flavored Markdown | |
| # https://gist.github.com/levigroker/96f96253c992b7a947d93c3d32d80b8d | |
| # | |
| # A BBEdit Preview Filter script to render GitHub flavored markdown as HTML | |
| # See the "Applying Preview Filters" section of the BBEdit Manual | |
| # https://www.barebones.com/support/bbedit/index.html#docs | |
| # GitHub Flavored Markdown Spec: https://github.github.com/gfm/ | |
| # GitHub Flavored Markdown CLI: https://github.com/github/cmark-gfm |
| body { | |
| font-family: "Helvetica Neue", Helvetica, sans-serif; | |
| font-size: 12pt; | |
| line-height: 1.45; | |
| padding: 0 1rem; | |
| max-width: 60em; | |
| } | |
| a { | |
| color: rgba(0, 122, 255, 1); | |
| } |
| maxUnsigned = 0x1FFFFFFF | |
| bitsInUnsigned = int(29) | |
| seventyFivePercent = int(22) | |
| twelvePercent = int(4) | |
| highBits = 0x1E000000 | |
| lowBits = 0x01FFFFFF | |
| def generateRegCode(userName): | |
| reg = "" | |
| sn = "" |
| <meta name="description" content="<?php echo $page->description()->or($site->description()) ?>"> |
| function uf_getLastDir($sUrl) | |
| { | |
| $sPath = parse_url($sUrl, PHP_URL_PATH); // parse URL and return only path component | |
| $aPath = explode('/', trim($sPath, '/')); // remove surrounding "/" and return parts into array | |
| end($aPath); // last element of array | |
| if (is_dir($sPath)) // if path points to dir | |
| return current($aPath); // return last element of array | |
| if (is_file($sPath)) // if path points to file | |
| return prev($aPath); // return second to last element of array | |
| return false; // or return false |