# Run
docker run -d --name redis -p 6379:6379 redis
# Stop
docker stop redis
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# Aliases taken from https://github.com/PaulRoze/mezeze/blob/main/mezeze.sh | |
# To avoid cluttering the global shell namespace, only load them when `kube` is entered in the terminal. | |
function kube() { | |
alias k="kubectl" | |
alias kx="/usr/local/bin/kubectx" | |
alias kn="/usr/local/bin/kubens" | |
alias ke="kubectl exec -it" | |
alias kl="kubectl logs" | |
alias kg="kubectl get" |
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
// Usage: | |
// node httprint.mjs [PORT] | |
// | |
// The default port is 3000. | |
// Prints to stdout the request method, url, headers and body. | |
// Always returns 200 with an empty JSON object as the body and application/json as the content type. | |
import { createServer } from "node:http"; | |
const port = process.argv[2] || 3000; |
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
# Source this file to use | |
_podget() { | |
kubectl --namespace $NS get pods | |
} | |
_podnames() { | |
_podget | tail -n +2 | cut -d " " -f1 | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>FastAPI - ReDoc</title> | |
<!-- needed for adaptive design --> | |
<meta charset="utf-8"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet"> |
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
def get_region_name(): | |
from urllib import request, error | |
me = get_region_name | |
if hasattr(me, 'cache'): | |
return me.cache | |
try: | |
with request.urlopen("http://169.254.169.254/latest/meta-data/placement/region", timeout=1) as res: | |
me.cache = res.read().decode().strip() |
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
#!/usr/bin/env python3 | |
import boto3 | |
import time | |
from pprint import pprint | |
import json | |
import sys | |
client = boto3.client('kinesis') |
NewerOlder