I hereby claim:
- I am hrvoj3e on github.
- I am hrvoj3e (https://keybase.io/hrvoj3e) on keybase.
- I have a public key ASCouDrOYVr7vbfxwRQatfK00eIaLr07bFnUYfPSHn131Ao
To claim this, I am signing this object:
location ~ /\.git { | |
deny all; | |
} | |
# or, all . directories/files in general (including .htaccess, etc) | |
location ~ /\. { | |
deny all; | |
} |
#!/bin/bash | |
# for use with cron, eg: | |
# 0 3 * * * postgres /var/db/db_backup.sh foo_db | |
if [[ -z "$1" ]]; then | |
echo "Usage: $0 <db_name> [pg_dump args]" | |
exit 1 | |
fi |
# sync everything excluding things in .gitignore | |
# delete anything on target not in source | |
# include dotfiles and symlinks, also use compression | |
rsync -azP --delete --filter=":- .gitignore" . my-target-host:/my/target/directory |
## PHP 7.2 | |
apt install yaz php7.2-dev php7.2-pear libyaz5-dev | |
pecl channel-update pecl.php.net | |
pecl install yaz | |
## Installing '/usr/lib/php/20170718/yaz.so' | |
echo 'extension=yaz.so' > /etc/php/7.2/mods-available/yaz.ini | |
ln -s /etc/php/7.2/mods-available/yaz.ini /etc/php/7.2/fpm/conf.d/20-yaz.ini | |
ln -s /etc/php/7.2/mods-available/yaz.ini /etc/php/7.2/cli/conf.d/20-yaz.ini |
## PHP 7.3 | |
apt update | |
apt install software-properties-common | |
apt-add-repository ppa:ondrej/php | |
apt install yaz libyaz5-dev | |
apt install php7.3-dev php7.3 php7.3-fpm | |
pecl channel-update pecl.php.net | |
pecl install yaz | |
## Installing '/usr/lib/php/20180731/yaz.so' | |
## install ok: channel://pecl.php.net/yaz-1.2.3 |
#!/bin/bash | |
### | |
# semantic version comparition using semver specification http://semver.org/ | |
# This bash script compares pre-releases alphabetically as well | |
# | |
# returns 1 when A greater than B | |
# returns 0 when A equals B | |
# returns -1 when A lower than B | |
# |
I hereby claim:
To claim this, I am signing this object:
First of all, please note that token expiration and revoking are two different things.
A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.
Quoted from JWT RFC:
<?php | |
namespace Core\UserBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Symfony\Component\HttpFoundation\Request; | |
class SecurityController extends Controller | |
{ | |
public function loginAction(Request $request) |
version: '3.7' | |
services: | |
whoami: | |
image: jwilder/whoami | |
ports: | |
- 127.0.0.1:7000:8000 | |
cors: |