Place this in ~/.kodi/userdata/keymaps/customkeys.xml
<keymap>
<visualisation>
<keyboard>
<key id="166">volumeup</key>
<key id="167">volumedown</key>
<key id="168">skipnext</key>
<key id="169">skipprevious</key>
playpause
#!/usr/bin/env bash | |
# TODO: test wayland gamescope session | |
export DISPLAY=:0 # vnc | |
export WAYLAND_DISPLAY=:2 # xwayland | |
export DXVK_HDR=1 | |
export ENABLE_GAMESCOPE_WSI=1 | |
# Check existing X server | |
start_x() { |
#!/bin/sh | |
source /etc/gamescope-session.conf | |
export SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS=0 | |
# Source environment from ~/.config/environment.d | |
set -a | |
for i in ~/.config/environment.d/*.conf ; | |
do | |
[[ -f "${i}" ]] && source "${i}" |
// https://piccalil.li/blog/a-modern-css-reset | |
/* Box sizing rules */ | |
*, | |
*::before, | |
*::after { | |
box-sizing: border-box; | |
} | |
/* Remove default margin */ |
:root { | |
--gutter: 32px; | |
} | |
@media screen and (min-width: 782px) { | |
/* For the '25's' in the 25 / 50 / 25 variation */ | |
.wp-block-column[style='flex-basis:25%'] { | |
flex-basis: calc(var(--gutter) * 2) !important; |
Place this in ~/.kodi/userdata/keymaps/customkeys.xml
<keymap>
<visualisation>
<keyboard>
<key id="166">volumeup</key>
<key id="167">volumedown</key>
<key id="168">skipnext</key>
<key id="169">skipprevious</key>
playpause
# sunrise.py | |
# colors = [ | |
# {"r": 0, "g": 0, "b": 0}, | |
# {"r": 255, "g": 0, "b": 0}, | |
# {"r": 0, "g": 255, "b": 0}, | |
# {"r": 0, "g": 0, "b": 255}, | |
# {"r": 255, "g": 255, "b": 255}, | |
# {"r": 0, "g": 0, "b": 0} | |
# ] |
#!/bin/bash | |
# Automatically setup routing and DNS for a PiZero connected over a USB-network | |
# NOTE: Before running this script for the first time, you need to run the | |
# following two commands on your Linux PC | |
# sudo sysctl -w net.ipv4.ip_forward=1 | |
# sudo iptables -t nat -A POSTROUTING -s 169.254.0.0/16 -o eth0 -j MASQUERADE | |
# (replace eth0 in the second command with your internet-facing network device, | |
# e.g. wlan0 on a laptop) | |
# The Avahi-discovered hostname |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
<?php | |
/* output instagram widget */ | |
the_widget( | |
'null_instagram_widget', | |
array( | |
'username' => 'username', | |
'title' => '', | |
'number' => '1', | |
'size' => 'large', | |
'target' => '_blank', |