This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
<?php | |
/** | |
* Make asynchronous requests to different resources as fast as possible and process the results as they are ready. | |
*/ | |
class Requests | |
{ | |
public $handle; | |
public function __construct() | |
{ |
""" | |
From http://harkablog.com/inside-the-django-orm-aggregates.html | |
with a couple of fixes. | |
Usage: MyModel.objects.all().annotate(new_attribute=Concat('related__attribute', separator=':') | |
""" | |
from django.db.models import Aggregate | |
from django.db.models.sql.aggregates import Aggregate as SQLAggregate |
On M1 machines, Docker for Mac is running a lightweight linux ARM VM, then running containers within that, so containers are essentially running natively. Don't be fooled by the fact the UI or binary CLI tools (e.g. docker
) might require Rosetta.
Within that VM is an emulation layer called QEmu. This can be used by docker to run Intel containers. This does not use Rosetta at all, and has a roughly 5-6X performance penalty. (If you just upgraded your CPU this may result in a similar performance to your old machine!)
Many images in public registries are multi-architecture. For instance at the time of writing on Docker Hub the php:8.0-cli
image has the following digests:
@startuml | |
' uncomment the line below if you're using computer with a retina display | |
' skinparam dpi 300 | |
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >> | |
' we use bold for primary key | |
' green color for unique | |
' and underscore for not_null | |
!define primary_key(x) <b>x</b> | |
!define unique(x) <color:green>x</color> | |
!define not_null(x) <u>x</u> |
# Usage: powershell ExportSchema.ps1 "SERVERNAME" "DATABASE" "C:\<YourOutputPath>" | |
# Start Script | |
Set-ExecutionPolicy RemoteSigned | |
# Set-ExecutionPolicy -ExecutionPolicy:Unrestricted -Scope:LocalMachine | |
function GenerateDBScript([string]$serverName, [string]$dbname, [string]$scriptpath) | |
{ | |
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null |
In a terminal start a server.
$ python -m SimpleHTTPServer 8000
In another terminal set up the cgroups freezer.
module GADTMotivation | |
(* | |
Here is a simple motivational example for GADTs and their usefulness for library design and domain modeling. Suppose we | |
need to work with settings which can be displayed and adjusted in a GUI. The set of possible setting "types" is fixed | |
and known in advance: integers, strings and booleans (check-boxes). | |
The GUI should show an example value for each possible setting type, e.g. 1337 for an integer setting and "Hello" for a | |
string setting. How can we model this small domain of setting types and computing example values? | |
*) |