Skip to content

Instantly share code, notes, and snippets.

View denzuko's full-sized avatar
💬
linkedin.com/in/denzuko

Dwight Spencer denzuko

💬
linkedin.com/in/denzuko
View GitHub Profile
@adulau
adulau / malicious-captcha.md
Last active September 26, 2024 07:19
Malicious captcha for Windows user

Email received

Hey there!

We have detected a security vulnerability in your repository. Please contact us at https://github-scanner.com to get more information on how to fix this issue.

Best regards,
Github Security Team
@keenanwoodall
keenanwoodall / _ Raylib + microui for Odin.md
Last active October 21, 2026 17:36
Easy two-line raylib + microui integration for the Odin programming language

Odin + Raylib + microui

  1. Copy/paste rlmu.odin into an rlmu/ folder in your Odin project
  2. Import rlmu package import "rlmu"
  3. Import microui package import mu "vendor:microui"
  4. Call rlmu lifecycle procs like so:
main :: proc() {
    rl.SetWindowState({ rl.ConfigFlag.WINDOW_RESIZABLE })
 rl.InitWindow(720, 600, "Odin/Raylib/microui Demo")
import logging
from airflow import DAG
from datetime import datetime, timedelta
from airflow.providers.postgres.hooks.postgres import PostgresHook
from airflow.operators.python import PythonOperator
# Change these to your identifiers, if needed.
POSTGRES_CONN_ID = "postgres_default"
@scyto
scyto / docker-swarm-architecture.md
Last active September 29, 2026 15:45
My Docker Swarm Architecture
@Gavinok
Gavinok / sqlval.troff
Last active January 29, 2021 23:53
demo tsql a troff preprocessor for using sqlite in troff
.\" cat THISFILE | tsql | tbl | groff -Tpdf > THISFILE.pdf
Store info
.sqldb :memory:
.sqlbeg
create table Fam (
name text,
id integer
primary key
@sairamkrish
sairamkrish / docker-compose.yml
Last active October 30, 2024 18:00
Airflow - Docker swarm setup
version: "3.8"
# This should give a high level idea of the approach.
# The complete solution is too complex and involves multiple internal microservices.
# I have tried to capture core things to consider while some else needs to achieve Docker swarm based auto scalout of workers.
services:
webserver:
image: customized/airflow:prod
environment:
from airflow import DAG
from airflow.operators.python_operator import PythonOperator
from airflow.hooks.base_hook import BaseHook
from airflow.utils.dates import days_ago
default_args = {
'start_date': days_ago(2)
}
dag = DAG('test-connection-hook', default_args = default_args, description='Test connection details', schedule_interval='@once')
@prabhu
prabhu / git-protect.tf
Created July 18, 2020 13:52
Protect github branches, mandate status checks with Terraform
# Protect the master branch. Enforce that ci/tests and shiftleft should pass to allow merges
# Allow PR to be dismissed by sem-user and managers team
resource "github_branch_protection" "protect_master" {
repository = "${github_repository_name}"
branch = "master"
enforce_admins = true
require_signed_commits = false
required_status_checks {
strict = false
@ustropo
ustropo / api.py
Created March 27, 2020 00:11
Exemplo de configuração de API usando Python Eve
from eve import Eve
from .sensor_manager import TempSensorManager
# API configuration
SETTINGS = {
'DOMAIN': {
'sensors': {
'schema': {
'_id': {'type': 'string', 'unique': True},
@FBosler
FBosler / code.py
Created February 21, 2020 18:43
functools.py
from functools import lru_cache
from datetime import datetime
@lru_cache(maxsize=None)
def fib_cache(n):
if n < 2:
return n
return fib_cache(n-1) + fib_cache(n-2)
def fib_no_cache(n):