Skip to content

Instantly share code, notes, and snippets.

View playpauseandstop's full-sized avatar

Igor Davydenko playpauseandstop

View GitHub Profile
@playpauseandstop
playpauseandstop / App.tsx
Created September 28, 2021 16:01
Code to reproduce parcel-bundler/parcel#6642 issue
import * as Sentry from '@sentry/react'
import React, { FC, ReactElement } from 'react'
export const App: FC = () => <p>Hello, world!</p>
export const createApp = (): ReactElement => (
<Sentry.ErrorBoundary>
<App />
</Sentry.ErrorBoundary>
)
@playpauseandstop
playpauseandstop / README.rst
Last active July 14, 2020 14:09
Check latest GitHub actions releases.

check-latest-actions

Check latest GitHub actions releases.

Requirements

@playpauseandstop
playpauseandstop / Dockerfile.pip19
Last active March 7, 2020 22:16
pyproject.toml
FROM playpauseandstop/docker-python:3.2.0-py38
RUN pip install pip==19.2.3
RUN pip install pyheif==0.4
CMD ["python"]
[tool.black]
exclude = "^.*/migrations/.*$"
line_length = 79
target_version = ["py37"]
[tool.poetry]
name = "project"
version = "1.0.0"
description = "Project"
authors = ["Team <[email protected]>"]
@playpauseandstop
playpauseandstop / show-hook-dependencies.sh
Last active October 29, 2019 20:44
Show latest pre-commit hook dependencies.
#!/bin/bash
#
# Script to show list of dependencies for pre-commit hook.
#
# Requirements
# ============
#
# - [curl](https://curl.haxx.se/)
# - [jq](https://stedolan.github.io/jq/)
# - [npm](https://www.npmjs.com/)
@playpauseandstop
playpauseandstop / README.md
Created July 10, 2019 21:20
Script to update Python version for projects with pyenv & poetry

update-python.sh

Script to update Python version for projects with pyenv & poetry

Pre-requisites

This script intended to be run for projects which,

  1. Has .pyenv-version file (Python version managed by pyenv)
  2. Can be installed with make install (or make install-api)
@playpauseandstop
playpauseandstop / env-pip-check
Last active July 9, 2016 09:44
Tiny wrapper around pip-check cmd, to run it inside venv Python first
#!/bin/bash
#
# Tiny shell script to run ``pip-check`` cmd inside of venv or fallback to
# global ``pip-check`` after.
#
# `pip-check <https://github.com/bartTC/pip-check/>`_ is a tool for checking
# outdated versions installed in your Python virtual environment or global
# site packages.
#
# Usage
@playpauseandstop
playpauseandstop / Makefile
Last active August 3, 2021 18:22
Setup aiohttp web app with Session Middleware to use Redis Storage and run under Gunicorn.
.PHONY: clean distclean install run
ENV ?= env
VENV = $(shell python -c "import sys; print(int(hasattr(sys, 'real_prefix')));")
ifeq ($(VENV),1)
GUNICORN = gunicorn
else
GUNICORN = $(ENV)/bin/gunicorn
endif
@playpauseandstop
playpauseandstop / pip-list-updates.sh
Last active August 29, 2015 14:04
Check out available updates for virtual environment or system libraries with pip
#!/bin/bash
#
# Check out available updates for virtual environment or system libraries with
# `pip <http://pip.pypa.org/>`_.
#
# Requirements
# ============
#
# * GNU/Linux, Mac OS X
# * `pip`_ 1.4 or higher
@playpauseandstop
playpauseandstop / arange.py
Last active August 29, 2015 13:56
Range function for Decimals and floats and any other objects which supports addition
import operator
def arange(start, stop=None, step=None):
"""
Implement range function not only for integers as Python's builtin
function, but for Decimals and floats as well.
Returns generator with arithmetic progession, not list.