Skip to content

Instantly share code, notes, and snippets.

View dobeerman's full-sized avatar
🤔
I may be slow to respond.

Alexander Smirnoff dobeerman

🤔
I may be slow to respond.
View GitHub Profile
---
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
...
spec:
advanced:
horizontalPodAutoscalerConfig:
behavior:
scaleDown:
policies:
@danilop
danilop / template.yaml
Last active July 17, 2025 15:02
Sample AWS SAM Template using Provisioned Concurrency with Application Auto Scaling
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
Sample SAM Template using Application Auto Scaling + Provisioned Concurrency
Globals:
Function:
Timeout: 30
@rmoff
rmoff / ccloud_connect.adoc
Created September 26, 2019 11:18
Configuring Kafka Connect with Confluent Cloud

Configuring Kafka Connect with Confluent Cloud

So you want to connect Kafka Connect to Confluent Cloud? Here’s how.

Overview

  1. Configure the worker

  2. Pre-create any topics that your source connector will write to (since auto-topic creation is not enabled on Confluent Cloud)

pipelines:
custom: # Pipelines that can only be triggered manually
from-commit:
- step:
#python image with aws-cli installed
image: atlassian/pipelines-awscli
services:
- docker
script:
# aws login
[user]
email = john.smith@gmail.com
name = John Smith
[push]
default = simple
[alias]
co = checkout
ci = commit
czp = cz && git pu
st = status
@nqbao
nqbao / ssm_parameter_store.py
Last active August 25, 2024 04:07
Python class to provide a dictionary-like interface to access AWS SSM Parameter Store easily
# Copyright (c) 2018 Bao Nguyen <b@nqbao.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
@dkurzaj
dkurzaj / README.md
Last active August 21, 2024 09:02
Docker compose Kafka, Zookeeper and Kafka manager

Docker compose Kafka, Zookeeper and Kafka manager

Gist inspired by this one intending to be an updated version of it : https://gist.github.com/17twenty/d619f922ab209f750630824f7c6836e3

Install

  • Create the environment variable that contains our host name (IP address) :
$ export EXPOSED_HOSTNAME=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1  -d'/')
  • Create the folders :
<?php
define('BOT_TOKEN', 'XXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXX'); // place bot token of your bot here
function checkTelegramAuthorization($auth_data) {
$check_hash = $auth_data['hash'];
unset($auth_data['hash']);
$data_check_arr = [];
foreach ($auth_data as $key => $value) {
$data_check_arr[] = $key . '=' . $value;
@Piterden
Piterden / test.js
Last active January 8, 2018 01:36 — forked from ejnshtein/test
Shittycode )))
const puppeteer = require('puppeteer')
let anime = {}
async function run (searched) {
searched = searched.replace(';', ' ')
// Setup pupeteer
const browser = await puppeteer.launch({
headless: false,
})
@alexcasalboni
alexcasalboni / aws-lambda-static-type-checker.md
Last active May 22, 2023 07:31
AWS Lambda Static Type Checker Example (Python3)

How to use Python3 Type Hints in AWS Lambda

TL;DR

Static Type Checkers help you find simple (but subtle) bugs in your Python code. Check out lambda_types.py and incrementally improve your code base and development/debugging experience with type hints.

Your Lambda Function code will go from this: