Skip to content

Instantly share code, notes, and snippets.

View neovintage's full-sized avatar
😅
data is always moving

Rimas Silkaitis neovintage

😅
data is always moving
View GitHub Profile
# Makefile for a go project
#
# Author: Jon Eisen
# site: joneisen.me
#
# Targets:
# all: Builds the code
# build: Builds the code
# fmt: Formats the source files
# clean: cleans the code
@neovintage
neovintage / postgres_table_size.sql
Created August 13, 2015 21:03
Get Size of Postgres Tables
SELECT relname as "Table",
pg_size_pretty(pg_total_relation_size(relid)) As "Size",
pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as "External Size"
FROM pg_catalog.pg_statio_user_tables
ORDER BY pg_total_relation_size(relid) DESC;
@neovintage
neovintage / ssl_everywhere.py
Created September 30, 2015 15:37
SSL Support for Airflow
from flask import Blueprint, redirect, url_for, request, current_app
from airflow.plugins_manager import AirflowPlugin
YEAR_IN_SECS = 31536000
ssl_bp = Blueprint('ssl_everything', __name__)
@ssl_bp.before_app_request
def before_request():
app = current_app._get_current_object()
@neovintage
neovintage / main.cr
Created November 29, 2016 15:47
Generics and Constants
module Something(T)
macro extended
alias Somethingelse = ({{ @type.id }} | Nil)
WHATEVER = [] of Somethingelse
def self.add(item : Somethingelse)
WHATEVER.push(item)
end
end
@neovintage
neovintage / storable_types.cr
Created January 24, 2017 17:39
Storable Types for Kemal-Session
require "json"
STORABLE_TYPES = [] of Nil
class StorageInstance
macro finished
alias StorableObjects = Union({{ *STORABLE_TYPES }})
end
JSON.mapping({
@neovintage
neovintage / principles.md
Created May 28, 2019 16:10
Rimas Product Principles

Background

I wrote these at the beginning of my journey within product management and these principles guide my decision making on a daily basis. These principles were written from the perspective of doing product management for data products but most could easily be used for other industries.

Principles

  • Grow. Products not growing faster than the market are becoming less relevant over time.
  • We are a subscription product. Customers buy us every second. We survive if they keep choosing us daily.
  • Ask yourself: "what am I requiring a user learn? how would they know to find this? when would they look?"
  • First, write down the problem.
@neovintage
neovintage / principles.md
Last active July 21, 2023 16:33
Rimas Product Principles

Background

I wrote these at the beginning of my journey within product management and these principles guide my decision making on a daily basis. These principles were written from the perspective of doing product management for data products but most could easily be used for other industries.

Principles

  • Grow. Products not growing faster than the market are becoming less relevant over time.
  • We are a subscription product. Customers buy us every second. We survive if they keep choosing us daily.
  • Ask yourself: "what am I requiring a user learn? how would they know to find this? when would they look?"
  • First, write down the problem.
@neovintage
neovintage / conduit_api_call.sh
Created March 31, 2022 23:14
Conduit Connect Wrapper API Call
curl --header "Content-Type: application/json" \
--request POST
--data '{
"type": "TYPE_SOURCE",
"plugin": "~/kafka-connector-plugin",
"pipeline_id": "...",
"config": {
"name": "my-pg-source",
"settings": {
"wrapper.connector.class": "io.aiven.connect.jdbc.JdbcSourceConnector",