This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM frolvlad/alpine-miniconda3 | |
RUN apk --update add apk-tools-static busybox-static gcc flatpak musl-dev linux-headers python3-dev libjpeg-turbo-dev | |
RUN apk --update add gcc musl musl-dev linux-headers python3-dev libjpeg-turbo-dev | |
RUN pip install ptvsd maixpy3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install QEMU OSX port with ARM support | |
sudo port install qemu +target_arm | |
export QEMU=$(which qemu-system-arm) | |
# Dowload kernel and export location | |
curl -OL \ | |
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.4.34-jessie | |
export RPI_KERNEL=./kernel-qemu-4.4.34-jessie | |
# Download filesystem and export location |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// libsass (v3.2.5) | |
// ---- | |
@mixin breaker($compact-selector) { | |
#{$compact-selector} & { | |
@content | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Writing testable HTML | |
When you want to test interaction in the UI, you often want to verify the state of a particular element. You might think of adding an id attribute so you can look up the element easily, but that is a bad solution. | |
The id attribute should only be used for elements that are inherently unique on the page. With changing requirements and future reuse it is hard to say which elements are unique. It also limits testing in parallel. If for instance a test runner renders a component multiple times without cleaning up the DOM to run the fastest, the test might not be working on the right element as 'getElementById' will not complain about multiple elements with the same id, it is also not defined which one it will get. Usually it is the first matching in the s a rule of thumb you should never use the id attribute outside pages served by the server; Never in views and templates. | |
To make an element easy to fetch in a test, put a unique attribute on it, and use CSS or xpath selector to match it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import with_statement | |
import sys,os,yaml | |
def split_file(content,header): | |
if content[:3] == "---": | |
parts = content.split("---") | |
matter = yaml.load(unicode(parts[1],"utf-8")) or {} | |
for key in header.keys(): | |
matter[key] = header[key] |