type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
# Redis Cheatsheet | |
# All the commands you need to know | |
redis-server /path/redis.conf # start redis with the related configuration file | |
redis-cli # opens a redis prompt | |
# Strings. |
from fastapi import Security, Depends, FastAPI, HTTPException | |
from fastapi.security.api_key import APIKeyQuery, APIKeyCookie, APIKeyHeader, APIKey | |
from fastapi.openapi.docs import get_swagger_ui_html | |
from fastapi.openapi.utils import get_openapi | |
from starlette.status import HTTP_403_FORBIDDEN | |
from starlette.responses import RedirectResponse, JSONResponse | |
API_KEY = "1234567asdfgh" | |
API_KEY_NAME = "access_token" |
#!/usr/bin/env python3 | |
import asyncio | |
import time | |
import aiohttp | |
START = time.monotonic() | |
# Redis Cheatsheet | |
# All the commands you need to know | |
redis-server /path/redis.conf # start redis with the related configuration file | |
redis-cli # opens a redis prompt | |
# Strings. |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
# | |
# INPUT - Logstash listens on port 8514 for these logs. | |
# | |
input { | |
udp { | |
port => "8514" | |
type => "syslog-cisco" | |
} | |
Git Cheatsheet, (c) 2009-2012, Andrew Peterson
A place to hide modifications made to the workspace, while working on something else. (The stash area is not required in a “normal” workflow.)
#!/usr/bin/env bash | |
# If you're using docker-machine, call this script with your | |
# environment name | |
# Ex: ./vpn_fix dev | |
DEFAULTVM="boot2docker-vm" | |
[ $(id -u) = 0 ] || { echo "You must be root (or use 'sudo')" ; exit 1; } | |
report_success () |
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git |