Skip to content

Instantly share code, notes, and snippets.

View peter279k's full-sized avatar
🎯
Focusing

Chun-Sheng, Li peter279k

🎯
Focusing
View GitHub Profile
version: "3"
services:
# configuration manager for NiFi
zookeeper:
hostname: myzookeeper
container_name: zookeeper_container_persistent
image: 'bitnami/zookeeper:3.7.0' # latest image as of 2021-11-09.
restart: on-failure
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
@alexlopes
alexlopes / kafka_python_sasl_scram.py
Last active December 25, 2024 10:37
Kafka Python with SASL/SCRAM Authentication Example
import os
from kafka import KafkaProducer, KafkaConsumer
BOOTSTRAP_SERVERS=os.gentenv("KAFKA_BOOTSTRAP_SERVERS").split(",")
TOPIC_NAME="the-topic"
SASL_USERNAME=os.gentenv("KAFKA_SASL_USERNAME")
SASL_PASSWORD=os.gentenv("KAFKA_SASL_PASSWORD")
def consume():
consumer = KafkaConsumer(TOPIC_NAME, security_protocol="SASL_SSL", sasl_mechanism="SCRAM-SHA-512", sasl_plain_username=SASL_USERNAME, sasl_plain_password=SASL_PASSWORD, bootstrap_servers=BOOTSTRAP_SERVERS)
@glubsy
glubsy / howto_record_youtube_livestreams.md
Last active March 20, 2025 21:28
How to properly record Youtube & Twitch live streams

How to record Youtube live streams:

  • use livestream_saver to download from the first segment. Can also record membership-only streams by supplying it your cookies (uses yt-dlp to download)

  • use ytarchive which basically does the same thing, except a bit better.

  • use youtube_stream_capture. You can use cookies file to get member-only streams too. Be aware that this script currently fails to download chunks as soon as the stream has ended (this might be a bug).

  • or use live-dl which does monitoring of streams too. This is a wrapper around streamlink and yt-dlp.

@Gsealy
Gsealy / clean.sh
Created February 5, 2021 08:14
clean coin miner and tsunami back door
#!/bin/env bash
# clean coin miner and tsunami back door
# Gsealy
# 2021-2-3 21:19:17
set +e
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
USER=`whoami`
@eldadfux
eldadfux / .env
Last active June 29, 2022 05:24
Appwrite 0.14 - Stack
_APP_ENV=production
_APP_LOCALE=en
_APP_OPTIONS_ABUSE=enabled
_APP_OPTIONS_FORCE_HTTPS=disabled
_APP_OPENSSL_KEY_V1=your-secret-key
_APP_DOMAIN=localhost
_APP_DOMAIN_TARGET=localhost
_APP_CONSOLE_WHITELIST_ROOT=enabled
_APP_CONSOLE_WHITELIST_EMAILS=
_APP_CONSOLE_WHITELIST_IPS=
<?php
require 'vendor/autoload.php';
use PHPUnit\Framework\TestCase;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\WebDriverBy;
$GLOBALS['LT_USERNAME'] = "user-name";
# accessKey: AccessKey can be generated from automation dashboard or profile section
@peter279k
peter279k / aks-hands-on-lab.md
Last active September 26, 2020 05:42
This is the AKS hands-on-lab on K8s Summit 2020

容器化技術

  • 作業系統層級虛擬化
  • 透過Docker Engine
  • 可以專注在開發應用程式,不用太注意與操作虛擬化相關的操作技術

Docker image 映像檔

  • Docker Engine
  • Docker image
@peter279k
peter279k / IEC-61850_62351.md
Last active May 22, 2021 09:02
基於IEC 61850及IEC 62351之微電網保護的通訊及資安應用與測試

References

Sessions

11:20 Track E TICC 101C

用 Serverless 真的方便又省錢?

12:00 Track E TICC 101C

OpenStack 私有雲大規模佈署與維運之實務經驗技術分享

13:30 Track E TICC 102

容器化微服務應用於企業整合架構之發展