A prompt to boost your lazy "do this" prompts. Install with one of the buttons below.
| version: '3.7' | |
| services: | |
| dynamodb-local: | |
| image: amazon/dynamodb-local:latest | |
| container_name: dynamodb-local | |
| ports: | |
| - "8000:8000" | |
| dynamodb-admin: | |
| image: aaronshaf/dynamodb-admin |
| const shapeArea = n => Math.pow( n, 2 ) + Math.pow( n - 1, 2 ); |
| fastlane_version "2.64.1" | |
| default_platform :android | |
| platform :android do | |
| lane :beta do | |
| gradle(task: "assembleRelease") | |
| appcenter_upload( | |
| api_token: "", |
| kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod |
When spinning up a new service, Amazon Elastic LoadBalancer needs to check if the service is live and running.
This check is done from an IP (from any IP in a private IP range) to the service, this is done by the ELB just doing a simple GET request to a specified path, with no host information - for example GET /heatbeat.
If this instance is a Django service, regardless of the page accessed, this call will fail as in a properly setup Django it is very unlikely that the IP will be in Django's settings.ALLOWED_HOSTS settings.
There are two ways around this, either:
a. Add every IP from every private IP range into your Django project's ALLOWED_HOSTS settings
| import React from "react"; | |
| import { render } from "react-dom"; | |
| const ParentComponent = React.createClass({ | |
| getDefaultProps: function() { | |
| console.log("ParentComponent - getDefaultProps"); | |
| }, | |
| getInitialState: function() { | |
| console.log("ParentComponent - getInitialState"); | |
| return { text: "" }; |
| from django.contrib import admin | |
| from django.contrib.auth import admin as auth_admin | |
| from .models import * | |
| from forms import UserChangeForm, UserCreationForm | |
| class UserAdmin(auth_admin.UserAdmin): | |
| fieldsets = ( | |
| (None, {'fields': ('email', 'password')}), | |
| ('Personal info', {'fields': ('first_name', 'last_name', 'twitter', 'photo', 'event')}), |
| .list-group-horizontal .list-group-item { | |
| display: inline-block; | |
| } | |
| .list-group-horizontal .list-group-item { | |
| margin-bottom: 0; | |
| margin-left:-4px; | |
| margin-right: 0; | |
| } | |
| .list-group-horizontal .list-group-item:first-child { | |
| border-top-right-radius:0; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.