Skip to content

Instantly share code, notes, and snippets.

View iamjenechka's full-sized avatar
wow!

Jenechka iamjenechka

wow!
View GitHub Profile
@iamjenechka
iamjenechka / s3baby.py
Last active April 2, 2024 13:42
Getting s3 connection uri for airflow
import json
from airflow.models.connection import Connection
c = Connection(
conn_id='s3conn',
conn_type='s3',
extra=json.dumps({"host":"http://hostname/", "aws_access_key_id":"id", "aws_secret_access_key": "secret"}),
)
c.get_uri()
@iamjenechka
iamjenechka / README.md
Created August 25, 2022 14:49 — forked from seansawyer/README.md
Managing OpenStack instances with Ansible through an SSH bastion host

Managing OpenStack instances with Ansible through an SSH bastion host

I'm be using DreamCompute as my OpenStack provider, but there are dozens to choose from. I assume you already have Ansible and the OpenStack CLI tools installed.

Motivation

With the proliferation of OpenStack public clouds offering free and intro tiers, it's becoming very easy to effectively run a simple application for free or nearly free. Also with the emergence of Ansible, you don't need to learn and deploy complicated tools to do configuration management.

@iamjenechka
iamjenechka / wireguard.conf
Created August 25, 2022 14:49 — forked from nealfennimore/wireguard.conf
Wireguard VPN - Forward all traffic to server
# ------------------------------------------------
# Config files are located in /etc/wireguard/wg0
# ------------------------------------------------
# ---------- Server Config ----------
[Interface]
Address = 10.10.0.1/24 # IPV4 CIDR
Address = fd86:ea04:1111::1/64 # IPV6 CIDR
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Add forwarding when VPN is started
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE; ip6tables -D FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -D POSTROUTING -o eth0 -j MASQUERADE # Remove forwarding when VPN is shutdown
@iamjenechka
iamjenechka / exercise-slices.go
Created February 28, 2022 08:33 — forked from bilsalak/exercise-slices.go
A Tour of Go - Exercise: Slices
// Implement Pic. It should return a slice of length dy, each element of which is
// a slice of dx 8-bit unsigned integers. When you run the program, it will display your picture,
// interpreting the integers as grayscale (well, bluescale) values.
//
// The choice of image is up to you. Interesting functions include (x+y)/2, x*y, and x^y.
//
// (You need to use a loop to allocate each []uint8 inside the [][]uint8.)
//
// (Use uint8(intValue) to convert between types.)
package main
@iamjenechka
iamjenechka / docker_lxc.md
Created November 24, 2021 16:58 — forked from kuanghan/docker_lxc.md
Setting up docker to run in a PRIVILEGED LXC container

Setting up docker to run in a PRIVILEGED LXC container

Set up a privileged container

Create container

Let's call the container docker_test1.

$ sudo lxc-create -t download -n docker_test1
...
Follow the prompts on the screen to set up the new container.
@iamjenechka
iamjenechka / zathu
Created October 20, 2018 15:51 — forked from michaelmrose/zathu
zathura config
# Zathura configuration file
# See man `man zathurarc'
# Open document in fit-width mode by default
set adjust-open "best-fit"
# One page per row by default
set pages-per-row 1
#stop at page boundries