A LAMP sandbox appliance image for use with VirtualBox
- LAMP - 5.4.17
- phpMyAdmin
- Git
from flask import Flask, jsonify | |
app = Flask(__name__) | |
@app.route("/") | |
def index(): | |
data = { | |
"header": [ | |
"Date", | |
"Payment Id" |
A LAMP sandbox appliance image for use with VirtualBox
▶ docker build -t shakyshane/laravel-app -f ./app.dockerfile . | |
Sending build context to Docker daemon 721.4 kB | |
Step 1/8 : FROM shakyshane/laravel-php:latest | |
---> dd18f9511e64 | |
Step 2/8 : COPY composer.lock composer.json /var/www/ | |
---> Using cache | |
---> 874dac8074d3 | |
Step 3/8 : COPY database /var/www/database | |
---> Using cache | |
---> dd57d56da83e |
from django.core import serializers | |
from product.models import Product, Author | |
import json | |
# Pretty Printing a model instance by converting it to JSON | |
# assuming obj is a model instance | |
author_id = 6417 | |
products = Product.objects.filter(author_id=author_id) | |
serialized_obj = serializers.serialize('json', [ products[0], ]) |
* MORE INFORMAL | |
- "What are you doing in Python that is exciting you / you consider 'cutting-edge' / what's interesting to you in Python a.t.m | |
* Do you know what a PEP is 'Zen of Python'? Favourite line from zen of Python and why? | |
- 'Although never is often better than *right* now. | |
+ Because it implies that rushing will cause problems until property digested and discussed | |
* Has your previous Python projects been secure? In what way have you had to optimise for security? |
Redis timeseries
Running playground container for testing out redistimeseries
docker run
-p 6379:6379 \
{ | |
"query": { | |
"bool": { | |
"should": [ | |
{ | |
"match": { | |
"isbn_keyword": "9780008179823" | |
} | |
} | |
] |
# | |
#DO droplet metadata intro + for DO-API | |
# [https://www.digitalocean.com/community/tutorials/an-introduction-to-droplet-metadata#how-to-retrieve-droplet-metadata#digitalocean-api] | |
# | |
#intro to cloud-config scripting (source of following examples) | |
# [https://www.digitalocean.com/community/tutorials/an-introduction-to-cloud-config-scripting] | |
# | |
#howto | |
# [https://www.digitalocean.com/community/tutorials/how-to-use-cloud-config-for-your-initial-server-setup] | |
# |
If children live with hostility they learn to fight. If children live with kindness and consideration, they learn respect. Excerpt from "Child Learn What They Live" by Dorothy Law Nolte.
I found this book to offer pragmatic and practical approaches to understanding and dealing with defiant children. Dr. Jeffrey Bernstein is a licensed psychologist who specalised in child and family therapy. Much of the ideas in this book are backed by research and his case history.
Lisa and I read this at roughly the same time. This proved a useful strategy because we could discuss the content in relation to our day-to-day parenting.
<!doctype html> | |
<html lang="en" class="no-js"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1"> | |