sudo pacman -Syu zsh
You do not need to install manjaro-zsh-config
and all the other related packages like zsh-syntax-highlighting
, zsh-history-substring-search
, zsh-autosuggestions
, etc., as we will use Oh My Zsh.
sudo pacman -Syu zsh
You do not need to install manjaro-zsh-config
and all the other related packages like zsh-syntax-highlighting
, zsh-history-substring-search
, zsh-autosuggestions
, etc., as we will use Oh My Zsh.
This is just some code I recently used in my development application in order to add token-based authentication for my api-only rails app. The api-client was to be consumed by a mobile application, so I needed an authentication solution that would keep the user logged in indefinetly and the only way to do this was either using refresh tokens or sliding sessions.
I also needed a way to both blacklist and whitelist tokens based on a unique identifier (jti)
Before trying it out DIY, I considered using:
<?php | |
namespace App\Nova\Actions; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Queue\SerializesModels; | |
use Illuminate\Support\Collection; | |
use Laravel\Nova\Actions\Action; | |
use Laravel\Nova\Fields\ActionFields; |
#********************************************* | |
# 二項係数計算モジュール | |
# | |
# DATE AUTHOR VERSION | |
# 2019.10.19 mk-mode.com 1.00 新規作成 | |
# | |
# Copyright(C) 2019 mk-mode.com All Rights Reserved. | |
#********************************************* | |
module BinomCoeff | |
# 二項係数の計算(1) |
This explains how to set up Vim on Ubuntu 18.04 on Windows Subsystem for Linux 2 (WSL2) in order to share the clipboard between Windows and Ubuntu.
set -e | |
yay -S docker | |
sudo usermod -aG docker $USER | |
newgrp docker | |
sudo systemctl enable docker | |
sudo systemctl start docker |
#!/usr/bin/env bash | |
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error | |
# Make sure that the .gnupg directory and its contents is accessibile by your user. | |
chown -R $(whoami) ~/.gnupg/ | |
# Also correct the permissions and access rights on the directory | |
chmod 600 ~/.gnupg/* | |
chmod 700 ~/.gnupg |
''' | |
Run the following commands (bc. gists don't allow directories) | |
pip install flask django dj-database-url psycopg2 | |
mkdir -p app/migrations | |
touch app/__init__.py app/migrations/__init__.py | |
mv models.py app/ | |
python manage.py makemigrations | |
python manage.py migrate |