This blog post shows how to create a token:
Enable developer mode:
- User Settings
- Advanced
- Enable Developer Mode
Get the channel id:
""" | |
This script uses the GraphQL API to create discussions programatically using Python and Requests. | |
""" | |
import os | |
import time | |
import json | |
import requests | |
def url_builder(path): |
<div class="card"> | |
<img class="avatar" src="https://pbs.twimg.com/profile_images/1610149927455178752/JuWuMNUw_400x400.jpg"> | |
<div class="follow-btn" onclick="followBtn()">Follow</div> | |
<p class="name">Frank Eno</p> | |
<p class="username">@xsgames</p> | |
<p class="info">Game Developer, Web designer<br>Guitar player, father of 4</p> | |
<div class="bottom-data">9.7K <span>Followers</span> • 240 <span>Following</span> • <span>Since May 2018</span> | |
</div> |
This blog post shows how to create a token:
Enable developer mode:
Get the channel id:
<!doctype html> | |
<title>Site Maintenance</title> | |
<style> | |
body { text-align: center; padding: 150px; } | |
h1 { font-size: 50px; } | |
body { font: 20px Helvetica, sans-serif; color: #333; } | |
article { display: block; text-align: left; width: 650px; margin: 0 auto; } | |
a { color: #dc8100; text-decoration: none; } | |
a:hover { color: #333; text-decoration: none; } | |
</style> |
import socket | |
def find_open_port(): | |
""" | |
Use socket's built in ability to find an open port. | |
""" | |
sock = socket.socket() | |
sock.bind(('', 0)) |
######################################################## | |
# How To Auto-Scale Kubernetes Clusters With Karpenter # | |
# https://youtu.be/C-2v7HT-uSA # | |
######################################################## | |
# Referenced videos: | |
# - GKE Autopilot - Fully Managed Kubernetes Service From Google: https://youtu.be/Zztufl4mFQ4 | |
######### | |
# Setup # |
Access Log:
172.16.4.86 - - [04/Jun/2022:07:58:38 +0000] "GET / HTTP/2.0" 301 280 "-" "curl"
Query in Grafana / Loki:
{job="prod/nginx"} |= "GET / "
#!/usr/bin/env python3 | |
# docs: https://grafana.com/docs/loki/latest/api/#post-lokiapiv1push | |
import requests | |
import time | |
# variables | |
LOKI_USERNAME="x" | |
LOKI_PASSWORD="x" | |
LOKI_ENDPOINT="https://loki-api.example.com/loki/api/v1/push" |
This is a basic example with a dirty bash script on how to create a copy of a production database and update the column values of the new (test / staged) database, which might be sensitive or which is not suitable for test environments.
This test is intentional for small datasets.
The flow: