Skip to content

Instantly share code, notes, and snippets.

@zrks
zrks / app-Dockerfile
Last active April 4, 2025 14:40
docker-compose.yaml
FROM python:3.11-slim
WORKDIR /app
# Install dependencies
RUN pip install flask kubernetes redis
# Copy files
COPY watcher.py /app/watcher.py
COPY web.py /app/web.py
https://github.com/muesli/gitomatic.git
https://github.com/muesli/gitomatic.git
package com.example.marcis.myapplication.feature;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
@zrks
zrks / Jenkinsfile
Last active December 28, 2017 06:33
DevOps for powerpoint
pipeline {
agent {
label "master"
}
environment {
CONFIGURATION_FILENAME = "presentation.yml"
PRESENTATION_NAME = "devops-for-powerpoint.pptx"
}
@zrks
zrks / generate.py
Last active February 1, 2017 10:59
jinja2 Templating Primer
"""
For full reference check: http://jinja.pocoo.org/docs/2.9/api/
"""
import logging
import json
import yaml
from jinja2 import Environment, FileSystemLoader, select_autoescape
@zrks
zrks / hadolint.png
Last active June 30, 2016 09:48
Hooks demonstration
hadolint.png
@zrks
zrks / test-jira.py
Last active April 1, 2016 08:38
Sample Jira ticket status change.
import os
from jira import JIRA
# http://jira.readthedocs.org/en/latest/#quickstart
from git import Repo
# http://gitpython.readthedocs.org/en/stable/tutorial.html
from settings import * # Add your own settings file!
{
"twopac" : {
"greatest_song" : "California Love",
"greatest_album" : "Me against the world",
"quotes" : [{"song" : "Hit em up",
"line" : "Killing ain't fair, but somebody's got to do it."}]
},
"eminem" : {
"greatest_song" : "Berzerk",
"greatest_album" : "Infinite",
@zrks
zrks / log_reader.py
Last active January 15, 2016 11:31
log_reader.py
import time
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
class MyHandler(FileSystemEventHandler):
def __init__(self):
self.last_line_count = 0
from pprint import pprint
import pygame
class GamePiece:
def __init__(self):
self.checked = False