Skip to content

Instantly share code, notes, and snippets.

View jensneuhaus's full-sized avatar
🔥
Building Foundation as a Service

Jens Neuhaus jensneuhaus

🔥
Building Foundation as a Service
View GitHub Profile
@jensneuhaus
jensneuhaus / settings.json
Created February 6, 2024 16:37 — forked from adamghill/settings.json
VS Code settings
{
"editor.minimap.enabled": false,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[html]": {
"editor.insertSpaces": true,
"editor.tabSize": 2,
"editor.defaultFormatter": "HookyQR.beautify"
},
.PHONY: help
POSTGRES_SERVICE=postgres
REDIS_SERVICE=redis
help: # This help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
##########################
@jensneuhaus
jensneuhaus / hello.md
Last active May 1, 2020 09:14
Hello there

👋 Hello there!

I am the founder of Pixelpassion. We develop scalable, user-friendly web applications!

🚀 Our references

  • a mobile payment app ("wallet") for one of the biggest german banks
  • a platform for a temporary employment agency to do sales and manage facilities, jobs and employees
  • a SEO-heavy platform to search and connect with real estate agents and see their portfolios
  • a project management SaaS platform for design agencies to create offers, invoices and track progress of projects & hours
@jensneuhaus
jensneuhaus / exceptions.py
Created December 18, 2019 18:16
django-rest-framework exception handling
### settings.py
REST_FRAMEWORK = {
"DEFAULT_PERMISSION_CLASSES": ("apps.metronom_commons.permissions.IsAuthenticatedAndDeleteAllowedOnlyToAdmin",),
"DEFAULT_AUTHENTICATION_CLASSES": (
"rest_framework_jwt.authentication.JSONWebTokenAuthentication",
"rest_framework.authentication.SessionAuthentication",
),
"NON_FIELD_ERRORS_KEY": "error",
"EXCEPTION_HANDLER": "apps.api.exceptions.core_exception_handler",
@jensneuhaus
jensneuhaus / Dockerfile
Created August 29, 2019 10:51
A more simple Dockerfile
# 1 Use the Python Slim
FROM python:3.7-slim
# 2 Force stdin, stdout and stderr to be totally unbuffered and don´t write .pyc or .pyo files
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
# 3 Create the Working dir and the staticfiles folder
RUN mkdir -p /app \
&& mkdir -p /venv \
&& mkdir -p /app/staticfiles
@jensneuhaus
jensneuhaus / Dockerfile
Last active August 29, 2019 10:44
Dockerfile Django project for usage with Pip, Heroku, Healthcheck
# 1 Use the Python Slim
FROM python:3.6.5-slim
# 2 Force stdin, stdout and stderr to be totally unbuffered and don´t write .pyc or .pyo files
ENV PYTHONUNBUFFERED=1 PYTHONDONTWRITEBYTECODE=1
# 3 Create the Working dir and the staticfiles folder
RUN mkdir -p /app \
&& mkdir -p /venv \
&& mkdir -p /app/staticfiles
@jensneuhaus
jensneuhaus / clean_push.sh
Created August 10, 2018 16:47
Create a clean commit to another repo (Usage: ./clean_push.sh <repo_name> "this is a new commit")
#!/bin/bash
set -e
echo "Using repository $1"
echo "Using commit message $2"
rm -rf /tmp/git-copy/
mkdir /tmp/git-copy/
git clone $1 /tmp/git-copy/
@jensneuhaus
jensneuhaus / circle.yml
Created March 13, 2017 12:16 — forked from jonah-williams/circle.yml
Automating deployments to Heroku from CircleCI
test:
override:
- bundle exec rspec spec
deployment:
acceptance:
branch: master
commands:
- ./script/heroku_deploy.sh <ACCEPTANCE_HEROKU_APP>:
timeout: 300