This file contains 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
#!/usr/local/bin/php | |
<?php | |
use modmore\Gitify\Gitify; | |
use Symfony\Component\Yaml\Yaml; | |
if (PHP_SAPI !== 'cli') { | |
exit('This file should be run through the command line interface!'); | |
} |
This file contains 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 | |
use Phinx\Console\PhinxApplication; | |
use Phinx\Wrapper\TextWrapper; | |
$base = dirname(__DIR__, 2) . '/private/'; | |
require $base . 'vendor/autoload.php'; | |
$config = $base . 'console-commands/configs/phinx.php'; |
This file contains 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 | |
require 'config.core.php'; | |
require MODX_CORE_PATH . 'config/' . MODX_CONFIG_KEY . '.inc.php'; | |
$filename = $dbase . '-' . date('Y-m-d') . '.sql.gz'; | |
header('Content-Type: application/x-gzip'); | |
header('Content-Disposition: attachment; filename="' . $filename . '"'); |
This file contains 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
<template> | |
<div> | |
<div | |
style="min-height: 200px; transition: background-color 0.25s" | |
:class="{ | |
'border rounded overflow-hidden': true, | |
'bg-light': !dragCount, | |
'bg-light-green border-success': dragCount > 0, | |
}" | |
@drop.prevent="onAddFile" |
This file contains 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
// Put into plugins/auth.ts | |
export default defineNuxtPlugin((nuxtApp) => { | |
const auth = useAuth() | |
nuxtApp.hook('app:created', async () => { | |
if (!auth.loggedIn.value && auth.token.value) { | |
try { | |
await auth.loadUser() | |
} catch (e) { | |
if (e.response && e.response.status === 401) { |