. | Find a single character, except newline or line terminator |
---|---|
\w | Find a word character |
\W | Find a non-word character |
\d | Find a digit |
\D | Find a non-digit character |
\s | Find a whitespace character |
\S | Find a non-whitespace character |
\b | Find a match at the beginning/end of a word, beginning like this: \bHI, end like this: HI\b |
\B | Find a match, but not at the beginning/end of a word |
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
apt-get update | |
apt-get install -y gnupg | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list | |
apt-get update | |
apt-get install -y yarn |
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
# source: https://github.com/cataphract/php-rar/issues/17#issuecomment-1001826233 | |
git clone https://hub.fastgit.org/cataphract/php-rar.git | |
cd php-rar | |
phpize | |
./configure | |
make | |
make install | |
cd ../ | |
rm -rf php-rar |
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
<router-view v-slot="{ Component }"> | |
<suspense timeout="0"> | |
<template #default> | |
<component :is="Component" :key="$route.path"></component> | |
</template> | |
<template #fallback> | |
<div>Loading...</div> | |
</template> | |
</suspense> | |
</router-view> |
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 | |
/** | |
* @noinspection PhpRedundantCatchClauseInspection | |
* @noinspection PhpUnusedLocalVariableInspection | |
*/ | |
public function getUser(): ?User | |
{ | |
try { | |
$this->user?->getId(); | |
return $this->user; |
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
################################################################################################################## | |
# Public assets (JS, Vue, images, etc.) | |
################################################################################################################## | |
FROM node:18-bullseye AS webpack-build | |
# configuring Yarn | |
RUN mkdir -p /app/public/build | |
WORKDIR /app | |
COPY yarn.lock . | |
COPY package.json . |
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
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico"> | |
<link rel="icon" type="image/x-icon" href="/favicon.ico"> |
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
function getHoursAndMinutes(int $seconds): string | |
{ | |
return sprintf( | |
"%dh%02d", | |
(int)floor($seconds / 3600), | |
($seconds / 60) % 60 | |
); | |
} |
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
location /robots.txt { | |
return 200 "User-agent: *\\nDisallow: /"; | |
access_log off; | |
} |
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
git tag new old | |
git tag -d old | |
git push origin :refs/tags/old | |
git push --tags |
NewerOlder