openssl genrsa 2048 > edgenode1.key
openssl req -new -x509 -nodes -sha1 -days 3650 -key edgenode1.key -subj "/C=JO/CN=*.goll.com"> edgenode1-wildcard.cert
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
"""This is an example of how to use async langchain with fastapi and return a streaming response. | |
The latest version of Langchain has improved its compatibility with asynchronous FastAPI, | |
making it easier to implement streaming functionality in your applications. | |
""" | |
import asyncio | |
import os | |
from typing import AsyncIterable, Awaitable | |
import uvicorn | |
from dotenv import load_dotenv |
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
{ | |
"preset": "per", | |
"rules": { | |
"align_multiline_comment": true, | |
"array_indentation": true, | |
"array_syntax": true, | |
"blank_line_after_namespace": true, | |
"blank_line_after_opening_tag": true, | |
"combine_consecutive_issets": true, | |
"combine_consecutive_unsets": true, |
This is a manual for OSX like touchpad gestures on arch linux for the awesome window manager. It describes how to trigger awesome actions on swiping with three fingers on the touchpad.
-
Install libinput dependencies
pacaur -S sf86-input-libinput libinput-gestures
-
Add current user to input group
sudo gpasswd -a $USER input
First of all, please note that token expiration and revoking are two different things.
- Expiration only happens for web apps, not for native mobile apps, because native apps never expire.
- Revoking only happens when (1) uses click the logout button on the website or native Apps;(2) users reset their passwords; (3) users revoke their tokens explicitly in the administration panel.
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:
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
#!/bin/bash | |
### Install PHP 5.5.38 on Ubuntu 16.04 64Bits | |
### https://www.howtoforge.com/tutorial/how-to-install-php-5-6-on-ubuntu-16-04/ | |
apt-get -y install build-essential libxml2-dev libxslt1-dev | |
apt-get -y install libfcgi-dev libfcgi0ldbl libjpeg62-dbg libxml2-dev | |
apt-get -y install libmcrypt-dev libssl-dev libc-client2007e libc-client2007e-dev | |
apt-get -y install libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev | |
apt-get -y install libfreetype6-dev libkrb5-dev libpq-dev libicu-dev |
This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.
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
ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
# Don't add passphrase | |
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
cat jwtRS256.key | |
cat jwtRS256.key.pub |
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
# Config for GNU GRand Unified Bootloader (GRUB) (2) | |
# /boot/grub2/grub.cfg | |
# or | |
# /boot/grub/grub.cfg | |
# Mostly only 'legacy' CSM/BIOS boot methods currently. | |
# Unable to boot loop entries with Secure Boot | |
# Notes: | |
# Description: | |
# This grub.cfg file was created by Lance http://www.pendrivelinux.com |