Warning
This is a rather old guide and may or may not work with modern versions of Android.
- Boot into TWRP
- Connect device to computer
- Terminal: List devices with
adb devices
// SVG URL | |
// | |
// Generate an escaped SVG for data URIs. | |
// | |
// Usage: | |
// .selector { | |
// background-image: svg-url('<svg>…</svg>'); | |
// } | |
// | |
// Source: |
/** | |
* Modern browsers support the `once` option for event listeners: | |
* https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#parameters | |
*/ | |
module.exports = function(target, type, callback) { | |
let eventWrapper = function(event) { | |
target.removeEventListener(type, eventWrapper); | |
callback(event); | |
}; |
// Modern browsers have support for the CSS clamp function: | |
// https://developer.mozilla.org/en-US/docs/Web/CSS/clamp() | |
// Source: https://css-tricks.com/snippets/css/fluid-typography/ | |
@mixin fluid-type($min-font-size, $max-font-size, $min-vw: $breakpoint-min, $max-vw: $breakpoint-max) { | |
$u1: unit($min-vw); | |
$u2: unit($max-vw); | |
$u3: unit($min-font-size); | |
$u4: unit($max-font-size); |
/** | |
* Visually hides elements but keeps them accessible for screen readers and | |
* keyboard users. | |
* | |
* Source: | |
* https://allyjs.io/tutorials/hiding-elements.html#2017-edition-of-visuallyhidden | |
*/ | |
.sr-only:not(:focus):not(:active) { | |
position: absolute; |
/** | |
* Use Mitt instead: https://github.com/developit/mitt | |
*/ | |
const EventBus = { | |
topics: {}, | |
subscribe: function (topic, listener) { | |
// Create topic if not yet created | |
if (!this.topics[topic]) { |
# Source: | |
# https://github.com/moby/moby/issues/10032#issuecomment-310023443 | |
docker stop $(docker ps -a -q) & docker update --restart=no $(docker ps -a -q) |
wget --mirror --page-requisites --adjust-extension --convert-links --no-clobber --domains=domain.tld https://domain.tld |
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO |
@function json-stringify ($map) { | |
$result: '{'; | |
@each $key, $value in $map { | |
$result: $result + '"#{$key}":'; | |
@if type-of($value) == 'map' { | |
$result: $result + json-stringify($value); | |
} @else { | |
$result: $result + '"#{$value}"'; |