This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.lapanthere.bohemia | |
import kotlinx.coroutines.flow.Flow | |
import kotlinx.coroutines.flow.flow | |
import org.apache.kafka.clients.consumer.ConsumerRecord | |
import org.apache.kafka.clients.consumer.KafkaConsumer | |
import java.time.Duration | |
fun <K, V> KafkaConsumer<K, V>.asFlow(timeout: Duration = Duration.ofMillis(500)): Flow<ConsumerRecord<K, V>> = |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
secure-agent --generate-completion-script fish | |
secure-agent --generate-completion-script bash | |
secure-agent --generate-completion-script zsh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from django.contrib.auth.decorators import login_required | |
from django.utils.cache import patch_response_headers | |
from django.utils.decorators import method_decorator | |
from django.views.decorators.cache import cache_page, never_cache | |
from django.views.decorators.csrf import csrf_exempt | |
class NeverCacheMixin(object): | |
@method_decorator(never_cache) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fabric.api import env, run, sudo, local, put | |
def production(): | |
"""Defines production environment""" | |
env.user = "deploy" | |
env.hosts = ['example.com',] | |
env.base_dir = "/var/www" | |
env.app_name = "app" | |
env.domain_name = "app.example.com" | |
env.domain_path = "%(base_dir)s/%(domain_name)s" % { 'base_dir':env.base_dir, 'domain_name':env.domain_name } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
from boto.s3.connection import S3Connection | |
AWS_ACCESS_KEY = '<aws access key>' | |
AWS_SECRET_KEY = '<aws secret key>' | |
AWS_BUCKET_NAME = '<aws bucket name>' | |
AWS_HEADERS = { | |
'Cache-Control':'max-age=31556926,public' | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# encoding: utf-8 | |
import sys, json, urllib | |
from optparse import OptionParser | |
def main(): | |
parser = OptionParser() | |
parser.add_option("-e", "--extension", action="append", type="string", dest="extensions", help="specify domain extension", default=[]) | |
parser.add_option("-a", "--availability", action="store", type="choice", choices=["taken", "maybe", "available", "unavailable", "tld"], dest="availability", help="specifiy level of availability", default="available") | |
parser.set_defaults(verbose=True) |