Skip to content

Instantly share code, notes, and snippets.

View webjunkie's full-sized avatar

Julian Bez webjunkie

View GitHub Profile
@gene1wood
gene1wood / aws-lambda-relative-import-no-known-parent-package.md
Last active March 15, 2024 14:13
Python relative imports in AWS Lambda fail with `attempted relative import with no known parent package`

Python relative imports in AWS Lambda fail with attempted relative import with no known parent package

The Problem

In AWS Lambda if I attempt an explicit relative import like this

.
├── lambda_file.py
└── example.py

How we incorporate next and cloudfront (2018-04-21)

Feel free to contact me at robert.balicki@gmail.com or tweet at me @statisticsftw

This is a rough outline of how we utilize next.js and S3/Cloudfront. Hope it helps!

It assumes some knowledge of AWS.

Goals

@y13i
y13i / generic_aws_network.yml
Last active February 13, 2021 11:18
Generic AWS VPC Networking Template
Description: Generic AWS VPC Networking
Parameters:
PrivateToInternetAccess:
Type: String
Description: If true, NAT Gateways and Elastic IPs will be created for the internet access from private subnets.
AllowedValues:
- "false"
- "true"
Default: "false"
CidrPrefix:
@jensens
jensens / INSTALL.rst
Last active April 13, 2019 09:43
sentry setup with docker-compose

In order to run this image do: docker-compose up -d to get all up. On first run DB initialization and initial user setup is done like so:

First start a bash in the container: docker-compose exec sentry /bin/bash. Then, inside bash, do sentry upgrade wait until it asks you for an inital user. When finished exit the bash.

When in doubt check with docker-compose ps if all went fine.

@simonw
simonw / pixel_gif.py
Created April 9, 2014 07:27
Return a 1x1 pixel gif from Django (e.g. for a dynamic tracking pixel)
from django.http import HttpResponse
PIXEL_GIF_DATA = """
R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
""".strip().decode('base64')
def pixel_gif(request):
return HttpResponse(PIXEL_GIF_DATA, content_type='image/gif')
" vim:fdm=marker
"
" =============================================================================
" vim-plug {{{
" =============================================================================
call plug#begin('~/.vim/bundle')
function! BuildYCM(info)
" info is a dictionary with 3 fields
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 21, 2024 05:35
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k