Skip to content

Instantly share code, notes, and snippets.

@andreyrusanov
andreyrusanov / Dockerfile
Last active September 21, 2022 09:44 — forked from maroux/Dockerfile
Spanner performance debug
#############################
FROM python:3.7.7-slim-buster
RUN pip install \
google-api-core[grpc,grpcgcp]==1.22.2 \
google-cloud-core==1.4.1 \
google-cloud-spanner==2.0.0 \
googleapis-common-protos[grpc]==1.52.0 \
grpc-google-iam-v1==0.12.3 \
grpcio-gcp==0.2.2 \
@andreyrusanov
andreyrusanov / Dockerfile
Created September 21, 2022 07:58 — forked from maroux/Dockerfile
Spanner performance debug
#############################
FROM python:3.7.7-slim-buster
RUN pip install \
google-api-core[grpc,grpcgcp]==1.22.2 \
google-cloud-core==1.4.1 \
google-cloud-spanner==2.0.0 \
googleapis-common-protos[grpc]==1.52.0 \
grpc-google-iam-v1==0.12.3 \
grpcio-gcp==0.2.2 \
@andreyrusanov
andreyrusanov / gist:7e085289d5c937a4c224f43ecaf7068b
Last active January 21, 2019 13:35
Remove all Git tags except certain
# Locally:
git tag | grep -v "staging.*\|production.*" | xargs git tag -d
# Remote:
git tag | grep -v "staging.*\|production.*" | xargs -n 1 git push --delete origin
@andreyrusanov
andreyrusanov / MariaDB.Dockerfile
Last active July 26, 2017 11:34
Maria DB from dump
FROM mariadb:10.3
ENV MYSQL_ROOT_PASSWORD=1111 MYSQL_DATABASE=db MYSQL_USER=user MYSQL_PASSWORD=1111
ADD dump.sql /docker-entrypoint-initdb.d/db.sql
@andreyrusanov
andreyrusanov / pedantically_commented_playbook.yml
Created December 29, 2016 06:28 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
arch -i386 pip install Skype4Py
@andreyrusanov
andreyrusanov / todo_keeper.py
Created May 5, 2015 08:08
Terminal todo list
#!/usr/bin/env python
import os
import shelve
import functools
import time
import collections
import argparse
from abc import ABCMeta, abstractmethod
SHELVE_DB_FILE = os.path.join(os.path.dirname(__file__), 'storage.shelve')
import pymongo
from pymongo import Connection
from pymongo.dbref import DBRef
from pymongo.database import Database
# connect
connection = Connection()
db = Database(connection, "things")
# clean up